/**
 * JaduGo Theme - Responsive Styles
 * Mobile-first approach for two-row header design
 *
 * @package JaduGo
 * @version 3.0.0
 */

/* ==========================================================================
   TABLET (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Header — Keep BOTH rows visible on mobile/Android */
    /* Row 1 (brand bar) stays visible with hamburger + JaduGo */
    /* Row 2 (icon nav tabs) stays visible below — icons only, labels hidden */

    .jadugo-header-nav {
        display: block; /* Always show on mobile */
    }

    .jadugo-nav-tabs {
        height: 48px;
        padding: 0 4px;
    }

    .jadugo-tab {
        min-width: 44px;
        padding: 6px 8px;
        font-size: 18px;
    }

    /* v5.1.0 (Topic 9): icon-background tiles stay perfectly round on mobile
       (labels hidden here — icons only). */
    .jadugo-tab i {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .jadugo-tab-label {
        display: none; /* Hide text labels on mobile, show only icons */
    }

    .jadugo-tab.active::after {
        width: 20px;
        height: 2px;
    }

    .jadugo-main {
        min-height: calc(100vh - 100px - 56px);
    }

    /* Hero */
    .jadugo-hero {
        min-height: 60vh;
    }

    .jadugo-hero-title {
        font-size: 36px !important;
    }

    .jadugo-hero-subtitle {
        font-size: 18px !important;
    }

    .jadugo-hero-desc {
        font-size: 14px !important;
    }

    .jadugo-hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .jadugo-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    /* Features */
    .jadugo-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    /* Stats Grid */
    .mv-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px;
    }

    .mv-stat-full {
        grid-column: 1 / -1;
    }

    /* v3.9.0: dead rules removed (.mv-plans-grid / .mv-profile-grid —
       no template uses these classes). */

    /* ---- v3.9.0: Form page responsive rules REMOVED ----
       The old rules forced `width: 100% !important` on every input / label /
       button inside the standalone form page, overriding the admin's own
       Height / Width / Padding / Display / Line-height and breaking inline
       layouts. The standalone form page now renders admin form_code
       pixel-perfect (isolated scope in form-styles.css + page-form.php). */
}

/* ==========================================================================
   MOBILE (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    /* General */
    body {
        font-size: 13px;
    }

    /* Header */
    .jadugo-header-top-inner {
        height: 48px;
    }

    .jadugo-brand-text {
        font-size: 20px;
    }

    .jadugo-nav-tabs {
        height: 44px;
    }

    .jadugo-tab {
        min-width: 40px;
        padding: 6px 6px;
        font-size: 17px;
    }

    /* Hero */
    .jadugo-hero {
        min-height: 50vh;
    }

    .jadugo-hero-title {
        font-size: 28px !important;
    }

    .jadugo-hero-subtitle {
        font-size: 16px !important;
    }

    .jadugo-hero-icon {
        font-size: 40px !important;
    }

    /* Features */
    .jadugo-features-grid {
        grid-template-columns: 1fr !important;
    }

    .jadugo-feature-card {
        padding: 20px !important;
    }

    /* Auth Cards */
    .jadugo-auth-card {
        padding: 24px !important;
        margin: 0 8px;
    }

    .jadugo-auth-title {
        font-size: 18px !important;
    }

    /* Stats */
    .mv-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .mv-stat-full {
        grid-column: 1;
    }

    .mv-stat-value {
        font-size: 22px !important;
    }

    /* Tables */
    .mv-table th,
    .mv-table td {
        padding: 8px 10px !important;
        font-size: 12px;
    }

    /* v3.9.0: dead rules removed (.jadugo-form-wrapper / .jadugo-form-title —
       no template uses these classes). */

    /* Profile Avatar */
    .mv-profile-avatar {
        width: 64px !important;
        height: 64px !important;
        font-size: 28px !important;
    }

    /* Modal — v1.0.0: fullscreen preview; slightly smaller Back button on phones */
    .mv-modal-back {
        top: 10px;
        left: 10px;
        padding: 8px 14px 8px 12px;
        font-size: 12px;
    }

    .mv-modal-body iframe {
        height: 100%;
    }

    /* v3.9.0: form page mobile rules removed — see the tablet note above. */
}

/* ==========================================================================
   EXTRA-SMALL (max-width: 360px) — very small phones
   ========================================================================== */

@media (max-width: 360px) {
    /* v3.9.0: form page extra-small rules removed — the standalone form page
       renders admin form_code pixel-perfect at every screen size (the page
       itself scrolls horizontally when a fixed-width form is wider than the
       viewport; the form is never squeezed). */
}

/* ==========================================================================
   LARGE SCREENS (min-width: 769px)
   ========================================================================== */

@media (min-width: 769px) {
    /* Hamburger stays visible on desktop — it's the top-right mobile menu trigger */
    .jadugo-hamburger {
        display: flex;
    }

    /* Make spacer hidden (brand sits left, hamburger sits right) */
    .jadugo-header-spacer {
        width: 0;
    }

    /* Show tab labels on desktop */
    .jadugo-tab-label {
        display: block;
    }
}
