/* Suti-hozzajarulasi reteg: banner, beallitopanel es a beagyazasok helyorzoi. */

:root {
    --site-consent-alj: 0px;
    --site-consent-magassag: 0px;
    --site-consent-z-banner: 10010;
    --site-consent-z-fatyol: 10020;
    --site-consent-z-panel: 10030;
}

.site-consent[hidden],
.site-consent-banner[hidden],
.site-consent-fatyol[hidden],
.site-consent-panel[hidden] {
    display: none !important;
}

/* A dontes utan a szerveroldali markup soha nem villan fel. */
html.site-consent-dontott .site-consent-banner {
    display: none;
}

.site-consent-banner {
    position: fixed;
    bottom: calc(var(--site-consent-alj, 0px) + 16px);
    left: 16px;
    z-index: var(--site-consent-z-banner);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: var(--space-5);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-family-base);
    color: var(--color-text-body);
}

/* A banner es a panel csak programbol kap fokuszt, ezert nem kap fokuszgyurut, a bennuk levo gombok igen. */
#sns_wrapper .site-consent-banner:focus-visible,
#sns_wrapper .site-consent-panel:focus-visible,
.site-consent-banner:focus,
.site-consent-panel:focus {
    outline: none !important;
}

.site-consent-cim {
    margin: 0 0 var(--space-2);
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-heading);
    color: var(--color-text);
}

.site-consent-leiras {
    margin: 0;
    font-size: var(--font-size-md);
    line-height: var(--line-height-base);
    color: var(--color-text-body);
}

.site-consent-leiras-rovid {
    display: none;
}

.site-consent-link {
    color: var(--color-brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.site-consent-link:hover,
.site-consent-link:focus-visible {
    color: var(--color-brand-hover);
}

.site-consent-gombok {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.site-consent-gomb {
    flex: 1 1 auto;
    min-width: 150px;
    min-height: var(--touch-target-min);
    justify-content: center;
}

.site-consent-fatyol {
    position: fixed;
    inset: 0;
    z-index: var(--site-consent-z-fatyol);
    background: rgb(35 40 42 / 55%);
}

.site-consent-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: var(--site-consent-z-panel);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: min(620px, calc(100vw - 32px));
    max-height: min(84vh, 720px);
    overflow-y: auto;
    padding: var(--space-6);
    transform: translate(-50%, -50%);
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-family-base);
    color: var(--color-text-body);
}

.site-consent-panel-fej {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
}

.site-consent-panel-cim {
    margin: 0;
    font-family: var(--font-family-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-regular);
    line-height: var(--line-height-heading);
    color: var(--color-text);
}

.site-consent-panel-zar {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
    padding: 0;
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface-muted);
    color: var(--color-text);
    cursor: pointer;
}

.site-consent-panel-zar:hover {
    background: var(--color-surface-sunken);
}

.site-consent-panel-zar svg {
    width: 16px;
    height: 16px;
}

.site-consent-panel-leiras {
    margin: 0;
    font-size: var(--font-size-md);
    line-height: var(--line-height-base);
}

.site-consent-lista {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-consent-tetel {
    padding: var(--space-4);
    border: var(--border-width) solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted);
}

.site-consent-tetel-fej {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    min-height: 32px;
}

.site-consent-tetel-cim {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-heading);
    color: var(--color-text);
}

label.site-consent-tetel-cim {
    cursor: pointer;
}

.site-consent-allando {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.site-consent-tetel-leiras {
    margin: var(--space-2) 0 0;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
    color: var(--color-text-body);
}

/* A kapcsolo egy valodi jelolonegyzet, csak a megjelenese sav alaku. */
.site-consent-kapcsolo {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    min-width: var(--touch-target-min);
    min-height: var(--touch-target-min);
}

.site-consent-jelolo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.site-consent-kapcsolo-jel {
    position: relative;
    display: block;
    width: 46px;
    height: 26px;
    border: var(--border-width) solid var(--color-border-strong);
    border-radius: var(--radius-pill);
    background: var(--color-surface-sunken);
    pointer-events: none;
}

.site-consent-kapcsolo-jel::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
    content: "";
    transition: transform 0.15s ease;
}

.site-consent-jelolo:checked + .site-consent-kapcsolo-jel {
    border-color: var(--color-brand-active);
    background: var(--color-brand);
}

.site-consent-jelolo:checked + .site-consent-kapcsolo-jel::after {
    transform: translateX(20px);
}

.site-consent-jelolo:focus-visible + .site-consent-kapcsolo-jel {
    outline: var(--border-width-thick) solid var(--color-brand);
    outline-offset: 2px;
}

.site-consent-panel-gombok {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.site-consent-panel-lab {
    margin: 0;
    font-size: var(--font-size-sm);
}

/* Lablec visszavono gomb: linkkent nez ki, de gomb marad. */
.site-consent-lablec-gomb {
    min-height: 24px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.site-consent-lablec-gomb:hover,
.site-consent-lablec-gomb:focus-visible {
    color: var(--color-on-ink-strong);
}

/* Beagyazas helyorzoje: a Google Terkep es a Facebook csak kattintasra vagy marketing-hozzajarulassal tolt be. */
.site-consent-beagyazas {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-3);
    min-height: 200px;
    padding: var(--space-5);
    border: var(--border-width) dashed var(--color-border-strong);
    border-radius: var(--radius-md);
    background: var(--color-surface-muted);
    text-align: left;
}

.site-consent-beagyazas .site-consent-beagyazas-leiras {
    margin: 0;
    padding: 0;
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
    color: var(--color-text-body);
}

.site-consent-beagyazas-gomb {
    min-height: var(--touch-target-min);
}

.site-consent-beagyazas iframe {
    display: block;
    width: 100%;
    border: 0;
    border-radius: var(--radius-sm);
}

/* Betoltes utan a helyorzo keret eltunik, csak a beagyazott tartalom marad. */
.site-consent-beagyazas.site-consent-beagyazas-kesz {
    display: block;
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
}

/* A lablec sotet, ezert ott a helyorzo is sotet paletta szerint keretezodik. */
.site-footer .site-consent-beagyazas {
    border-color: var(--color-border-on-ink);
    background: rgb(255 255 255 / 4%);
    color: var(--color-on-ink);
}

.site-footer .site-consent-beagyazas-leiras {
    color: var(--color-on-ink);
}

@media (max-width: 767px) {
    .site-consent-banner {
        right: 12px;
        bottom: calc(var(--site-consent-alj, 0px) + 12px);
        left: 12px;
        width: auto;
        max-height: 72vh;
        padding: var(--space-4);
        gap: var(--space-3);
    }

    /* Mobilon a fo gomb egesz soros, a masik ketto egy sorba fer, igy alacsonyabb a banner. */
    .site-consent-gombok .site-consent-gomb {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    .site-consent-gombok .site-consent-gomb:first-child {
        flex: 1 1 100%;
    }

    .site-consent-panel {
        padding: var(--space-4);
    }

    .site-consent-panel-gombok .site-consent-gomb {
        flex: 1 1 100%;
    }
}

/* Telefonon a sav a kepernyo negyede alatt marad: tomorebb szoveg, harom gomb egy sorban. */
@media (max-width: 575px) {
    .site-consent-banner {
        gap: var(--space-2);
        padding: var(--space-3) var(--space-4);
    }

    .site-consent-cim {
        margin-bottom: 2px;
        font-size: var(--font-size-base);
    }

    .site-consent-leiras {
        font-size: var(--font-size-xs);
        line-height: 1.45;
    }

    .site-consent-leiras-teljes {
        display: none;
    }

    .site-consent-leiras-rovid {
        display: block;
    }

    .site-consent-gombok {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .site-consent-gombok .site-consent-gomb,
    .site-consent-gombok .site-consent-gomb:first-child {
        flex: 1 1 0;
        min-width: 0;
        padding-inline: var(--space-2);
        font-size: var(--font-size-sm);
    }
}

/* A banner soha ne takarja el a chat-buborekot es a mobil szurofiok kuldogombjat: amig latszik, mindketto folemelkedik. */
@media (max-width: 991px) {
    #sns_wrapper .site-chat {
        bottom: calc(var(--space-4) + var(--site-consent-alj, 0px) + var(--site-consent-magassag, 0px));
    }

    #sns_wrapper .site-szuro[data-nyitva="true"] {
        padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px) + var(--site-consent-magassag, 0px));
    }

    .site-consent-lablec-gomb {
        min-height: var(--touch-target-min);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-consent-kapcsolo-jel::after {
        transition: none;
    }
}
