/* ============================================
   ChargAutos v2.1 - Estilos CSS
   Layout Responsivo com Leaflet.js
   Schema normalizado: conectores, fontes, filtros avancados
============================================ */

/* Utilitario global */
.hidden {
    display: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ============================================
   Header Principal
============================================ */
.main-header {
    background: linear-gradient(135deg, #1a2744 0%, #0f1b33 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tagline {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* ============================================
   Container e Layout Responsivo
============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    min-height: calc(100vh - 200px);
    margin-top: 1rem;
}

/* ============================================
   Formulario de Busca
============================================ */
/* ============================================
   Busca por Destino
============================================ */
.destino-container {
    margin-top: 1.5rem;
    position: relative;
}

.destino-input-group {
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.destino-input-group:focus-within {
    border-color: #1a2744;
}

.destino-icon {
    padding: 0 0.6rem 0 1rem;
    font-size: 1.2rem;
}

#input-destino {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.9rem 0.5rem;
    font-size: 1rem;
    background: transparent;
    color: #333;
    min-width: 0;
}

#input-destino::placeholder {
    color: #aaa;
    font-size: 0.9rem;
}

.btn-destino {
    background: #1a2744;
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-destino:hover {
    background: #0f1b33;
}

.btn-destino:disabled {
    background: #95a5a6;
    cursor: wait;
}

.btn-destino-limpar {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    z-index: 1001;
}

.btn-destino-limpar:hover {
    background: #c0392b;
}

/* Sugestoes dropdown */
.destino-sugestoes {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
}

.destino-sug-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.destino-sug-item:last-child {
    border-bottom: none;
}

.destino-sug-item:hover {
    background: #e8f8f0;
}

.destino-sug-icon {
    margin-right: 0.3rem;
}

.destino-sug-vazio {
    color: #999;
    cursor: default;
    text-align: center;
}

/* Marcador destino no mapa */
.eco-marker-destino {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    animation: bounce-pin 0.6s ease;
}

@keyframes bounce-pin {
    0% { transform: translateY(-20px); opacity: 0; }
    60% { transform: translateY(4px); }
    100% { transform: translateY(0); opacity: 1; }
}

.search-container {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.08);
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.input-group label {
    font-weight: 600;
    color: #2c3e50;
}

select, input[type="text"] {
    padding: 0.6rem 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    min-width: 120px;
}

select:focus, input:focus {
    outline: none;
    border-color: #1a2744;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.btn-search {
    background-color: #1a2744;
    color: white;
    border: none;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: #0f1b33;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* Botao filtros avancados */
.btn-toggle-filtros {
    background-color: #34495e;
    color: white;
    border: none;
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle-filtros:hover {
    background-color: #2c3e50;
    transform: translateY(-2px);
}

/* ============================================
   Filtros Avancados (Painel Colapsavel)
============================================ */
.filtros-avancados {
    margin-top: 1rem;
    padding: 1.2rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    animation: fadeIn 0.3s ease-out;
}

.filtros-avancados.hidden {
    display: none;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.2rem;
}

.filtro-grupo h4 {
    color: #2c3e50;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #1a2744;
}

.filtro-checks {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.check-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
    padding: 0.2rem 0;
}

.check-label:hover {
    color: #2c3e50;
}

.check-label input[type="checkbox"] {
    accent-color: #1a2744;
    width: 16px;
    height: 16px;
}

.filtros-acoes {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid #ddd;
}

.btn-aplicar {
    background-color: #1a2744;
}

.btn-limpar {
    background-color: transparent;
    color: #e74c3c;
    border: 2px solid #e74c3c;
    padding: 0.55rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-limpar:hover {
    background-color: #e74c3c;
    color: white;
}

/* ============================================
   Mapa (Secao Esquerda)
============================================ */
.map-section {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-height: 600px;
}

#map-container {
    width: 100%;
    height: 600px;
}

/* ============================================
   Marcadores do Mapa (Leaflet)
============================================ */
.marker-custom {
    background: transparent;
    border: none;
}

.eco-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.eco-marker:hover {
    transform: scale(1.25);
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}

.eco-marker-emoji {
    font-size: 16px;
    line-height: 1;
}

/* Marcadores com imagem (carro/moto) — legado */
.eco-marker-img {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    background: #fff;
}

.eco-marker-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.eco-marker-img.carro { border-color: #1a2744; }
.eco-marker-img.moto { border-color: #e74c3c; }
.eco-marker-img.ambos { border-color: #9b59b6; }

.eco-marker-img:hover {
    transform: scale(1.2);
    box-shadow: 0 5px 18px rgba(0,0,0,0.45);
}

/* Marcadores SVG inline (carro/moto/ambos) */
.eco-marker-svg {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.35));
}

.eco-marker-svg svg {
    width: 40px;
    height: 40px;
    display: block;
}

.eco-marker-svg:hover {
    transform: scale(1.25);
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

.eco-marker-svg .eco-marker-pin {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
}

.eco-marker-svg .eco-marker-pin.carro { border-top: 10px solid #1a2744; }
.eco-marker-svg .eco-marker-pin.moto { border-top: 10px solid #e74c3c; }
.eco-marker-svg .eco-marker-pin.ambos { border-top: 10px solid #9b59b6; }

.eco-marker-pin {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
}

.eco-marker-img.carro .eco-marker-pin { border-top: 10px solid #1a2744; }
.eco-marker-img.moto .eco-marker-pin { border-top: 10px solid #e74c3c; }
.eco-marker-img.ambos .eco-marker-pin { border-top: 10px solid #9b59b6; }

.eco-marker-badge {
    position: absolute;
    bottom: -2px;
    right: -4px;
    background: #9b59b6;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    line-height: 1;
}

/* Marcador do usuario com pulso */
.eco-marker-user {
    width: 18px;
    height: 18px;
    background-color: #3498db;
    border: 3px solid white;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 8px rgba(52,152,219,0.6);
}

.eco-marker-user-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(52,152,219,0.25);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* ============================================
   Painel de Resultados (Secao Direita)
============================================ */
.results-section {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    max-height: 78vh;
    overflow-y: auto;
}

.results-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

#posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================
   Cards de Postos
============================================ */
.post-card {
    background-color: #f8f9fa;
    border-left: 4px solid #1a2744;
    padding: 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeIn 0.3s ease-out both;
}

.post-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    background-color: #e8f5e9;
}

.card-operador {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
    font-style: italic;
}

/* Tags de conectores no card */
.card-conectores {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0.4rem 0;
}

.conn-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.conn-tag-ok {
    background-color: #d4edda;
    color: #155724;
}

.conn-tag-busy {
    background-color: #fff3cd;
    color: #856404;
}

.conn-tag-off {
    background-color: #f8d7da;
    color: #721c24;
    text-decoration: line-through;
}

/* Badge de distancia no card */
.card-distancia {
    display: inline-block;
    background-color: #ebf5fb;
    color: #2471a3;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Preco gratis badge */
.preco-gratis-badge {
    display: inline-block;
    background-color: #d4edda;
    color: #155724;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-card-ativo {
    background-color: #d5f5e3 !important;
    border-left-width: 6px !important;
    box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25) !important;
    transform: translateX(5px);
}

.post-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.post-card p {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.status-open {
    display: inline-block;
    background-color: #d4edda;
    color: #155724;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

.status-closed {
    display: inline-block;
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    font-weight: 600;
}

.no-results {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
}

/* ============================================
   Indicador de Carregamento
============================================ */
#loading-indicator {
    text-align: center;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
}

/* ============================================
   Conectores - Status indicators
============================================ */
.conn-ok { color: #27ae60; font-weight: bold; }
.conn-busy { color: #f39c12; font-weight: bold; }
.conn-off { color: #e74c3c; font-weight: bold; }

.preco-gratis {
    color: #0f1b33;
    font-weight: 700;
}

/* ============================================
   Tabela de Conectores (Popup e Modal)
============================================ */
.popup-conectores-table,
.modal-conectores-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 0.78rem;
}

.popup-conectores-table th,
.modal-conectores-table th {
    background-color: #f0faf5;
    color: #2c3e50;
    font-weight: 600;
    padding: 4px 6px;
    text-align: left;
    border-bottom: 2px solid #1a2744;
}

.popup-conectores-table td,
.modal-conectores-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
}

.popup-conectores-table tr:hover td,
.modal-conectores-table tr:hover td {
    background-color: #f8f9fa;
}

.modal-conectores-table {
    font-size: 0.85rem;
}

.modal-conectores-table th {
    padding: 6px 8px;
}

.modal-conectores-table td {
    padding: 6px 8px;
}

/* ============================================
   Fontes de Dados (Badges)
============================================ */
.eco-popup-fontes {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.fonte-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 500;
    background-color: #f8f9fa;
    border: 2px solid #ccc;
    color: #555;
}

.fonte-item {
    margin-bottom: 0.4rem;
}

.eco-popup-operador {
    font-size: 0.78rem;
    color: #7f8c8d;
    margin-bottom: 4px;
    font-style: italic;
}

/* ============================================
   Modal de Detalhes
============================================ */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 550px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-right: 2rem;
}

.modal-content h3 {
    color: #2c3e50;
}

.modal-content p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn-primary {
    background-color: #1a2744;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0f1b33;
    transform: translateY(-2px);
}

/* ============================================
   Popup Estilizado do Mapa (Leaflet override)
============================================ */
.eco-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    padding: 0;
    overflow: hidden;
}

.eco-popup .leaflet-popup-content {
    margin: 0;
    min-width: 260px;
}

.eco-popup .leaflet-popup-tip {
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.eco-popup-content {
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.eco-popup-header {
    padding: 12px 16px;
    border-left: 5px solid #1a2744;
    background: linear-gradient(135deg, #f8fffe 0%, #f0faf5 100%);
}

.eco-popup-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.eco-popup-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.eco-popup-disponivel {
    background-color: #d4edda;
    color: #155724;
}

.eco-popup-ocupado {
    background-color: #f8d7da;
    color: #721c24;
}

.eco-popup-body {
    padding: 10px 16px;
}

.eco-popup-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #444;
    line-height: 1.4;
}

.eco-popup-icon {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.eco-popup-distancia {
    background-color: #ebf5fb;
    border-radius: 6px;
    padding: 4px 8px;
    color: #2471a3;
}

.eco-popup-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.eco-popup-stars {
    color: #f1c40f;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.eco-popup-rating {
    font-size: 0.8rem;
    color: #777;
}

/* Botoes de navegacao GPS no popup */
.eco-popup-nav-buttons {
    display: flex;
    gap: 0;
}

.eco-popup-btn {
    flex: 1;
    padding: 10px 8px;
    color: white;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.eco-btn-gmaps {
    background: linear-gradient(135deg, #1a2744 0%, #0f1b33 100%);
    border-radius: 0 0 0 12px;
}

.eco-btn-gmaps:hover {
    background: linear-gradient(135deg, #0f1b33 0%, #0a1628 100%);
}

.eco-btn-waze {
    background: linear-gradient(135deg, #33b5e5 0%, #2196F3 100%);
    border-radius: 0 0 12px 0;
}

.eco-btn-waze:hover {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

.nav-icon {
    font-size: 1rem;
}

/* Botoes de navegacao GPS no modal */
.modal-nav-buttons {
    display: flex;
    gap: 0.8rem;
    justify-content: stretch;
}

.btn-nav {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.8rem 1.2rem;
    color: white;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-gmaps {
    background: linear-gradient(135deg, #1a2744 0%, #0f1b33 100%);
}

.btn-gmaps:hover {
    background: linear-gradient(135deg, #0f1b33 0%, #0a1628 100%);
}

.btn-waze {
    background: linear-gradient(135deg, #33b5e5 0%, #2196F3 100%);
}

.btn-waze:hover {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
}

/* Estrelas nos cards */
.estrelas {
    color: #f1c40f;
    letter-spacing: 1px;
}

/* Badge do contador de filtro */
.filtro-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   Footer
============================================ */
.main-footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.2rem;
    margin-top: 2rem;
}

/* ============================================
   Responsividade (Media Queries)
============================================ */

/* Tablets e celulares grandes */
@media screen and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    #map-container {
        height: 400px;
    }

    .results-section {
        max-height: none;
    }

    .filtros-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media screen and (max-width: 768px) {
    .main-header h1 {
        font-size: 2rem;
    }

    #input-destino::placeholder {
        font-size: 0.8rem;
    }

    .btn-destino {
        padding: 0.9rem 1rem;
        font-size: 0.85rem;
    }

    .search-container {
        padding: 1rem;
    }

    .input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .input-group label {
        min-width: auto;
    }

    select {
        width: 100%;
    }

    .filtros-grid {
        grid-template-columns: 1fr;
    }
}

/* Celulares */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .main-header h1 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    #map-container {
        height: 300px;
    }

    .results-section {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .popup-conectores-table th,
    .popup-conectores-table td {
        padding: 2px 4px;
        font-size: 0.7rem;
    }
}

/* ============================================
   Scrollbar Customizado
============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1a2744;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f1b33;
}

/* ============================================
   Animacoes
============================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Sidebar Menu (Open Charge Map style)
============================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.visible {
    opacity: 1;
}

.sidebar-overlay.hidden {
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background-color: #2c3e50;
    z-index: 2000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
}

.sidebar.visible {
    left: 0;
}

.sidebar.hidden {
    left: -300px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1rem;
    background-color: #1a252f;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a2744;
}

.sidebar-close {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.3rem;
    transition: color 0.2s;
}

.sidebar-close:hover {
    color: white;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
    flex: 1;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.85rem 1.2rem;
    color: #bdc3c7;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    position: relative;
}

.sidebar-item:hover {
    background-color: rgba(255,255,255,0.08);
    color: white;
}

.sidebar-item:active {
    background-color: rgba(46,204,113,0.15);
}

.sidebar-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-badge {
    margin-left: auto;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: #7f8c8d;
    text-align: center;
}

/* ============================================
   Hamburger Button
============================================ */
.header-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.btn-google-search {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-google-search:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.btn-google-search:active {
    transform: scale(0.95);
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.hamburger:hover {
    background: rgba(255,255,255,0.15);
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   Settings Form + Toggle Switch
============================================ */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.setting-row label:first-child {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.setting-row select,
.setting-row input[type="text"],
.setting-row input[type="email"],
.setting-row input[type="password"] {
    min-width: 160px;
    padding: 0.5rem 0.7rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: #1a2744;
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
}

/* ============================================
   About Panel
============================================ */
.about-content {
    text-align: center;
}

.about-logo {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.about-content h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.about-content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 1rem 0;
}

.about-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

.about-footer-text {
    color: #999 !important;
    font-size: 0.85rem !important;
}

/* ============================================
   Add Location Panel
============================================ */
.add-info {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.add-disclaimer {
    margin-top: 1rem;
    color: #999;
    text-align: center;
}

/* ============================================
   Sign In Panel
============================================ */
.signin-content {
    text-align: center;
}

.signin-content .settings-form {
    text-align: left;
}

/* ============================================
   Favourites Panel
============================================ */
.fav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    border-left: 4px solid #1a2744;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fav-item:hover {
    background-color: #e8f5e9;
    transform: translateX(3px);
}

.fav-item-info h4 {
    color: #2c3e50;
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.fav-item-info p {
    color: #777;
    font-size: 0.8rem;
    margin: 0;
}

.fav-remove {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 50%;
    transition: background 0.2s;
    flex-shrink: 0;
}

.fav-remove:hover {
    background-color: rgba(231,76,60,0.1);
}

/* Favourite heart button in cards */
.btn-fav-card {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 2px 4px;
    transition: transform 0.2s;
    float: right;
}

.btn-fav-card:hover {
    transform: scale(1.3);
}

/* ============================================
   Dark Mode
============================================ */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .main-header {
    background: linear-gradient(135deg, #0a1628 0%, #145a32 100%);
}

body.dark-mode .destino-input-group {
    background: #16213e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.dark-mode #input-destino {
    color: #e8e8e8;
}

body.dark-mode #input-destino::placeholder {
    color: #666;
}

body.dark-mode .destino-sugestoes {
    background: #1a1a2e;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

body.dark-mode .destino-sug-item {
    color: #ddd;
    border-bottom-color: #2c3e50;
}

body.dark-mode .destino-sug-item:hover {
    background: #2c3e50;
}

body.dark-mode .search-container {
    background-color: #16213e;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

body.dark-mode .input-group label {
    color: #bdc3c7;
}

body.dark-mode select,
body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"] {
    background-color: #0f3460;
    border-color: #1a4080;
    color: #e0e0e0;
}

body.dark-mode .content-wrapper {
    background: transparent;
}

body.dark-mode .map-section {
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.dark-mode .results-section {
    background-color: #16213e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

body.dark-mode .results-section h2 {
    color: #ecf0f1;
}

body.dark-mode .post-card {
    background-color: #1a2744;
    border-left-color: #1a2744;
}

body.dark-mode .post-card:hover {
    background-color: #1e3050;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.dark-mode .post-card h3 {
    color: #ecf0f1;
}

body.dark-mode .post-card p {
    color: #bdc3c7;
}

body.dark-mode .card-operador {
    color: #95a5a6;
}

body.dark-mode .post-card-ativo {
    background-color: #1a3a2a !important;
    box-shadow: 0 4px 16px rgba(46,204,113,0.2) !important;
}

body.dark-mode .modal-content {
    background-color: #16213e;
    color: #e0e0e0;
}

body.dark-mode .modal-content h2,
body.dark-mode .modal-content h3 {
    color: #ecf0f1;
}

body.dark-mode .close {
    color: #7f8c8d;
}

body.dark-mode .close:hover {
    color: #ecf0f1;
}

body.dark-mode .modal-footer {
    border-top-color: #2c3e50;
}

body.dark-mode .setting-row {
    border-bottom-color: #2c3e50;
}

body.dark-mode .setting-row label:first-child {
    color: #bdc3c7;
}

body.dark-mode .filtros-avancados {
    background-color: #1a2744;
    border-color: #2c3e50;
}

body.dark-mode .filtro-grupo h4 {
    color: #ecf0f1;
}

body.dark-mode .check-label {
    color: #bdc3c7;
}

body.dark-mode .main-footer {
    background-color: #0f1a2e;
}

body.dark-mode .fav-item {
    background-color: #1a2744;
}

body.dark-mode .fav-item:hover {
    background-color: #1e3050;
}

body.dark-mode .fav-item-info h4 {
    color: #ecf0f1;
}

body.dark-mode .fav-item-info p {
    color: #95a5a6;
}

body.dark-mode .about-content p {
    color: #bdc3c7;
}

body.dark-mode #loading-indicator {
    background-color: #1a2744;
    color: #95a5a6;
}

body.dark-mode .popup-conectores-table th,
body.dark-mode .modal-conectores-table th {
    background-color: #1a3a2a;
    color: #ecf0f1;
}

body.dark-mode .popup-conectores-table td,
body.dark-mode .modal-conectores-table td {
    border-bottom-color: #2c3e50;
}

/* ============================================
   Responsive: Sidebar & Hamburger
============================================ */
@media screen and (max-width: 480px) {
    .sidebar {
        width: 260px;
    }

    .header-flex {
        gap: 0.5rem;
    }
}
