/**
 * GDPR cookie kezelő – megjelenés
 * ---------------------------------------------------------------------------
 * Szándékosan nagyon konkrét (gdpr- előtagú) osztálynevek, hogy ne ütközzön
 * az oldal meglévő CSS-ével. Minden méret px-ben, hogy a téma rem-alapú
 * beállításai ne torzítsák el.
 */

.gdpr-banner,
.gdpr-modal,
.gdpr-reopen {
    --gdpr-accent: #ea7d1a;
    --gdpr-accent-dark: #c96712;
    --gdpr-ink: #1f2124;
    --gdpr-muted: #5d6570;
    --gdpr-line: #dfe3e8;
    --gdpr-bg: #ffffff;
    --gdpr-bg-soft: #f4f6f8;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--gdpr-ink);
    box-sizing: border-box;
}

.gdpr-banner *,
.gdpr-modal *,
.gdpr-embed * { box-sizing: border-box; }

.gdpr-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* A saját display szabályaink felülírnák a hidden attribútumot – ez tiltja meg. */
.gdpr-modal[hidden],
.gdpr-overlay[hidden],
.gdpr-reopen[hidden],
.gdpr-cat__body[hidden] { display: none !important; }

/* ============================ 1. réteg: banner ============================
 * FONTOS: a banner NEM takarja le és nem blokkolja az oldalt (nincs overlay,
 * nincs scroll-tiltás). A tartalom hozzájárulás nélkül is olvasható marad –
 * a "cookie wall" tiltott gyakorlat.
 * ========================================================================= */

.gdpr-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 2147483000;
    background: var(--gdpr-bg);
    border-top: 3px solid var(--gdpr-accent);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .16);
    padding: 20px 16px;
    transform: translateY(110%);
    transition: transform .28s ease;
    max-height: 85vh;
    overflow-y: auto;
}

.gdpr-banner.is-visible { transform: translateY(0); }

.gdpr-banner__inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap;
}

.gdpr-banner__text { flex: 1 1 460px; min-width: 280px; }

.gdpr-banner__title {
    margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--gdpr-ink);
}

.gdpr-banner__text p { margin: 0 0 8px; color: var(--gdpr-muted); }

.gdpr-banner__links { font-size: 13px; }
.gdpr-banner__links a { color: var(--gdpr-muted); text-decoration: underline; }
.gdpr-banner__links a:hover,
.gdpr-banner__links a:focus { color: var(--gdpr-accent-dark); }

.gdpr-banner__actions {
    flex: 0 0 auto;
    display: flex; flex-direction: column; gap: 10px;
    min-width: 220px;
}

/* ================================ gombok =================================
 * Az elfogadás és az elutasítás azonos méretű, azonos súlyú, egymás mellett.
 * Csak a színük különbözik, mindkettő jó kontraszttal (WCAG AA).
 * ========================================================================= */

.gdpr-btn {
    display: inline-block; width: 100%;
    padding: 12px 22px;
    font-size: 15px; font-weight: 600; font-family: inherit; line-height: 1.2;
    text-align: center;
    border: 2px solid transparent; border-radius: 4px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.gdpr-btn:focus-visible,
.gdpr-btn:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

.gdpr-btn--accept { background: var(--gdpr-accent); border-color: var(--gdpr-accent); color: #fff; }
.gdpr-btn--accept:hover { background: var(--gdpr-accent-dark); border-color: var(--gdpr-accent-dark); }

.gdpr-btn--reject { background: #3c4148; border-color: #3c4148; color: #fff; }
.gdpr-btn--reject:hover { background: #24282d; border-color: #24282d; }

.gdpr-btn--save { background: #fff; border-color: var(--gdpr-accent); color: var(--gdpr-accent-dark); }
.gdpr-btn--save:hover { background: #fdf3e9; }

.gdpr-btn--link {
    background: none; border-color: transparent; color: var(--gdpr-muted);
    text-decoration: underline; font-weight: 500; padding: 6px;
}
.gdpr-btn--link:hover { color: var(--gdpr-ink); }

.gdpr-btn--sm { width: auto; padding: 9px 18px; font-size: 14px; }

/* ========================= 2. réteg: beállítások ========================= */

.gdpr-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 17, 20, .6);
    z-index: 2147483100;
}

.gdpr-modal {
    position: fixed; inset: 0;
    z-index: 2147483200;
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}

.gdpr-modal__box {
    background: var(--gdpr-bg);
    border-radius: 6px;
    width: 100%; max-width: 760px; max-height: 88vh;
    display: flex; flex-direction: column;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .32);
    overflow: hidden;
}

.gdpr-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--gdpr-line);
}
.gdpr-modal__header h2 { margin: 0; font-size: 19px; font-weight: 700; }

.gdpr-modal__close {
    background: none; border: 0; font-size: 30px; line-height: 1;
    color: var(--gdpr-muted); cursor: pointer; padding: 0 6px;
}
.gdpr-modal__close:hover { color: var(--gdpr-ink); }
.gdpr-modal__close:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

.gdpr-modal__body { padding: 18px 22px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.gdpr-modal__intro { margin: 0 0 18px; color: var(--gdpr-muted); }

.gdpr-modal__footer {
    display: flex; gap: 10px; flex-wrap: wrap;
    padding: 16px 22px; border-top: 1px solid var(--gdpr-line); background: var(--gdpr-bg-soft);
}
.gdpr-modal__footer .gdpr-btn { width: auto; flex: 1 1 180px; }

/* ============================== kategóriák =============================== */

.gdpr-cat { border: 1px solid var(--gdpr-line); border-radius: 5px; margin-bottom: 12px; }

.gdpr-cat__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 14px;
}

.gdpr-cat__toggle {
    display: flex; align-items: center; gap: 10px;
    background: none; border: 0; padding: 4px; cursor: pointer;
    font-family: inherit; font-size: 16px; font-weight: 600; color: var(--gdpr-ink);
    text-align: left; flex: 1 1 auto;
}
.gdpr-cat__toggle:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

.gdpr-cat__arrow {
    width: 0; height: 0; flex: 0 0 auto;
    border-left: 6px solid var(--gdpr-muted);
    border-top: 5px solid transparent; border-bottom: 5px solid transparent;
    transition: transform .18s ease;
}
.gdpr-cat__toggle[aria-expanded="true"] .gdpr-cat__arrow { transform: rotate(90deg); }

.gdpr-cat__always { font-size: 13px; color: var(--gdpr-muted); font-weight: 600; white-space: nowrap; }

.gdpr-cat__body { padding: 0 14px 14px; border-top: 1px solid var(--gdpr-line); }
.gdpr-cat__desc { margin: 12px 0; color: var(--gdpr-muted); font-size: 14px; }

.gdpr-svc__name { margin: 16px 0 2px; font-size: 14px; font-weight: 700; }
.gdpr-svc__purpose { margin: 0 0 8px; font-size: 13px; color: var(--gdpr-muted); }

/* kapcsoló */
.gdpr-switch { position: relative; display: inline-block; width: 48px; height: 26px; flex: 0 0 auto; }
.gdpr-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

.gdpr-switch__slider {
    position: absolute; inset: 0; background: #b9c0c8; border-radius: 26px; transition: background .18s ease;
    pointer-events: none;
}
.gdpr-switch__slider::before {
    content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .18s ease;
}
.gdpr-switch input:checked + .gdpr-switch__slider { background: var(--gdpr-accent); }
.gdpr-switch input:checked + .gdpr-switch__slider::before { transform: translateX(22px); }
.gdpr-switch input:focus + .gdpr-switch__slider { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* süti-táblázat */
.gdpr-table-wrap { overflow-x: auto; }
.gdpr-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.gdpr-table th, .gdpr-table td {
    text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--gdpr-line); vertical-align: top;
}
.gdpr-table th { background: var(--gdpr-bg-soft); font-weight: 700; }
.gdpr-table code { font-family: Consolas, Menlo, monospace; font-size: 12px; word-break: break-all; }

/* ========================= beágyazás helyőrző ============================ */

.gdpr-embed {
    background: var(--gdpr-bg-soft, #f4f6f8);
    border: 1px dashed #c3cad2;
    border-radius: 5px;
    padding: 26px 20px;
    text-align: center;
    margin: 14px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: #1f2124;
}
.gdpr-embed__text { margin: 0 0 14px; color: #5d6570; font-size: 14px; }
.gdpr-embed__link {
    display: block; margin: 10px auto 0; background: none; border: 0; padding: 4px;
    font-family: inherit; font-size: 13px; color: #5d6570; text-decoration: underline; cursor: pointer;
}

/* ============================= visszanyitó ============================== */

.gdpr-reopen {
    position: fixed; left: 16px; bottom: 16px;
    z-index: 2147482900;
    width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%;
    background: var(--gdpr-accent); color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .28);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: .75; transition: opacity .15s ease;
}
.gdpr-reopen:hover, .gdpr-reopen:focus { opacity: 1; }
.gdpr-reopen:focus { outline: 3px solid #1a73e8; outline-offset: 2px; }

.gdpr-noscroll { overflow: hidden; }

/* ================================ mobil ================================= */

@media (max-width: 640px) {
    .gdpr-banner { padding: 16px 14px; }
    .gdpr-banner__inner { gap: 16px; }
    .gdpr-banner__actions { width: 100%; min-width: 0; }
    .gdpr-banner__title { font-size: 17px; }
    .gdpr-modal { padding: 0; }
    .gdpr-modal__box { max-width: none; max-height: 100vh; height: 100%; border-radius: 0; }
    .gdpr-modal__footer .gdpr-btn { flex: 1 1 100%; }
    .gdpr-reopen { width: 40px; height: 40px; left: 10px; bottom: 10px; }
}

/* ========================= mozgásérzékenység ============================ */

@media (prefers-reduced-motion: reduce) {
    .gdpr-banner, .gdpr-cat__arrow, .gdpr-switch__slider, .gdpr-switch__slider::before {
        transition: none;
    }
}

/* ====================== nagy kontrasztú mód ============================= */

@media (prefers-contrast: more) {
    .gdpr-banner { border-top-width: 4px; }
    .gdpr-btn { border-width: 3px; }
    .gdpr-cat { border-width: 2px; }
}
