/* FuelDash R196 — final precision layer for the remaining legacy visual islands. */
:root {
  --fd-r196-page: #000000;
  --fd-r196-card: #0c0c0c;
  --fd-r196-control: #080808;
  --fd-r196-border: #1e1e1e;
  --fd-r196-red: #ff3b30;
}

/* Preisalarm: page, content rows and the controls inside them have fixed roles. */
html body .fd-alert-modal,
html body .fd-alert-modal .fd-alert-sheet,
html body .fd-alert-modal .fd-alert-head {
  background: var(--fd-r196-page) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .fd-alert-modal :is(.fd-alert-status, .fd-alert-row, .fd-alert-station, .fd-alert-empty) {
  border-color: var(--fd-r196-border) !important;
  background: var(--fd-r196-card) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .fd-alert-modal :is(.fd-alert-close, .fd-alert-test, .fd-alert-row select, .fd-alert-row input[type="time"], .fd-alert-row input[type="number"]) {
  border-color: var(--fd-r196-border) !important;
  background: var(--fd-r196-control) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Native checkbox rendering was disabled earlier; draw the neutral and selected states explicitly. */
html body .fd-alert-modal .fd-alert-row input[type="checkbox"],
html body .fd-alert-modal .fd-alert-station input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  place-content: center !important;
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  border: 2px solid #2a2a2e !important;
  border-radius: 8px !important;
  background: #080808 !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
  cursor: pointer;
}

html body .fd-alert-modal .fd-alert-row input[type="checkbox"]::after,
html body .fd-alert-modal .fd-alert-station input[type="checkbox"]::after {
  width: 12px;
  height: 7px;
  content: "";
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  opacity: 0;
  transform: rotate(-45deg) translate(1px, -1px);
}

html body .fd-alert-modal .fd-alert-row input[type="checkbox"]:checked,
html body .fd-alert-modal .fd-alert-station input[type="checkbox"]:checked {
  border-color: #ff3b30 !important;
  background: #ff3b30 !important;
}

html body .fd-alert-modal .fd-alert-row input[type="checkbox"]:checked::after,
html body .fd-alert-modal .fd-alert-station input[type="checkbox"]:checked::after {
  opacity: 1;
}

html body .fd-alert-modal :is(input, select, textarea) {
  color-scheme: dark;
}

/* Tankbuch: fields and their affix shells must be the exact same control, never a legacy graphite gradient. */
html body .fd-feature-page[data-fd-feature-view="tankbook"] :is(.fd-feature-card, .fd-tank-history) {
  border-color: var(--fd-r196-border) !important;
  background: var(--fd-r196-card) !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .fd-feature-page[data-fd-feature-view="tankbook"] :is(.fd-field > input, .fd-field > select, .fd-field > textarea, .fd-field-affix, .fd-field-affix > input, .fd-tank-summary > article, .fd-month-grid > article, .fd-tank-entry__values > span, .fd-backup-actions > button) {
  border-color: var(--fd-r196-border) !important;
  background: #080808 !important;
  background-image: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html body .fd-feature-page[data-fd-feature-view="tankbook"] .fd-field-affix > input {
  border-color: transparent !important;
  background: transparent !important;
}

/* The empty-favorites notice is a content card, matching the rest of the Favorites tab. */
html body #app .favorites-block .empty-state,
html body #app .result-list > .empty-state {
  border: 1px solid var(--fd-r196-border) !important;
  background: #0c0c0c !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #a1a1a8 !important;
}

/* Search and detail maps: reliable visible layer, dim red candidates, vivid selected station. */
html body #app .fuel-map[data-marker-mode="station"] .leaflet-marker-pane,
html body #app .fuel-map[data-marker-mode="station"] .leaflet-shadow-pane {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 650 !important;
}

html body #app .fuel-map[data-marker-mode="station"] .leaflet-marker-icon.fuel-map-marker {
  display: block !important;
  visibility: visible !important;
  overflow: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

html body #app .fuel-map[data-marker-mode="station"] .map-price-marker:not(.is-selected) {
  display: flex !important;
  visibility: visible !important;
  opacity: .62 !important;
  border-color: #8d2824 !important;
  background: #3c1211 !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, .46) !important;
}

html body #app .fuel-map[data-marker-mode="station"] .map-price-marker.is-selected {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-color: #ff746d !important;
  background: #ff3b30 !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .54), 0 0 0 2px rgba(255, 255, 255, .18) !important;
  transform: translateY(-2px) scale(1.05) !important;
}

html body #app .fuel-map[data-marker-mode="none"] :is(.leaflet-marker-pane, .leaflet-shadow-pane, .fuel-map-marker, .map-price-marker, .user-location-marker) {
  display: none !important;
  visibility: hidden !important;
}
