/* Niche cookie consent popup. Cookiebot records consent; its own dialog and
   widget are hidden so this branded popup is the only consent UI. */
#CybotCookiebotDialog,
#CybotCookiebotDialogBodyUnderlay,
#CookiebotWidget {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

html.nc-open,
html.nc-open body { overflow: hidden; }

.nc-overlay {
    --nc-navy: #010a35;
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(1, 10, 53, 0.45);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.nc-overlay[hidden] { display: none; }
.nc-overlay.is-visible { opacity: 1; }

.nc-panel {
    position: relative;
    width: min(100%, 42rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: clamp(2rem, 6vw, 3.25rem) clamp(1.5rem, 6vw, 3rem) clamp(1.5rem, 4vw, 2.25rem);
    border-radius: 4px;
    background: #fff;
    color: var(--nc-navy);
    text-align: center;
    box-shadow: 0 24px 70px rgba(1, 10, 53, 0.28);
    transform: translateY(12px);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.nc-overlay.is-visible .nc-panel { transform: none; }

.nc-view[hidden] { display: none; }

.nc-title {
    margin: 0 0 0.85rem;
    font: 500 clamp(1.6rem, 4.5vw, 2.1rem)/1.15 'DM Sans', sans-serif;
    letter-spacing: -0.02em;
    color: var(--nc-navy);
    outline: none;
}

.nc-text {
    margin: 0 auto;
    max-width: 34rem;
    font: 400 0.95rem/1.65 'Plus Jakarta Sans', sans-serif;
    color: rgba(1, 10, 53, 0.82);
}
.nc-text a,
.nc-inline-link {
    color: var(--nc-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.nc-inline-link {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.nc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.nc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.25rem;
    padding: 0 1.5rem;
    border: 1px solid var(--nc-navy);
    border-radius: 4px;
    font: 500 0.95rem/1 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nc-btn--primary { background: var(--nc-navy); color: #fff; }
.nc-btn--primary:hover { background: #0a1a5c; border-color: #0a1a5c; }
.nc-btn--outline { background: #fff; color: var(--nc-navy); }
.nc-btn--outline:hover { background: var(--nc-navy); color: #fff; }
.nc-btn--text {
    min-height: 2.75rem;
    border-color: transparent;
    background: none;
    color: rgba(1, 10, 53, 0.72);
}
.nc-btn--text:hover { color: var(--nc-navy); text-decoration: underline; text-underline-offset: 3px; }

.nc-btn:focus-visible,
.nc-inline-link:focus-visible,
.nc-text a:focus-visible,
.nc-close:focus-visible,
.nc-switch input:focus-visible + .nc-switch-track {
    outline: 2px solid #54c1bf;
    outline-offset: 2px;
}

.nc-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 4px;
    background: none;
    color: rgba(1, 10, 53, 0.55);
    cursor: pointer;
}
.nc-close:hover { color: var(--nc-navy); background: #f3f4f6; }
.nc-close[hidden] { display: none; }

/* Settings view */
.nc-categories {
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
    border-top: 1px solid #e5e7eb;
}
.nc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}
.nc-category-copy { display: flex; flex-direction: column; gap: 0.2rem; }
.nc-category-label { font: 600 0.95rem/1.3 'Plus Jakarta Sans', sans-serif; }
.nc-category-text { font: 400 0.85rem/1.5 'Plus Jakarta Sans', sans-serif; color: rgba(1, 10, 53, 0.68); }
.nc-always-on {
    flex: none;
    font: 600 0.72rem/1 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2a8f8d;
}

.nc-switch { position: relative; flex: none; cursor: pointer; }
.nc-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.nc-switch-track {
    display: block;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    transition: background-color 0.2s ease;
}
.nc-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: calc(1.5rem - 6px);
    height: calc(1.5rem - 6px);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(1, 10, 53, 0.25);
    transition: transform 0.2s ease;
}
.nc-switch input:checked + .nc-switch-track { background: var(--nc-navy); }
.nc-switch input:checked + .nc-switch-track::after { transform: translateX(1.25rem); }

/* Floating settings button, shown only once a choice exists. */
.nc-settings-btn {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 0;
    border-radius: 999px;
    background: #010a35;
    color: #ffc93c;
    box-shadow: 0 6px 18px rgba(1, 10, 53, 0.25);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nc-settings-btn:hover { background: #54c1bf; color: #fff; }
.nc-settings-btn:focus-visible { outline: 2px solid #54c1bf; outline-offset: 3px; }
.nc-settings-btn[hidden] { display: none; }

body:has(#mobile-fullscreen-expansion) .nc-settings-btn,
body:has(#details-overlay.active) .nc-settings-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 520px) {
    .nc-panel { padding-top: 2.25rem; }
    .nc-settings-btn { left: 1rem; bottom: 1rem; width: 3rem; height: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
    .nc-overlay,
    .nc-panel,
    .nc-switch-track,
    .nc-switch-track::after { transition: none; }
}
