/* =========================================================
   Vuln-X Cookie Consent - banner + preferences modal
   Brand: dark navy/near-black surface, cyan accent, white text.
   ========================================================= */

.vx-cc-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2050;
    background: rgba(11, 13, 18, 0.97);
    border-top: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.45);
    padding: 1.1rem 1rem;
    color: #e2e8f0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .38s ease-out, transform .38s ease-out;
}
.vx-cc-banner.vx-cc-show { opacity: 1; transform: translateY(0); }

.vx-cc-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.vx-cc-text { flex: 1 1 420px; min-width: 260px; }
.vx-cc-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .25rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.vx-cc-title i { color: #38BDF8; }
.vx-cc-desc { font-size: .85rem; line-height: 1.5; color: #94a3b8; margin: 0; }
.vx-cc-desc a { color: #38BDF8; text-decoration: none; }
.vx-cc-desc a:hover { text-decoration: underline; }

.vx-cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
/* All three actions share the same weight - no dark patterns. */
.vx-cc-btn {
    font-size: .85rem;
    font-weight: 600;
    padding: .5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, .45);
    background: transparent;
    color: #e2e8f0;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}
.vx-cc-btn:hover { background: rgba(148, 163, 184, .14); color: #fff; }
.vx-cc-btn-primary {
    background: #38BDF8;
    border-color: #38BDF8;
    color: #0b1220;
}
.vx-cc-btn-primary:hover { background: #7dd3fc; border-color: #7dd3fc; color: #0b1220; }
.vx-cc-btn:focus-visible { outline: 2px solid #38BDF8; outline-offset: 2px; }

/* ---------------- Preferences modal ---------------- */
.vx-cc-overlay {
    position: fixed;
    inset: 0;
    z-index: 2060;
    background: rgba(2, 6, 12, .72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity .25s ease-out;
}
.vx-cc-overlay.vx-cc-show { opacity: 1; }

.vx-cc-modal {
    width: 100%;
    max-width: 620px;
    max-height: 88vh;
    overflow-y: auto;
    background: #0f141c;
    border: 1px solid rgba(56, 189, 248, .25);
    border-radius: 14px;
    color: #e2e8f0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    transform: translateY(16px);
    transition: transform .28s ease-out;
}
.vx-cc-overlay.vx-cc-show .vx-cc-modal { transform: translateY(0); }

.vx-cc-modal-head {
    padding: 1.1rem 1.25rem .8rem;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.vx-cc-modal-head h2 { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0 0 .25rem; }
.vx-cc-modal-head p { font-size: .82rem; color: #94a3b8; margin: 0; }
.vx-cc-close {
    background: transparent; border: none; color: #94a3b8;
    font-size: 1.3rem; line-height: 1; cursor: pointer; padding: .1rem .3rem;
}
.vx-cc-close:hover { color: #fff; }

.vx-cc-body { padding: .5rem 1.25rem 1rem; }

.vx-cc-cat {
    padding: .9rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.vx-cc-cat:last-child { border-bottom: none; }
.vx-cc-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .3rem;
}
.vx-cc-cat-name { font-size: .92rem; font-weight: 700; color: #fff; }
.vx-cc-badge {
    font-size: .65rem; font-weight: 700; letter-spacing: .5px;
    padding: .15rem .45rem; border-radius: 999px; text-transform: uppercase;
    margin-left: .45rem; vertical-align: middle;
}
.vx-cc-badge-req { background: rgba(56,189,248,.16); color: #7dd3fc; border: 1px solid rgba(56,189,248,.35); }
.vx-cc-badge-opt { background: rgba(148,163,184,.14); color: #cbd5e1; border: 1px solid rgba(148,163,184,.3); }
.vx-cc-badge-unused { background: rgba(234,179,8,.12); color: #fbbf24; border: 1px solid rgba(234,179,8,.32); }
.vx-cc-cat-desc { font-size: .8rem; color: #94a3b8; line-height: 1.5; margin: 0; }
.vx-cc-cat-desc ul { margin: .35rem 0 0; padding-left: 1.1rem; }
.vx-cc-cat-desc li { margin-bottom: .1rem; }

/* Accessible switch */
.vx-cc-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.vx-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vx-cc-slider {
    position: absolute; inset: 0; border-radius: 999px;
    background: rgba(148, 163, 184, .3);
    transition: background .2s ease;
    pointer-events: none;
}
.vx-cc-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .2s ease;
}
.vx-cc-switch input:checked + .vx-cc-slider { background: #38BDF8; }
.vx-cc-switch input:checked + .vx-cc-slider::before { transform: translateX(20px); }
.vx-cc-switch input:disabled + .vx-cc-slider { background: rgba(56,189,248,.45); opacity: .7; }
.vx-cc-switch input:disabled { cursor: not-allowed; }
.vx-cc-switch input:focus-visible + .vx-cc-slider { outline: 2px solid #38BDF8; outline-offset: 2px; }

.vx-cc-modal-foot {
    padding: .9rem 1.25rem 1.1rem;
    border-top: 1px solid rgba(148, 163, 184, .16);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

/* Status table used on the Settings page */
.vx-cc-status-row { display: flex; justify-content: space-between; align-items: center; padding: .4rem 0; font-size: .88rem; }
.vx-cc-status-row + .vx-cc-status-row { border-top: 1px solid rgba(148,163,184,.12); }
.vx-cc-status-val { font-weight: 600; }
.vx-cc-on { color: #22c55e; }
.vx-cc-off { color: #94a3b8; }
.vx-cc-always { color: #38BDF8; }

/* ---------------- Mobile ---------------- */
@media (max-width: 640px) {
    .vx-cc-banner { padding: .9rem .85rem; max-height: 72vh; overflow-y: auto; }
    .vx-cc-inner { gap: .75rem; }
    .vx-cc-actions { width: 100%; }
    .vx-cc-actions .vx-cc-btn { flex: 1 1 100%; text-align: center; padding: .6rem 1rem; }
    .vx-cc-title { font-size: .95rem; }
    .vx-cc-desc { font-size: .8rem; }
    .vx-cc-modal { max-height: 92vh; }
    .vx-cc-modal-foot .vx-cc-btn { flex: 1 1 100%; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
    .vx-cc-banner, .vx-cc-overlay, .vx-cc-modal { transition: none; }
    .vx-cc-banner { transform: none; }
    .vx-cc-modal { transform: none; }
}
