/* Radio Hy — mobil app shell (alsó nav + Több lap) v1.1 */

@media (min-width: 769px) {
    .radiohy-mobile-bottom-nav,
    .rh-mobile-more-backdrop,
    .rh-mobile-more-sheet {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body.radiohy-mobile-app {
        padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    }

    /* WP admin sáv: ne nyomja le / ne takarja a navot */
    body.radiohy-mobile-app.admin-bar {
        margin-top: 0 !important;
    }

    body.radiohy-mobile-app.admin-bar #wpadminbar {
        position: fixed !important;
        top: auto !important;
        bottom: calc(62px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        min-height: 0;
        opacity: 0.92;
    }

    body.radiohy-mobile-app .mobile-menu-toggle {
        display: none !important;
    }

    body.radiohy-mobile-app .radiohy-nav-buttons {
        display: none !important;
    }

    /* Kompakt fejléc */
    body.radiohy-mobile-app .radiohy-top-bar {
        padding: 6px 10px 4px;
    }

    body.radiohy-mobile-app .radiohy-header-inner {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        text-align: left;
    }

    body.radiohy-mobile-app .radiohy-brand {
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    body.radiohy-mobile-app .radiohy-nav-logo {
        height: 36px !important;
        max-width: 36px !important;
    }

    body.radiohy-mobile-app .brand-title {
        font-size: 1rem !important;
        line-height: 1.1;
    }

    body.radiohy-mobile-app .brand-slogan {
        display: none;
    }

    /* Chat oldalon: kevesebb duplikáció, több hely a chatnek */
    body.radiohy-mobile-app.page-slug-chat .radiohy-info-bar {
        display: none;
    }

    body.radiohy-mobile-app.page-slug-chat .radiohy-compact-bar {
        margin: 6px auto;
        padding: 8px 10px;
    }

    body.radiohy-mobile-app.page-slug-chat .radiohy-broadcast-wrap {
        padding: 0 6px;
    }

    /* Alsó navigáció — egy síkban, nem lóg ki */
    .radiohy-mobile-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100800;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        align-items: end;
        min-height: 56px;
        padding: 0 2px calc(4px + env(safe-area-inset-bottom, 0px));
        background: #0a0a0f;
        border-top: 1px solid rgba(0, 243, 255, 0.4);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8);
    }

    .rh-mnav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 2px;
        min-height: 52px;
        padding: 6px 2px 4px;
        border: none;
        background: transparent;
        color: #888;
        text-decoration: none;
        font: inherit;
        cursor: pointer;
        border-radius: 10px 10px 0 0;
        transition: color 0.2s, background 0.2s;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        min-width: 0;
    }

    .rh-mnav-item:active {
        background: rgba(255, 255, 255, 0.04);
    }

    .rh-mnav-item.is-active {
        color: #00f3ff;
    }

    .rh-mnav-item.is-active .rh-mnav-label {
        color: #00f3ff;
    }

    .rh-mnav-icon {
        font-size: 22px;
        line-height: 1;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .rh-mnav-label {
        font-size: 10px;
        font-weight: 700;
        line-height: 1.1;
        text-align: center;
        color: #999;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Rádió — középen, de a sávban marad */
    .rh-mnav-radio {
        color: #fff;
    }

    .rh-mnav-radio .rh-mnav-icon-radio {
        width: 40px;
        height: 40px;
        margin-top: 0;
        margin-bottom: 1px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: linear-gradient(145deg, #ff1e4d, #b01028);
        border: 2px solid #00f3ff;
        box-shadow: 0 2px 10px rgba(255, 30, 77, 0.4);
        font-size: 16px;
        line-height: 1;
    }

    .rh-mnav-radio.is-playing .rh-mnav-icon-radio {
        background: linear-gradient(145deg, #00b8c4, #007a99);
        box-shadow: 0 2px 10px rgba(0, 243, 255, 0.35);
    }

    /* Több — három vonal (emoji helyett CSS) */
    .rh-mnav-more .rh-mnav-icon-more {
        width: 22px;
        height: 16px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: stretch;
    }

    .rh-mnav-more .rh-mnav-icon-more span {
        display: block;
        height: 2px;
        background: currentColor;
        border-radius: 1px;
    }

    .rh-mnav-more.is-active .rh-mnav-icon-more span {
        background: #00f3ff;
    }

    /* Több lap */
    .rh-mobile-more-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100900;
        background: rgba(0, 0, 0, 0.72);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .rh-mobile-more-backdrop.is-open {
        opacity: 1;
    }

    .rh-mobile-more-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 101000;
        max-height: min(78vh, 620px);
        background: #101014;
        border-top: 2px solid rgba(0, 243, 255, 0.45);
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.85);
        padding: 0 14px calc(14px + env(safe-area-inset-bottom, 0px));
        transform: translateY(105%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .rh-mobile-more-sheet.is-open {
        transform: translateY(0);
    }

    .rh-mobile-more-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 2px 10px;
        border-bottom: 1px solid #222;
        flex-shrink: 0;
    }

    .rh-mobile-more-head h2 {
        margin: 0;
        font-size: 16px;
        color: #00f3ff;
    }

    .rh-mobile-more-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid #444;
        background: #1a1a1a;
        color: #fff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    .rh-mobile-more-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 14px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rh-mobile-more-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 82px;
        padding: 10px 6px;
        border-radius: 14px;
        background: #16161c;
        border: 1px solid #2a2a35;
        color: #eee;
        text-decoration: none;
        text-align: center;
        transition: border-color 0.2s, background 0.2s;
        touch-action: manipulation;
    }

    .rh-mobile-more-link:active,
    .rh-mobile-more-link.is-active {
        border-color: rgba(0, 243, 255, 0.55);
        background: rgba(0, 243, 255, 0.08);
    }

    .rh-mobile-more-link.is-support {
        border-color: rgba(255, 234, 0, 0.45);
        color: #ffea00;
    }

    .rh-mobile-more-link.is-logout {
        border-color: rgba(255, 68, 68, 0.35);
        color: #ff8888;
    }

    .rh-more-icon {
        font-size: 24px;
        line-height: 1;
    }

    .rh-more-label {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
    }

    .rh-mobile-more-social {
        border-top: 1px solid #222;
        padding: 12px 0 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .rh-mobile-more-social-label,
    .rh-mobile-more-lang-label {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #888;
    }

    .rh-mobile-more-social .radiohy-social-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .rh-mobile-more-social .radiohy-social-btn {
        width: 44px;
        height: 44px;
    }

    .rh-mobile-more-social .radiohy-social-btn svg {
        width: 20px;
        height: 20px;
    }

    .rh-mobile-more-lang {
        border-top: 1px solid #222;
        padding: 12px 0 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        flex-shrink: 0;
    }

    .radiohy-lang-inline {
        display: flex;
        align-items: stretch;
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 360px;
        padding: 0 4px;
    }

    .radiohy-lang-inline-btn {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 10px 6px;
        border-radius: 12px;
        border: 1px solid #2a2a35;
        background: #16161c;
        color: #eee;
        text-decoration: none;
        transition: border-color 0.2s, background 0.2s;
        touch-action: manipulation;
    }

    .radiohy-lang-inline-btn.is-active {
        border-color: rgba(255, 179, 0, 0.55);
        background: rgba(255, 179, 0, 0.12);
        box-shadow: 0 0 10px rgba(255, 179, 0, 0.2);
    }

    .radiohy-lang-inline-flag {
        font-size: 22px;
        line-height: 1;
    }

    .radiohy-lang-inline-label {
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
        text-align: center;
    }

    body.radiohy-mobile-app.rh-more-open {
        overflow: hidden;
    }

    body.radiohy-mobile-app #radiohy-chat-wrapper {
        padding-bottom: 2px !important;
    }

    body.radiohy-mobile-app .radiohy-quiz-popup {
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
        max-height: calc(100svh - 78px - env(safe-area-inset-bottom, 0px) - 80px) !important;
    }

    body.radiohy-mobile-app .radiohy-quiz-popup-inner {
        max-height: calc(100svh - 78px - env(safe-area-inset-bottom, 0px) - 80px) !important;
    }

    body.radiohy-mobile-app .radiohy-alert-popup {
        bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        width: min(300px, calc(100vw - 24px)) !important;
        max-height: min(50vh, 340px) !important;
    }

    body.radiohy-mobile-app .radiohy-alert-popup-inner {
        max-height: min(50vh, 340px);
    }
}

@media (max-width: 380px) {
    .rh-mnav-label {
        font-size: 9px;
    }

    .rh-mobile-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
