/* =========================================
   AMATH DESIGNS — COOKIE CONSENT
   ========================================= */

/* =========================================
   COOKIE OVERLAY
   ========================================= */

.cookie-overlay {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding: 24px;

   

    z-index: 99999;

    animation: cookieOverlayIn 0.35s ease forwards;
}

.cookie-overlay[hidden] {
    display: none;
}


/* =========================================
   COOKIE BOX
   ========================================= */

.cookie-box {
    position: relative;

    width: 100%;
    max-width: 760px;

    padding: 34px 36px 30px;

    background: #ffffff;
    color: #171717;

    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18);

    animation: cookieBoxIn 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}


/* =========================================
   BRAND / HEADING
   ========================================= */

.cookie-box h2 {
    margin: 0 45px 12px 0;

    font-size: 25px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.03em;

    color: #111111;
}

.cookie-box h2::before {
    content: "AMATH DESIGNS";

    display: block;

    margin-bottom: 10px;

    font-size: 10px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.18em;

    color: #777777;
}


/* =========================================
   TEXT
   ========================================= */

.cookie-box p {
    max-width: 680px;

    margin: 0;

    font-size: 14px;
    line-height: 1.7;
    font-weight: 400;

    color: #666666;
}

.cookie-box p a {
    color: #171717;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    transition: opacity 0.2s ease;
}

.cookie-box p a:hover {
    opacity: 0.55;
}


/* =========================================
   BUTTONS
   ========================================= */

.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    
    gap: 10px;

    margin-top: 26px;
}


/* =========================================
   BASE BUTTON
   ========================================= */

.btn {
    min-height: 46px;

    border: 1px solid transparent;
    border-radius: 2px;

    padding: 0 20px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible,
.cookie-close:focus-visible,
#open-cookie-settings:focus-visible {
    outline: 2px solid #111111;
    outline-offset: 3px;
}


/* =========================================
   PRIMARY — ACCEPT
   ========================================= */

.btn-primary {
    background: #151515;
    color: #ffffff;

    border-color: #151515;
}

.btn-primary:hover {
    background: #333333;
    border-color: #333333;
}


/* =========================================
   SECONDARY — REJECT
   ========================================= */

.btn-secondary {
    background: #ffffff;
    color: #222222;

    border-color: #d8d8d8;
}

.btn-secondary:hover {
    background: #f5f5f5;
    border-color: #bdbdbd;
}


/* =========================================
   LINK / SETTINGS
   ========================================= */

.btn-link {
    background: transparent;
    color: #555555;

    border-color: transparent;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.btn-link:hover {
    color: #111111;

    background: transparent;
}


/* =========================================
   FULL WIDTH BUTTON
   ========================================= */

.btn-full {
    width: 100%;

    margin-top: 22px;
}


/* =========================================
   SETTINGS PANEL
   ========================================= */

.cookie-settings {
    position: relative;

    max-height: min(80vh, 720px);

    overflow-y: auto;
}

.cookie-settings h2 {
    padding-right: 35px;
}


/* =========================================
   CLOSE BUTTON
   ========================================= */

.cookie-close {
    position: absolute;

    top: 24px;
    right: 24px;

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    background: transparent;

    color: #555555;

    font-family: Arial, sans-serif;
    font-size: 25px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;

    border-radius: 50%;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.cookie-close:hover {
    background: #f3f3f3;
    color: #111111;

    transform: rotate(90deg);
}


/* =========================================
   COOKIE CATEGORIES
   ========================================= */

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 20px 0;

    border-bottom: 1px solid #eeeeee;
}

.cookie-category:first-of-type {
    margin-top: 10px;
}

.cookie-category:last-of-type {
    border-bottom: none;
}

.cookie-category strong {
    display: block;

    margin-bottom: 6px;

    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.01em;

    color: #222222;
}

.cookie-category p {
    margin: 0;

    font-size: 13px;
    line-height: 1.6;

    color: #777777;
}

.cookie-always-active {
    flex-shrink: 0;

    white-space: nowrap;

    padding: 6px 10px;

    border: 1px solid #dedede;
    border-radius: 2px;

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #777777;
}


/* =========================================
   SWITCH
   ========================================= */

.switch {
    position: relative;

    display: inline-block;

    width: 46px;
    height: 25px;

    flex-shrink: 0;
}

.switch input {
    position: absolute;

    opacity: 0;

    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;

    background: #d5d5d5;

    border-radius: 30px;

    cursor: pointer;

    transition: background-color 0.25s ease;
}

.slider:before {
    content: "";

    position: absolute;

    width: 19px;
    height: 19px;

    left: 3px;
    top: 3px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);

    transition: transform 0.25s ease;
}

.switch input:checked + .slider {
    background: #151515;
}

.switch input:checked + .slider:before {
    transform: translateX(21px);
}


/* =========================================
   FOOTER / SETTINGS LINK
   ========================================= */

#open-cookie-settings {
    color: inherit;

    padding: 0;

    border: none;
    background: transparent;

    font-family: inherit;
    font-size: 16px;

    cursor: pointer;

    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;

    transition: opacity 0.2s ease;
}

#open-cookie-settings:hover {
    opacity: 0.55;
}


/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes cookieOverlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes cookieBoxIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 1000px) {

    .cookie-overlay {
        align-items: flex-start;

        padding: 12px;
    }

    .cookie-box {
        max-width: none;

        padding: 26px 22px 22px;

        border-radius: 3px;
    }

    .cookie-box h2 {
        font-size: 22px;
    }

    .cookie-box p {
        font-size: 13px;
        line-height: 1.65;
    }

    .cookie-buttons {
        flex-direction: column;
        align-items: stretch;

        gap: 8px;

        margin-top: 22px;
    }

    .btn {
        width: 100%;

        min-height: 45px;
    }

    .btn-link {
        min-height: 40px;
    }

    .cookie-category {
        align-items: flex-start;

        gap: 18px;
    }

    .cookie-category p {
        font-size: 12px;
    }

    .cookie-close {
        top: 18px;
        right: 18px;
    }
}

@media (max-width: 1000px) {

    .cookie-box {
        animation: cookieBoxInMobile 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

@keyframes cookieBoxInMobile {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================
   VERY SMALL SCREENS
   ========================================= */

@media (max-width: 400px) {

    .cookie-overlay {
        padding: 8px;
    }

    .cookie-box {
        padding: 23px 18px 18px;
    }

    .cookie-box h2 {
        font-size: 20px;
    }

    .cookie-box h2::before {
        font-size: 9px;
    }

    .cookie-category {
        gap: 12px;
    }

    .cookie-always-active {
        font-size: 9px;
        padding: 5px 7px;
    }
}


/* =========================================
   REDUCED MOTION
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    .cookie-overlay,
    .cookie-box {
        animation: none;
    }

    .btn,
    .cookie-close,
    .slider,
    .slider:before {
        transition: none;
    }
}