/* ----------------
STYLE SECTIONS
1. GLOBAL
2. FONTS
3. HEADER
4. MAIN
5. PANELS
6. PUZZLE AREA
7. GRID
8. MODAL
9. FOOTER
10. MEDIA QUERIES
---------------- */

/* 1. GLOBAL */

html {
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    box-sizing: border-box;
    height: -webkit-fill-available;

}
* {
    box-sizing: inherit;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    margin: 0;
    padding: 0;
}
p {
    font-family: tomarik-poster, sans-serif;
    font-size: 1.1rem;
}
button {
    display: block;
    font-size: .9rem;
    text-transform: uppercase;
    padding: .5rem 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
}

/* 2. FONTS */

h1,
h2,
h3 {
    font-family: 'Jua', sans-serif;
}
button,
header a,
li a,
td,
#puzzle-number,
#copyright {
    font-family: tomarik-extrovert, sans-serif;
}

/* 3. HEADER */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1rem 2rem;
}
header a,
header a:visited {
    font-size: 2.1rem;
    color: rgb(124, 151, 177);
    text-decoration: none;
}
#puzzle-piece {
    height: 1.5rem;
    cursor: pointer;
}
@media (hover: hover) {
    #puzzle-piece:hover {
        filter: saturate(1.5);
    }
}
nav {
    position: fixed;
    z-index: 3;
    top: 0;
    right: -100%;
    width: 25%;
    height: 100%;
    padding: 1rem;
    background-color: rgb(53, 66, 93);
    border-top: 1rem solid rgb(126, 202, 215);
    border-left: 1rem solid rgb(126, 202, 215);
    border-bottom: 1rem solid rgb(126, 202, 215);
    box-shadow: -2px 3px 4px 1px rgb(137, 141, 151);
}
#mochi-love {
    display: block;
    width: 50%;
    margin: 4rem auto 2rem;
}
#close-nav {
    font-family: monospace;
    font-size: 1.8rem;
    float: right;
    color: rgb(240, 248, 255);
    cursor: pointer;
}
@media (hover: hover) {
    #close-nav:hover {
        color: rgb(167, 240, 242);
    }
}
h3 {
    font-size: 1.2rem;
    letter-spacing: .25rem;
    text-align: center;
    color: rgb(135, 247, 228);
    margin: 2rem 0;
}
ul {
    margin-top: 3rem;
}
li {
    margin: 1.5rem 0;
    list-style: none;
}
li a {
    font-size: 1.2rem;
    color: rgb(240, 248, 255);
    text-decoration: none;
    padding: .5rem;
    border-left: .5rem solid rgb(53, 66, 93);
}
li a:hover {
    border-left: .5rem solid rgb(232, 245, 103);
    background-color: rgb(96, 125, 139);
    color: rgb(135, 247, 228);
}

/* 4. MAIN */

main {
    display: flex;
    justify-content: space-evenly;
    visibility: hidden;
}

/* 5. PANELS */

#panels {
    position: relative;
    width: 35%;
}
h1 {
    font-size: 1.6rem;
    color: rgb(53, 66, 93);
}
#rules {
    margin-bottom: 1rem;
}
#rules p {
    color: rgb(77, 78, 80);
}
.small-caps {
    text-transform: uppercase;
    color: rgb(156, 177, 196);
}
.nbsp {
    white-space: nowrap;
}
#tips-container {
    margin-bottom: 2rem;
}
#tips-container p {
    margin: 0;
}
#reveal-tips {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}
@media (hover: hover) {
    #reveal-tips:hover {
        color: rgb(94, 127, 156);
    }
}
#hidden-tips {
    display: none;
    padding-bottom: 1rem;
}
h2 {
    font-size: 1rem;
    color: rgb(53, 66, 93);
    text-transform: uppercase;
}
td {
    font-size: .9rem;
    padding: .5rem;
    color: rgb(77, 78, 80);
}
#light-blue {
    background-color: rgb(240, 248, 255);
}
#indigo {
    background-color: rgb(82, 106, 156);
}
#red-green {
    background-image: linear-gradient(
45deg, rgb(230, 163, 172) 50%, rgb(224, 243, 237) 50%);
}
#sprinkles-border {
    display: block;
    border-radius: 50px;
    height: .4rem;
    background-color: rgb(124, 151, 177);
    background-image: url('../images/polka-dots.svg');
    background-size: .5rem;
}
#menu-board {
    position: absolute;
    width: 100%;
    left: 50%;
    transform: translate(-50%, 0);
}
#menu {
    z-index: 2;
    position: relative;
    margin: 0 auto;
}
#menu-title {
    display: block;
    width: 50%;
    margin: 0 auto;
    padding-top: 1.7rem;
}
#selections {
    display: flex;
    justify-content: space-evenly;
    position: relative;
    padding: 2rem;
    margin: 0 auto;
    height: 7rem;
}
#selections div {
    display: flex;
    justify-content: center;
    margin: 0 auto;
}
.game-pieces {
    height: 100%;
    cursor: pointer;
}
.disabled-dessert {
    filter: saturate(.2);
    opacity: .7;
    cursor: not-allowed;
}
@-webkit-keyframes dessert-dance {
    0% {transform: rotate(0deg);}
    50% {transform: rotate(5deg); filter: saturate(1.2);}
    100% {transform: rotate(-5deg); filter: saturate(1.5);}
}
@keyframes dessert-dance {
    0% {transform: rotate(0deg);}
    50% {transform: rotate(5deg); filter: saturate(1.2);}
    100% {transform: rotate(-5deg); filter: saturate(1.5);}
}
.dessert-dance {
    -webkit-animation-name: dessert-dance;
    -webkit-animation-duration: .5s;
    animation-name: dessert-dance;
    animation-duration: .5s;
}

/* 6. PUZZLE AREA */

#puzzle-area {
    position: relative;
    width: 40%;
}
#puzzle-selection {
    display: flex;
    align-items: center;
    justify-content: space-around;
    width: 90%;
    margin: 1rem auto;
}
.arrow-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 50px;
    background-color: #7c97b1;
    cursor: pointer;
    text-decoration: none;
}
.arrow-container:hover {
    background-image: linear-gradient(175deg, rgb(56, 84, 142), rgb(89, 113, 162));
}
.disabled-arrow,
.disabled-arrow:hover {
    background-color: rgb(199, 199, 199);
    background-image: none;
    cursor: not-allowed;
}
.arrow {
    font-family: monospace;
    color: rgb(240, 248, 255);
    margin: 0;
}
#puzzle-number {
    font-size: 1rem;
    color: rgb(156, 177, 196);
    text-align: center;
    margin: 0;
}
#check-solution {
    color: rgb(204, 245, 253);
    background-color: rgb(53, 66, 93);
    margin: 1rem auto 2rem;
}
@media (hover: hover) {
    #check-solution:hover {
        background-image: linear-gradient(175deg, rgb(56, 84, 142), rgb(89, 113, 162));
    }
}

/* 7. GRID */

#main-grid,
.subgrid {
    display: grid;
    grid-template-columns: repeat(3, 33.33%);
    grid-template-rows: repeat(3, 33.33%);
}
#main-grid {
    grid-gap: 5px;
    justify-content: center;
    align-content: center;
    width: 100%;
    padding: 15px;
    background-color: rgb(53, 66, 93);
}
.subgrid {
    width: 100%;
    height: 100%;
    margin: 0 auto;
}
.subgrid div {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(53, 66, 93);
    background-color: rgb(255, 255, 255);
}
.aisu-cube {
    height: 49%;
    opacity: .65;
    cursor: pointer;
}
@media (hover: hover) {
    .aisu-cube:hover {
        opacity: 1;
    }
}
.active {
    background-color: rgb(82, 106, 156) !important;
}
.populated-cell {
    height: 66%;
    cursor: not-allowed;
}
.ice-notification {
    -webkit-animation-name: ice-notification;
    -webkit-animation-duration: 2s;
    animation-name: ice-notification;
    animation-duration: 2s;
}
@-webkit-keyframes ice-notification {
    0%   {background-color: rgb(255, 255, 255);}
    25%  {background-color: rgb(204, 240, 72);}
    50%  {background-color: rgb(204, 240, 72);}
    100% {background-color: rgb(255, 255, 255);}
}
@keyframes ice-notification {
    0%   {background-color: rgb(255, 255, 255);}
    25%  {background-color: rgb(204, 240, 72);}
    50%  {background-color: rgb(204, 240, 72);}
    100% {background-color: rgb(255, 255, 255);}
}

/* 8. MODAL */

.modal {
    display: none;
    position: fixed;
    z-index: 4;
    padding-top: 10%;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(53, 66, 93, .7);
}
.popup {
    position: relative;
    background-color: rgb(53, 66, 93);
    border: 1rem solid rgb(126, 202, 215);
    margin: auto;
    padding: 2rem;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    width: 50%;
    max-width: 550px;
    -webkit-animation-name: drop-modal;
    -webkit-animation-duration: 0.4s;
    animation-name: drop-modal;
    animation-duration: 0.4s;
}
@-webkit-keyframes drop-modal {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1;}
}
@keyframes drop-modal {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1;}
}
.modal img {
    display: block;
    width: 30%;
    margin: 0 auto;
}
.modal p {
    text-align: center;
    color: rgb(180, 221, 228);
    margin: 2rem 0 2.5rem;
}
#button-row {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}
#button-row button {
    background-color: rgb(247, 251, 252);
    color: rgb(53, 66, 93);
}
@media (hover: hover) {
    #button-row button:hover {
        background-image: linear-gradient(175deg, rgb(119, 209, 224), rgb(167, 240, 242));
    }
}

/* 9. FOOTER */

footer {
    width: 100%;
    margin-top: auto;
    background-color: rgb(34, 156, 212);
    padding: 1rem 2rem;
}
#copyright {
    font-size: .8rem;
    color: rgb(245, 245, 245);
    margin: 0;
}

/* 10. MEDIA QUERIES */

@media only screen and (max-width: 1050px) {

    /* HEADER */

    nav {
        width: 35%;
    }

    /* MAIN */

    main {
        flex-flow: column;
    }

    /* PANELS */

    #panels {
        width: 85%;
        margin: 0 auto;
    }
    #menu-board {
        width: 65%;
    }
    #menu {
        padding: .5rem;
    }
    #menu-title {
        width: 40%;
        padding-top: 2rem;
    }
    #selections {
        display: flex;
        justify-content: space-evenly;
        width: 65%;
        margin: .5rem auto 1rem;
        padding: 1rem 2rem;
    }
    #selections div {
        width: fit-content;
        margin: 5px;
    }
    .game-pieces {
        height: 55px;
    }

    /* PUZZLE AREA */

    #puzzle-area {
        width: 100%;
    }
    #puzzle-selection {
        width: 70%;
    }

    /* GRID */
    
    #main-grid {
        width: 55%;
        margin: 1rem auto;
        padding: 10px;
    }
    .subgrid div {
        padding: 0;
    }
}

@media only screen and (min-width: 416px) and (max-width: 1050px) and (orientation: portrait) {

    /* PANELS */

    #menu {
        padding: 3rem;
    }
    #menu-board {
        width: 88%;
    }
    #menu-title {
        width: 50%;
        padding-top: 2rem;
    }
    #selections {
        width: 90%;
    }
    .game-pieces {
        height: 65%;
    }

    /* PUZZLE AREA */

    #puzzle-selection {
        width: 90%;
    }

    /* GRID */

    #main-grid {
        width: 75%;
        margin: 2rem auto;
    }
}

@media only screen and (max-width: 850px) {

    /* PANELS */

    #menu {
        padding: 0;
    }
    .game-pieces {
        height: 45px;
    }
}

@media only screen and (max-width: 440px) {

    /* HEADER */

    header {
        margin: .5rem 5% 1rem 5%;
    }
    nav {
        width: 50%;
    }
    ul {
        padding: 0 .5rem;
    }

    /* PANELS */

    #panels {
        width: 90%;
    }
    #menu-board {
        width: 100%;
    }
    #menu-title {
        width: 55%;
        padding-top: 1.2rem;
    }
    #selections {
        width: 100%;
        margin: 1rem auto 0;
        padding: .2rem 1rem 1.75rem 1rem;
    }

    /* GRID */

    #main-grid {
        width: 90%;
        margin: .25rem auto 1rem;
    }

    /* MODAL */

    .modal {
        padding-top: 20%;
    }
    .popup {
        width: 85%;
    }
}
