/**
 * 📱 MENU RESPONSIVE - RotaTruck v5.0.2
 * Media queries e temas dia/noite
 * Extraído de sidebar-menu.css (linhas 892-1293)
 */

/* ==================== RESPONSIVIDADE ==================== */

/* ==================== TABLET (768px) ==================== */
@media (max-width: 768px) {
    /* Hamburger */
    .btn-hamburger {
        width: 48px !important;
        height: 48px !important;
        top: 16px !important;
        left: 12px !important;
    }
    
    /* Menu Card */
    .menu-card-container {
        width: 95%;
        max-width: 500px;
        height: auto;
        max-height: 90vh;
    }
    
    .menu-logo {
        width: 70px;
        height: 70px;
    }
    
    .menu-card-title h2 {
        font-size: 28px;
    }
    
    /* Search Card */
    .search-container {
        max-width: 420px;
        top: 80px;
        left: 12px;
    }
    
    .search-logo {
        width: 50px;
        height: 50px;
    }
    
    /* GPS Button */
    .btn-location-custom {
        width: 52px;
        height: 52px;
        bottom: 20px;
        right: 20px;
        font-size: 22px;
    }
}

/* ==================== MOBILE (480px) ==================== */
@media (max-width: 480px) {
    /* Hamburger */
    .btn-hamburger {
        width: 46px !important;
        height: 46px !important;
        top: 12px !important;
        left: 12px !important;
    }
    
    .hamburger-line {
        width: 20px;
    }
    
    /* Menu Card */
    .menu-card-container {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 95vh;
        border-radius: 20px;
        padding: 16px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .menu-card-container.active {
        transform: translate(-50%, -50%);
    }
    
    .menu-card-header {
        padding: 0 0 0 12px;
        margin-bottom: 20px;
    }
    
    .menu-logo {
        width: 60px;
        height: 60px;
    }
    
    .menu-card-title h2 {
        font-size: 24px;
    }
    
    .menu-close-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    /* Menu Tabs */
    .menu-tabs {
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .menu-tab-btn {
        padding: 10px 12px;
        font-size: 14px;
        gap: 6px;
    }
    
    .menu-tab-btn span {
        display: none;
    }
    
    .menu-tab-btn i {
        font-size: 18px;
    }
    
    /* Menu Content */
    .menu-card-content {
        height: calc(100% - 120px);
        padding-bottom: 60px; /* 🔧 v8.5.7: Mais espaço embaixo no mobile para não cortar */
        overflow-y: scroll; /* 🔧 v8.5.7: Forçar scrollbar visível no mobile */
    }
    
    /* Form Groups */
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    /* Grid 2 Colunas */
    .form-grid-2 {
        gap: 10px;
        margin-bottom: 14px;
    }
    
    /* Botões */
    .btn-primary {
        padding: 12px;
        font-size: 14px;
    }
    
    .btn-secondary {
        padding: 10px;
        font-size: 13px;
    }
    
    /* User Info */
    .user-avatar {
        width: 70px;
        height: 70px;
        font-size: 32px;
        margin-bottom: 10px;
    }
    
    .user-name {
        font-size: 16px;
    }
    
    .user-email {
        font-size: 12px;
    }
    
    /* Account Actions */
    .account-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Search Container */
    .search-container {
        top: 70px;
        left: 12px;
        right: 12px;
        width: calc(100% - 24px);
        max-width: none;
        padding: 16px;
        border-radius: 20px;
    }
    
    .search-header {
        margin-bottom: 12px;
    }
    
    .search-logo {
        width: 45px;
        height: 45px;
    }
    
    .search-bar {
        padding: 10px 14px;
        margin-bottom: 14px;
        border-radius: 14px;
    }
    
    .search-input {
        font-size: 14px;
    }
    
    /* Card Tabs */
    .card-tabs {
        gap: 6px;
        margin-bottom: 16px;
    }
    
    .card-tab-btn {
        padding: 8px 10px;
        font-size: 13px;
        gap: 4px;
    }
    
    .card-tab-btn span {
        display: none;
    }
    
    .card-tab-btn i {
        font-size: 16px;
    }
    
    /* Card Form */
    .card-form-group {
        margin-bottom: 14px;
    }
    
    .card-form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .card-input,
    .card-select {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .card-btn-gps {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .card-btn-primary {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Suggestions */
    .suggestion-item {
        padding: 10px;
        margin-bottom: 6px;
    }
    
    .suggestion-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .suggestion-title {
        font-size: 14px;
    }
    
    .suggestion-subtitle {
        font-size: 12px;
    }
    
    /* GPS Button */
    .btn-location-custom {
        width: 50px;
        height: 50px;
        bottom: 16px;
        right: 16px;
        font-size: 20px;
    }
}

/* ==================== MOBILE PEQUENO (375px) ==================== */
@media (max-width: 375px) {
    /* Hamburger */
    .btn-hamburger {
        width: 44px !important;
        height: 44px !important;
    }
    
    /* Menu Card */
    .menu-card-container {
        padding: 14px;
        border-radius: 18px;
    }
    
    .menu-logo {
        width: 55px;
        height: 55px;
    }
    
    .menu-card-title h2 {
        font-size: 22px;
    }
    
    .menu-close-btn {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    /* Menu Tabs */
    .menu-tab-btn {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Search Container */
    .search-container {
        padding: 14px;
    }
    
    .search-logo {
        width: 40px;
        height: 40px;
    }
    
    .search-bar {
        padding: 9px 12px;
    }
    
    /* GPS Button */
    .btn-location-custom {
        width: 48px;
        height: 48px;
        bottom: 14px;
        right: 14px;
        font-size: 18px;
    }
}

/* ==================== TEMA DIA - BOTÕES CONTA ==================== */
[data-theme="day"] .btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="day"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: #FF6B35;
    color: #FF6B35;
}

/* ==================== TEMA DIA - CONTAINERS BRANCOS SÓLIDOS ==================== */
[data-theme="day"] .menu-card-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="day"] .menu-card-title h2 {
    color: #FF6B35;
}

[data-theme="day"] .menu-tab-btn {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .menu-tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="day"] .menu-tab-btn.active {
    background: #FF6B35;
    color: white;
}

[data-theme="day"] .form-group label {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="day"] .form-group input,
[data-theme="day"] .form-group select {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="day"] .form-group input:focus,
[data-theme="day"] .form-group select:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: #FF6B35;
}

[data-theme="day"] .suggestions-header {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="day"] .user-name {
    color: #333;
}

[data-theme="day"] .user-email {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .search-container {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="day"] .search-bar {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="day"] .search-bar:focus-within {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="day"] .search-icon {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .search-input {
    color: #333;
}

[data-theme="day"] .search-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="day"] .card-tab-btn {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .card-tab-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="day"] .card-tab-btn.active {
    background: #FF6B35;
    color: white;
}

[data-theme="day"] .suggestion-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="day"] .suggestion-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="day"] .suggestion-title {
    color: #333;
}

[data-theme="day"] .suggestion-subtitle {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="day"] .card-form-group label {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="day"] .card-input,
[data-theme="day"] .card-select {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

[data-theme="day"] .card-input:focus,
[data-theme="day"] .card-select:focus {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme="day"] .card-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* ==================== TROCA DE LOGOS POR TEMA ==================== */
[data-theme="day"] .menu-logo,
[data-theme="day"] .search-logo {
    content: url('../assets/icons/logo-day.svg');
}

[data-theme="night"] .menu-logo,
[data-theme="night"] .search-logo {
    content: url('../assets/icons/logo.svg');
}

/* ==================== BOTÃO SAIR ==================== */
.btn-sair-centralizado {
    width: 100%;
    padding: 14px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #EF4444;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.btn-sair-centralizado:hover {
    background: #EF4444;
    color: white;
    border-color: #EF4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

[data-theme="day"] .btn-sair-centralizado {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ==================== LANDSCAPE MODE ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .menu-card-container {
        height: 95vh;
        max-height: none;
    }
    
    .menu-card-content {
        height: calc(100% - 100px);
    }
    
    .search-container {
        max-height: 85vh;
    }
}