/* 
    Some styling pulled in from Foundry Portal;
    relevant license is included in the repo
*/

/* Fonts */
@font-face {
    font-family: 'NodestoCapsCondensed';
    src: url('../fonts/NodestoCapsCondensed.otf') format('opentype');
    font-style: normal;
}
@font-face {
    font-family: 'AmiriRegular';
    src: url('../fonts/AmiriBold.ttf') format('truetype');
}
@font-face {
    font-family: 'Signika';
    src: url('../fonts/SignikaRegular.ttf') format('truetype');
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes mock3dspin {
    0% { scale: 100% 100% 100%; }
    50% { scale: 0% 100% 100%;}
    100% { scale: 100% 100% 100%; }
}

a:link {
    color: unset;
}

body {
    margin: 0;
    padding: 1rem 2rem 0rem 2rem;
    font-family: "Signika", "Palatino Linotype", sans-serif;
    color: #eeeeee;
    background-image: url('../../refractory/img/BrickBG.webp');
    background-size: repeat;
    display: flex;
    flex-basis: 100%;
    flex-direction: column;
    min-height:95vh;
}

.headertext {
    font-size: 5em;
    font-family: 'NodestoCapsCondensed';
    font-weight: normal;
    letter-spacing: -0.1rem;
    line-height: 1;
    background: url('../../refractory/img/Refractory512.png') 50% 50% no-repeat;
    background-size: contain;
    display: table;
    text-shadow: 0 5px 5px black;
    margin: 0 0;
    user-select: none;
}

.horiflow {
    display: flex;
    flex-direction: row;
}

.flexcenter {
    justify-content: center;
}

.row-rev {
    flex-direction: row-reverse;
}

.vertiflow {
    display: flex;
    flex-direction: column;
}

.fillall {
    flex-basis: 100%;
}

.rounded-outline {
    outline: 1px orange solid;
    border-radius: 10px;
}

.bigbox {
    background-color: rgba(11, 11, 11, 40%);
    backdrop-filter: blur(3px);
    box-shadow: 0 0 20px rgb(11, 11, 11);
    height: 80vh;
    max-width: 80vw;
}

.instance-section {
    flex-grow: 1;
    margin: 1em 1em 0.3em 1em;
    padding: 0;
    max-height: 5em;
    overflow-x: scroll;
    overflow-y: hidden;
    scrollbar-width: none;
    align-content: baseline;
    flex-wrap: nowrap;
    flex-basis: 100%;
    scroll-behavior: smooth;
}


.world-section {
    margin: 1em 1em;
    flex-grow: 1;
    flex-wrap: wrap;
    overflow-y: scroll;
    scrollbar-width: none;
    justify-content: center;
    align-content: baseline;
}

button {
    all: unset;
    background: rgba(0,0,0,0.5);
    border: 2px solid rgb(90,90,90);
    vertical-align: middle;
    text-align: center;
    border-radius: 4px;
    color: #eeeeee;
    transition-duration: 0.1s;
}

button:hover {
    border: 2px solid orange;
}

button:active {
    background: color-mix(in srgb, orange 50%, rgba(0,0,0,0.5) 50%)
}

.header-button {
    padding: 0.5em 1em;
    margin: 0 0.3em;
}

.header-button > p {
    margin: 0 0;
}

.hiddenbutton {
    inherits: all;
    height:80%;
    width:100%;
    padding:0 0;
    margin:0 0;
    border: none;
    background-color: rgba(0,0,0,0);
}

.hiddenbutton:hover {
    border: none;
}

.hiddenbutton:active {
    background: rgba(0,0,0,0);
}

.fakebutton {
    background: rgba(0,0,0,0.5);
    border: 2px solid orange;
    vertical-align: middle;
    text-align: center;
    border-radius: 4px;
}

.instance-card {
    display: flex;
    position: relative;
    height:3em;
    aspect-ratio: 32/9;
    border: 2px solid black;
    background-size: cover;
    margin: 1em;
    transition: 0.1s;
    background-image: url('../../refractory/img/InstanceCard.png');
    padding: 0;
    align-content: center;
    justify-content: center;
}

.instance-card:hover{
    scale: 103%;
    border: 2px solid orange;
}

.game-card {
    position: relative;
    height:25vh;
    aspect-ratio: 16/9;
    border: 2px solid black;
    background-size: cover;
    margin: 1em;
    transition: 0.1s;
    background-image: url('../../refractory/img/BrickBG.webp');
    background-position: center;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.game-card:hover{
    scale: 103%;
    border: 2px solid orange;
}

.gamecard-bar {
    margin: 0 0.3em;
    padding: 1em;
    flex-grow: 1;
}

.gamecard-bar > button {
    padding: 0.1em 0.5em;
}

.status-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    height: 16px;
    width: 16px;
    /*border: 2px solid black;*/
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
}

.warning-status {
    background-color: yellow;
    /*animation: rotate 10s linear infinite;*/
}

.active-status {
    background-color: rgb(50,175,50);
    /*animation: rotate 10s linear infinite;*/
}

.loading-blocker[hidden]{
    display: none !important; 
}

.loading-blocker{
    position: fixed;
    height: 100%;
    width: 100%;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.5) 25%, rgba(0, 0, 0, 0.5) 75%, transparent 100%);
    backdrop-filter: blur(3px);
    z-index: 99999;
    display: flex;
    justify-content: center;
}

.loading-spinner {
    animation: mock3dspin 2s ease-out infinite;
    height: 30%;
    align-self: center;
}

.online-count {
    position: absolute;
    top: 8px;
    right: 8px;
    text-align: right;
    text-shadow: 1px 1px 4px black;
}

.card-title {
    font-family: "Signika", "Palatino Linotype", sans-serif;
    margin: 1rem 0 0 0;
    color: #eeeeee;
    font-size: 1.5em;
    text-align: center;
    padding: 1rem;
    text-shadow: 1px 1px 4px black;
    background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.5) 25%, rgba(0, 0, 0, 0.5) 75%, transparent 100%);
    text-wrap: auto;
    max-height: 2lh;
    overflow: scroll;
    scrollbar-width: none;
    overflow-wrap: break-word;
}

.card-hr {
  display: block;
  border-top: 2px solid #ffae00;
  mask-image: linear-gradient(270deg, transparent 0%, black 50%, transparent 100%);
  width: 80%;
  margin: 0 auto;
  color: transparent;
}

.card-instance-line {
    max-height: 2lh;
    overflow: scroll;
    scrollbar-width: none;
    text-shadow: 1px 1px 4px black;
    overflow-wrap: break-word;
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
  cursor: pointer;
}

.tooltiptext {
  visibility: hidden;
  background-color: #000000ee;
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  top: -5px;
  left: 105%;
  padding: 1em 2em;
  width: max-content;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}

.refractory-messages {
    position: fixed;
    background: #333377;
    pointer-events: none;
    animation: fadeout 10s linear forwards;
}

@keyframes fadeout {
    0% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

.refractory-message {
    border: 1px solid #444488;
    width: 100%;
    top: 2rem;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
}

.panel {
    padding: 1.5rem;
    margin: 1rem;
}
.main-panel {
    flex-grow: 70;
    text-align: center;
}
.thin-panel {
    flex-grow: 30;
    text-align: center;
}