
/* =======================================================================
   ESEMÉNY MODAL (v2.5.3)
   Kártyára kattintásra felugró AJAX popup – EventON-ihlette, de saját stílus
   ======================================================================= */

/* -- Body scroll lock (JS osztályozza) ----------------------------------- */
body.abe-modal-open {
    overflow: hidden;
}

/* -- Overlay (fekete háttér) --------------------------------------------- */
.abe-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0);
    align-items: center;
    justify-content: center;
    padding: 16px;
    transition: background 0.25s ease;
    box-sizing: border-box;
}

.abe-modal-overlay.abe-modal-visible {
    display: flex;
}

.abe-modal-overlay.abe-modal-active {
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(3px);
}

/* -- Modal doboz ---------------------------------------------------------- */
.abe-modal-box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 560px;  /* alap – tablet és kisebb PC */
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.26s cubic-bezier(0.34, 1.2, 0.64, 1),
                opacity 0.22s ease;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}

.abe-modal-overlay.abe-modal-active .abe-modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* -- Loading állapot (megnyitáskor) -------------------------------------- */
.abe-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 24px;
    font-size: 15px;
    color: #718096;
    min-height: 160px;
}

/* -- Modal belső struktúra ----------------------------------------------- */
.abe-modal-inner {
    display: flex;
    flex-direction: column;
}

/* -- Bezárás gomb (modern narancs ikon, keret nélkül) -------------------- */
/* Csak a valódi gombra – a frontend.js hiba-állapotú szöveges
   <a class="abe-modal-close"> linkjeit szándékosan NEM érinti. */
button.abe-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: none;
    -webkit-appearance: none;
    appearance: none;
    color: #E8943A;            /* AktívBalaton header akcent-narancs */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
    transition: color 0.15s ease, transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), filter 0.15s ease;
}
button.abe-modal-close .abe-modal-close-ikon {
    width: 34px;
    height: 34px;
    display: block;
    pointer-events: none;   /* a klikk mindig a gombra essen, ne az svg path-ra */
}
/* A kitöltést közvetlenül kényszerítjük – így sem az Elementor globális
   "button" színe, sem egy téma-féle "svg { fill }" szabály nem írja felül.
   (A currentColor öröklődés ezeknél kék lett.) */
button.abe-modal-close .abe-modal-close-ikon,
button.abe-modal-close .abe-modal-close-ikon path {
    fill: #E8943A !important;   /* AktívBalaton header akcent-narancs */
}
button.abe-modal-close:hover {
    transform: scale(1.12);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
button.abe-modal-close:hover .abe-modal-close-ikon,
button.abe-modal-close:hover .abe-modal-close-ikon path {
    fill: #d67f24 !important;   /* kicsit mélyebb narancs hoverre */
}
button.abe-modal-close:active {
    transform: scale(0.96);
}
button.abe-modal-close:focus-visible {
    outline: 2px solid #E8943A;
    outline-offset: 2px;
    border-radius: 8px;
}

/* -- Képterület (blur bg + contain fg, mint a kártyákon) ----------------- */
.abe-modal-img-wrap {
    display: block;
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #111827;
    text-decoration: none;
    border-radius: 16px 16px 0 0;
    flex-shrink: 0;
}

.abe-modal-img-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(16px) brightness(0.35) saturate(1.2);
    transform: scale(1.08);
}

.abe-modal-img-fg {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* -- Modal tartalom törzs ------------------------------------------------- */
.abe-modal-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* -- Tagek (kategória, típus) --------------------------------------------- */
.abe-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* -- Cím ------------------------------------------------------------------ */
.abe-modal-title {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    color: #1a202c;
    letter-spacing: -0.2px;
}
.abe-modal-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.abe-modal-title a:hover {
    color: var(--kat-szin, #0073aa);
}

/* -- Meta sorok ----------------------------------------------------------- */
.abe-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 12px 0;
    border-top: 1px solid #f0f4f8;
    border-bottom: 1px solid #f0f4f8;
}

.abe-modal-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #2d3748;
    line-height: 1.45;
}

.abe-modal-meta-item i {
    width: 16px;
    flex-shrink: 0;
    color: #0073aa;
    font-size: 13px;
    margin-top: 2px;
}
.abe-modal-meta-item .fa-map-marker-alt { color: #e53e3e; }

a.abe-modal-helyszin-link {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}
a.abe-modal-helyszin-link:hover { color: #0073aa; text-decoration: underline; }
.abe-modal-helyszin-varos { color: #718096; font-weight: 400; }

/* -- Jegy gomb ------------------------------------------------------------ */
.abe-modal-body a.abe-btn-jegy-nagy {
    font-size: 14px;
    padding: 11px 22px;
    margin-bottom: 0;
    border-radius: 9px;
    align-self: flex-start;
}

/* -- Leírás előnézet ------------------------------------------------------ */
.abe-modal-leiras {
    font-size: 14px;
    line-height: 1.65;
    color: #4a5568;
}

/* -- Naptárhoz adás ------------------------------------------------------- */
.abe-modal-cal {
    background: linear-gradient(135deg, #ebf8ff 0%, #e3f2fd 100%);
    border: 1px solid #90cdf4;
    border-radius: 10px;
    padding: 12px 14px;
}

.abe-modal-cal-title {
    font-size: 11px;
    font-weight: 800;
    color: #2b6cb0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.abe-modal-cal .abe-cal-blokk-gombok {
    flex-wrap: wrap;
    gap: 8px;
}

/* -- Lábléc (megosztás + teljes részletek gomb) -------------------------- */
.abe-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f4f8;
    flex-wrap: wrap;
}

/* Megosztás ikonok a láblécben */
.abe-modal-share {
    display: flex;
    gap: 6px;
    align-items: center;
}

.abe-modal-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
    border: 1.5px solid transparent;
    flex-shrink: 0;
}

.abe-modal-share-btn.abe-share-btn--fb      { background: #1877f2; color: #fff; border-color: #1877f2; }
.abe-modal-share-btn.abe-share-btn--fb:hover { background: #1565d8; transform: translateY(-2px); }

.abe-modal-share-btn.abe-share-btn--twitter      { background: #000; color: #fff; border-color: #000; }
.abe-modal-share-btn.abe-share-btn--twitter:hover { background: #333; transform: translateY(-2px); }

.abe-modal-share-btn.abe-share-btn--email      { background: #fff; color: #4a5568; border-color: #cbd5e0; }
.abe-modal-share-btn.abe-share-btn--email:hover { background: #edf2f7; transform: translateY(-2px); }

.abe-modal-share-btn.abe-share-btn--copy      { background: #fff; color: #4a5568; border-color: #cbd5e0; }
.abe-modal-share-btn.abe-share-btn--copy:hover { background: #edf2f7; transform: translateY(-2px); }

/* Teljes részletek gomb */
a.abe-modal-full-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--kat-szin, #0073aa);
    color: #fff;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: filter 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.14);
    white-space: nowrap;
}
a.abe-modal-full-link:hover {
    filter: brightness(0.88);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    color: #fff;
}
a.abe-modal-full-link i { transition: transform 0.2s ease; }
a.abe-modal-full-link:hover i { transform: translateX(3px); }

/* -- Kártya és lista sor: pointer cursor (jelzi a kattinthatóságot) ------ */
[data-esemeny-id] {
    cursor: pointer;
}

/* -- Wider screens: nagyobb modal --------------------------------------- */
@media (min-width: 700px) {
    .abe-modal-box { max-width: 680px; }
}
@media (min-width: 1024px) {
    .abe-modal-box { max-width: 860px; }
    /* Kép kicsit laposabb, hogy a tartalom hamarabb kezdődjek */
    .abe-modal-img-wrap { max-height: 320px; }
}
@media (min-width: 1400px) {
    .abe-modal-box { max-width: 980px; }
}

/* =======================================================================
   HAVI NAPTÁR MODAL – szélesebb variáns (v2.16.0)
   A 7 oszlopos naptárnak több vízszintes hely kell, mint egy esemény-
   leírásnak; a modal a VIEWPORT-hoz méreteződik, nem az oldal-layout
   oszlopaihoz, így a Szo/V oszlop köztes ablakméretnél sem vágódik le.
   (Mobilon a naptár NEM modalban nyílik – lásd frontend.js ≥768px ág.)
   ======================================================================= */
.abe-naptar-modal-overlay .abe-modal-box--naptar {
    max-width: 880px;   /* tablet / kis PC */
}
@media (min-width: 1024px) {
    .abe-naptar-modal-overlay .abe-modal-box--naptar { max-width: 1150px; }
}
@media (min-width: 1400px) {
    .abe-naptar-modal-overlay .abe-modal-box--naptar { max-width: 1400px; }
}
@media (min-width: 1700px) {
    /* Nagyon széles monitorok: a növekedés arányosan folytatódjon, de marad a
       max-height:90vh + overflow-y:auto, így a "modal-érzet" megmarad. */
    .abe-naptar-modal-overlay .abe-modal-box--naptar { max-width: 1580px; }
}

/* A modalba ágyazott naptár saját kártya-kerete felesleges (a modal-box adja).
   A bal/jobb belső padding ad "levegőt" a H és V oszlopnak a modal pereméig;
   a szélesebb modalokhoz arányosan nő (lásd media query-k lentebb). */
.abe-modal-box--naptar .abe-calendar-honap {
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    padding: 16px 20px 18px;
}
@media (min-width: 1024px) {
    .abe-modal-box--naptar .abe-calendar-honap { padding: 20px 28px 24px; }
}
@media (min-width: 1400px) {
    .abe-modal-box--naptar .abe-calendar-honap { padding: 24px 36px 28px; }
}
/* Az X (bezárás) gomb méretének RÖGZÍTÉSE. DevTools szerint egy ismeretlen
   eredetű külső szabály (valószínűleg Elementor/téma globális "button" stílusa)
   56×38px-re hizlalja és padding: 14px 28px-et ad hozzá, emiatt csúszott a ▶ alá.
   Erős, jól körülhatárolt felülírás (mindkét class + overlay scope) → csak a
   naptár-modal X gombját érinti, a sima esemény-modal X-ét NEM. */
.abe-naptar-modal-overlay button.abe-modal-close.abe-naptar-modal-close {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    min-width: 0 !important;
}
/* A hónapléptető ▶ gombja ne kerüljön a jobb-felső X gomb alá: kifejezetten a
   ▶ gombot toljuk balra (margin-right), nem a teljes nav-sávot. 64px nagyvonalú
   tartalék, ami akkor is elég hézagot hagy, ha az X mérete megint változna. */
.abe-naptar-modal-overlay .abe-cal-nav-btn.abe-cal-next {
    margin-right: 64px;
}
/* Naptár-modal bezáró gomb ikonja (FA – nem SVG, mint az esemény-modalé). */
.abe-naptar-modal-close i {
    font-size: 22px;
}

/* =======================================================================
   NAPTÁR-MODAL – EGY NAP RÉSZLETES LISTÁJA ("+ N további", v2.17.0)
   ======================================================================= */
/* A "+ N további" a modalban kattintható (a beágyazott panelben marad default). */
.abe-naptar-modal-overlay .abe-cal-tobb {
    cursor: pointer;
}
.abe-naptar-modal-overlay .abe-cal-tobb:hover {
    text-decoration: underline;
}

.abe-cal-nap-reszletes {
    padding: 16px 20px 18px;
}
@media (min-width: 1024px) {
    .abe-cal-nap-reszletes { padding: 20px 28px 24px; }
}
@media (min-width: 1400px) {
    .abe-cal-nap-reszletes { padding: 24px 36px 28px; }
}

.abe-cal-nap-fejlec {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}
a.abe-cal-nap-vissza {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: #f0f6fc;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    color: #0073aa;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}
a.abe-cal-nap-vissza:hover {
    background: #e1effe;
    border-color: #0073aa;
    color: #0073aa;
}
.abe-cal-nap-cim {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.3;
}

.abe-cal-nap-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
a.abe-cal-nap-esemeny {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 11px 14px;
    border-left: 4px solid #0073aa;
    background: #f7fafc;
    border-radius: 0 8px 8px 0;
    text-decoration: none;
    transition: background 0.15s, transform 0.12s;
}
a.abe-cal-nap-esemeny:hover {
    background: #edf2f7;
    transform: translateX(2px);
}
a.abe-cal-nap-esemeny--cancelled {
    opacity: 0.6;
    text-decoration: line-through;
}
.abe-cal-nap-esemeny-ido {
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    letter-spacing: 0.3px;
}
.abe-cal-nap-esemeny-ido i { margin-right: 2px; }
.abe-cal-nap-esemeny-nev {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.35;
}
.abe-cal-nap-esemeny-helyszin {
    font-size: 12px;
    color: #718096;
}
.abe-cal-nap-esemeny-helyszin .fa-map-marker-alt { color: #e53e3e; margin-right: 2px; }

/* -- Reszponzív – mobilon bottom sheet stílus ----------------------------- */
@media (max-width: 600px) {
    .abe-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .abe-modal-box {
        max-width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(40px) scale(1);
    }
    .abe-modal-overlay.abe-modal-active .abe-modal-box {
        transform: translateY(0) scale(1);
    }
    .abe-modal-img-wrap {
        height: 180px;
        border-radius: 16px 16px 0 0;
    }
    .abe-modal-title { font-size: 17px; }
    .abe-modal-body { padding: 16px 16px 20px; gap: 10px; }
    .abe-modal-footer { flex-direction: column-reverse; align-items: stretch; }
    a.abe-modal-full-link { justify-content: center; }
    .abe-modal-share { justify-content: center; }
}

/* =======================================================================
   PROGRAM – napi bontás: a v2.44.0 óta a modal is a közös program-napi.php
   partialt használja (.abe-prognapi-*, CSS a frontend.css-ben) – a régi
   .abe-modal-alkalom-* lapos lista szabályai törölve.
   ======================================================================= */
