/*================================*/
/*           INDEX.CSS            */
/*            KGARMIRE            */
/*================================*/

*{
    /*Keep it inside 100%*/
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

*:focus{
    outline:0;
}

html, body{
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
}

body{
    display:flex;
    background-color: #121212;
    overflow: hidden;
}

:root{
    --z-pieces:1;
    --z-hot-piece:2;

    --clr-alpha: steelblue;
    --clr-omega: seagreen;

    --clr-alpha-50 : #4682b480;
    --clr-omega-50 : #2e8b5780;
}

.flex{display:flex}
.fill{width:100%;height:100%}
.w-fill{width:100%}
.v-fill{height:100%}
.flip{transform: rotate(180deg);}
.v-center{margin: auto 0}
.relative{position: relative;}

h2{
    margin: auto 0; 
    font-family: "Quicksand", sans-serif; 
    font-weight: normal;
}

.view{
    width:100%;
    height:100%;
    display: none;
}

/*------------ READY ------------*/
#ready{ display:block; }

#ready .top-grid{
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    padding: 24px 0;
    height:100%;
    width:100%;
}

#ready .spinner-cont{
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    user-select: none;
    pointer-events: none;
}

#ready .spinner{
    margin: auto;
    width: 50%;
    height: auto;
    animation: spin 18s linear infinite;
    max-width: 300px;
}

#ready .spinner.bump{
    width: 55%;
    max-width: 325px;
}

#ready .carousel.omega{ margin-top: auto }
#ready .carousel.alpha svg{transform: rotate(180deg);}

#ready .carousel {
    height:96px;
    width: 100%;
}

#ready .carousel-cell{
    width: 100%;
    height: 96px;
    display:flex;
}

#ready .carousel-cell svg{
    height: 96px;
    width: auto;
    margin:auto;
}

/*------------- MAIN -------------*/
#game .top-grid{
    display:grid;
    grid-template-rows: auto 36px 1fr 36px auto;
    gap: 8px;

    height:100%;
    width:100%;
    max-width: 400px;
    margin:0 auto;

    /*border:1px dotted rgba(255,255,255,0.1);*/
    z-index : 0;
}

#game .turn-marker{
    height: 36px;
    width: 90%;
    margin: 0 5%;
    border-radius: 99px;
    color: #121212;
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: bold;

    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
}

/*------------ BOARD  ------------*/
#board {
    --margin:12px;
    width:calc(100% - (var(--margin) * 2));
    margin:auto var(--margin);
    aspect-ratio: 1 / 1;

    display:grid;
    grid-template-columns: repeat(6, 1fr);
    gap:8px;
}

.space{
    display: flex;
    background:rgba(255,255,255,0.2);
    width:100%;
    height:100%;

    color:white;
    font-family: monospace;
    font-size: 0.8rem;

    position: relative;
}

.space.active{background: rgba(255,255,255,0.5); }
.space.nbor{background: rgba(255,0,0,0.5); }

.space img.arrow{
    z-index: 99;
    display: none;
    position: absolute;
    height:80%;
    width:80%;
    margin:10%;
}


/*------------ PIECES ------------*/
.piece{
    position: absolute;
    z-index: 1;
    cursor: grab;
}
.piece:active{cursor: grabbing; }
.piece.onboard{cursor: default; }

.hot.piece{
    z-index: 2;
}

.piece svg{
    height:80%;
    width:80%;
    margin:10%;

    position: absolute;
}

/*----------- ROSTERS  -----------*/
.roster{
    display: flex;
    width:100%;
    min-height: 12px;
    padding:12px;
}

.roster .grid{
    display:grid;
    grid-template-columns: repeat(4, 1fr);
    height:100%;
    width:auto;
    margin:auto;
}

/*.alpha.roster{border-bottom:1px dotted rgba(255,255,255,0.1)}*/
/*.omega.roster{border-top:1px dotted rgba(255,255,255,0.1)}*/

.roster-slot{
    background-image:url("../graphics/dot.svg");
}

/*-------- VICTORY BANNER --------*/
#banner{
    display: none; 
    
    position: absolute;
    top: 0;
    left: 0;
    z-index: 9;
    height: 100%;
    width: 100%;
}

#banner.active{display: flex; }

#banner .color{
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    margin: auto 0;
    width: 100%;
    height: 25%;
}
/*#banner.alpha .color{ background-color: var(--clr-alpha-50);}*/
/*#banner.omega .color{ background-color: var(--clr-omega-50);}*/

#banner img{
    height: 48px;
    width: auto;
}

#banner .box{
    display: flex;
    padding: 24px;
    gap: 16px;
    font-size: 2rem;
    width: 100%;

    position: absolute;
    top: 0;
}
#banner .box.alpha{right: -100%; }
#banner .box.omega{left: -100%; }


