/* =========================================================
   RESPONSIVE.CSS - Media Queries Globais
   Projeto: MPPE Caatinga Resiste 2026
========================================================= */

/* ===== TABELAS RESPONSIVAS ===== */
@media (max-width: 768px) {
    .data-table {
        font-size: var(--font-size-xs);
    }
    
    .data-table th,
    .data-table td {
        padding: var(--spacing-xs);
    }
    
    /* Esconde colunas menos importantes em telas pequenas */
    .data-table .hide-mobile {
        display: none;
    }
}

/* ===== GRID RESPONSIVO ===== */
@media (max-width: 1200px) {
    .metric-grid-3,
    .metric-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metric-grid,
    .metric-grid-3,
    .metric-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTAINERS DE TABELA ===== */
@media (max-width: 768px) {
    .tabela-container,
    .list-container {
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .tabela-container,
    .list-container {
        max-height: 180px;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .leaflet-tooltip {
        font-size: var(--font-size-base);
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .btn {
        min-height: 44px; /* Tamanho mínimo para toque */
    }
}

/* ===== TELAS COM ALTURA REDUZIDA ===== */
@media (max-height: 700px) {
    .dashboard-content {
        max-height: 95vh;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* ===== PREFERÊNCIA DE MOVIMENTO REDUZIDO ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MODO ESCURO (OPCIONAL) ===== */
@media (prefers-color-scheme: dark) {
    /* Implementação futura */
    /*
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #f0f0f0;
        --text-secondary: #b0b0b0;
    }
    */
}

/* ===== ALTA CONTRASTÊNCIA ===== */
@media (prefers-contrast: high) {
    :root {
        --border-light: #333;
        --border-medium: #555;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* ===== IMPRESSÃO ===== */
@media print {
    body {
        background: white !important;
    }
    
    .sidebar-left,
    .sidebar-right,
    .toggle-btn-right,
    .header-container {
        display: none !important;
    }
    
    #map {
        width: 100% !important;
        height: auto !important;
        min-height: 500px !important;
    }
    
    .leaflet-control-container {
        display: none !important;
    }
}