:root {
    --primary: #635bff;
    --primary-dark: #5148e8;
    --page: #f7f8fc;
    --surface: #ffffff;
    --border: #e9ebf2;
    --text: #171a24;
    --muted: #74798a;
}


/* =========================================================
   COOKIE MODAL OVERLAY
   ========================================================= */

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px;
    background: rgba(15, 17, 27, 0.72);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}


    /* =========================================================
   SHOW MODAL
   ========================================================= */

    .cookie-modal-overlay.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


/* =========================================================
   MODAL
   ========================================================= */

.cookie-modal {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .28), 0 8px 30px rgba(0, 0, 0, .12);
    transform: translateY(20px) scale(.97);
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}


/* =========================================================
   MODAL ANIMATION
   ========================================================= */

.cookie-modal-overlay.is-visible .cookie-modal {
    transform: translateY(0) scale(1);
}


/* =========================================================
   HEADER
   ========================================================= */

.cookie-modal-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
    width: 100%;
    padding: 26px 32px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}


    /* =========================================================
   HEADER ICON
   ========================================================= */

    .cookie-modal-header .cookie-modal-icon {
        flex: 0 0 46px !important;
        width: 46px !important;
        height: 46px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        border-radius: 13px;
        background: rgba(99, 91, 255, .1);
        color: var(--primary);
        font-size: 21px;
    }


    /* =========================================================
   HEADER TEXT
   ========================================================= */

    .cookie-modal-header .cookie-modal-header-text {
        flex: 1 1 auto !important;
        min-width: 0;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 3px;
    }


        /* =========================================================
   HEADER TITLE
   ========================================================= */

        .cookie-modal-header .cookie-modal-header-text h2 {
            display: block !important;
            margin: 0 !important;
            color: var(--text);
            font-size: 21px;
            font-weight: 700;
            line-height: 1.3;
            letter-spacing: -.3px;
        }


        /* =========================================================
   HEADER SUBTITLE
   ========================================================= */

        .cookie-modal-header .cookie-modal-header-text p {
            display: block !important;
            margin: 0 !important;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.5;
        }


/* =========================================================
   BODY
   ========================================================= */

.cookie-modal-body {
    padding: 28px 32px;
    overflow-y: auto;
}


/* =========================================================
   BODY TEXT
   ========================================================= */

.cookie-modal-text p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.75;
}


    .cookie-modal-text p:last-child {
        margin-bottom: 24px;
    }


.cookie-modal-text strong {
    color: var(--text);
}


/* =========================================================
   BODY LINKS
   ========================================================= */

.cookie-modal-text a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}


    .cookie-modal-text a:hover {
        text-decoration: underline;
    }


/* =========================================================
   COOKIE OPTIONS
   ========================================================= */

.cookie-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--page);
}


/* =========================================================
   COOKIE OPTION
   ========================================================= */

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}


    .cookie-option:hover {
        border-color: rgba(99, 91, 255, .35);
        box-shadow: 0 5px 18px rgba(23, 26, 36, .06);
        transform: translateY(-1px);
    }


    /* =========================================================
   COOKIE CHECKBOX
   ========================================================= */

    .cookie-option input {
        flex: 0 0 auto;
        width: 18px;
        height: 18px;
        margin: 2px 0 0;
        accent-color: var(--primary);
        cursor: pointer;
    }


/* =========================================================
   COOKIE OPTION CONTENT
   ========================================================= */

.cookie-option-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


    .cookie-option-content strong {
        color: var(--text);
        font-size: 14px;
        font-weight: 600;
    }


    .cookie-option-content small {
        color: var(--muted);
        font-size: 12px;
        line-height: 1.45;
    }


/* =========================================================
   FOOTER
   ========================================================= */

.cookie-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 32px 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}


/* =========================================================
   BUTTONS
   ========================================================= */

.cookie-btn {
    position: relative;
    min-width: 145px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px !important;
    border: 1px solid transparent !important;
    border-radius: 11px !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.1px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}


/* =========================================================
   ACCEPT SELECTED
   ========================================================= */

.cookie-modal-footer .cookie-btn:first-child {
    color: var(--text) !important;
    background: var(--surface) !important;
    border-color: var(--border) !important;
    box-shadow: 0 2px 6px rgba(23, 26, 36, .04);
}


    .cookie-modal-footer .cookie-btn:first-child:hover {
        color: var(--primary) !important;
        background: #fafaff !important;
        border-color: rgba(99, 91, 255, .35) !important;
        box-shadow: 0 5px 16px rgba(99, 91, 255, .10);
        transform: translateY(-1px);
    }


    .cookie-modal-footer .cookie-btn:first-child:active {
        transform: translateY(0);
        box-shadow: 0 2px 7px rgba(99, 91, 255, .08);
    }


/* =========================================================
   ACCEPT ALL
   ========================================================= */

.cookie-modal-footer .cookie-btn:last-child {
    color: #ffffff !important;
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 6px 16px rgba(99, 91, 255, .22);
}


    .cookie-modal-footer .cookie-btn:last-child:hover {
        color: #ffffff !important;
        background: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
        box-shadow: 0 8px 22px rgba(99, 91, 255, .28);
        transform: translateY(-1px);
    }


    .cookie-modal-footer .cookie-btn:last-child:active {
        transform: translateY(0);
        box-shadow: 0 4px 10px rgba(99, 91, 255, .18);
    }


/* =========================================================
   KEYBOARD FOCUS
   ========================================================= */

.cookie-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, .15), 0 6px 16px rgba(99, 91, 255, .12);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .cookie-modal-overlay {
        padding: 12px;
    }


    .cookie-modal {
        max-height: calc(100vh - 24px);
        border-radius: 20px;
    }


    /* Header */

    .cookie-modal-header {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 20px;
    }


        .cookie-modal-header .cookie-modal-icon {
            flex: 0 0 42px !important;
            width: 42px !important;
            height: 42px !important;
            border-radius: 12px;
            font-size: 19px;
        }


        .cookie-modal-header .cookie-modal-header-text {
            flex: 1 1 auto !important;
            display: flex !important;
            flex-direction: column !important;
            justify-content: center !important;
            gap: 2px;
        }


            .cookie-modal-header .cookie-modal-header-text h2 {
                font-size: 19px;
            }


            .cookie-modal-header .cookie-modal-header-text p {
                font-size: 12px;
                line-height: 1.45;
            }


    /* Body */

    .cookie-modal-body {
        padding: 22px 20px;
    }


    .cookie-modal-text p {
        font-size: 13px;
        line-height: 1.7;
    }


    /* Options */

    .cookie-options {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }


    .cookie-option {
        padding: 12px;
    }


    /* Footer */

    .cookie-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        padding: 16px 20px 20px;
    }


    /* Buttons */

    .cookie-btn {
        width: 100%;
        min-width: 0;
        height: 46px;
    }
}
