/* Cookie consent banner, shared by every page. Uses the color tokens each page defines in :root. */
.consent {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 100;
    max-width: 40rem;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.5rem;
}

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

.consent p { margin: 0 0 1rem; }

/* Detailed choices, one row per cookie type */
.consent-title {
    font-weight: 600;
    color: var(--navy-900);
}

.consent .consent-title { margin-bottom: 0.5rem; }

.consent-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-light);
    cursor: pointer;
}

.consent-option:has(input:disabled) { cursor: default; }

.consent-option input {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    margin: 0.1875rem 0 0;
    accent-color: var(--accent);
}

.consent-option strong {
    display: block;
    font-weight: 500;
    color: var(--navy-900);
}

.consent-choices .consent-actions { margin-top: 0.75rem; }

.consent a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.consent .btn {
    padding: 0.625rem 1.5rem;
    border: 1px solid transparent;
    font-family: inherit;
    cursor: pointer;
}

.consent .btn-outline {
    background: #fff;
    border-color: var(--border);
    box-shadow: none;
    color: var(--navy-900);
}

.consent .btn-outline:hover {
    background: var(--surface);
    color: var(--navy-900);
}

/* Footer "Cookie settings" control, styled like the footer links */
.link-button {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0.25rem;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: color 0.15s ease;
}

.link-button:hover { color: var(--accent); }

/* Phones: stack the buttons full width */
@media (max-width: 480px) {
    .consent-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: no-preference) {
    .consent { animation: consent-in 0.4s var(--ease-out); }
}

@keyframes consent-in {
    from { opacity: 0; transform: translateY(12px); }
}
