/* ============================================================
   NDA Cookie Consent — banner + preferences modal
   Styled to the live brand canon (colors_and_type.css):
   ink #0E0F11 · dark-card #1A1B1E · accent #FF5722 · pill buttons
   ============================================================ */

.nda-cc,
.nda-cc * { box-sizing: border-box; }

.nda-cc {
    --cc-bg:      #16181b;
    --cc-card:    #1f2226;
    --cc-fg:      #ffffff;
    --cc-fg-mute: rgba(255, 255, 255, .62);
    --cc-line:    rgba(255, 255, 255, .12);
    --cc-accent:  #FF5722;
    --cc-accent-deep: #C75721;
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
    color: var(--cc-fg);
}

.nda-cc[hidden] { display: none !important; }
.nda-cc [hidden] { display: none !important; }

/* ---------- Blocking scrim (cookie wall) ---------- */
.nda-cc-scrim {
    position: fixed;
    inset: 0;
    z-index: 99998;            /* below banner (99999) and modal (100000) */
    background: rgba(8, 9, 11, .62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: nda-cc-fade .35s ease;
}
@keyframes nda-cc-fade { from { opacity: 0; } to { opacity: 1; } }
html.agntix-light .nda-cc-scrim { background: rgba(15, 17, 19, .42); }

/* ---------- Light site theme: adapt surface to match the page ---------- */
html.agntix-light .nda-cc {
    --cc-bg:      #ffffff;
    --cc-card:    #f5f7f9;
    --cc-fg:      #0f1113;
    --cc-fg-mute: rgba(15, 17, 19, .62);
    --cc-line:    rgba(15, 17, 19, .12);
}
html.agntix-light .nda-cc-banner { box-shadow: 0 18px 50px rgba(15, 17, 19, .14); }
html.agntix-light .nda-cc-modal__card { box-shadow: 0 24px 70px rgba(15, 17, 19, .22); }
html.agntix-light .nda-cc-switch__track { background: rgba(15, 17, 19, .22); }
html.agntix-light .nda-cc-btn--reject:hover { border-color: rgba(15, 17, 19, .4); }

/* ---------- Bottom banner ---------- */
.nda-cc-banner {
    position: fixed;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 99999;
    max-width: 1180px;
    margin: 0 auto;
    background: var(--cc-bg);
    border: 1px solid var(--cc-line);
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
    padding: 26px 30px;
    display: flex;
    align-items: center;
    gap: 28px;
    animation: nda-cc-rise .42s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes nda-cc-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nda-cc-banner__text { flex: 1 1 auto; }

.nda-cc-banner__title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
    color: var(--cc-fg);   /* banner is always dark — keep title light in both site themes */
}

.nda-cc-banner__copy {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-fg-mute);
    margin: 0;
}

.nda-cc-banner__copy a {
    color: var(--cc-fg);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nda-cc-banner__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ---------- Buttons ---------- */
.nda-cc-btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 13px 24px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.nda-cc-btn:active { transform: translateY(1px); }

.nda-cc-btn--accept {
    background: var(--cc-accent);
    color: #fff;
}
.nda-cc-btn--accept:hover { background: var(--cc-accent-deep); }

.nda-cc-btn--reject {
    background: transparent;
    color: var(--cc-fg);
    border-color: var(--cc-line);
}
.nda-cc-btn--reject:hover { border-color: rgba(255, 255, 255, .4); }

.nda-cc-btn--ghost {
    background: transparent;
    color: var(--cc-fg-mute);
    padding: 13px 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.nda-cc-btn--ghost:hover { color: var(--cc-fg); }

/* ---------- Preferences modal ---------- */
.nda-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.nda-cc-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(2px);
}
.nda-cc-modal__card {
    position: relative;
    width: 100%;
    max-width: 540px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--cc-bg);
    border: 1px solid var(--cc-line);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
    animation: nda-cc-rise .42s cubic-bezier(0.16, 1, 0.3, 1);
}
.nda-cc-modal__title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: var(--cc-fg);   /* modal is always dark — keep title light in both site themes */
}
.nda-cc-modal__intro {
    font-size: 14px;
    line-height: 1.6;
    color: var(--cc-fg-mute);
    margin: 0 0 22px;
}

.nda-cc-cat {
    border: 1px solid var(--cc-line);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.nda-cc-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}
.nda-cc-cat__name { font-size: 15px; font-weight: 600; }
.nda-cc-cat__desc { font-size: 13px; line-height: 1.55; color: var(--cc-fg-mute); margin: 0; }

/* Toggle switch */
.nda-cc-switch { position: relative; width: 44px; height: 24px; flex: 0 0 auto; }
.nda-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nda-cc-switch__track {
    position: absolute; inset: 0;
    background: rgba(255, 255, 255, .18);
    border-radius: 999px;
    transition: background .2s ease;
    pointer-events: none;
}
.nda-cc-switch__track::after {
    content: "";
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
}
.nda-cc-switch input:checked + .nda-cc-switch__track { background: var(--cc-accent); }
.nda-cc-switch input:checked + .nda-cc-switch__track::after { transform: translateX(20px); }
.nda-cc-switch input:disabled { cursor: not-allowed; }
.nda-cc-switch input:disabled + .nda-cc-switch__track { background: var(--cc-accent); opacity: .55; }

.nda-cc-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}
.nda-cc-modal__actions .nda-cc-btn { flex: 1; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .nda-cc-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 18px;
        padding: 22px;
        left: 12px; right: 12px; bottom: 12px;
    }
    .nda-cc-banner__actions { flex-wrap: wrap; }
    .nda-cc-banner__actions .nda-cc-btn { flex: 1 1 auto; text-align: center; }
    .nda-cc-btn--ghost { flex-basis: 100%; }
}
@media (max-width: 480px) {
    .nda-cc-modal__actions { flex-direction: column; }
}
