/*
 * Homepage cookie consent panel.
 */

.eclat-cookie-consent {
    position: fixed;
    inset: auto 0 0;
    z-index: 1400;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: clamp(12px, 1.4vw, 20px);
    pointer-events: none;
}

.eclat-cookie-consent,
.eclat-cookie-consent *,
.eclat-cookie-consent *::before,
.eclat-cookie-consent *::after {
    box-sizing: border-box;
}

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

.eclat-cookie-consent__panel {
    --eclat-cookie-panel: #ffffff;
    --eclat-cookie-text: #202124;
    --eclat-cookie-accent: #81e291;
    --eclat-cookie-primary: #1f1f1f;
    --eclat-cookie-primary-text: #ffffff;
    --eclat-cookie-toggle: #f3a7ec;
    width: min(440px, calc(100vw - 24px));
    max-height: min(680px, calc(100dvh - 24px));
    padding: clamp(18px, 1.8vw, 24px);
    overflow-y: auto;
    color: var(--eclat-cookie-text);
    background: var(--eclat-cookie-panel);
    border: 1px solid rgba(0, 36, 44, 0.1);
    border-radius: 8px;
    box-shadow: 0 22px 58px rgba(0, 12, 16, 0.2);
    pointer-events: auto;
    transform: translate3d(calc(100% + clamp(12px, 1.4vw, 20px)), 0, 0);
    opacity: 0;
    transition:
        transform 0.34s cubic-bezier(0.22, 0.8, 0.22, 1),
        opacity 0.24s ease;
}

.eclat-cookie-consent.is-visible .eclat-cookie-consent__panel {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

.eclat-cookie-consent__title {
    margin: 0 0 12px;
    color: var(--eclat-cookie-text);
    font-family: "Antonio Bold", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(23px, 2.15vw, 30px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: 0;
    text-transform: uppercase;
    text-align: center;
    overflow-wrap: anywhere;
}

.eclat-cookie-consent__text {
    margin: 0 0 14px;
    color: var(--eclat-cookie-text);
    font-family: "Ubuntu Light", Ubuntu, "Segoe UI", sans-serif;
    font-size: 13.5px;
    line-height: 1.42;
    overflow-wrap: anywhere;
}

.eclat-cookie-consent__text p {
    margin: 0;
}

.eclat-cookie-consent__text p + p {
    margin-top: 0.85em;
}

.eclat-cookie-consent__preferences {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
}

.eclat-cookie-consent__preference {
    background: rgba(0, 0, 0, 0.045);
    border: 1px solid rgba(0, 36, 44, 0.045);
    border-radius: 0;
}

.eclat-cookie-consent__preference-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    min-height: 42px;
}

.eclat-cookie-consent__preference-summary,
.eclat-cookie-consent__chevron,
.eclat-cookie-consent__switch,
.eclat-cookie-consent__button {
    appearance: none;
    border: 0;
    border-radius: 0;
    font: inherit;
    cursor: pointer;
}

.eclat-cookie-consent__preference-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 0 0 0 12px;
    color: var(--eclat-cookie-text);
    background: transparent;
    text-align: left;
}

.eclat-cookie-consent__preference-label,
.eclat-cookie-consent__preference-status {
    display: block;
    min-width: 0;
    font-family: "Ubuntu Light", Ubuntu, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.eclat-cookie-consent__preference-status {
    flex: 0 0 auto;
    color: #13832d;
    font-size: 12px;
}

.eclat-cookie-consent__chevron {
    position: relative;
    display: grid;
    place-items: center;
    width: 36px;
    height: 42px;
    color: var(--eclat-cookie-text);
    background: transparent;
}

.eclat-cookie-consent__chevron span {
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.18s ease;
}

.eclat-cookie-consent__preference.is-open .eclat-cookie-consent__chevron span {
    transform: translateY(2px) rotate(225deg);
}

.eclat-cookie-consent__switch {
    position: relative;
    width: 28px;
    height: 17px;
    padding: 0;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
    transition: background 0.18s ease;
}

.eclat-cookie-consent__switch[aria-checked="true"] {
    background: var(--eclat-cookie-toggle);
}

.eclat-cookie-consent__switch-thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 9px;
    height: 9px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
    transition: transform 0.18s ease;
}

.eclat-cookie-consent__switch[aria-checked="true"] .eclat-cookie-consent__switch-thumb {
    transform: translateX(11px);
}

.eclat-cookie-consent__preference-detail {
    margin: -1px 36px 12px 12px;
    color: var(--eclat-cookie-text);
    color: color-mix(in srgb, var(--eclat-cookie-text) 72%, #ffffff);
    font-family: "Ubuntu Light", Ubuntu, "Segoe UI", sans-serif;
    font-size: 12.5px;
    line-height: 1.38;
}

.eclat-cookie-consent__preference-detail p {
    margin: 0;
}

.eclat-cookie-consent__preference-detail p + p {
    margin-top: 0.45em;
}

.eclat-cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.28fr;
    gap: 8px;
    margin: 0 0 12px;
}

.eclat-cookie-consent__button {
    min-width: 0;
    min-height: 42px;
    padding: 9px 10px;
    color: var(--eclat-cookie-text);
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(0, 36, 44, 0.08);
    border-radius: 3px;
    font-family: "Ubuntu Light", Ubuntu, "Segoe UI", sans-serif;
    font-size: 13.5px;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.eclat-cookie-consent__button--primary {
    color: var(--eclat-cookie-primary-text);
    background: var(--eclat-cookie-primary);
    border-color: var(--eclat-cookie-primary);
    font-weight: 700;
}

.eclat-cookie-consent__button:hover,
.eclat-cookie-consent__button:focus-visible {
    transform: translateY(-1px);
    border-color: var(--eclat-cookie-accent);
}

.eclat-cookie-consent__button--primary:hover,
.eclat-cookie-consent__button--primary:focus-visible {
    background: var(--eclat-cookie-primary);
    background: color-mix(in srgb, var(--eclat-cookie-primary) 88%, var(--eclat-cookie-accent));
}

.eclat-cookie-consent__preference-summary:focus-visible,
.eclat-cookie-consent__chevron:focus-visible,
.eclat-cookie-consent__switch:focus-visible,
.eclat-cookie-consent__button:focus-visible,
.eclat-cookie-consent__links a:focus-visible {
    outline: 2px solid var(--eclat-cookie-accent);
    outline-offset: 2px;
}

.eclat-cookie-consent__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 12px;
    color: var(--eclat-cookie-text);
    font-family: "Ubuntu Light", Ubuntu, "Segoe UI", sans-serif;
    font-size: 12px;
    line-height: 1.35;
}

.eclat-cookie-consent__links::before {
    content: "•";
    flex: 0 0 auto;
    color: var(--eclat-cookie-text);
    color: color-mix(in srgb, var(--eclat-cookie-text) 68%, #ffffff);
}

.eclat-cookie-consent__links a {
    color: var(--eclat-cookie-text);
    color: color-mix(in srgb, var(--eclat-cookie-text) 72%, #ffffff);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .eclat-cookie-consent {
        inset: auto 0 0;
        width: 100vw;
        max-width: 100vw;
        padding: 0 10px 10px;
        justify-content: flex-end;
        align-items: flex-end;
        overflow: hidden;
    }

    .eclat-cookie-consent__panel {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        max-height: calc(100dvh - 20px);
        padding: 14px 12px 16px;
        border-radius: 8px;
        box-shadow: 0 -16px 44px rgba(0, 12, 16, 0.16);
        transform: translate3d(calc(100% + 10px), 0, 0);
    }

    .eclat-cookie-consent__title {
        max-width: 240px;
        margin-inline: auto;
        margin-bottom: 10px;
        font-size: clamp(22px, 6.2vw, 27px);
    }

    .eclat-cookie-consent__text {
        margin-bottom: 12px;
        font-size: 12.5px;
        line-height: 1.38;
    }

    .eclat-cookie-consent__preferences {
        gap: 7px;
        margin-bottom: 12px;
    }

    .eclat-cookie-consent__preference-head {
        min-height: 40px;
    }

    .eclat-cookie-consent__preference-summary {
        min-height: 40px;
        padding-left: 10px;
    }

    .eclat-cookie-consent__preference-label {
        font-size: 13.5px;
    }

    .eclat-cookie-consent__preference-status {
        font-size: 11.5px;
    }

    .eclat-cookie-consent__chevron {
        width: 34px;
        height: 40px;
    }

    .eclat-cookie-consent__actions {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 10px;
    }

    .eclat-cookie-consent__button {
        min-height: 40px;
        padding: 9px 12px;
        font-size: 13.5px;
    }

    .eclat-cookie-consent__links {
        gap: 5px 9px;
        font-size: 11.5px;
    }
}

@media (max-width: 360px) {
    .eclat-cookie-consent__preference-summary {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 3px;
    }

    .eclat-cookie-consent__preference-status {
        flex: 0 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eclat-cookie-consent__panel,
    .eclat-cookie-consent__chevron span,
    .eclat-cookie-consent__switch,
    .eclat-cookie-consent__switch-thumb,
    .eclat-cookie-consent__button {
        transition: none;
    }
}
