/* GUIALOGG — revisão de consistência visual entre temas
   Regra principal: áreas fotográficas da frota permanecem escuras em ambos os temas. */

:root {
  --fleet-photo-bg: #081626;
  --fleet-photo-bg-2: #0d233b;
  --fleet-photo-line: rgba(78, 157, 236, .28);
}

/* A área da fotografia não muda no modo claro: preserva contraste e fidelidade dos veículos. */
.fleet-card .fleet-media {
  background:
    radial-gradient(circle at 54% 38%, rgba(45, 116, 181, .16), transparent 45%),
    linear-gradient(155deg, var(--fleet-photo-bg-2), var(--fleet-photo-bg)) !important;
  border-bottom: 1px solid var(--fleet-photo-line) !important;
  isolation: isolate;
}

.fleet-card .fleet-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 58%, rgba(3, 11, 21, .20));
  z-index: 1;
}

.fleet-card .fleet-media img {
  position: relative;
  z-index: 2;
  filter: saturate(1.06) contrast(1.06) brightness(.98)
          drop-shadow(0 12px 10px rgba(0, 0, 0, .32)) !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

/* Mantém eventuais máscaras de limpeza na mesma cor da mídia em qualquer tema. */
.fleet-card--van .fleet-image-cleanup,
html[data-theme="light"] .fleet-card--van .fleet-image-cleanup {
  background: linear-gradient(135deg, var(--fleet-photo-bg-2), var(--fleet-photo-bg)) !important;
}

/* O card pode seguir o tema; somente a mídia permanece escura. */
html[data-theme="light"] .fleet-card {
  background: linear-gradient(180deg, #ffffff 0%, #edf6ff 100%) !important;
  border-color: rgba(29, 104, 180, .25) !important;
  box-shadow: 0 12px 28px rgba(32, 79, 128, .12) !important;
}

html[data-theme="light"] .fleet-card:hover,
html[data-theme="light"] .fleet-card:focus-visible,
html[data-theme="light"] .fleet-card.is-open {
  border-color: rgba(18, 126, 239, .62) !important;
  box-shadow: 0 18px 38px rgba(31, 94, 158, .20), 0 0 0 1px rgba(18, 126, 239, .12) !important;
}

html[data-theme="light"] .fleet-summary strong { color: #081a34 !important; }
html[data-theme="light"] .fleet-summary span { color: #4c6079 !important; }

/* Veículos animados no mapa: fidelidade igual nos dois temas. */
.map-vehicle-fixed img,
html[data-theme="light"] .map-vehicle-fixed img {
  filter: saturate(1.05) contrast(1.06) drop-shadow(0 8px 7px rgba(0, 0, 0, .42)) !important;
  mix-blend-mode: normal !important;
  opacity: 1 !important;
}

/* Revisão de contraste do modo claro — sem alterar layout. */
html[data-theme="light"] .tech-card,
html[data-theme="light"] .contact-card,
html[data-theme="light"] .freight-card,
html[data-theme="light"] .antt-calculator-card,
html[data-theme="light"] .map-card {
  border-color: rgba(27, 99, 173, .22) !important;
  box-shadow: 0 18px 48px rgba(38, 82, 129, .13) !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  color: #0a1b33 !important;
  background-color: #f8fbff !important;
  border-color: rgba(31, 96, 163, .24) !important;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #6a7b91 !important;
  opacity: 1;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] textarea:focus,
html[data-theme="light"] select:focus {
  border-color: rgba(19, 128, 239, .68) !important;
  box-shadow: 0 0 0 3px rgba(19, 128, 239, .12) !important;
  outline: none;
}

/* Cabeçalho claro um pouco mais definido, evitando aspecto lavado. */
html[data-theme="light"] .site-header {
  background: rgba(247, 251, 255, .92) !important;
  border-bottom-color: rgba(30, 94, 160, .18) !important;
  box-shadow: 0 8px 24px rgba(30, 78, 126, .07);
}

/* Painéis do mapa ganham contraste sem mexer na geometria do mapa. */
html[data-theme="light"] .map-panel {
  background: rgba(250, 253, 255, .94) !important;
  border-color: rgba(28, 93, 159, .24) !important;
  color: #0b1d35 !important;
  box-shadow: 0 16px 34px rgba(33, 76, 120, .16) !important;
}

html[data-theme="light"] .map-panel span,
html[data-theme="light"] .map-panel em {
  color: #53677f !important;
}

/* Tooltips globais: contraste previsível nos dois temas. */
.fleet-popover,
[data-fleet-popover] {
  color-scheme: dark;
}

html[data-theme="light"] .fleet-popover,
html[data-theme="light"] [data-fleet-popover] {
  color-scheme: light;
}

/* Redução de movimento respeitada em qualquer tema. */
@media (prefers-reduced-motion: reduce) {
  .fleet-card,
  .map-vehicle-fixed img,
  .theme-thumb {
    transition-duration: .01ms !important;
  }
}
