:root {
  --azul: #153b55;
  --azul-profundo: #0d2c42;
  --naranja: #c2410c;
  --naranja-oscuro: #9f3010;
  --amarillo: #ffd166;
  --crema: #fffaf1;
  --texto: #183142;
  --suave: #60737b;
  --linea: #dce5e7;
  --verde: #237a5c;
  --fuente: "Avenir Next", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: hidden; }
body { margin: 0; overflow-x: hidden; background: var(--crema); color: var(--texto); font-family: var(--fuente); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
.cabecera-estaciones, main, footer { width: min(1380px, calc(100% - 40px)); margin-inline: auto; }
.cabecera-estaciones { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.marca-estaciones { color: var(--naranja); font-size: 23px; font-weight: 900; letter-spacing: -.8px; text-decoration: none; }
.marca-estaciones span { color: var(--azul-profundo); }
.volver-calculadora { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 1px solid var(--linea); border-radius: 11px; background: #fff; color: var(--azul); font-size: 13px; font-weight: 800; text-decoration: none; }
.volver-calculadora svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.volver-calculadora:hover { border-color: var(--naranja); color: var(--naranja-oscuro); }

.cabecera-herramienta { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 16px 4px 24px; }
.sobrelinea { margin: 0 0 5px; color: var(--naranja-oscuro); font-size: 11px; font-weight: 900; letter-spacing: 1.4px; }
h1, h2, h3 { color: var(--azul-profundo); }
h1 { margin: 0; font-size: clamp(29px, 3.5vw, 46px); line-height: 1.05; letter-spacing: -1.8px; }
.introduccion { margin: 8px 0 0; color: #56717d; font-size: 15px; line-height: 1.45; }
.tarjeta-brent { min-width: 405px; min-height: 127px; display: flex; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: linear-gradient(135deg, #12354d, #0a2639); color: #fff; box-shadow: 0 12px 30px rgba(13,44,66,.17); }
.icono-brent { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 13px; background: rgba(255,209,102,.14); }
.icono-brent svg { width: 25px; fill: rgba(255,209,102,.13); stroke: var(--amarillo); stroke-width: 1.7; }
.contenido-brent { min-width: 0; flex: 1; }
.etiqueta-brent { display: block; color: #bbd0d9; font-size: 9px; font-weight: 900; letter-spacing: 1.25px; }
.brent-oficial strong { display: block; margin-top: 2px; color: #fff; font-size: 23px; line-height: 1.1; letter-spacing: -.6px; }
.brent-oficial small { display: block; margin-top: 3px; color: #b9cbd2; font-size: 10px; }
#variacionBrent.positiva { color: #ffb7a0; font-weight: 800; }
#variacionBrent.negativa { color: #8ee1bd; font-weight: 800; }
.brent-mercado { width: 300px; max-width: 100%; min-height: 78px; margin-top: 3px; overflow: hidden; color-scheme: dark; --tv-widget-background-color: transparent; --tv-widget-font-family: var(--fuente); }
.brent-mercado tv-single-ticker { width: 100%; min-height: 78px; display: block; }
.tarjeta-brent.mercado-activo { padding-block: 10px; }

.explorador-estaciones { min-height: 590px; height: min(720px, calc(100vh - 192px)); display: grid; grid-template-columns: 355px minmax(0,1fr); overflow: hidden; border: 1px solid #dce5e5; border-radius: 24px; background: #fff; box-shadow: 0 18px 55px rgba(22,59,82,.11); }
.panel-estaciones { min-height: 0; display: flex; flex-direction: column; padding: 20px; overflow: hidden; border-right: 1px solid var(--linea); background: #fff; }
.buscador-estaciones { padding-bottom: 18px; border-bottom: 1px solid #e6ecec; }
.buscador-estaciones fieldset { margin: 16px 0 0; padding: 0; border: 0; }
.buscador-estaciones legend, .campo-ubicacion { color: var(--azul); font-size: 12px; font-weight: 900; }
.entrada-ubicacion { position: relative; display: block; }
.entrada-ubicacion input { width: 100%; height: 47px; margin-top: 7px; padding: 0 103px 0 41px; border: 1px solid #cfdbde; border-radius: 11px; background: #fbfcfc; color: var(--texto); font-size: 14px; font-weight: 650; }
.entrada-ubicacion input:focus { outline: 3px solid rgba(194,65,12,.13); border-color: var(--naranja); }
.entrada-ubicacion > svg { position: absolute; z-index: 1; left: 13px; top: 21px; width: 18px; fill: none; stroke: var(--verde); stroke-width: 2; }
.usar-ubicacion-estaciones { position: absolute; z-index: 2; right: 7px; top: 14px; height: 33px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 0; border-radius: 8px; background: #e8f3ee; color: #216c53; font-size: 10px; font-weight: 900; }
.usar-ubicacion-estaciones:hover { background: #d9ece3; }
.usar-ubicacion-estaciones:disabled { cursor: wait; opacity: .65; }
.usar-ubicacion-estaciones svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.estado-ubicacion-estaciones { min-height: 15px; display: block; margin-top: 5px; color: var(--suave); font-size: 10px; font-weight: 650; line-height: 1.4; }
.sugerencias-ruta { position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; right: 0; display: none; max-height: 280px; overflow-y: auto; padding: 7px; border: 1px solid var(--linea); border-radius: 14px; background: #fff; box-shadow: 0 18px 42px rgba(13,44,66,.16); }
.sugerencias-ruta.abiertas { display: block; }
.sugerencia-ruta { width: 100%; display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: var(--texto); text-align: left; }
.sugerencia-ruta:hover, .sugerencia-ruta.activa { background: #fff3ed; }
.sugerencia-marca { flex: 0 0 25px; width: 25px; height: 25px; display: grid; place-items: center; margin-top: 1px; border-radius: 8px; background: #edf7f3; color: #2b9f78; }
.sugerencia-marca svg { position: static; width: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.sugerencia-texto { min-width: 0; }
.sugerencia-texto strong, .sugerencia-texto small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugerencia-texto strong { color: var(--azul-profundo); font-size: 12px; }
.sugerencia-texto small { margin-top: 2px; color: var(--suave); font-size: 10px; font-weight: 500; }
.sugerencia-cargando { display: block; padding: 11px; color: var(--suave); font-size: 11px; text-align: center; }
.selector-tipo > div, .selector-radio > div { display: grid; gap: 6px; margin-top: 7px; }
.selector-tipo > div { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
.selector-radio > div { grid-template-columns: repeat(3,1fr); }
.selector-tipo label, .selector-radio label { position: relative; min-width: 0; }
.selector-tipo input, .selector-radio input { position: absolute; opacity: 0; pointer-events: none; }
.selector-tipo span, .selector-radio span { min-height: 37px; display: grid; place-items: center; padding: 6px 4px; border: 1px solid var(--linea); border-radius: 9px; background: #f9fbfb; color: #49616b; font-size: 11px; font-weight: 800; text-align: center; }
.selector-tipo input:checked + span, .selector-radio input:checked + span { border-color: var(--naranja); background: #fff1e8; color: var(--naranja-oscuro); box-shadow: inset 0 0 0 1px var(--naranja); }
.selector-tipo input:focus-visible + span, .selector-radio input:focus-visible + span { outline: 3px solid rgba(194,65,12,.15); }
#buscarEstaciones { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; border: 0; border-radius: 11px; background: var(--naranja); color: #fff; font-size: 13px; font-weight: 900; box-shadow: 0 9px 20px rgba(194,65,12,.2); }
#buscarEstaciones:hover { background: var(--naranja-oscuro); }
#buscarEstaciones:disabled { cursor: wait; opacity: .7; }
#buscarEstaciones svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }

.resumen-resultados { padding: 17px 1px 12px; }
.resumen-resultados h2 { margin: 0; font-size: 19px; letter-spacing: -.5px; }
#estadoEstaciones { margin: 6px 0 0; color: var(--suave); font-size: 11px; line-height: 1.45; }
.lista-estaciones { min-height: 0; flex: 1; overflow-y: auto; padding-right: 4px; scrollbar-color: #bdccce transparent; scrollbar-width: thin; }
.estado-vacio { min-height: 150px; display: grid; place-items: center; align-content: center; padding: 18px; border: 1px dashed #cddadb; border-radius: 14px; background: #f8fbfa; text-align: center; }
.estado-vacio > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: #fff0e7; color: var(--naranja); font-size: 18px; font-weight: 900; }
.estado-vacio strong { margin-top: 10px; color: var(--azul-profundo); font-size: 14px; }
.estado-vacio p { margin: 4px 0 0; color: var(--suave); font-size: 11px; }
.tarjeta-estacion { position: relative; margin-bottom: 8px; padding: 12px 11px 11px 48px; border: 1px solid var(--linea); border-radius: 12px; background: #fff; }
.tarjeta-estacion:first-child { border-color: #e5b59f; box-shadow: 0 7px 18px rgba(194,65,12,.08); }
.puesto-estacion { position: absolute; left: 10px; top: 11px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: #e8f3ee; color: var(--verde); font-size: 11px; font-weight: 900; }
.tarjeta-estacion:first-child .puesto-estacion { background: var(--naranja); color: #fff; }
.tarjeta-estacion h3 { max-width: calc(100% - 72px); margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; }
.precio-estacion { position: absolute; right: 10px; top: 10px; margin: 0; color: var(--naranja-oscuro); font-size: 13px; font-weight: 900; }
.precio-estacion.sin-precio { position: static; margin-top: 5px; color: var(--suave); font-size: 11px; }
.detalle-estacion { margin: 5px 0 0; color: var(--verde); font-size: 10px; font-weight: 800; }
.direccion-estacion { margin: 4px 0 0; color: var(--suave); font-size: 10px; line-height: 1.35; }
.etiquetas-estacion { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.etiquetas-estacion span { padding: 3px 5px; border-radius: 6px; background: #f0f5f4; color: #49646d; font-size: 9px; font-weight: 700; }
.ver-estacion { display: inline-flex; margin-top: 6px; color: var(--naranja-oscuro); font-size: 10px; font-weight: 900; text-decoration: none; }
.ver-estacion:hover { text-decoration: underline; }
.tarjeta-electrica { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 0 8px; border-left: 3px solid var(--verde); }
.tarjeta-electrica.fuente-here { border-left-color: #718187; }
.tarjeta-electrica h3 { max-width: none; align-self: center; }
.tarjeta-electrica .precio-estacion { position: static; align-self: center; white-space: nowrap; font-size: 11px; }
.tarjeta-electrica .precio-estacion.sin-precio { margin: 0; }
.tarjeta-electrica .detalle-estacion,
.tarjeta-electrica .direccion-estacion,
.tarjeta-electrica .etiquetas-estacion,
.tarjeta-electrica .ver-estacion { grid-column: 1 / -1; }
.procedencia-estacion { width: fit-content; grid-column: 1 / -1; margin-top: 6px; padding: 3px 6px; border-radius: 6px; background: #e8f3ee; color: #216c53; font-size: 8px; font-weight: 900; letter-spacing: .25px; text-transform: uppercase; }
.fuente-here .procedencia-estacion { background: #eef2f3; color: #52666d; }

.zona-mapa { position: relative; min-width: 0; overflow: hidden; background: #e9eeeb; }
#mapaEstaciones, .mapa-fallback { position: absolute; inset: 0; }
#mapaEstaciones { z-index: 2; }
.mapa-fallback { z-index: 1; overflow: hidden; background: #e7ece8; background-image: linear-gradient(30deg, rgba(196,207,200,.42) 12%, transparent 12.5%, transparent 87%, rgba(196,207,200,.42) 87.5%), linear-gradient(150deg, rgba(196,207,200,.42) 12%, transparent 12.5%, transparent 87%, rgba(196,207,200,.42) 87.5%); background-size: 88px 154px; }
.mapa-fallback::before, .mapa-fallback::after { content: ""; position: absolute; background: rgba(211,220,214,.74); border: 1px solid rgba(174,190,180,.45); border-radius: 42%; transform: rotate(19deg); }
.mapa-fallback::before { left: 9%; top: 9%; width: 25%; height: 22%; }
.mapa-fallback::after { right: 8%; bottom: 8%; width: 31%; height: 24%; }
.calle { position: absolute; z-index: 1; height: 15px; border: 4px solid #fff; border-radius: 99px; background: #cbd5d0; box-shadow: 0 0 0 1px rgba(152,171,160,.45); }
.calle-a { width: 110%; left: -5%; top: 43%; transform: rotate(-8deg); }
.calle-b { width: 82%; right: -17%; top: 26%; transform: rotate(54deg); }
.calle-c { width: 75%; left: -15%; bottom: 18%; transform: rotate(45deg); }
.etiqueta-demo { position: absolute; z-index: 4; left: 17px; top: 16px; padding: 7px 9px; border-radius: 8px; background: rgba(13,44,66,.9); color: #fff; font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.pin-demo { position: absolute; z-index: 3; display: grid; place-items: center; }
.pin-demo b { min-width: 62px; padding: 7px 9px; border: 2px solid #fff; border-radius: 10px; background: var(--verde); color: #fff; font-size: 12px; box-shadow: 0 5px 15px rgba(13,44,66,.25); }
.pin-demo i { width: 10px; height: 10px; margin-top: -6px; background: var(--verde); transform: rotate(45deg); }
.pin-demo-1 { left: 24%; top: 30%; }
.pin-demo-2 { right: 25%; top: 22%; }
.pin-demo-3 { left: 54%; bottom: 25%; }
.pin-demo-2 b, .pin-demo-2 i { background: #d07a28; }
.pin-demo-3 b, .pin-demo-3 i { background: #66777d; }
.mensaje-mapa-local { position: absolute; z-index: 4; left: 50%; top: 54%; width: min(390px, calc(100% - 32px)); display: grid; justify-items: center; padding: 21px; border: 1px solid rgba(255,255,255,.9); border-radius: 16px; background: rgba(255,255,255,.94); box-shadow: 0 15px 40px rgba(13,44,66,.15); text-align: center; transform: translate(-50%,-50%); backdrop-filter: blur(6px); }
.mensaje-mapa-local svg { width: 25px; fill: none; stroke: var(--naranja); stroke-width: 2; }
.mensaje-mapa-local strong { margin-top: 7px; color: var(--azul-profundo); font-size: 16px; }
.mensaje-mapa-local span { margin-top: 5px; color: var(--suave); font-size: 12px; line-height: 1.45; }
.leyenda-mapa { position: absolute; z-index: 5; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 11px; padding: 9px 11px; border: 1px solid rgba(214,224,221,.9); border-radius: 10px; background: rgba(255,255,255,.94); box-shadow: 0 6px 18px rgba(13,44,66,.1); color: #465e68; font-size: 10px; font-weight: 800; }
.leyenda-mapa span { display: inline-flex; align-items: center; gap: 5px; }
.leyenda-mapa i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.leyenda-mapa i.medio { background: #d07a28; }
.leyenda-mapa i.sin-dato { background: #66777d; }
.fuente-estaciones { margin: 11px 5px 0; color: var(--suave); font-size: 10px; line-height: 1.5; }
.fuente-estaciones a { color: var(--naranja-oscuro); font-weight: 800; }

.H_ib_body { min-width: 0; }
.H_ib_content { margin: 8px 14px 9px 9px; }
.burbuja-estacion { width: min(196px, calc(100vw - 90px)); padding: 0; color: var(--texto); font-family: var(--fuente); }
.burbuja-cabecera { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.burbuja-cabecera strong { min-width: 0; color: var(--azul-profundo); font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.burbuja-cabecera small { flex: 0 0 auto; padding: 3px 5px; border-radius: 5px; background: #e8f3ee; color: #216c53; font-size: 7px; font-weight: 900; text-transform: uppercase; }
.burbuja-resumen { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.burbuja-precios { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin-top: 6px; }
.burbuja-precios span { display: flex; flex-direction: column; gap: 1px; padding: 3px 6px; border-radius: 6px; background: #f2f6f5; line-height: 1.15; }
.burbuja-precios small { color: #5d7179; font-size: 8px; font-weight: 800; }
.burbuja-precios b { color: var(--azul-profundo); font-size: 12px; font-weight: 900; }
.burbuja-precios .elegido { background: #fff0e8; box-shadow: inset 0 0 0 1px #f3b48f; }
.burbuja-precios .elegido b { color: var(--naranja-oscuro); }
.burbuja-precios .sin-precio { grid-column: 1 / -1; color: #5d7179; font-size: 10px; font-weight: 800; }
.burbuja-resumen span { display: inline-flex; margin: 0; padding: 4px 6px; border-radius: 6px; background: #f2f6f5; color: #536870; font-size: 9px; font-weight: 800; }
.burbuja-resumen .burbuja-precio { background: #fff0e8; color: var(--naranja-oscuro); font-size: 11px; font-weight: 900; }
.burbuja-conectores { margin: 7px 0 0; color: var(--suave); font-size: 9px; line-height: 1.35; overflow-wrap: anywhere; }
.burbuja-estacion a { display: block; margin-top: 6px; padding: 5px 8px; border-radius: 7px; background: var(--azul-profundo); color: #fff; font-size: 9px; font-weight: 900; text-align: center; text-decoration: none; }
.burbuja-estacion a:hover { background: var(--azul); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 34px; padding: 24px 0 32px; border-top: 1px solid #e5e4dd; }
footer nav { display: flex; flex-wrap: wrap; gap: 10px 17px; }
footer nav a { color: var(--azul); font-size: 12px; font-weight: 750; text-decoration: none; }

@media (max-width: 900px) {
  .cabecera-herramienta { align-items: flex-start; }
  .tarjeta-brent, .tarjeta-brent.mercado-activo { min-width: 320px; }
  .explorador-estaciones { height: auto; grid-template-columns: 1fr; overflow: visible; }
  .panel-estaciones { border-right: 0; border-bottom: 1px solid var(--linea); overflow: visible; }
  .lista-estaciones { max-height: 340px; }
  .zona-mapa { min-height: 540px; }
}

@media (max-width: 620px) {
  .cabecera-estaciones, main, footer { width: min(100% - 24px, 1380px); }
  .cabecera-estaciones { min-height: 64px; }
  .marca-estaciones { font-size: 20px; }
  .volver-calculadora { min-height: 36px; padding-inline: 10px; font-size: 11px; }
  .cabecera-herramienta { display: block; padding: 13px 1px 18px; }
  h1 { font-size: 32px; letter-spacing: -1.3px; }
  .introduccion { font-size: 13px; }
  .tarjeta-brent, .tarjeta-brent.mercado-activo { min-width: 0; width: 100%; margin-top: 16px; padding: 12px 14px; }
  .brent-oficial strong { font-size: 20px; }
  .brent-mercado { width: 100%; }
  .explorador-estaciones { border-radius: 19px; }
  .panel-estaciones { padding: 16px; }
  .selector-tipo span { min-height: 42px; font-size: 10px; }
  .resumen-resultados { padding-top: 15px; }
  .lista-estaciones { max-height: 320px; }
  .zona-mapa { min-height: 470px; }
  .mensaje-mapa-local { top: 55%; padding: 17px; }
  .pin-demo-1 { left: 12%; }
  .pin-demo-2 { right: 11%; top: 25%; }
  .pin-demo-3 { left: 58%; bottom: 18%; }
  .leyenda-mapa { left: 12px; right: auto; bottom: 12px; gap: 8px; }
  footer { align-items: flex-start; flex-direction: column; }
}
