/* =========================================================
   STATTUNER COOKIE CONSENT + SHARE BUILD 13.3.16
   ========================================================= */

.st-cookie-banner,
.st-consent-dialog,
.st-share-dialog,
.st-share-fab,
.st-toast {
    font-family: "Rajdhani", "Segoe UI", Arial, sans-serif;
}

.st-cookie-banner {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 100000;
    width: min(1120px, calc(100% - 32px));
    max-height: calc(100dvh - 36px);
    overflow: auto;
    transform: translateX(-50%);
    border: 1px solid rgba(173, 145, 120, .44);
    border-radius: 20px;
    background: rgba(255, 253, 248, .98);
    box-shadow: 0 28px 80px rgba(35, 25, 18, .24);
    color: #251d18;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.st-cookie-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 22px 24px;
}

.st-cookie-copy {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.st-cookie-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid #decab7;
    border-radius: 14px;
    background: linear-gradient(145deg, #fff, #f1e6da);
    color: #a44c30;
}

.st-cookie-icon svg {
    width: 25px;
    height: 25px;
}

.st-cookie-copy h2,
.st-consent-dialog h2,
.st-share-dialog h2 {
    margin: 0;
    color: #251d18;
    font-size: 22px;
    line-height: 1.15;
}

.st-cookie-copy p,
.st-consent-dialog p,
.st-share-dialog p {
    margin: 7px 0 0;
    color: #6e5d51;
    font-size: 15px;
    line-height: 1.55;
}

.st-cookie-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-top: 8px;
}

.st-cookie-links a,
.st-cookie-settings-link {
    color: #9d432c !important;
    font-weight: 700;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

.st-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.st-cookie-button,
.st-dialog-button {
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid #cdb8a5;
    border-radius: 11px;
    background: #fff;
    color: #2b211b;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
    cursor: pointer;
}

.st-cookie-button:hover,
.st-dialog-button:hover {
    transform: translateY(-1px);
    border-color: #a44c30;
}

.st-cookie-button.primary,
.st-dialog-button.primary {
    border-color: #2b211b;
    background: #2b211b;
    color: #fff;
}

.st-cookie-button.reject {
    background: #f4ede5;
}

.st-dialog-overlay {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(22, 16, 12, .62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.st-dialog-overlay[hidden] {
    display: none !important;
}

.st-consent-dialog,
.st-share-dialog {
    width: min(560px, 100%);
    max-height: calc(100dvh - 36px);
    overflow: auto;
    border: 1px solid #d4c0ad;
    border-radius: 20px;
    background: #fffdf8;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .34);
}

.st-dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 24px 18px;
    border-bottom: 1px solid #e3d8cc;
}

.st-dialog-close {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid #d8c7b7;
    border-radius: 11px;
    background: #fff;
    color: #2b211b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.st-dialog-body {
    padding: 20px 24px 6px;
}

.st-consent-choice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px solid #e8ded4;
}

.st-consent-choice:last-child {
    border-bottom: 0;
}

.st-consent-choice strong {
    display: block;
    color: #2b211b;
    font-size: 16px;
}

.st-consent-choice span {
    display: block;
    margin-top: 3px;
    color: #79685a;
    font-size: 13px;
    line-height: 1.45;
}

.st-switch {
    position: relative;
    width: 50px;
    height: 28px;
    display: inline-block;
}

.st-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.st-switch-track {
    position: absolute;
    inset: 0;
    border: 1px solid #bba998;
    border-radius: 999px;
    background: #ded4ca;
    cursor: pointer;
    transition: .18s;
}

.st-switch-track::after {
    content: "";
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: .18s;
}

.st-switch input:checked + .st-switch-track {
    border-color: #a8452e;
    background: #b74c32;
}

.st-switch input:checked + .st-switch-track::after {
    transform: translateX(22px);
}

.st-switch input:disabled + .st-switch-track {
    opacity: .62;
    cursor: not-allowed;
}

.st-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
    padding: 18px 24px 23px;
}

.st-share-fab {
    position: fixed;
    right: max(24px, env(safe-area-inset-right));
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 9990;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 999px;
    background: linear-gradient(135deg, #6d28d9 0%, #a21caf 52%, #e11d74 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(126, 34, 206, .38);
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    isolation: isolate;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.st-share-fab::before {
    content: "";
    position: absolute;
    inset: -5px;
    z-index: -1;
    border-radius: inherit;
    border: 1px solid rgba(225, 29, 116, .34);
    animation: stSharePulse 2.2s ease-out infinite;
}

.st-share-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 48px rgba(126, 34, 206, .48);
}

.st-share-fab svg {
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

@keyframes stSharePulse {
    0% { opacity: .8; transform: scale(.96); }
    80%, 100% { opacity: 0; transform: scale(1.15); }
}

body.st-cookie-open .st-share-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.st-share-url {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin-top: 17px;
    padding: 0 13px;
    border: 1px solid #cdb9a6;
    border-radius: 11px;
    background: #f7f1ea;
    color: #403129;
    font: 600 13px/1.3 "Segoe UI", Arial, sans-serif;
}

.st-share-summary {
    margin-top: 14px;
    padding: 13px 15px;
    border-left: 4px solid #8b2bd1;
    border-radius: 9px;
    background: #f6effc;
    color: #60456e;
    font-size: 13px;
    line-height: 1.5;
}

.st-toast {
    position: fixed;
    left: 50%;
    bottom: 30px;
    z-index: 100005;
    max-width: calc(100% - 32px);
    padding: 12px 17px;
    transform: translate(-50%, 12px);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: #251d18;
    color: #fff;
    box-shadow: 0 14px 35px rgba(0, 0, 0, .28);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: .2s;
}

.st-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

body.st-dialog-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .game-page .st-cookie-banner {
        bottom: calc(74px + env(safe-area-inset-bottom));
        max-height: calc(100dvh - 92px);
    }

    .game-page .st-share-fab {
        right: 14px;
        bottom: calc(76px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 760px) {
    .st-cookie-banner {
        width: calc(100% - 20px);
        border-radius: 17px;
    }

    .st-cookie-inner {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    .st-cookie-copy {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .st-cookie-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .st-cookie-copy h2,
    .st-consent-dialog h2,
    .st-share-dialog h2 {
        font-size: 20px;
    }

    .st-cookie-copy p {
        font-size: 14px;
    }

    .st-cookie-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .st-cookie-button {
        width: 100%;
        padding: 0 10px;
    }

    .st-cookie-button.primary {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .st-dialog-head,
    .st-dialog-body,
    .st-dialog-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .st-dialog-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .st-dialog-button {
        width: 100%;
    }

    .st-share-fab {
        right: 14px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        min-width: 54px;
        min-height: 54px;
        padding: 0 15px;
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .st-cookie-actions {
        grid-template-columns: 1fr;
    }

    .st-cookie-button.primary {
        grid-column: auto;
        grid-row: auto;
    }

    .st-share-fab span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-share-fab::before {
        animation: none;
    }

    .st-share-fab,
    .st-toast,
    .st-cookie-button,
    .st-dialog-button {
        transition: none;
    }
}
