/* Carvara Consent Manager */
:root {
    --cv-consent-bg: #0b1728;
    --cv-consent-card: #0f2034;
    --cv-consent-line: rgba(148, 180, 210, .18);
    --cv-consent-text: #f4f8fc;
    --cv-consent-muted: #9fb0c2;
    --cv-consent-accent: #28d6a5;
    --cv-consent-accent-2: #25a9ff;
}

.cv-consent-lock { overflow: hidden; }

.cv-consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(2, 8, 16, .58);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.cv-consent-backdrop.is-visible { opacity: 1; visibility: visible; }

.cv-consent-banner {
    position: fixed;
    left: 50%;
    bottom: 1.25rem;
    z-index: 1100;
    width: min(1120px, calc(100% - 2rem));
    transform: translate(-50%, calc(100% + 3rem));
    opacity: 0;
    visibility: hidden;
    transition: transform .28s ease, opacity .2s ease, visibility .2s ease;
}
.cv-consent-banner.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
}
.cv-consent-panel {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--cv-consent-line);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at 0 0, rgba(37,169,255,.10), transparent 24rem),
        radial-gradient(circle at 100% 100%, rgba(40,214,165,.08), transparent 25rem),
        rgba(11, 23, 40, .98);
    box-shadow: 0 28px 80px rgba(0,0,0,.45);
}
.cv-consent-inner { padding: clamp(1.15rem, 2.6vw, 1.75rem); }
.cv-consent-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: end;
}
.cv-consent-brand {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.cv-consent-icon {
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border-radius: .9rem;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    color: #06101d;
    background: linear-gradient(135deg, var(--cv-consent-accent), var(--cv-consent-accent-2));
    box-shadow: 0 0 32px rgba(40,214,165,.14);
}
.cv-consent-icon svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.cv-consent-title {
    margin: 0 0 .45rem;
    color: var(--cv-consent-text);
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    letter-spacing: -.025em;
}
.cv-consent-copy {
    margin: 0;
    max-width: 720px;
    color: var(--cv-consent-muted);
    font-size: .92rem;
    line-height: 1.65;
}
.cv-consent-copy a { color: #aaf2dd; text-decoration: underline; text-underline-offset: 3px; }
.cv-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    min-width: 440px;
}
.cv-consent-btn {
    min-height: 46px;
    border-radius: .78rem;
    border: 1px solid rgba(255,255,255,.18);
    padding: .7rem .95rem;
    font: inherit;
    font-size: .86rem;
    font-weight: 750;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.cv-consent-btn:hover { transform: translateY(-1px); }
.cv-consent-btn:focus-visible { outline: 3px solid rgba(37,169,255,.35); outline-offset: 2px; }
.cv-consent-btn-neutral {
    background: rgba(255,255,255,.045);
    color: #edf6fc;
}
.cv-consent-btn-neutral:hover { background: rgba(255,255,255,.085); border-color: rgba(255,255,255,.30); }
.cv-consent-btn-choice {
    background: rgba(40,214,165,.10);
    border-color: rgba(40,214,165,.36);
    color: #c9fbed;
}
.cv-consent-btn-choice:hover { background: rgba(40,214,165,.16); border-color: rgba(40,214,165,.52); }

.cv-consent-settings {
    position: fixed;
    inset: 0;
    z-index: 1120;
    display: grid;
    place-items: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.cv-consent-settings.is-visible { opacity: 1; visibility: visible; }
.cv-consent-settings-card {
    width: min(680px, 100%);
    max-height: min(820px, calc(100vh - 2rem));
    overflow: auto;
    border-radius: 1.35rem;
    border: 1px solid var(--cv-consent-line);
    background: rgba(11,23,40,.995);
    box-shadow: 0 32px 100px rgba(0,0,0,.55);
}
.cv-consent-settings-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.4rem 1.4rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.cv-consent-settings-head h2 {
    margin: 0 0 .35rem;
    color: var(--cv-consent-text);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.025em;
}
.cv-consent-settings-head p { margin: 0; color: var(--cv-consent-muted); font-size: .88rem; line-height: 1.6; }
.cv-consent-close {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: .7rem;
    background: rgba(255,255,255,.035);
    color: #dbe8f2;
    cursor: pointer;
}
.cv-consent-settings-body { padding: 1.25rem 1.4rem; }
.cv-consent-category {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 1rem;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.cv-consent-category:first-child { padding-top: 0; }
.cv-consent-category:last-child { border-bottom: 0; padding-bottom: 0; }
.cv-consent-category-title { display: flex; gap: .55rem; align-items: center; margin-bottom: .35rem; color: #f1f7fc; font-weight: 780; }
.cv-consent-badge {
    border: 1px solid rgba(40,214,165,.28);
    background: rgba(40,214,165,.08);
    color: #aaf2dd;
    border-radius: 999px;
    padding: .18rem .45rem;
    font-size: .68rem;
    font-weight: 750;
}
.cv-consent-category p { margin: 0; color: var(--cv-consent-muted); font-size: .84rem; line-height: 1.6; }
.cv-consent-vendor { margin-top: .65rem !important; color: #8195a8 !important; font-size: .78rem !important; }
.cv-consent-switch { position: relative; width: 48px; height: 26px; margin-top: .15rem; }
.cv-consent-switch input { position: absolute; opacity: 0; pointer-events: none; }
.cv-consent-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #304255;
    border: 1px solid rgba(255,255,255,.10);
    cursor: pointer;
    transition: .2s ease;
}
.cv-consent-slider::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: #dce8f2;
    transition: transform .2s ease;
}
.cv-consent-switch input:checked + .cv-consent-slider { background: rgba(40,214,165,.55); border-color: rgba(40,214,165,.55); }
.cv-consent-switch input:checked + .cv-consent-slider::after { transform: translateX(22px); background: #f2fffb; }
.cv-consent-switch input:disabled + .cv-consent-slider { opacity: .75; cursor: not-allowed; }
.cv-consent-settings-foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: .65rem;
    padding: 1.1rem 1.4rem 1.4rem;
    border-top: 1px solid rgba(255,255,255,.07);
}

button.footer-link {
    appearance: none;
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 900px) {
    .cv-consent-top { grid-template-columns: 1fr; align-items: stretch; }
    .cv-consent-actions { min-width: 0; }
}
@media (max-width: 620px) {
    .cv-consent-banner { width: calc(100% - 1rem); bottom: .5rem; }
    .cv-consent-panel { border-radius: 1rem; }
    .cv-consent-brand { gap: .8rem; }
    .cv-consent-icon { width: 2.65rem; height: 2.65rem; }
    .cv-consent-actions, .cv-consent-settings-foot { grid-template-columns: 1fr; }
    .cv-consent-actions .cv-consent-btn[data-cv-consent-settings] { order: 3; }
    .cv-consent-settings { padding: .5rem; }
    .cv-consent-settings-card { border-radius: 1rem; max-height: calc(100vh - 1rem); }
}

@media (prefers-reduced-motion: reduce) {
    .cv-consent-backdrop, .cv-consent-banner, .cv-consent-settings, .cv-consent-btn, .cv-consent-slider, .cv-consent-slider::after { transition: none !important; }
}
