/*
 * ADS-MÉRÉS (S4) — GDPR cookie-sáv v2 (granuláris) stílusa.
 * doc: workOrderManagement/docs/seo-hirdethetoseg/01-suti-tajekoztato-es-consent-jog-2026-08-22.md
 *
 * Sötét üveg-sáv: SZÁNDÉKOSAN önálló (nem a --cp-* tokenekre épül), hogy a világos
 * cégoldalon ÉS a sötét /rendeles oldalon (portal-dark) is egyformán, jól olvashatóan
 * jelenjen meg. Márka-kék (#0B5FFF) kiemelés.
 */
.bw-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;               /* minden fölött (lightbox, sticky nav) */
    background: rgba(17, 24, 39, 0.94);
    color: #eef2f7;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(14px) saturate(1.1);
    -webkit-backdrop-filter: blur(14px) saturate(1.1);
    animation: bw-consent-in .28s ease-out both;
}

@keyframes bw-consent-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.bw-consent[hidden],
.bw-consent-main[hidden],
.bw-consent-panel[hidden] { display: none; }

.bw-consent-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 18px;
}

/* ── 1. réteg: szöveg + gombok ─────────────────────────────────────────────── */
.bw-consent-main {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.bw-consent-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: #d7dee8;
    flex: 1 1 320px;
}

.bw-consent-text a {
    color: #7fb4ff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bw-consent-actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
    align-items: center;
}

.bw-consent-btn {
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, transform .05s ease;
    white-space: nowrap;
}

.bw-consent-btn:active { transform: translateY(1px); }

/* „Beállítások" — visszafogott szöveg-gomb */
.bw-consent-link-btn {
    background: transparent;
    color: #aeb9c6;
    border-color: transparent;
    padding: 10px 10px;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.bw-consent-link-btn:hover { color: #eef2f7; }

.bw-consent-decline {
    background: transparent;
    color: #c3ccd8;
    border-color: rgba(255, 255, 255, 0.22);
}
.bw-consent-decline:hover { background: rgba(255, 255, 255, 0.08); }

.bw-consent-accept {
    background: #0B5FFF;
    color: #fff;
    box-shadow: 0 6px 18px rgba(11, 95, 255, 0.4);
}
.bw-consent-accept:hover { background: #2a76ff; }

/* ── 2. réteg: kategóriák ──────────────────────────────────────────────────── */
.bw-consent-panel {
    display: block;
}

.bw-consent-cat {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.bw-consent-cat:first-child { padding-top: 4px; }

.bw-consent-cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    cursor: pointer;
}
/* A „szükséges" fejléc nem interaktív */
.bw-consent-cat:first-child .bw-consent-cat-head { cursor: default; }

.bw-consent-cat-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #f3f6fa;
}

.bw-consent-cat-desc {
    margin: 4px 0 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #aab4c0;
    max-width: 760px;
}

.bw-consent-locked {
    font-size: 12px;
    font-weight: 600;
    color: #8fe3b0;
    background: rgba(25, 135, 84, 0.18);
    border: 1px solid rgba(25, 135, 84, 0.35);
    border-radius: 999px;
    padding: 3px 10px;
    white-space: nowrap;
}

.bw-consent-panel .bw-consent-actions {
    justify-content: flex-end;
    margin-top: 14px;
}

/* Kapcsoló (toggle) az analitika/marketing kategóriákhoz */
.bw-consent-switch {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background .15s ease;
    margin: 0;
}
.bw-consent-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}
.bw-consent-switch:checked { background: #0B5FFF; }
.bw-consent-switch:checked::after { transform: translateX(20px); }
.bw-consent-switch:focus-visible { outline: 2px solid #7fb4ff; outline-offset: 2px; }

/* ── Mobil ─────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .bw-consent {
        left: 8px;
        right: 8px;
        bottom: 8px;
        border-radius: 14px;
        max-height: 85vh;
        overflow-y: auto;
    }
    .bw-consent-inner { padding: 14px; }
    .bw-consent-main {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .bw-consent-actions { flex-wrap: wrap; }
    .bw-consent-main .bw-consent-btn { flex: 1 1 40%; }
    .bw-consent-panel .bw-consent-btn { flex: 1 1 40%; }
}

@media (prefers-reduced-motion: reduce) {
    .bw-consent { animation: none; }
    .bw-consent-switch, .bw-consent-switch::after { transition: none; }
}
