/* components */

/* buttons */
.button {
    display: inline-flex;

    border-radius: 50% 12px 12px 40px;
    align-items: stretch;
    /* justify-content: center; */

    flex-direction: row;
    position: relative;
}
.button,
a.button,
a.button:hover,
a.button:focus,
a.button:active {
    color: #fff;
}
.button.small {
    flex-wrap: nowrap;
}
.button div:not(.icon) {
    /* padding: 16px; */
    padding-left: 35px;
    margin-left: -35px;
    /* margin-right: -72px; */
    border-radius: 0 12px 12px 0px;
    background: #639aa4;
    position: relative;
    z-index: 0;
    width: calc(100% - 25px);
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 25.0029px;
    line-height: 30px;
    justify-content: center;
}
.button .icon {
    position: relative;
    z-index: 1;
    display: inline-block;
}
.button.small .icon svg {
    width: 41px;
    height: 41px;
}
.button.small div:not(.icon) {
    font-size: 18px;
    background-color: #fff;
    color: #639aa4;
    width: auto;
    margin-left: -20.5px;
    padding-right: 16px;
    padding-left: 31.5px;
}
body.page-6 {
    background-color: #aec1bf;
}
body.page-6.modal-open {
    overflow-y: auto !important;
    padding-right: 0 !important;
}
body.page-6 #wrapper .content_wrapper {
    min-height: calc(100vh - 149px);
}
body.page-6 #wrapper {
    background-image: url('https://ssb.gov.tr/savunmasanayii360/frontend/game/img/game-bg.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0% 0%;
}

body.page-6 h1:after {
    background: #639aa4;
}

#game-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* height: calc(100vh - 345px); */
}

#game-container .game-inner-container {
    position: relative;
    height: 250px;
    /* height: auto; */
    margin-left: auto;
    margin-right: auto;
    transition: max-width 300ms ease-in-out, height 300ms ease-in-out;
}

@media (max-width: 768px) {
    #game-container .game-inner-container {
        padding: 0;
        max-width: 100% !important;
    }
}

#game-container .game-inner-container.init {
    max-width: 400px !important;
}

.game-inner-container::before {
    content: ' ';
    background-color: #639aa4;
    border-radius: 23px;
    height: 80%;
    position: absolute;
    bottom: -20px;
    width: calc(100% + 40px);
    left: 50%;
    transform: translateX(-50%);
    transition: all 300ms;
}

#game-container .game-inner-container.start {
    max-width: 60vw;
    height: 320px;
    /* height: auto; */
}

#game-container .game-inner-container.start::before {
    height: 60%;
    bottom: 0%;
    /* transform: translateX(0%); */
}

.game-box {
    width: 100%;
    position: relative;
    transition: background 100ms;
}

#game-container .game-inner-container.init .game-box {
    margin-top: 30px;
}
#game-container .game-inner-container.start .game-box {
    background: transparent;
    min-height: 200px;
    height: auto;
}
.game-box-start-screen {
    background: #ffffff;
    mix-blend-mode: normal;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    opacity: 1;
    width: 100%;
    padding-top: 44px;
    padding-bottom: 44px;
    transition: opacity 50ms;
}
.game-box-start-screen .button {
    width: 70%;
}

@media (max-width: 768px) {
    #game-container .game-inner-container.start::before {
        content: none;
    }
    #game-container .game-inner-container .game-box-start-screen .button {
    }

    /* .button .icon svg {
        width: 40px;
        height: 40px;
    } */
}

.game-box-play-screen {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

#game-container .game-inner-container.start .game-box-start-screen {
    opacity: 0;
    display: none;
}

#game-container .game-inner-container.start .game-box-play-screen {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 1rem;
    float: left;
    align-items: stretch;

    /* margin-top: 1rem; */
}

.game-countdown-container {
    margin: 20px 0 25px 0;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.game-countdown {
    display: none;
    /* margin-bottom: 15px;
    margin-top: 15px; */
    justify-items: center;
    justify-content: center;
    width: 120px;
    padding: 10px 15px;
    background-color: #f4fdff;
    border: 1px solid #796a59;
    border-radius: 7px;
}
.game-countdown span {
    color: #796a59;
    font-weight: 700;
    font-size: 22px;
}
.game-countdown.active {
    display: inline-flex;
    align-self: center;
}
.card-target {
    opacity: 0;
    transition: opacity 400ms, transform 200ms;
    /* display: none; */
    /* background-color: rgba(0, 0, 0, 0.2); */
    border-radius: 15px;
    /* margin-right: 1rem; */
    width: calc((100% - 5rem) / 6);
    float: left;
    flex: 1;
    border: 2px solid transparent;
    box-shadow: none;
}
.card-target-placeholder {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    /* margin-right: 1rem; */
    width: calc((100% - 5rem) / 6);
    border: 2px solid transparent;
}

.card-target:last-child,
.card-target-placeholder:last-child {
    /* margin-right: 0; */
}
.card-target.active {
    display: flex;
    align-items: stretch;
    opacity: 1;
}
.card-target.animate {
    animation-name: toBigBack;
    animation-duration: 400ms;
    animation-timing-function: ease-in;
}
@keyframes toBigBack {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
.card-target.error {
    filter: drop-shadow(0px 4px 15px rgba(172, 0, 0, 0.4));
    border-color: #ff0000;
}
.card-item {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 0.5rem 0.5rem 1rem 0.5rem;
    display: flex;
    flex-direction: column;
}
.card-item img {
    margin-bottom: 1.5rem;
    border-radius: 5px;
}
.card-item p {
    color: #698f94;
    font-size: 12px;
    text-align: center;
    margin-bottom: 0;
}
.game-check-button-holder,
.game-footer-holder {
    display: none;
    justify-content: center;
    position: relative;
    /* position: absolute;
    bottom: -25%;
    left: 50%;
    transform: translateX(-50%); */
}
.game-check-button-holder.active,
.game-footer-holder.active {
    display: flex;
}
.game-check-button,
.game-check-button:focus,
.game-check-button:hover,
.game-check-button:active {
    font-size: 22px;
    text-transform: uppercase;
    color: #fff;
    padding: 10px 20px;
    background-color: #19383e;
    border-radius: 12.0455px;
}

.game-footer-holder {
    margin: 63px auto;
}

.game-footer {
    background-color: #639aa4;
    border-radius: 19px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 18px;
}

#toggleSound {
}
#toggleSound .sound-off {
    display: none;
}
#toggleSound.off .sound-off {
    display: block;
}
#toggleSound.off .sound-on {
    display: none;
}
/* game modals */
.modal-game-result,
.modal-game-rules {
    width: 570px;
    max-width: 570px;
}
.modal-game-result .modal-content,
.modal-game-rules .modal-content {
    background: #639aa4;
    mix-blend-mode: normal;
    border-radius: 10px;
    border: none;
    color: #fff;
    text-align: center;
}
.modal-game-result .modal-body {
    padding: 60px 50px 40px 50px;
}
.modal-game-result .modal-content h2,
.modal-game-result .modal-content p {
    color: #fff;
    font-size: 35px;
}
.modal-game-result .modal-content p {
    font-weight: 300;
    font-size: 28px;
}

.modal-backdrop {
    /* --bs-backdrop-opacity: 1;
    background-color: rgba(15, 15, 14, 0.75); */
}
.modal-game-rules .heading-holder {
    padding: 11px 32px;
    background: #ffffff;
    border-radius: 11.7201px;
    position: absolute;
    left: 50%;
    top: 0%;
    transform: translate(-50%, -50%);
    color: #796a59;
    font-size: 25px;
    z-index: 1;
}
.modal-game-rules .modal-body {
    padding: 60px 30px 40px 30px;
}
.modal-game-rules .game-rule-row {
    background: #86bfca;
    border-radius: 8px;
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px 20px;
    text-align: left;
    margin-bottom: 20px;
}
.modal-game-rules .game-rule-row:last-child {
    margin: 0;
}
.modal-game-rules > img {
    margin-right: 15px;
}
.rule-description {
    padding: 0 15px;
    position: relative;
    font-weight: 300;
    line-height: 1.2;
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 75px;
}
.rule-description b {
    font-size: 16px;
}

.rule-description::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: #94cfdb;
    display: block;
    left: 0;
}

@media (max-width: 768px) {
    html,
    body {
        background-color: transparent;
        /* min-height: 100vh; */
        background-image: url(https://ssb.gov.tr/savunmasanayii360/frontend/game/img/game-bg.jpg);
        background-repeat: no-repeat;
        background-size: cover;
        background-position: 0% 0%;
        counter-reset: section;
    }

    body.page-6 #wrapper {
        min-height: calc(100vh - var(--header-height));
        background-repeat: repeat-y;
        background: none;
    }

    body.page-6 #wrapper .content_wrapper {
        margin-top: var(--header-height);
        min-height: calc(100vh - var(--header-height));
    }

    #game-container {
        padding-top: 25px;
    }

    #game-container .game-inner-container.start {
        /* height: 100%; */
        /* max-height: fit-content; */
        height: auto;
        /* min-height: fit-content; */
    }
    #game-container .game-inner-container.start .game-box-play-screen {
        /* display: grid;
        grid-template-columns: 300px 300px; */
        flex-direction: unset;
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        float: none;
    }
    #game-container
        .game-inner-container.start
        .game-box-play-screen
        .card-target {
        width: 100%;
        /* display: block; */
        flex: calc(50% - 5px);
        /* margin: 3px; */
    }

    .card-target {
        position: relative;
        /* height: 160px; */
        /* border: none; */
    }

    .card-target-placeholder {
        /* width: 100%; */
        flex: calc(50% - 5px);
        position: relative;
        background-color: rgba(255, 255, 255, 0.4);
        /* border: none; */
    }

    .card-number {
        position: absolute;
        /* left: -10px;
        top: 50%; */
        /* transform: translateY(-50%); */
        background-color: #fff;
        /* padding: 4px; */
        /* height: 16px;
        width: 14px; */
        width: 16px;
        top: calc(var(--postop) + var(--itemHeight) / 2 - 10px);
        font-size: 12px;
        height: 20px;
        line-height: 12px;
        display: flex;
        justify-content: center;
        align-items: center;
        align-content: center;
        color: #639aa4;
        font-weight: bold;
    }
    .card-number.odd {
        border-top-left-radius: 6px;
        border-bottom-left-radius: 6px;
        left: -16px !important;
    }
    .card-number.even {
        border-top-right-radius: 6px;
        border-bottom-right-radius: 6px;
        right: -16px;
    }

    .card-item {
        padding-bottom: 0.5rem;
    }
    .card-item img {
        margin-bottom: 0.5rem;
    }

    .game-check-button-holder {
        gap: 6px;
        justify-content: space-between;
        align-items: stretch;
    }
    .game-check-button-holder,
    .game-footer-holder {
        margin-top: 25px;
    }
    .game-footer-holder {
        /* margin: 25px -22.5px 0 -22.5px; */
        /* justify-content: stretch; */
    }
    .game-footer {
        width: 100%;
        /* border-radius: 0; */
        /* justify-content: center; */
    }

    .button.small div:not(.icon) {
        overflow: hidden;
        white-space: nowrap;
    }
    .game-countdown-container {
        margin: 0;
        flex: 50%;
        align-self: stretch;
        height: auto;
        justify-content: flex-start;
    }
    .game-countdown.active {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        border: none;
        padding: 15px;
        width: 100%;
        /* margin-right: 3px; */
        border-radius: 14px;
    }

    .game-check-button,
    .game-check-button:focus,
    .game-check-button:hover,
    .game-check-button:active {
        /* margin-left: 3px; */
        padding: 15px 30px;
        flex: 50%;
        text-align: center;
        justify-content: center;
        align-self: stretch;
        display: flex;
        align-items: center;
        line-height: 22px;
        border-radius: 14px;
    }

    .modal-game-result,
    .modal-game-rules {
        max-width: 500px;
        width: unset;
    }
    .modal-game-rules .modal-body {
        padding: 60px 15px 20px 15px;
    }
    .modal-game-rules .game-rule-row {
        margin-bottom: 15px;
    }
    .rule-description {
        height: auto;
    }

    .modal .modal-game-rules .close-btn {
        /* top: -50px;
        right: -11px; */
    }

    .game-footer-holder {
        margin-bottom: 0;
    }

    /* .game-countdown-container {
        margin: 15px 0 15px 0;
    }
    .game-countdown.active {
        padding: 5px; */
    /* } */
}
