/* Cookie consent — news_tgn_0009 SLICE FRONT (teal editorial) */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--n9-paper, #ffffff);
    color: var(--n9-ink, #14181a);
    border-top: 3px solid var(--n9-accent, #0c6e6e);
    box-shadow: 0 -8px 28px rgba(18, 18, 18, 0.08);
    font-family: var(--n9-font-body, "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif);
    animation: n9-cookie-slide-up 0.35s ease-out;
}

@keyframes n9-cookie-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-banner.show { display: block; }

.cookie-consent-content {
    max-width: var(--n9-max, 1180px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}

.cookie-consent-text {
    flex: 1;
    min-width: min(100%, 280px);
}

.cookie-consent-text > div:first-child {
    margin-bottom: 6px;
    font-family: var(--n9-font-display, "Barlow Condensed", "Arial Narrow", Impact, sans-serif);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--n9-accent, #0c6e6e);
}

.cookie-consent-text p {
    margin: 0 0 6px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--n9-muted, #5b5b5b);
}

.cookie-consent-text a {
    color: var(--n9-accent, #0c6e6e);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent-text a:hover {
    color: var(--n9-deep, #8f0000);
}

.cookie-consent-buttons {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.cookie-btn {
    padding: 10px 18px;
    border-radius: 0;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cookie-btn-accept {
    background: var(--n9-accent, #0c6e6e);
    color: #fff;
    border-color: var(--n9-accent, #0c6e6e);
}

.cookie-btn-accept:hover {
    background: var(--n9-deep, #8f0000);
    border-color: var(--n9-deep, #8f0000);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--n9-ink, #14181a);
    border-color: var(--n9-line, rgba(18, 18, 18, 0.12));
}

.cookie-btn-reject:hover {
    background: var(--n9-soft, #f6f6f6);
    border-color: var(--n9-ink, #14181a);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--n9-accent, #0c6e6e);
    border-color: rgba(184, 0, 0, 0.28);
}

.cookie-btn-settings:hover {
    background: #fff5f5;
    border-color: var(--n9-accent, #0c6e6e);
}

.cookie-settings-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(18, 18, 18, 0.55);
}

.cookie-settings-modal.show { display: flex; }

.cookie-settings-content {
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px 22px;
    border-radius: 0;
    background: var(--n9-paper, #ffffff);
    color: var(--n9-ink, #14181a);
    border: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
    border-top: 3px solid var(--n9-accent, #0c6e6e);
    box-shadow: 0 16px 48px rgba(18, 18, 18, 0.18);
    font-family: var(--n9-font-body, "Source Sans 3", "Source Sans Pro", system-ui, -apple-system, "Segoe UI", sans-serif);
    animation: n9-cookie-modal-in 0.25s ease-out;
}

@keyframes n9-cookie-modal-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
}

.cookie-settings-header > div {
    font-family: var(--n9-font-display, "Barlow Condensed", "Arial Narrow", Impact, sans-serif);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--n9-ink, #14181a);
}

.cookie-settings-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
    border-radius: 0;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    color: var(--n9-muted, #5b5b5b);
    cursor: pointer;
}

.cookie-settings-close:hover {
    color: var(--n9-accent, #0c6e6e);
    border-color: var(--n9-accent, #0c6e6e);
    background: #fff5f5;
}

.cookie-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
}

.cookie-setting-item:last-child { border-bottom: none; }

.cookie-setting-info > div {
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--n9-ink, #14181a);
}

.cookie-setting-info p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--n9-muted, #5b5b5b);
}

.cookie-toggle {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    border-radius: 999px;
    background: #e8e8e8;
    border: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
    transition: 0.3s;
}

.cookie-toggle-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 18, 18, 0.18);
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: var(--n9-accent, #0c6e6e);
    border-color: var(--n9-accent, #0c6e6e);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(22px);
}

.cookie-toggle.disabled { opacity: 0.5; cursor: not-allowed; }
.cookie-toggle.disabled input { cursor: not-allowed; }

.cookie-settings-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--n9-line, rgba(18, 18, 18, 0.12));
}

/* Sit above mobile bottom nav */
@media (max-width: 767px) {
    .cookie-consent-banner {
        bottom: calc(56px + env(safe-area-inset-bottom, 0px));
        padding-bottom: 16px;
    }

    .cookie-consent-content { flex-direction: column; text-align: center; }
    .cookie-consent-buttons { width: 100%; justify-content: center; }
    .cookie-btn { flex: 1; min-width: 0; }
    .cookie-setting-item { flex-direction: column; align-items: flex-start; }
    .cookie-toggle { align-self: flex-end; }
    .cookie-settings-footer { flex-direction: column; }
    .cookie-settings-footer .cookie-btn { width: 100%; }
}
