/* ==========================================================================
   COOKIE CONSENT
   ========================================================================== */

.cookie-consent {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9998;
    width: min(460px, calc(100vw - 48px));
    background: #252421;
    color: #f8f7f4;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.cookie-consent[hidden],
.cookie-preferences[hidden] {
    display: none;
}

.cookie-consent__inner {
    padding: 34px;
}

.cookie-consent__eyebrow,
.cookie-preferences__eyebrow {
    margin: 0 0 18px;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(248, 247, 244, 0.55);
}

.cookie-consent h2 {
    margin: 0;
    font-family: var(
        --font-serif,
        "Cormorant Garamond",
        Georgia,
        serif
    );
    font-size: 38px;
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: -0.025em;
	color: #fff;
}

.cookie-consent__content > p:last-child {
    max-width: 390px;
    margin: 24px 0 0;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 12px;
    line-height: 1.75;
    color: rgba(248, 247, 244, 0.62);
}


/* ==========================================================================
   ACTIONS
   ========================================================================== */

.cookie-consent__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.cookie-consent__button {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(248, 247, 244, 0.28);
    background: transparent;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #f8f7f4;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.cookie-consent__button:hover {
    border-color: rgba(248, 247, 244, 0.7);
}

.cookie-consent__button--primary {
    border-color: #f8f7f4;
    background: #f8f7f4;
    color: #252421;
}

.cookie-consent__button--primary:hover {
    background: transparent;
    color: #f8f7f4;
}

.cookie-consent__manage {
    border: 0;
    padding: 10px 0;
    background: transparent;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    text-decoration: underline;
    text-underline-offset: 4px;
    color: rgba(248, 247, 244, 0.65);
    cursor: pointer;
}

.cookie-consent__manage:hover {
    color: #f8f7f4;
}


/* ==========================================================================
   PREFERENCES OVERLAY
   ========================================================================== */

.cookie-preferences {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.cookie-preferences__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 18, 0.55);
    backdrop-filter: blur(8px);
}

.cookie-preferences__dialog {
    position: relative;
    z-index: 1;
    width: min(650px, 100%);
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    padding: 50px;
    background: #f8f7f4;
    color: #252421;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2);
}


/* ==========================================================================
   CLOSE BUTTON
   ========================================================================== */

.cookie-preferences__close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.cookie-preferences__close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 1px;
    background: #252421;
}

.cookie-preferences__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}

.cookie-preferences__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}


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

.cookie-preferences__header {
    max-width: 500px;
}

.cookie-preferences__header h2 {
    margin: 0;
    font-family: var(
        --font-serif,
        "Cormorant Garamond",
        Georgia,
        serif
    );
    font-size: clamp(42px, 5vw, 62px);
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: -0.03em;
}

.cookie-preferences__header > p:last-child {
    max-width: 480px;
    margin: 28px 0 0;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 13px;
    line-height: 1.8;
    color: #77736d;
}


/* ==========================================================================
   PREFERENCE OPTIONS
   ========================================================================== */

.cookie-preferences__options {
    margin-top: 42px;
    border-top: 1px solid rgba(37, 36, 33, 0.15);
}

.cookie-preference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 26px 0;
    border-bottom: 1px solid rgba(37, 36, 33, 0.15);
}

.cookie-preference__text {
    max-width: 450px;
}

.cookie-preference__text h3 {
    margin: 0;
    font-family: var(
        --font-serif,
        "Cormorant Garamond",
        Georgia,
        serif
    );
    font-size: 25px;
    font-weight: 400;
}

.cookie-preference__text p {
    margin: 8px 0 0;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 12px;
    line-height: 1.7;
    color: #77736d;
}

.cookie-preference__status {
    flex-shrink: 0;
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #77736d;
}


/* ==========================================================================
   SWITCH
   ========================================================================== */

.cookie-switch {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.cookie-switch__slider {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(37, 36, 33, 0.3);
    border-radius: 100px;
    background: transparent;
    transition: background-color 0.3s ease;
}

.cookie-switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #252421;
    transition: transform 0.3s ease;
}

.cookie-switch input:checked + .cookie-switch__slider {
    background: #252421;
}

.cookie-switch input:checked + .cookie-switch__slider::before {
    background: #f8f7f4;
    transform: translateX(20px);
}


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

.cookie-preferences__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-top: 34px;
}

.cookie-preferences__policy {
    font-family: var(
        --font-sans,
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif
    );
    font-size: 10px;
    color: #77736d;
    text-underline-offset: 4px;
}

.cookie-preferences__policy:hover {
    color: #252421;
}


/* ==========================================================================
   SCREEN READER ONLY
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


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

@media (max-width: 600px) {

    .cookie-consent {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
    }

    .cookie-consent__inner {
        padding: 26px;
    }

    .cookie-consent h2 {
        font-size: 34px;
    }

    .cookie-consent__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent__button {
        width: 100%;
    }

    .cookie-consent__manage {
        align-self: center;
    }


    /* Preferences */

    .cookie-preferences {
        padding: 12px;
    }

    .cookie-preferences__dialog {
        max-height: calc(100vh - 24px);
        padding: 38px 24px 28px;
    }

    .cookie-preferences__close {
        top: 16px;
        right: 16px;
    }

    .cookie-preferences__header h2 {
        font-size: 43px;
    }

    .cookie-preferences__header > p:last-child {
        font-size: 12px;
    }

    .cookie-preference {
        align-items: flex-start;
        gap: 18px;
    }

    .cookie-preference__text h3 {
        font-size: 22px;
    }

    .cookie-preference__text p {
        font-size: 11px;
    }

    .cookie-preferences__footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .cookie-preferences__footer .cookie-consent__button {
        width: 100%;
    }

    .cookie-preferences__policy {
        align-self: center;
    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .cookie-consent__button,
    .cookie-consent__manage,
    .cookie-switch__slider,
    .cookie-switch__slider::before {
        transition: none;
    }

}