/* ==========================================================
   HEJL PRODUCTIONS — COOKIE PREFERENCES
   ========================================================== */

.hp-preferences-panel {
    position: fixed;

    left: 28px;
    bottom: 28px;

    z-index: 2147483000;

    display: block;

    width:
        min(
            470px,
            calc(
                100vw
                -
                56px
            )
        );

    padding: 28px;

    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            #090d12 0%,
            #0d1820 55%,
            #07333c 100%
        );

    color: #ffffff;

    box-shadow:
        0
        24px
        70px
        rgba(
            0,
            0,
            0,
            0.28
        );

    opacity: 0;

    visibility: hidden;

    transform:
        translate3d(
            0,
            30px,
            0
        );

    pointer-events: none;

    transition:
        opacity 0.35s ease,
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear 0.45s;
}


.hp-preferences-panel.is-visible {
    opacity: 1;

    visibility: visible;

    transform:
        translate3d(
            0,
            0,
            0
        );

    pointer-events: auto;

    transition:
        opacity 0.35s ease,
        transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s;
}


/* ==========================================================
   HEADER
   ========================================================== */

.hp-preferences-header {
    display: flex;

    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;
}

.hp-preferences-title {
    margin: 0;

    color: #ffffff;

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size:
        clamp(
            1.55rem,
            2vw,
            2rem
        );

    font-weight: 700;

    line-height: 1;

    text-transform: uppercase;
}

.hp-preferences-close {
    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: transparent;

    color: #ffffff;

    font-size: 1.65rem;

    cursor: pointer;

    transition:
        color 0.17s ease,
        transform 0.17s ease,
        background-color 0.17s ease;
}

.hp-preferences-close:hover {
    color: #22d3ee;

    background:
        rgba(
            255,
            255,
            255,
            0.06
        );

    transform:
        scale(1.08);
}


/* ==========================================================
   TEXT
   ========================================================== */

.hp-preferences-text {
    margin:
        0
        0
        22px;

    color:
        rgba(
            255,
            255,
            255,
            0.78
        );

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.95rem;
    font-weight: 400;

    line-height: 1.42;
}

.hp-preferences-text a {
    color: #22d3ee;

    text-decoration: underline;

    text-underline-offset: 3px;

    transition:
        color 0.17s ease;
}

.hp-preferences-text a:hover {
    color: #ffffff;
}


/* ==========================================================
   BUTTONS
   ========================================================== */

.hp-preferences-actions {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;
}

.hp-preferences-button {
    min-height: 50px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding:
        12px
        16px;

    border:
        2px
        solid
        #22d3ee;

    border-radius: 13px;

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.92rem;
    font-weight: 700;

    line-height: 1;

    text-align: center;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        transform 0.17s ease,
        background-color 0.17s ease,
        color 0.17s ease,
        border-color 0.17s ease;
}

.hp-preferences-button--accept {
    background: #22d3ee;

    color: #071116;
}

.hp-preferences-button--reject {
    background: #f5f7f8;

    border-color: #f5f7f8;

    color: #071116;
}

.hp-preferences-button--accept:hover {
    transform:
        translateY(-2px);

    background: #5ddef0;

    border-color: #5ddef0;
}

.hp-preferences-button--reject:hover {
    transform:
        translateY(-2px);

    background: #ffffff;

    border-color: #ffffff;
}

.hp-preferences-button--settings {
    grid-column:
        1
        /
        -1;

    min-height: 44px;

    border-color:
        rgba(
            255,
            255,
            255,
            0.25
        );

    background: transparent;

    color:
        rgba(
            255,
            255,
            255,
            0.82
        );

    font-size: 0.82rem;
}

.hp-preferences-button--settings:hover {
    border-color:
        rgba(
            255,
            255,
            255,
            0.55
        );

    color: #ffffff;

    transform:
        translateY(-1px);
}


/* ==========================================================
   SETTINGS
   ========================================================== */

.hp-preferences-settings {
    max-height: 0;

    margin-top: 0;

    overflow: hidden;

    opacity: 0;

    transition:
        max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease,
        margin-top 0.35s ease;
}

.hp-preferences-panel.is-settings-open
.hp-preferences-settings {
    max-height: 720px;

    margin-top: 24px;

    opacity: 1;
}

.hp-preferences-divider {
    width: 100%;
    height: 1px;

    margin-bottom: 20px;

    background:
        rgba(
            255,
            255,
            255,
            0.16
        );
}


/* ==========================================================
   CATEGORY
   ========================================================== */

.hp-preferences-category {
    display: grid;

    grid-template-columns:
        minmax(
            0,
            1fr
        )
        auto;

    align-items: center;

    gap: 18px;

    padding: 14px 0;

    border-bottom:
        1px
        solid
        rgba(
            255,
            255,
            255,
            0.08
        );
}

.hp-preferences-category:last-of-type {
    border-bottom: 0;
}

.hp-preferences-category-copy {
    min-width: 0;
}

.hp-preferences-category-title {
    display: block;

    margin-bottom: 4px;

    color: #ffffff;

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.98rem;
    font-weight: 700;

    text-transform: uppercase;
}

.hp-preferences-category-description {
    margin: 0;

    color:
        rgba(
            255,
            255,
            255,
            0.58
        );

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.78rem;

    line-height: 1.35;
}

.hp-preferences-required {
    color: #22d3ee;

    font-size: 0.75rem;
    font-weight: 700;

    text-transform: uppercase;

    white-space: nowrap;
}


/* ==========================================================
   SWITCH
   ========================================================== */

.hp-preferences-switch {
    position: relative;

    width: 48px;
    height: 27px;

    flex: 0 0 auto;
}

.hp-preferences-switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.hp-preferences-switch-track {
    position: absolute;

    inset: 0;

    border-radius: 999px;

    background:
        rgba(
            255,
            255,
            255,
            0.17
        );

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.hp-preferences-switch-track::after {
    content: "";

    position: absolute;

    top: 4px;
    left: 4px;

    width: 19px;
    height: 19px;

    border-radius: 50%;

    background: #ffffff;

    transition:
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hp-preferences-switch
input:checked
+
.hp-preferences-switch-track {
    background: #22d3ee;
}

.hp-preferences-switch
input:checked
+
.hp-preferences-switch-track::after {
    transform:
        translateX(21px);
}

.hp-preferences-switch
input:focus-visible
+
.hp-preferences-switch-track {
    box-shadow:
        0
        0
        0
        3px
        rgba(
            34,
            211,
            238,
            0.25
        );
}


/* ==========================================================
   SAVE
   ========================================================== */

.hp-preferences-save {
    width: 100%;

    min-height: 48px;

    margin-top: 18px;

    border: 0;

    border-radius: 13px;

    background: #22d3ee;

    color: #071116;

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.92rem;
    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;

    transition:
        transform 0.17s ease,
        background-color 0.17s ease;
}

.hp-preferences-save:hover {
    transform:
        translateY(-2px);

    background: #5ddef0;
}


/* ==========================================================
   REOPEN
   ========================================================== */

.hp-preferences-reopen {
    position: fixed;

    left: 18px;
    bottom: 18px;

    z-index: 2147482999;

    display: block;

    padding:
        9px
        13px;

    border:
        1px
        solid
        rgba(
            255,
            255,
            255,
            0.2
        );

    border-radius: 999px;

    background:
        linear-gradient(
            180deg,
            #101923,
            #07333c
        );

    color:
        rgba(
            255,
            255,
            255,
            0.82
        );

    box-shadow:
        0
        8px
        24px
        rgba(
            0,
            0,
            0,
            0.12
        );

    font-family:
        "Expose",
        Arial,
        sans-serif;

    font-size: 0.7rem;
    font-weight: 700;

    text-transform: uppercase;

    cursor: pointer;

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transform:
        translateY(10px);

    transition:
        opacity 0.25s ease,
        visibility 0s linear 0.25s,
        transform 0.25s ease,
        background-color 0.17s ease;
}

.hp-preferences-reopen.is-visible {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform:
        translateY(0);

    transition:
        opacity 0.25s ease,
        visibility 0s,
        transform 0.25s ease;
}

.hp-preferences-reopen:hover {
    background: #129db3;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 600px) {

    .hp-preferences-panel {
        left: 14px;
        right: 14px;

        bottom:
            max(
                14px,
                calc(
                    env(safe-area-inset-bottom)
                    +
                    10px
                )
            );

        width: auto;

        padding: 22px;

        border-radius: 22px;
    }

    .hp-preferences-title {
        font-size: 1.45rem;
    }

    .hp-preferences-text {
        font-size: 0.88rem;
    }

    .hp-preferences-actions {
        grid-template-columns:
            1fr;
    }

    .hp-preferences-button--settings {
        grid-column: auto;
    }

    .hp-preferences-category {
        gap: 12px;
    }

    .hp-preferences-reopen {
        left:
            max(
                12px,
                env(safe-area-inset-left)
            );

        bottom:
            max(
                12px,
                env(safe-area-inset-bottom)
            );
    }

}


/* ==========================================================
   LANDSCAPE
   ========================================================== */

@media
(max-height: 500px)
and
(orientation: landscape) {

    .hp-preferences-panel {
        left:
            max(
                14px,
                calc(
                    env(safe-area-inset-left)
                    +
                    10px
                )
            );

        bottom:
            max(
                12px,
                calc(
                    env(safe-area-inset-bottom)
                    +
                    8px
                )
            );

        width:
            min(
                540px,
                64vw
            );

        max-height:
            calc(
                100dvh
                -
                24px
            );

        overflow-y: auto;

        padding:
            19px
            21px;

        border-radius: 19px;
    }

    .hp-preferences-title {
        font-size: 1.25rem;
    }

    .hp-preferences-text {
        margin-bottom: 15px;

        font-size: 0.78rem;
    }

    .hp-preferences-button {
        min-height: 42px;

        padding:
            9px
            12px;

        font-size: 0.77rem;
    }

    .hp-preferences-button--settings {
        min-height: 38px;
    }

    .hp-preferences-panel.is-settings-open
    .hp-preferences-settings {
        max-height: none;
    }

    .hp-preferences-category {
        padding: 10px 0;
    }

}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .hp-preferences-panel,
    .hp-preferences-settings,
    .hp-preferences-button,
    .hp-preferences-reopen,
    .hp-preferences-switch-track,
    .hp-preferences-switch-track::after {
        transition-duration:
            0.01ms !important;
    }

}