/* ============================================================
   ITALGURU AGE POPUP - MOBIL OPTIMALIZÁLT v2
   ============================================================ */

/* Overlay háttér */
.it-guru-age-popup-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 16px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Popup */
.it-guru-age-popup {
    display: flex;
    flex-direction: row;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 12px;
    padding: 32px;
    max-width: 900px;
    width: min(900px, 100%);
    color: #eee;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    gap: 32px;
    position: relative;
    flex-wrap: wrap;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Logó */
.it-guru-age-popup-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.it-guru-age-popup-logo img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(1.3);
}

/* Tartalom */
.it-guru-age-popup-content {
    flex: 1;
    min-width: 250px;
}

.it-guru-age-popup-content h4 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #d4af37;
    font-weight: 700;
}

.it-guru-age-popup-content p {
    font-size: 16px;
    color: #ccc;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Gombok */
.it-guru-age-popup-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.it-guru-btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.it-guru-btn.it-guru-btn-allowed {
    background: linear-gradient(45deg, #d4af37, #b78f2c);
    color: #000;
    border: none;
}

.it-guru-btn.it-guru-btn-allowed:hover {
    background: linear-gradient(45deg, #d4af37, #d4af37);
}

.it-guru-btn.it-guru-btn-forbidden {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}

.it-guru-btn.it-guru-btn-forbidden:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #000;
}

/* Hibaüzenet */
.it-guru-age-popup-error {
    color: #ff6b6b;
    margin-bottom: 15px;
    font-weight: bold;
}

/* Felelős fogyasztás link */
.it-guru-age-popup-responsible {
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin-top: 20px;
}

.it-guru-age-popup-responsible a {
    color: #d4af37;
    text-decoration: underline;
}

.it-guru-age-popup-responsible a:hover {
    color: #e6c25e;
}

/* ============================================================
   MOBIL NÉZET - Teljes képernyő, scrollozható
   ============================================================ */

@media (max-width: 768px) {
    .it-guru-age-popup-overlay {
        padding: 0;
        align-items: flex-start;
        overflow-y: auto;
    }

    .it-guru-age-popup {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        max-height: none; /* Ne limitáljuk a magasságot */
        padding: 30px 24px;
        margin: 0;
        border-radius: 0;
        gap: 20px;
        flex-direction: column;
        justify-content: flex-start; /* Felülről indul, nem középről */
        align-items: center;
        overflow: visible;
        background: linear-gradient(180deg, rgba(15, 15, 15, 0.98) 0%, rgba(25, 25, 25, 0.98) 100%);
        box-sizing: border-box;
    }

    /* Logó */
    .it-guru-age-popup-logo {
        width: 100%;
        padding: 20px 0;
        display: flex;
        justify-content: center;
        flex-shrink: 0;
    }

    .it-guru-age-popup-logo img {
        max-width: 150px;
    }

    /* Tartalom */
    .it-guru-age-popup-content {
        width: 100%;
        min-width: 0;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex-shrink: 0;
    }

    .it-guru-age-popup-content h4 {
        font-size: 22px;
        margin-bottom: 14px;
        text-align: center;
        line-height: 1.3;
    }

    .it-guru-age-popup-content p {
        font-size: 14px;
        margin-bottom: 20px;
        line-height: 1.5;
        text-align: center;
        max-width: 100%;
        padding: 0 10px;
    }

    /* Gombok */
    .it-guru-age-popup-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 10px;
        width: 100%;
        max-width: 280px;
    }

    .it-guru-btn {
        width: 100%;
        min-width: 0;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 50px;
    }

    .it-guru-btn.it-guru-btn-allowed {
        order: -1; /* Igen gomb legyen felül */
    }

    /* Felelős fogyasztás */
    .it-guru-age-popup-responsible {
        margin-top: 20px;
        font-size: 11px;
        text-align: center;
        padding: 0 10px 30px 10px;
    }
}

/* ============================================================
   KISEBB MOBILOK (iPhone SE, régi telefonok)
   ============================================================ */

@media (max-width: 380px) {
    .it-guru-age-popup {
        padding: 20px 16px;
    }

    .it-guru-age-popup-logo {
        padding: 15px 0;
    }

    .it-guru-age-popup-logo img {
        max-width: 120px;
    }

    .it-guru-age-popup-content h4 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .it-guru-age-popup-content p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .it-guru-age-popup-buttons {
        max-width: 100%;
    }

    .it-guru-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .it-guru-age-popup-responsible {
        font-size: 10px;
        margin-top: 16px;
    }
}

/* ============================================================
   NAGYON KICSI KÉPERNYŐK (320px széles)
   ============================================================ */

@media (max-width: 320px) {
    .it-guru-age-popup {
        padding: 15px 12px;
        gap: 15px;
    }

    .it-guru-age-popup-logo {
        padding: 10px 0;
    }

    .it-guru-age-popup-logo img {
        max-width: 100px;
    }

    .it-guru-age-popup-content h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .it-guru-age-popup-content p {
        font-size: 12px;
        margin-bottom: 12px;
        line-height: 1.4;
    }

    .it-guru-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .it-guru-age-popup-responsible {
        font-size: 9px;
        padding-bottom: 20px;
    }
}

/* ============================================================
   LANDSCAPE MÓD (fekvő telefon)
   ============================================================ */

@media (max-width: 768px) and (orientation: landscape) {
    .it-guru-age-popup {
        min-height: 100dvh;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: center;
        padding: 20px 30px;
        gap: 25px;
    }

    .it-guru-age-popup-logo {
        padding: 0;
        width: auto;
        flex-shrink: 0;
    }

    .it-guru-age-popup-logo img {
        max-width: 100px;
    }

    .it-guru-age-popup-content {
        text-align: left;
        align-items: flex-start;
    }

    .it-guru-age-popup-content h4 {
        text-align: left;
        font-size: 18px;
        margin-bottom: 8px;
    }

    .it-guru-age-popup-content p {
        text-align: left;
        font-size: 12px;
        margin-bottom: 12px;
        padding: 0;
    }

    .it-guru-age-popup-buttons {
        flex-direction: row;
        max-width: none;
        gap: 10px;
    }

    .it-guru-btn {
        padding: 10px 20px;
        font-size: 13px;
        width: auto;
        min-width: 100px;
    }

    .it-guru-age-popup-responsible {
        text-align: left;
        margin-top: 10px;
        padding-bottom: 0;
    }
}

/* ============================================================
   SAFE AREA (iPhone notch, home indicator)
   ============================================================ */

@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .it-guru-age-popup {
            padding-top: max(30px, env(safe-area-inset-top) + 15px);
            padding-bottom: max(30px, env(safe-area-inset-bottom) + 15px);
            padding-left: max(24px, env(safe-area-inset-left) + 16px);
            padding-right: max(24px, env(safe-area-inset-right) + 16px);
        }
    }
}