/* FuelCore V519 — primary station map hero, compact cheapest station, fixed refresh bar. */
.fd-dashboard-refresh-progress {
  position: fixed !important;
  z-index: 2147482999 !important;
  top: calc(env(safe-area-inset-top) + 69px) !important;
  right: max(18px, calc(50% - 222px)) !important;
  left: max(18px, calc(50% - 222px)) !important;
  transform: translate3d(0, 0, 0);
  will-change: opacity, visibility;
}
.fd-dashboard-refresh-progress__fill {
  transform: translate3d(0, 0, 0) scaleX(var(--fd-dashboard-refresh-progress, 0));
}

html body #app .primary-station-card[data-fd-dashboard-role="primary-station"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 25px !important;
  background: #08080a !important;
}

html body #app .primary-station-card__hero {
  position: relative;
  min-height: 304px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #111114;
}

html body #app .primary-station-card__map,
html body #app .primary-station-card__map .fuel-map,
html body #app .primary-station-card__map .fuel-map-canvas,
html body #app .primary-station-card__map .leaflet-container {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  overflow: hidden !important;
  border-radius: inherit !important;
}

html body #app .primary-station-card__map {
  z-index: 0;
  opacity: 0.56;
  pointer-events: none;
}

html body #app .primary-station-card__map .leaflet-marker-pane,
html body #app .primary-station-card__map .leaflet-shadow-pane,
html body #app .primary-station-card__map .map-price-marker,
html body #app .primary-station-card__map .user-location-marker {
  display: none !important;
}

html body #app .primary-station-card__hero::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: rgba(5, 5, 7, 0.54);
  pointer-events: none;
}

html body #app .primary-station-card__hero-tap {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

html body #app .primary-station-card__hero-copy {
  position: absolute;
  right: 54px;
  bottom: 53px;
  left: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

html body #app .primary-station-card__hero-copy small {
  display: block;
  color: #ff535d;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

html body #app .primary-station-card__hero-copy strong {
  display: block;
  margin-top: 12px;
  color: #ff453a;
  font-size: clamp(48px, 14vw, 64px);
  font-weight: 780;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

html body #app .primary-station-card__hero-copy b {
  display: block;
  max-width: 100%;
  margin-top: 18px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.95);
  font-size: 20px;
  font-weight: 720;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body #app .primary-station-card__hero-copy > span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
  line-height: 1.25;
}

html body #app .primary-station-card__hero-copy .primary-station-card__fallback {
  display: block;
  margin-top: 9px;
  color: #ffad4a;
  font-size: 11px;
  font-style: normal;
}

html body #app .primary-station-card__hero-tap > svg {
  position: absolute;
  top: 20px;
  right: 18px;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.76);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

html body #app .primary-station-card__route {
  position: absolute;
  right: 20px;
  bottom: 15px;
  left: 20px;
  z-index: 4;
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(5, 5, 7, 0.64);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

html body #app .primary-station-card[data-fd-dashboard-role="primary-station"] .primary-station-card__insights {
  gap: 14px;
  padding: 18px 18px 20px !important;
}

html body #app .primary-station-card--empty {
  min-height: 170px;
}

html body #app .primary-station-card--empty .primary-station-card__empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 22px;
}

html body #app .primary-station-card--empty .primary-station-card__empty small {
  color: #ff535d;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
}

html body #app .primary-station-card--empty .primary-station-card__empty strong {
  color: #f4f4f6;
  font-size: 21px;
}

html body #app .primary-station-card--empty .primary-station-card__empty span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  line-height: 1.4;
}

html body #app .fd-best.fd-best--compact {
  min-height: 166px !important;
  margin-top: 16px;
  grid-template-columns: 1fr !important;
  place-items: stretch;
  border-radius: 23px;
}

html body #app .fd-best--compact .fd-best__map {
  display: none !important;
}

html body #app .fd-best--compact::after {
  background: rgba(5, 5, 7, 0.18) !important;
}

html body #app .fd-best--compact .fd-best__copy {
  grid-column: 1;
  align-items: flex-start;
  align-self: center;
  gap: 5px;
  padding: 19px 52px 18px 22px !important;
  text-align: left;
}

html body #app .fd-best--compact .fd-best__label,
html body #app .fd-best--compact .fd-best__station {
  align-self: flex-start;
  width: auto;
  max-width: 100%;
  font-size: 14px;
  text-align: left;
}

html body #app .fd-best--compact .fd-best__trend {
  align-self: flex-start;
  margin: 0;
  font-size: 11px;
}

html body #app .fd-best--compact .fd-best__price {
  align-self: flex-start;
  margin: 2px 0 0;
  font-size: clamp(38px, 11vw, 48px);
  text-align: left;
}

html body #app .fd-best--compact .fd-best__station {
  margin-top: 7px;
}

html body #app .fd-best--compact .fd-best__meta {
  align-self: flex-start;
  justify-self: start;
  margin: 0;
  font-size: 11px;
  text-align: left;
}

html body #app .fd-best--compact + .favorites-block {
  margin-top: 16px !important;
}

@media (max-width: 370px) {
  html body #app .primary-station-card__hero { min-height: 280px; }
  html body #app .primary-station-card__hero-copy { right: 42px; left: 18px; }
  html body #app .primary-station-card__hero-copy strong { font-size: 48px; }
  html body #app .fd-best.fd-best--compact { min-height: 154px !important; }
  html body #app .fd-best--compact .fd-best__copy { padding-inline: 18px 44px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .fd-dashboard-refresh-progress,
  .fd-dashboard-refresh-progress__fill {
    transition: none !important;
  }
}

/* V519 visual correction against the original centered best-price tile. */
html body #app .primary-station-card__hero {
  min-height: 272px;
}
html body #app .primary-station-card__hero::after {
  background:
    linear-gradient(
      180deg,
      rgba(4, 4, 6, 0.84) 0%,
      rgba(4, 4, 6, 0.62) 42%,
      rgba(4, 4, 6, 0.9) 100%
    );
}
html body #app .primary-station-card__hero-copy {
  bottom: 39px;
}
html body #app .primary-station-card__hero-copy strong {
  margin-top: 8px;
  font-size: clamp(46px, 13.5vw, 60px);
}
html body #app .primary-station-card__hero-copy b {
  margin-top: 13px;
  font-size: 18px;
}
html body #app .primary-station-card__hero-copy > span {
  margin-top: 5px;
  font-size: 12px;
}
html body #app .primary-station-card__route {
  bottom: 12px;
  min-height: 36px;
}

/* V519 refinement: use the centered composition of the former best-price hero. */
html body #app .primary-station-card__hero-tap {
  text-align: center;
}
html body #app .primary-station-card__hero-copy {
  right: 22px;
  left: 22px;
  align-items: center;
  text-align: center;
}
html body #app .primary-station-card__hero-copy strong,
html body #app .primary-station-card__hero-copy b,
html body #app .primary-station-card__hero-copy > span {
  align-self: center;
  text-align: center;
}
html body #app .primary-station-card__hero-copy b {
  width: 100%;
}
html body #app .primary-station-card__hero-copy > span {
  width: 100%;
}

/* The lower cheapest station is a compact, single horizontal information row. */
html body #app .fd-best.fd-best--compact {
  min-height: 112px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center;
}
html body #app .fd-best--compact .fd-best__copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label trend"
    "station price"
    "meta price";
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  padding: 16px 52px 16px 20px !important;
}
html body #app .fd-best--compact .fd-best__label {
  grid-area: label;
  font-size: 13px;
}
html body #app .fd-best--compact .fd-best__trend {
  grid-area: trend;
  justify-self: end;
  font-size: 11px;
  white-space: nowrap;
}
html body #app .fd-best--compact .fd-best__price {
  grid-area: price;
  align-self: center;
  margin: 0;
  font-size: 34px;
  line-height: 1;
}
html body #app .fd-best--compact .fd-best__station {
  grid-area: station;
  margin: 0;
  font-size: 15px;
}
html body #app .fd-best--compact .fd-best__meta {
  grid-area: meta;
  margin: 0;
  font-size: 11px;
}

/* Keep the real progress node outside scrolling/layout containers. */
html > body > #fd-dashboard-refresh-progress {
  position: fixed !important;
  inset-block-start: calc(env(safe-area-inset-top) + 69px) !important;
  inset-inline: max(18px, calc(50% - 222px)) !important;
  z-index: 2147482999 !important;
  contain: strict;
}

/* V519: primary station uses the same map hero composition as the former best-price card. */
html body > #fd-dashboard-refresh-progress {
  position: fixed !important;
  z-index: 2147482999 !important;
  top: calc(env(safe-area-inset-top) + 69px) !important;
  right: max(18px, calc(50% - 222px)) !important;
  left: max(18px, calc(50% - 222px)) !important;
  bottom: auto !important;
  transform: none !important;
  contain: none !important;
  will-change: opacity, visibility !important;
}

html body #app .primary-station-card__hero {
  min-height: 258px !important;
}

html body #app .primary-station-card__map {
  opacity: 0.68 !important;
  background: #59595d !important;
}

html body #app .primary-station-card__map .leaflet-tile-pane {
  filter: grayscale(1) saturate(.18) brightness(.62) contrast(1.04) !important;
}

html body #app .primary-station-card__hero::after {
  background:
    linear-gradient(90deg,
      rgba(7, 7, 9, 0.94) 0%,
      rgba(7, 7, 9, 0.78) 48%,
      rgba(7, 7, 9, 0.22) 100%),
    linear-gradient(180deg, rgba(5, 5, 7, 0.05), rgba(5, 5, 7, 0.38)) !important;
}

html body #app .primary-station-card__hero-copy {
  top: 50% !important;
  right: 22px !important;
  bottom: auto !important;
  left: 22px !important;
  transform: translateY(-50%) !important;
  align-items: center !important;
  text-align: center !important;
}

html body #app .primary-station-card__hero-copy small {
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 17px !important;
  font-weight: 720 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

html body #app .primary-station-card__hero-trend {
  display: block !important;
  width: 100% !important;
  margin-top: 7px !important;
  color: var(--fd-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

html body #app .primary-station-card__hero-trend i {
  margin-left: 6px;
  color: inherit !important;
  font-style: normal;
  font-weight: 500;
}

html body #app .primary-station-card__hero-trend.is-lower,
html body #app .primary-station-card__hero-trend.is-lower i {
  color: var(--fd-positive) !important;
}

html body #app .primary-station-card__hero-trend.is-higher,
html body #app .primary-station-card__hero-trend.is-higher i {
  color: var(--fd-negative) !important;
}

html body #app .primary-station-card__hero-copy strong {
  margin-top: 16px !important;
  font-size: clamp(52px, 15vw, 66px) !important;
}

html body #app .primary-station-card__hero-copy b {
  margin-top: 17px !important;
  font-size: 20px !important;
}

html body #app .primary-station-card__hero-copy > span:not(.primary-station-card__hero-trend) {
  margin-top: 5px !important;
  color: rgba(255, 255, 255, 0.68) !important;
  font-size: 13px !important;
}

@media (max-width: 370px) {
  html body #app .primary-station-card__hero { min-height: 246px !important; }
  html body #app .primary-station-card__hero-copy strong { font-size: 50px !important; }
}

/* V519: copy the final, visible map treatment from the former best-price hero. */
html body #app .primary-station-card__map {
  opacity: 1 !important;
  background-color: var(--fd-surface-raised) !important;
}

html body #app .primary-station-card__map .leaflet-tile-pane {
  filter: none !important;
}

html body #app .primary-station-card__hero::after {
  background-color: rgba(0, 0, 0, .72) !important;
  background-image: none !important;
  background-size: auto !important;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.82) 45%, rgba(0,0,0,.20) 100%);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0,0,0,.82) 45%, rgba(0,0,0,.20) 100%);
  opacity: 1 !important;
}

/* The refresh indicator belongs directly below the dashboard header and scrolls away with it. */
html body #app > .app-shell > .app-content > .brand-header[data-fd-header-mode="main"] + .fd-dashboard-refresh-progress {
  position: relative !important;
  z-index: 4 !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: 4px;
  margin: -10px 0 10px !important;
  transform: none !important;
  contain: none !important;
}

html.fd-dashboard-refresh-active body #app > .app-shell > .app-content > .brand-header[data-fd-header-mode="main"] + .fd-dashboard-refresh-progress {
  opacity: 1 !important;
  visibility: visible !important;
}

html.fd-dashboard-refresh-active body #app > .app-shell::before,
html.fd-dashboard-refresh-active body #app > .app-shell::after {
  content: none !important;
  display: none !important;
}

@media (max-width: 370px) {
  html body #app .fd-best.fd-best--compact {
    min-height: 106px !important;
  }
  html body #app .fd-best--compact .fd-best__copy {
    padding-inline: 17px 44px !important;
    column-gap: 7px;
  }
  html body #app .fd-best--compact .fd-best__price {
    font-size: 30px;
  }
}

/* V519: the duplicate cheapest station becomes a compact two-column summary. */
html body #app .fd-best.fd-best--compact {
  min-height: 118px !important;
  margin-top: 16px !important;
  grid-template-columns: 1fr !important;
  place-items: stretch !important;
}

html body #app .fd-best--compact .fd-best__map {
  display: none !important;
}

html body #app .fd-best--compact .fd-best__copy {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label price"
    "station price"
    "trend price";
  align-items: center;
  align-self: center;
  column-gap: 12px;
  row-gap: 3px;
  padding: 16px 52px 16px 20px !important;
  text-align: left;
}

html body #app .fd-best--compact .fd-best__label {
  grid-area: label;
  align-self: end;
  margin: 0 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  font-size: 14px !important;
  line-height: 1.1;
  text-align: left !important;
}

html body #app .fd-best--compact .fd-best__station {
  grid-area: station;
  align-self: center;
  width: auto !important;
  max-width: 100%;
  margin: 0 !important;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 14px !important;
  font-weight: 650;
  line-height: 1.25;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body #app .fd-best--compact .fd-best__trend {
  grid-area: trend;
  align-self: start;
  justify-self: start;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.2;
  text-align: left !important;
  white-space: nowrap;
}

html body #app .fd-best--compact .fd-best__trend i {
  margin-left: 5px;
  font-style: normal;
}

html body #app .fd-best--compact .fd-best__price {
  grid-area: price;
  align-self: center;
  justify-self: end;
  margin: 0 !important;
  color: #ff453a !important;
  font-size: clamp(34px, 10.5vw, 42px) !important;
  line-height: 1;
  text-align: right !important;
  white-space: nowrap;
}

html body #app .fd-best--compact .fd-best__meta {
  display: none !important;
}

html body #app .fd-best--compact + .favorites-block {
  margin-top: 16px !important;
}

@media (max-width: 370px) {
  html body #app .fd-best.fd-best--compact {
    min-height: 112px !important;
  }

  html body #app .fd-best--compact .fd-best__copy {
    column-gap: 8px;
    padding: 16px 44px 16px 17px !important;
  }

  html body #app .fd-best--compact .fd-best__price {
    font-size: 30px !important;
  }
}
