/**
 * MOVIXIT Theme - Complete Responsive Styles
 * @version 2.0
 */

/* ============================================
   CSS VARIABLES FOR RESPONSIVE BREAKPOINTS
   ============================================ */
:root {
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 1024px;
    --breakpoint-desktop: 1200px;
    --breakpoint-wide: 1400px;
}

/* ============================================
   MOBILE FIRST APPROACH (Base styles)
   ============================================ */

/* Container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Grid System - Mobile */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

[class*="col-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

/* Typography - Mobile */
body {
    font-size: 14px;
    line-height: 1.5;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* ============================================
   TABLET STYLES (768px - 1024px)
   ============================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    /* Grid - Tablet (2 columns) */
    .col-tablet-1 { width: 8.333%; }
    .col-tablet-2 { width: 16.666%; }
    .col-tablet-3 { width: 25%; }
    .col-tablet-4 { width: 33.333%; }
    .col-tablet-5 { width: 41.666%; }
    .col-tablet-6 { width: 50%; }
    .col-tablet-7 { width: 58.333%; }
    .col-tablet-8 { width: 66.666%; }
    .col-tablet-9 { width: 75%; }
    .col-tablet-10 { width: 83.333%; }
    .col-tablet-11 { width: 91.666%; }
    .col-tablet-12 { width: 100%; }
    
    /* Typography - Tablet */
    body { font-size: 15px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    
    /* Tablet Navigation */
    .desktop-menu { display: none; }
    .tablet-menu { display: block; }
    
    /* Tablet Spacing */
    section { padding: 60px 0; }
    .mgm-hero-section { padding: 50px 0; }
}

/* ============================================
   DESKTOP/LAPTOP STYLES (1025px - 1200px)
   ============================================ */
@media (min-width: 1025px) and (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Grid - Desktop (3-4 columns) */
    .col-desktop-1 { width: 8.333%; }
    .col-desktop-2 { width: 16.666%; }
    .col-desktop-3 { width: 25%; }
    .col-desktop-4 { width: 33.333%; }
    .col-desktop-5 { width: 41.666%; }
    .col-desktop-6 { width: 50%; }
    .col-desktop-7 { width: 58.333%; }
    .col-desktop-8 { width: 66.666%; }
    .col-desktop-9 { width: 75%; }
    .col-desktop-10 { width: 83.333%; }
    .col-desktop-11 { width: 91.666%; }
    .col-desktop-12 { width: 100%; }
    
    /* Typography - Desktop */
    body { font-size: 16px; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    /* Desktop Navigation */
    .desktop-menu { display: block; }
    .tablet-menu { display: none; }
    .mobile-menu { display: none; }
}

/* ============================================
   WIDE DESKTOP STYLES (1201px+)
   ============================================ */
@media (min-width: 1201px) {
    .container {
        max-width: 1280px;
    }
    
    body { font-size: 16px; }
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    h3 { font-size: 1.5rem; }
}

/* ============================================
   DEVICE DETECTION CLASSES
   ============================================ */
body.is-mobile .desktop-only,
body.is-mobile .tablet-only {
    display: none !important;
}

body.is-tablet .mobile-only,
body.is-tablet .desktop-only {
    display: none !important;
}

body.is-desktop .mobile-only,
body.is-desktop .tablet-only {
    display: none !important;
}

/* Touch-friendly elements for mobile */
@media (max-width: 768px) {
    button, 
    .mgm-btn,
    .maifd-intent,
    .quick-reply,
    .chat-send,
    .next-step,
    .prev-step {
        min-height: 44px;
        padding: 12px 16px;
    }
    
    input, 
    select, 
    textarea {
        font-size: 16px !important; /* Prevents zoom on focus in iOS */
        padding: 12px;
    }
    
    /* Improved scrolling */
    .chat-messages-container,
    .mgm-modern-slider,
    .mgm-steps-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================
   RESPONSIVE GRID UTILITIES
   ============================================ */
.mgm-grid {
    display: grid;
    gap: 20px;
}

/* Mobile grid (1 column) */
.mgm-grid {
    grid-template-columns: 1fr;
}

/* Tablet grid (2 columns) */
@media (min-width: 769px) {
    .mgm-grid[data-cols-tablet="2"] { grid-template-columns: repeat(2, 1fr); }
    .mgm-grid[data-cols-tablet="3"] { grid-template-columns: repeat(3, 1fr); }
    .mgm-grid[data-cols-tablet="4"] { grid-template-columns: repeat(4, 1fr); }
}

/* Desktop grid (3-4 columns) */
@media (min-width: 1025px) {
    .mgm-grid[data-cols-desktop="2"] { grid-template-columns: repeat(2, 1fr); }
    .mgm-grid[data-cols-desktop="3"] { grid-template-columns: repeat(3, 1fr); }
    .mgm-grid[data-cols-desktop="4"] { grid-template-columns: repeat(4, 1fr); }
    .mgm-grid[data-cols-desktop="5"] { grid-template-columns: repeat(5, 1fr); }
}

/* ============================================
   RESPONSIVE HIDE/SHOW UTILITIES
   ============================================ */
.hide-mobile { display: block; }
.hide-tablet { display: block; }
.hide-desktop { display: block; }

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hide-tablet { display: none !important; }
    .show-tablet { display: block !important; }
}

@media (min-width: 1025px) {
    .hide-desktop { display: none !important; }
    .show-desktop { display: block !important; }
}

/* ============================================
   RESPONSIVE AI FRONT DESK WIDGET
   ============================================ */
@media (max-width: 768px) {
    .maifd-widget {
        padding: 16px !important;
        margin: 10px !important;
        border-radius: 12px !important;
    }
    
    .maifd-two-columns {
        flex-direction: column !important;
    }
    
    .maifd-sidebar {
        margin-top: 20px !important;
    }
    
    .maifd-intent-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .maifd-plan-grid {
        grid-template-columns: 1fr !important;
    }
    
    .maifd-process-steps {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .process-step {
        padding: 10px !important;
    }
    
    .review-item {
        flex-direction: column !important;
    }
    
    .review-label {
        width: 100% !important;
        margin-bottom: 5px !important;
    }
    
    .phone-input-group {
        flex-direction: column !important;
    }
    
    .phone-code-select {
        width: 100% !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .maifd-intent-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .maifd-plan-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   RESPONSIVE HEADER & NAVIGATION
   ============================================ */
@media (max-width: 768px) {
    .header-main-content {
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .logo-area {
        max-width: 130px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .header-actions .cta-button span,
    .visa-help-btn .chat-text {
        display: none;
    }
    
    .visa-help-btn {
        padding: 8px 10px !important;
        border-radius: 50% !important;
        width: 40px;
        height: 40px;
    }
    
    .header-actions .cta-button {
        padding: 8px 12px !important;
    }
    
    .header-actions .cta-button i {
        margin: 0;
    }
}

/* ============================================
   RESPONSIVE FOOTER
   ============================================ */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }
    
    .footer-nav ul {
        padding: 0;
    }
    
    .footer-nav li {
        margin: 8px 0;
    }
    
    .trust-links {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .footer-smart {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .live-stats {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   RESPONSIVE TABLES
   ============================================ */
@media (max-width: 768px) {
    .wp-list-table,
    .widefat {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table.responsive-table thead {
        display: none;
    }
    
    table.responsive-table tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
    }
    
    table.responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }
    
    table.responsive-table td:before {
        content: attr(data-label);
        font-weight: bold;
        width: 40%;
    }
}

/* ============================================
   RESPONSIVE MODALS
   ============================================ */
@media (max-width: 768px) {
    .maifd-modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px;
        border-radius: 16px !important;
    }
    
    .maifd-modal-body {
        padding: 16px !important;
        max-height: 70vh !important;
    }
    
    .gateway-options {
        gap: 8px !important;
    }
    
    .gateway-option {
        padding: 8px 12px !important;
    }
    
    .gateway-option span {
        font-size: 12px !important;
    }
}

/* ============================================
   RESPONSIVE CHAT WIDGET
   ============================================ */
@media (max-width: 768px) {
    .vconnect-chat-widget {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        bottom: 0 !important;
        right: 0 !important;
        border-radius: 0 !important;
    }
    
    .chat-message .message-content {
        max-width: 85% !important;
    }
    
    .chat-quick-replies {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
    }
    
    .quick-reply {
        white-space: nowrap !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .site-footer,
    .chat-trigger,
    .maifd-chat-widget,
    .mgm-trust-bar,
    .mgm-quiz-section,
    .mgm-ai-frontdesk-section {
        display: none !important;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    .container {
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    a {
        text-decoration: none;
        color: black;
    }
}