/* ==========================================================================
   GASOLINERAS — sección de precios (MITECO), selector del repostaje, ficha y mapa.
   Usa los mismos tokens, tarjetas y botones del resto de la app (claro/oscuro, móvil primero).
   ========================================================================== */

/* ---------- Piezas comunes ---------- */
.fuel-mark {
  width: 2.5rem; height: 2.5rem; flex: none; border-radius: 0.75rem;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: rgb(var(--a-500)); background: rgb(var(--a-500) / 0.12);
}
/* Logo de marca: imagen si existe; si no, iniciales sobre un tono estable derivado del nombre (--h) */
.fuel-logo {
  --s: 2.75rem;
  position: relative; flex: none; display: grid; place-items: center; overflow: hidden;
  width: var(--s); height: var(--s); border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--s) * 0.36); letter-spacing: 0.02em; line-height: 1;
  color: hsl(var(--h) 38% 30%); background: hsl(var(--h) 42% 90%);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.1);
}
.fuel-logo.is-xs { --s: 1.5rem; font-size: 0.6rem; }
.fuel-logo.is-sm { --s: 2.1rem; }
.fuel-logo.is-lg { --s: 3.25rem; }
.dark .fuel-logo { color: hsl(var(--h) 55% 82%); background: hsl(var(--h) 24% 22%); }
.fuel-logo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(0 0 0 / 0.1); pointer-events: none; }
.dark .fuel-logo::after { box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.1); }
.fuel-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 16%; background: #fff; }
.fuel-badge {
  display: inline-flex; align-items: center; width: fit-content;
  padding: 0.12rem 0.55rem; border-radius: 9999px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  color: #0b7a47; background: rgb(23 178 106 / 0.14);
}
.dark .fuel-badge { color: #4ade9b; }
.fuel-note { margin: 0.4rem 0 0; font-size: 0.82rem; line-height: 1.45; color: var(--muted-foreground); }
.fuel-note.is-visible:empty { display: none; }
.fuel-note.is-error { color: var(--gauge-bad); }
.fuel-section-title { margin: 1.25rem 0 0.5rem; font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }

/* ---------- Historial de repostajes ---------- */
.fuel-chip {
  display: inline-flex; align-items: center; gap: 0.5rem; max-width: 100%;
  min-height: 2.5rem; padding: 0.3rem 0.5rem 0.3rem 0.7rem; border-radius: 0.8rem; text-align: left;
  color: var(--foreground); background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border);
  transition-property: background-color, box-shadow, transform; transition-duration: 0.16s; transition-timing-function: var(--ease-out);
}
.fuel-chip:hover { background: var(--card); box-shadow: 0 0 0 1px rgb(var(--a-500) / 0.5); }
.fuel-chip:active { transform: scale(var(--press)); }
.fuel-chip > svg:first-child { color: rgb(var(--a-500)); flex: none; }
.fuel-chip-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.fuel-chip-text strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-chip-text small { font-size: 0.75rem; color: var(--muted-foreground); }
.fuel-chip-arrow { flex: none; color: var(--muted-foreground); transform: rotate(-90deg); }
.fuel-type-tag, .fuel-paid-tag { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 9999px; font-size: 0.7rem; font-weight: 700; vertical-align: middle; }
.fuel-type-tag { color: rgb(var(--a-600)); background: rgb(var(--a-500) / 0.12); }
.dark .fuel-type-tag { color: rgb(var(--a-300)); }
.fuel-paid-tag { color: var(--muted-foreground); background: var(--muted); }

/* ---------- Selector dentro del formulario de repostaje ---------- */
.fuel-station-field { display: flex; flex-direction: column; gap: 0.6rem; padding: 0.9rem; border-radius: 1rem; background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.fuel-station-field > .form-label small { font-weight: 400; }
.fuel-station-selected { display: flex; align-items: center; gap: 0.7rem; }
.fuel-station-selected[hidden], .fuel-picker[hidden], .fuel-suggestion[hidden], [data-fuel-open][hidden] { display: none; }
.fuel-station-selected-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.fuel-station-selected-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-station-selected-text small { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-mini-btn { min-height: 2.25rem; padding: 0.3rem 0.7rem; font-size: 0.82rem; }
.fuel-picker { display: flex; flex-direction: column; gap: 0.5rem; }
.fuel-picker-bar { display: grid; gap: 0.5rem; }
@media (min-width: 40rem) { .fuel-picker-bar { grid-template-columns: minmax(0, 1fr) auto; } }
.fuel-picker-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.3rem; max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; }
.fuel-result { display: flex; align-items: center; gap: 0.7rem; width: 100%; min-height: 3.25rem; padding: 0.45rem 0.6rem; border-radius: 0.8rem; text-align: left; background: var(--card); box-shadow: inset 0 0 0 1px var(--border); transition-property: box-shadow, transform; transition-duration: 0.14s; }
.fuel-result:hover { box-shadow: 0 0 0 1px rgb(var(--a-500) / 0.6); }
.fuel-result:active { transform: scale(var(--press)); }
.fuel-result .fuel-mark { width: 2.1rem; height: 2.1rem; font-size: 0.9rem; border-radius: 0.6rem; }
.fuel-result-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.fuel-result-text strong { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-result-text small { font-size: 0.76rem; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fuel-result-price { flex: none; font-weight: 700; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.fuel-result-price small { font-weight: 500; color: var(--muted-foreground); }

.fuel-suggestion { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 1rem; border-radius: 1rem; background: rgb(var(--a-500) / 0.08); box-shadow: inset 0 0 0 1px rgb(var(--a-500) / 0.25); }
.fuel-suggestion > div { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; flex: 1 1 12rem; }
.fuel-suggestion-label { font-size: 0.78rem; font-weight: 600; color: var(--muted-foreground); }
.fuel-suggestion-price { font-family: var(--font-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.fuel-suggestion small { font-size: 0.76rem; color: var(--muted-foreground); }

/* ---------- Ficha (modal) ---------- */
.fuel-detail-head { display: flex; align-items: center; gap: 0.85rem; }
.fuel-detail-head h3 { margin: 0; font-size: 1.15rem; }
.fuel-detail-head p { margin: 0.1rem 0 0; font-size: 0.88rem; color: var(--muted-foreground); }
.fuel-detail-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin: 0.8rem 0 0; font-size: 0.88rem; font-weight: 600; }
.fuel-price-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.15rem; }
.fuel-price-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0.75rem; border-radius: 0.65rem; }
.fuel-price-list li:nth-child(odd) { background: var(--card-sunken); }
.fuel-price-list li.is-selected { background: rgb(var(--a-500) / 0.1); font-weight: 700; }
.fuel-price-list strong { font-variant-numeric: tabular-nums; }
.fuel-compare { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.fuel-compare > div { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.8rem 1rem; border-radius: 1rem; background: var(--card-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.fuel-compare.is-current > div:first-child { box-shadow: inset 0 0 0 1px rgb(var(--a-500) / 0.4); }
.fuel-compare span { font-size: 0.78rem; font-weight: 600; color: var(--muted-foreground); }
.fuel-compare strong { font-family: var(--font-display); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.fuel-compare strong.is-down { color: #0b7a47; }
.fuel-compare strong.is-up { color: var(--gauge-bad); }
.dark .fuel-compare strong.is-down { color: #4ade9b; }
.fuel-compare small { font-size: 0.76rem; color: var(--muted-foreground); }
.fuel-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.fuel-actions > * { flex: 1 1 9rem; }

/* ---------- Dashboard: tu gasolinera ---------- */
.fuel-dash { display: flex; flex-direction: column; gap: 0.9rem; }
.fuel-dash-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.fuel-dash-head h3 { margin: 0; }
.fuel-dash-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.fuel-dash-row > div { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.75rem 0.9rem; border-radius: 0.9rem; background: var(--card-sunken); }
.fuel-dash-row span { font-size: 0.76rem; font-weight: 600; color: var(--muted-foreground); }
.fuel-dash-row strong { font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.fuel-dash-row strong.is-down { color: #0b7a47; }
.fuel-dash-row strong.is-up { color: var(--gauge-bad); }
.dark .fuel-dash-row strong.is-down { color: #4ade9b; }
.fuel-dash-sub { margin: 0; font-size: 0.82rem; color: var(--muted-foreground); }


