/**
 * Estilos para o layout do Mapa V2.
 * @version 11.4.0 - Adicionado estilo para exibir Modelo | Cor na lista da sidebar, com divisor de relevo.
 */

/* ==========================================================================
   1. TOKENS DE DESIGN E VARIÁVEIS GLOBAIS
   ========================================================================== */
:root {
    --color-primary: #2563eb;
    --color-primary-light: #eff6ff;
    --color-text-primary: #111827;
    --color-text-secondary: #4b5563;
    --color-border: #e5e7eb;
    --color-bg-base: #ffffff;
    --color-bg-subtle: #f8fafc;
    --color-bg-interactive: #f1f5f9;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 999px;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --glow-ligada: #10b981;
    --glow-movimento: #3b82f6;
    --glow-desligada: #ef4444;
    --glow-desconhecida: #8b5cf6;
}

/* ==========================================================================
   2. LAYOUT GERAL DO MAPA
   ========================================================================== */
.locamais-map-layout { display: flex; flex-direction: column; height: 85vh; min-height: 600px; background-color: var(--color-bg-base); border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.locamais-map-sidebar { display: flex; flex-direction: column; height: 45%; min-height: 280px; border-bottom: 1px solid var(--color-border); background-color: var(--color-bg-subtle); }
.locamais-map-view { flex-grow: 1; position: relative; height: 55%; display: flex; flex-direction: column; }

/* ==========================================================================
   3. SIDEBAR E LISTA DE VEÍCULOS
   ========================================================================== */
.locamais-sidebar-header { padding: 1rem; border-bottom: 1px solid var(--color-border); background-color: var(--color-bg-base); }
.locamais-map-sync-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
}
.locamais-map-sync-meta .sync-label { font-weight: 600; color: var(--color-text-primary); }
.locamais-map-sync-meta .sync-dot { color: var(--color-border); }
.locamais-map-sync-meta .sync-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--color-text-primary);
}
.locamais-map-sync-meta .sync-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.6);
    animation: locamais-sync-pulse 1.6s infinite;
}
@keyframes locamais-sync-pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.locamais-map-vehicle-list { flex-grow: 1; overflow-y: auto; padding: 0; margin: 0; list-style: none; }
.map-vehicle-item { border-bottom: 1px solid var(--color-border); cursor: pointer; transition: background-color 0.2s ease; padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.map-vehicle-item:hover { background-color: var(--color-bg-interactive); }
.map-vehicle-item.active { background-color: var(--color-primary-light); border-left: 4px solid var(--color-primary); padding-left: calc(1rem - 4px); }
.vehicle-info { flex-grow: 1; min-width: 0; }
.vehicle-info .vehicle-placa { font-weight: 600; font-size: 0.95rem; color: var(--color-text-primary); }
.vehicle-info .vehicle-odometer { font-size: 0.8rem; color: var(--color-text-secondary); margin-top: 4px; }

/* ✅ NOVO: Estilos para a linha de Modelo e Cor */
.vehicle-model-color {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
}
.vehicle-model-color .info-divider {
    font-size: 1.1em;
    font-weight: 300;
    color: var(--color-border);
    margin: 0 0.5em;
    /* Efeito de relevo com sombra de texto */
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}
.vehicle-model-color .vehicle-color {
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* ✅ NOVO: Estilos para o Indicador de Status "Botão 3D Neon" */
.vehicle-status-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.4), inset 0 -2px 2px rgba(0, 0, 0, 0.2);
}
.vehicle-status-indicator::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: 0 0 8px var(--glow-color, transparent);
    animation: neon-pulse 2.2s infinite ease-in-out;
}

@keyframes neon-pulse {
    0%, 100% { box-shadow: 0 0 5px var(--glow-color, currentColor), 0 0 8px var(--glow-color, currentColor); }
    50% { box-shadow: 0 0 10px var(--glow-color, currentColor), 0 0 16px var(--glow-color, currentColor); }
}

.vehicle-status-indicator.status-ligada { --glow-color: var(--glow-ligada); background-color: var(--glow-ligada); }
.vehicle-status-indicator.status-movimento { --glow-color: var(--glow-movimento); background-color: var(--glow-movimento); animation-duration: 1.5s; }
.vehicle-status-indicator.status-desligada { background-color: var(--glow-desligada); animation: none; box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); opacity: 0.7; }
.vehicle-status-indicator.status-desconhecida { background-color: var(--glow-desconhecida); animation: none; box-shadow: inset 0 1px 2px rgba(0,0,0,0.3); opacity: 0.7; }
.status-indicator-skeleton.skeleton-line { width: 14px; height: 14px; border-radius: 50%; }

/* ==========================================================================
   4. ÁREA DO MAPA E CONTROLES (sem alterações)
   ========================================================================== */
.locamais-map-status-bar {
    --map-status-bar-height: 44px;
    min-height: var(--map-status-bar-height);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-base);
}
.locamais-leaflet-map-container { width: 100%; flex: 1; height: auto; background: #eef2ff; }
.map-initial-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--color-text-secondary); gap: 1rem; }
.map-initial-loader .dashicons.spin { font-size: 2rem; color: var(--color-primary); }
.locamais-map-controls { position: absolute; top: calc(1rem + var(--map-status-bar-height)); left: 1rem; z-index: 1001; }
.locamais-map-theme-switcher { display: flex; background-color: var(--color-bg-base); box-shadow: var(--shadow-md); border-radius: 4px; }
.locamais-map-theme-switcher .style-btn { width: 34px; height: 34px; line-height: 34px; text-align: center; color: var(--color-text-primary); transition: background-color 0.2s ease, color 0.2s ease; }
.locamais-map-theme-switcher .style-btn:hover { background-color: var(--color-bg-interactive); }
.locamais-map-theme-switcher .style-btn.active { background-color: var(--color-primary); color: white; }
.locamais-map-theme-switcher .dashicons { font-size: 20px; line-height: 34px; }
.leaflet-control-zoom { position: absolute; top: calc(1rem + var(--map-status-bar-height)) !important; right: 1rem !important; left: auto !important; z-index: 1000 !important; }
.theme-light .leaflet-tile-pane { filter: grayscale(100%) brightness(1.05) contrast(1.0); }

/* ==========================================================================
   5. CARD DE DETALHES FIXO (sem alterações)
   ========================================================================== */
.locamais-map-details-card { position: absolute; top: calc(1rem + 44px); left: 50%; transform: translateX(-50%); width: 95%; max-width: 700px; z-index: 1010; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,0.05); padding: 1rem; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease; transform-origin: top center; }
.locamais-map-details-card[hidden] { transform: translateX(-50%) translateY(-20px) scale(0.95); opacity: 0; pointer-events: none; }

/* ==========================================================================
   6. RESPONSIVIDADE E SKELETON (sem alterações)
   ========================================================================== */
@media (min-width: 992px) {
    .locamais-map-layout { flex-direction: row; height: clamp(600px, 85vh, 950px); }
    .locamais-map-sidebar { width: 340px; height: 100%; flex-shrink: 0; border-right: 1px solid var(--color-border); border-bottom: none; }
    .locamais-map-view { height: 100%; }
}
.skeleton-line { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: 4px; }
.skeleton-line--title { height: 16px; width: 70%; margin-bottom: 8px; }
.skeleton-line--subtitle { height: 12px; width: 50%; }
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
