/*
 * FortiVox — Cookie consent banner & preferences modal.
 * Matches the dark, glass-style aesthetic of the marketing site
 * (variables resolved from site.css) and falls back to safe colours
 * when surfaced on lighter layouts.
 */

:root {
    --fv-cc-bg: #0f172a;
    --fv-cc-bg-alt: #1e293b;
    --fv-cc-border: rgba(148, 163, 184, 0.25);
    --fv-cc-text: #e2e8f0;
    --fv-cc-muted: #94a3b8;
    --fv-cc-primary: #3b82f6;
    --fv-cc-primary-hover: #2563eb;
    --fv-cc-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fv-cc-banner[hidden],
.fv-cc-modal[hidden]{ display: none !important; }

/* ---------- Bottom banner ------------------------------------------------ */
.fv-cc-banner{
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 2147483000;
    background: rgba(15, 23, 42, 0.96);
    color: var(--fv-cc-text);
    border: 1px solid var(--fv-cc-border);
    border-radius: 14px;
    box-shadow: var(--fv-cc-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: fv-cc-slide-up 0.35s ease-out;
}
@keyframes fv-cc-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fv-cc-banner-inner{
    display: flex; gap: 24px; align-items: center;
    padding: 18px 22px; max-width: 1280px; margin: 0 auto;
    flex-wrap: wrap;
}
.fv-cc-banner-text{ flex: 1 1 380px; min-width: 0; }
.fv-cc-banner-text h3{
    margin: 0 0 6px; font-size: 16px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 8px;
}
.fv-cc-banner-text h3 i{ color: #f59e0b; }
.fv-cc-banner-text p{
    margin: 0; font-size: 14px; line-height: 1.55; color: var(--fv-cc-muted);
}
.fv-cc-banner-text p a{
    color: #93c5fd; text-decoration: underline; margin-inline-start: 4px;
}
.fv-cc-banner-actions{
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    flex-shrink: 0;
}

/* ---------- Buttons ------------------------------------------------------- */
.fv-cc-btn{
    appearance: none; border: 1px solid transparent;
    padding: 10px 18px; border-radius: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
    line-height: 1.2; white-space: nowrap;
}
.fv-cc-btn:active{ transform: translateY(1px); }
.fv-cc-btn-primary{ background: var(--fv-cc-primary); color: #fff; }
.fv-cc-btn-primary:hover{ background: var(--fv-cc-primary-hover); }
.fv-cc-btn-secondary{
    background: rgba(148, 163, 184, 0.12); color: var(--fv-cc-text);
    border-color: var(--fv-cc-border);
}
.fv-cc-btn-secondary:hover{ background: rgba(148, 163, 184, 0.2); }
.fv-cc-btn-ghost{
    background: transparent; color: var(--fv-cc-text);
    border-color: var(--fv-cc-border);
}
.fv-cc-btn-ghost:hover{ background: rgba(148, 163, 184, 0.1); }

/* ---------- Preferences modal -------------------------------------------- */
.fv-cc-modal{
    position: fixed; inset: 0; z-index: 2147483100;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.fv-cc-modal-backdrop{
    position: absolute; inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    animation: fv-cc-fade 0.2s ease-out;
}
@keyframes fv-cc-fade { from { opacity: 0; } to { opacity: 1; } }
.fv-cc-modal-panel{
    position: relative; z-index: 1;
    width: 100%; max-width: 640px; max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    background: var(--fv-cc-bg);
    color: var(--fv-cc-text);
    border: 1px solid var(--fv-cc-border);
    border-radius: 16px; overflow: hidden;
    box-shadow: var(--fv-cc-shadow);
    animation: fv-cc-pop 0.25s ease-out;
}
@keyframes fv-cc-pop {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.fv-cc-modal-head{
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--fv-cc-border);
}
.fv-cc-modal-head h3{
    margin: 0; font-size: 17px; font-weight: 700;
    display: inline-flex; align-items: center; gap: 10px;
}
.fv-cc-modal-head h3 i{ color: var(--fv-cc-primary); }
.fv-cc-modal-close{
    appearance: none; border: 0; background: transparent;
    color: var(--fv-cc-muted); font-size: 18px; cursor: pointer;
    width: 32px; height: 32px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
}
.fv-cc-modal-close:hover{ background: rgba(148, 163, 184, 0.15); color: #fff; }
.fv-cc-modal-body{ padding: 18px 22px; overflow-y: auto; }
.fv-cc-modal-lead{
    margin: 0 0 18px; font-size: 14px; line-height: 1.55;
    color: var(--fv-cc-muted);
}

/* ---------- Category rows ------------------------------------------------ */
.fv-cc-cat{
    padding: 14px 16px; border: 1px solid var(--fv-cc-border);
    border-radius: 12px; margin-bottom: 12px;
    background: rgba(148, 163, 184, 0.05);
}
.fv-cc-cat:last-child{ margin-bottom: 0; }
.fv-cc-cat-row{
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
}
.fv-cc-cat-title{ font-size: 15px; font-weight: 600; color: var(--fv-cc-text); }
.fv-cc-cat-desc{
    margin: 8px 0 0; font-size: 13px; line-height: 1.5;
    color: var(--fv-cc-muted);
}

/* ---------- Toggle switch ------------------------------------------------ */
.fv-cc-switch{
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    cursor: pointer; user-select: none;
}
.fv-cc-switch input{ position: absolute; opacity: 0; pointer-events: none; }
.fv-cc-slider{
    width: 42px; height: 24px; border-radius: 999px;
    background: rgba(148, 163, 184, 0.3); position: relative;
    transition: background 0.2s ease;
}
.fv-cc-slider::before{
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 18px; height: 18px; border-radius: 50%; background: #fff;
    transition: transform 0.2s ease;
}
.fv-cc-switch input:checked + .fv-cc-slider{ background: var(--fv-cc-primary); }
.fv-cc-switch input:checked + .fv-cc-slider::before{ transform: translateX(18px); }
.fv-cc-switch-locked .fv-cc-slider{ opacity: 0.6; cursor: not-allowed; }
.fv-cc-locked-label{
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: #10b981;
}

/* ---------- Modal footer ------------------------------------------------- */
.fv-cc-modal-foot{
    display: flex; gap: 10px; flex-wrap: wrap;
    padding: 16px 22px; border-top: 1px solid var(--fv-cc-border);
    justify-content: flex-end;
}

/* ---------- RTL ---------------------------------------------------------- */
html[dir="rtl"] .fv-cc-switch input:checked + .fv-cc-slider::before{
    transform: translateX(-18px);
}
html[dir="rtl"] .fv-cc-banner-text p a{ margin-inline-start: 0; margin-inline-end: 4px; }

/* ---------- Mobile ------------------------------------------------------- */
@media (max-width: 768px){
    .fv-cc-banner{ left: 8px; right: 8px; bottom: 8px; border-radius: 12px; }
    .fv-cc-banner-inner{ padding: 14px 16px; gap: 14px; }
    .fv-cc-banner-actions{ width: 100%; }
    .fv-cc-banner-actions .fv-cc-btn{ flex: 1 1 auto; text-align: center; }
    .fv-cc-modal-panel{ max-height: calc(100vh - 16px); border-radius: 14px; }
    .fv-cc-modal-foot{ flex-direction: column; }
    .fv-cc-modal-foot .fv-cc-btn{ width: 100%; }
}
