/* WEEM · herramientas de importación: contraste, tema y móvil.
   Se carga después de cada herramienta heredada para no tocar cálculos ni flujos. */
:root{--weem-public-bottom-space:72px}

/* La barra siempre conserva petróleo: deja claro qué es navegación incluso en modo claro. */
.topnav,.nav{isolation:isolate}
.topnav-mobile{position:relative;z-index:2;background:var(--weem-petroleo);box-shadow:0 12px 24px rgba(5,24,28,.20)}
.topnav-mobile a{min-height:42px;display:flex!important;align-items:center}
.topnav-hamburger{min-width:44px;min-height:44px;display:grid;place-items:center}

/* Tema claro: Tailwind heredado dejaba blancos y grises muy claros sobre marfil. */
:root.light body,:root[data-theme="light"] body{background:var(--weem-marfil)!important;color:var(--weem-petroleo)}
:root.light body.text-white,:root[data-theme="light"] body.text-white{color:var(--weem-petroleo)!important}
:root.light body.text-white main .text-white,:root[data-theme="light"] body.text-white main .text-white{color:var(--weem-petroleo)!important}
:root.light body.text-white main .text-gray-400,:root[data-theme="light"] body.text-white main .text-gray-400,
:root.light body.text-white main .text-gray-300,:root[data-theme="light"] body.text-white main .text-gray-300,
:root.light body.text-white main .text-slate-400,:root[data-theme="light"] body.text-white main .text-slate-400{color:#526D70!important}
:root.light main [class*="bg-white/"],:root[data-theme="light"] main [class*="bg-white/"]{background-color:rgba(255,253,249,.88)!important;border-color:rgba(18,62,69,.16)!important}
:root.light main [class*="border-white/"],:root[data-theme="light"] main [class*="border-white/"]{border-color:rgba(18,62,69,.16)!important}
:root.light main input,:root.light main select,:root.light main textarea,
:root[data-theme="light"] main input,:root[data-theme="light"] main select,:root[data-theme="light"] main textarea{background:#FFFDF9!important;color:#123E45!important;border-color:rgba(18,62,69,.28)!important}
:root.light main input::placeholder,:root.light main textarea::placeholder,
:root[data-theme="light"] main input::placeholder,:root[data-theme="light"] main textarea::placeholder{color:#627879!important}
:root.light .topnav .text-white,:root.light .topnav .text-gray-400,:root.light .topnav .text-gray-300,
:root[data-theme="light"] .topnav .text-white,:root[data-theme="light"] .topnav .text-gray-400,:root[data-theme="light"] .topnav .text-gray-300{color:var(--weem-marfil)!important}

/* Una capa solo bloquea cuando está activa: evita pantallas apagadas por popups ocultos. */
.modal-overlay,.lead-overlay,.popup-overlay,.quiz-overlay,.vm-overlay,#serviceModal{visibility:hidden!important;pointer-events:none!important}
.modal-overlay.active,.lead-overlay.active,.popup-overlay.active,.quiz-overlay.open,.vm-overlay.active,#serviceModal.active{visibility:visible!important;pointer-events:auto!important}
.modal-overlay,.lead-overlay,.popup-overlay,.quiz-overlay,.vm-overlay,#serviceModal:not(.weem-dialog-overlay){background:var(--v-overlay)!important}
.modal-box,.lead-popup,.popup,.quiz-panel,.vm-card,#serviceModal>div:not(.weem-dialog){background:var(--v-surface-1)!important;color:var(--v-text)!important;border-color:var(--v-border)!important}
.modal-box input,.modal-box select,.modal-box textarea,.lead-popup input,.lead-popup select,.lead-popup textarea,.popup input,.popup select,.popup textarea,.vm-card input,.vm-card select{background:var(--v-surface-2)!important;color:var(--v-text)!important;border-color:var(--v-border-strong)!important}

/* La navegación inferior no tapa el último control ni el botón de volver arriba. */
@media (max-width:768px){
  body:has(#v-bottom-nav){padding-bottom:var(--weem-public-bottom-space)!important}
  #scrollTopBtn{bottom:calc(var(--weem-public-bottom-space) + env(safe-area-inset-bottom,0px))!important}
  .topnav{min-height:56px}
  .topnav-inner{min-height:56px;height:auto!important}
  .topnav-mobile{padding:8px 12px 14px!important;margin-inline:-16px!important;padding-inline:16px!important}
  .topnav-mobile a{font-size:.88rem!important}
  /* Dialog geometry is defined once in shared/dialogs.css. */
}
@media (prefers-reduced-motion:reduce){.modal-overlay,.lead-overlay,.popup-overlay,.quiz-overlay,.vm-overlay,#serviceModal{transition:none!important}}
