/* Date of Creation: 26 October 2026. Responsive cookie preference popup. */
.cookie-dialog {
    box-sizing: border-box;
    width: min(560px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    position: fixed;
    inset: auto 16px max(16px, env(safe-area-inset-bottom)) auto;
    z-index: 1200;
    margin: 0;
    padding: clamp(20px, 4vw, 32px);
    overflow-y: auto;
    border: 1px solid #e8c382;
    border-radius: 12px;
    background: #ffffff;
    color: #14263d;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Updated: 27 October 2026. No backdrop, focus trap or scroll lock. */
.cookie-dialog[hidden] {
    display: none;
}

.cookie-dialog:not([hidden]) {
    animation: cookie-rise 1100ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

@keyframes cookie-rise {
    from {
        opacity: 0;
        transform: translateY(calc(100% + 32px));
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 650ms ease, color 650ms ease;
}

.cookie-close svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.cookie-close:hover {
    background: #e8c382;
    color: #14263d;
}

.cookie-dialog h2 {
    margin: 0 32px 16px 0;
    font-size: 1.5rem;
}

.cookie-dialog p {
    margin: 0 0 16px;
    text-align: left;
}

.cookie-dialog > a {
    color: inherit;
    font-weight: 700;
}

.cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.cookie-actions button {
    flex: 1 1 190px;
    min-height: 44px;
    padding: 12px 16px;
    border: 1px solid #14263d;
    border-radius: 6px;
    background: #e8c382;
    color: #14263d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 650ms ease;
}

.cookie-actions button:hover {
    background: #f4deb7;
}

.cookie-dialog :focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.cookie-settings {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

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

:root[data-theme="dark"] .cookie-dialog {
    background: #15243a;
    color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-actions button {
        transition: none;
    }
}

/* Respect reduced-motion preferences without delaying the notice. */
@media (prefers-reduced-motion: reduce) {
    .cookie-dialog:not([hidden]) {
        animation: none;
    }

    .cookie-close {
        transition: none;
    }
}
