/* ===================================================================
 * Ebéd menü widget – stílus v1.2.3
 * Összes szabály .em- prefixszel (téma-izolált).
 * Accent: #2d4a2b (iskolai sötétzöld).
 * =================================================================== */

.em-wrap {
    max-width: 640px;
    margin: 0 auto;
    background: #faf8f3;
    color: #2c2c2a;
    border: 1px solid #e7e5e0;
    border-radius: 16px;
    padding: 24px 24px 20px;
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0,0,0,.08), 0 12px 32px rgba(45,74,43,.14);
}
.em-wrap * { box-sizing: border-box; }

/* --- Fejléc: eyebrow + dátum + tanév-select --- */
.em-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}
.em-eyebrow {
    display: block;
    font-size: 12px;
    color: #7a8074;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
}
.em-date {
    font-size: 22px;
    font-weight: 600;
    color: #2d4a2b;
    letter-spacing: -.01em;
}

/* Tanév-select: pill-szerű, a korábbi badge vizuális stílusát örökli */
.em-year-sel {
    height: 32px;
    border: 1px solid #d0c9b8;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
    background: #f0e9d6;
    color: #6a5a1f;
    cursor: pointer;
    align-self: center;
    font-family: inherit;
    transition: border-color .15s;
    /* Csak egy tanév van általában – ha több, lenyílik */
}
.em-year-sel:hover  { border-color: #b8a87c; }
.em-year-sel:focus  { outline: 2px solid #2d4a2b; outline-offset: 2px; }

/* --- Vezérlők: prev / hónap-select / next --- */
.em-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.em-nav {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid #d9d7d0;
    background: #faf8f3;
    border-radius: 10px;
    color: #2d4a2b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s, transform .05s;
    padding: 0;
}
.em-nav svg { width: 20px; height: 20px; }
.em-nav:hover:not(:disabled) { background: #f6f5f1; border-color: #2d4a2b; }
.em-nav:active:not(:disabled) { transform: scale(.97); }
.em-nav:disabled { opacity: .35; cursor: default; }

/* Hónap-select (a controls sorban, régi hetek-select helyén) */
.em-select {
    flex: 1;
    height: 44px;
    border: 1px solid #d9d7d0;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 14px;
    background: #faf8f3;
    color: #2c2c2a;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.em-select:hover { border-color: #2d4a2b; }
.em-select:focus {
    outline: none;
    border-color: #2d4a2b;
    box-shadow: 0 0 0 3px rgba(45,74,43,.12);
}

/* --- Kép-terület --- */
.em-stage {
    position: relative;            /* a zoom-ikon EHHEZ igazodik (abszolút poz.) */
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf8f3;
    border: 1px solid #efeee9;
    border-radius: 12px;
    overflow: hidden;
}
.em-stage img { display: block; max-width: 100%; height: auto; cursor: zoom-in; }
.em-msg {
    font-size: 14px;
    color: #7a8074;
    padding: 32px 20px;
    text-align: center;
    position: relative;
    cursor: zoom-in;
}

/* --- Lábléc: PDF letöltése gomb (középen) --- */
.em-foot {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}
.em-dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #2d4a2b;
    border: 1px solid #2d4a2b;
    border-radius: 10px;
    padding: 11px 18px;
    transition: background .15s, transform .05s, box-shadow .15s;
}
.em-dl svg { width: 16px; height: 16px; flex-shrink: 0; }
.em-dl:hover { background: #1f3b1d; color: #fff; box-shadow: 0 4px 12px rgba(45,74,43,.18); }
.em-dl:active { transform: scale(.98); }
.em-dl.is-off {
    background: #efeee9;
    color: #a8a8a3;
    border-color: #efeee9;
    pointer-events: none;
    box-shadow: none;
}

/* --- Mobilra --- */
@media (max-width: 480px) {
    .em-wrap   { padding: 18px 16px 16px; border-radius: 14px; }
    .em-date   { font-size: 19px; }
    .em-head   { margin-bottom: 14px; }
    .em-controls { margin-bottom: 14px; }
}
/* --- Zoom jelzés a képen --- */
.em-zoom-hint {
    position: absolute;
    right: 8px;
    bottom: 8px;
    background: rgba(0,0,0,.45);
    color: #fff;
    border-radius: 6px;
    padding: 5px;
    pointer-events: none;
    opacity: .85;                  /* mobilon nincs hover, ezért alapból jól látszik */
    transition: opacity .15s;
}
.em-stage:hover .em-zoom-hint { opacity: 1; }
.em-zoom-hint svg { width: 16px; height: 16px; display: block; }

/* --- Lightbox dialog (teljes képernyős nagyító) --- */
.em-lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;                /* dinamikus magasság mobilon (címsor-barát) */
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    border: none;
    padding: 0;
    background: transparent;
    overflow: auto;                /* zoomolt képnél görgethető */
    overscroll-behavior: contain;
}
.em-lightbox::backdrop {
    background: rgba(0,0,0,.9);
}

/* A kép-konténer: középre igazít, ha a kép befér.
   A "safe center" megakadályozza, hogy zoomolt képnél a teteje levágódjon. */
.em-lb-stage {
    min-width: 100%;
    min-height: 100%;
    display: flex;
    align-items: safe center;
    justify-content: safe center;
    padding: 16px;
    cursor: zoom-out;              /* a kép körüli üres terület = bezárás */
}

.em-lb-img {
    display: block;
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,.5);
    cursor: zoom-in;               /* kattintásra tovább nagyít */
}
/* Tovább-nagyított állapot: a kép natív (1:1) méretben, a dialog görget */
.em-lb-img.is-zoomed {
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    cursor: zoom-out;
}

.em-lb-close {
    position: fixed;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #1c1c1a;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
    padding: 0;
    z-index: 2;
}
.em-lb-close svg { width: 18px; height: 18px; }
.em-lb-close:hover { background: #fff; }