/* JAK Express statewide estimate explorer.
   Everything is scoped to the quote product so Leaflet and the map UI cannot
   leak into the rest of the public site. */

.zone-estimate-section {
  --estimate-water: #d7dde0;
  --estimate-overflow: #747d86;
  --estimate-panel: #111212;
  --estimate-panel-strong: #0b0c0c;
  --estimate-line: rgba(190, 194, 199, 0.16);
  --estimate-line-strong: rgba(190, 194, 199, 0.34);
  position: relative;
  padding-top: 5rem;
}

.zone-estimate-section .zone-intro {
  margin-bottom: 1.25rem;
}

.estimate-notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(177, 22, 36, 0.42);
  border-left: 3px solid var(--red-light);
  border-radius: 6px;
  background: linear-gradient(110deg, rgba(158, 0, 1, 0.15), rgba(255, 255, 255, 0.025));
}

.estimate-notice-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-family: var(--font-head);
  font-weight: 800;
}

.estimate-notice strong {
  display: block;
  margin-bottom: 0.15rem;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.estimate-notice p {
  margin: 0;
  color: var(--silver);
  font-size: 0.9rem;
  line-height: 1.55;
}

.zone-estimator {
  position: relative;
  z-index: 0;
  isolation: isolate;
  display: grid;
  min-height: 790px;
  grid-template-columns: minmax(280px, 324px) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  grid-template-areas:
    "pickup map"
    "dropoff map"
    "request map"
    "legend map";
  overflow: hidden;
  border: 1px solid var(--estimate-line);
  border-radius: 8px;
  background: #0c0d0d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.zone-estimator[aria-busy="true"] {
  min-height: 620px;
}

.zone-estimator button,
.zone-estimator input,
.zone-estimator summary {
  font: inherit;
}

.zone-estimator button:focus-visible,
.zone-estimator input:focus-visible,
.zone-estimator summary:focus-visible,
.zone-estimator a:focus-visible {
  outline: 3px solid #e04a52;
  outline-offset: 2px;
}

.zone-estimator .pickup-card {
  grid-area: pickup;
  margin: 1rem 1rem 0;
}

.zone-estimator .dropoff-card {
  grid-area: dropoff;
  margin: 0.75rem 1rem 0;
}

.zone-estimator .pickup-card,
.zone-estimator .dropoff-card,
.zone-estimator .estimate-legend-section {
  border: 1px solid var(--estimate-line);
  border-radius: 6px;
  background: rgba(24, 25, 25, 0.91);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.025);
}

.zone-estimator .pickup-card,
.zone-estimator .dropoff-card {
  padding: 1rem;
}

.zone-estimator .section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.zone-estimator .section-kicker {
  margin: 0 0 0.12rem;
  color: #e0525a;
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.zone-estimator h3 {
  margin: 0;
  color: #f3f4f4;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.zone-estimator .pickup-marker,
.zone-estimator .dropoff-marker {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 800;
}

.zone-estimator .pickup-marker {
  color: #fff;
  background: linear-gradient(145deg, var(--red-light), var(--red-dark));
  box-shadow: 0 5px 16px rgba(82, 7, 15, 0.42);
}

.zone-estimator .dropoff-marker {
  border-color: rgba(255, 255, 255, 0.42);
  color: #111313;
  background: linear-gradient(145deg, #fff, #9ea5aa);
}

.zone-estimator .search-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #aeb2b5;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.zone-estimator .combobox-wrap {
  position: relative;
}

.zone-estimator #pickupSearch,
.zone-estimator #dropoffSearch {
  width: 100%;
  min-height: 48px;
  padding: 0 2.7rem 0 0.85rem;
  border: 1px solid var(--estimate-line-strong);
  border-radius: 4px;
  color: #fff;
  background: #090a0a;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, 0.38);
  font-size: 0.9rem;
  font-weight: 600;
}

.zone-estimator #pickupSearch:hover,
.zone-estimator #dropoffSearch:hover {
  border-color: rgba(190, 194, 199, 0.5);
}

.zone-estimator #pickupSearch:focus,
.zone-estimator #dropoffSearch:focus {
  border-color: var(--red-light);
  box-shadow:
    0 0 0 3px rgba(177, 22, 36, 0.18),
    inset 0 1px 8px rgba(0, 0, 0, 0.38);
}

.zone-estimator #pickupSearch::placeholder,
.zone-estimator #dropoffSearch::placeholder {
  color: #777c80;
}

.zone-estimator .field-help,
.zone-estimator .pickup-summary,
.zone-estimator .zone-help {
  margin: 0.55rem 0 0;
  color: #969b9e;
  font-size: 0.72rem;
  line-height: 1.5;
}

.zone-estimator .pickup-summary {
  padding-top: 0.55rem;
  border-top: 1px solid rgba(190, 194, 199, 0.09);
  color: #bec2c7;
}

.zone-estimator .search-results {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  max-height: 310px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid var(--estimate-line-strong);
  border-radius: 5px;
  background: #111212;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.46);
}

.zone-estimator .search-result {
  display: grid;
  width: 100%;
  min-height: 48px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border: 0;
  border-radius: 3px;
  color: #e8eaeb;
  text-align: left;
  background: transparent;
}

.zone-estimator .search-result:hover,
.zone-estimator .search-result.is-active {
  background: #252626;
}

.zone-estimator .result-copy {
  min-width: 0;
}

.zone-estimator .result-copy strong,
.zone-estimator .result-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .result-copy strong {
  color: #f5f6f6;
  font-size: 0.8rem;
}

.zone-estimator .result-copy small,
.zone-estimator .no-results {
  color: #92979a;
  font-size: 0.68rem;
}

.zone-estimator .result-arrow {
  color: #d7444d;
  font-size: 1.2rem;
}

.zone-estimator .no-results {
  padding: 0.8rem;
}

.zone-estimator .dropoff-selection {
  display: grid;
  min-width: 0;
  grid-template-columns: 9px minmax(0, 1fr) auto 26px;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 0.7rem;
  border: 1px solid var(--estimate-line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
}

.zone-estimator .dropoff-selection[hidden] {
  display: none;
}

.zone-estimator .dropoff-swatch {
  width: 7px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 2px;
  background: var(--estimate-overflow);
}

.zone-estimator .dropoff-selection-copy {
  min-width: 0;
}

.zone-estimator .dropoff-selection-copy small,
.zone-estimator .dropoff-selection-copy strong,
.zone-estimator .dropoff-selection-copy span,
.zone-estimator .dropoff-rate small,
.zone-estimator .dropoff-rate strong {
  display: block;
}

.zone-estimator .dropoff-selection-copy small,
.zone-estimator .dropoff-rate small {
  color: #9ba0a3;
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.zone-estimator .dropoff-selection-copy strong {
  overflow: hidden;
  color: #f4f5f5;
  font-family: var(--font-head);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.zone-estimator .dropoff-selection-copy span {
  overflow: hidden;
  color: #8f9598;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .dropoff-rate {
  text-align: right;
}

.zone-estimator .dropoff-rate strong {
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.5rem;
  line-height: 1;
}

.zone-estimator .clear-dropoff {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  color: #b6babd;
  background: transparent;
  font-size: 1.25rem;
}

.zone-estimator .clear-dropoff:hover {
  color: #fff;
}

.estimate-request-link {
  grid-area: request;
  width: auto;
  min-height: 46px;
  justify-content: center;
  margin: 0.75rem 1rem 1rem;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  white-space: normal;
  text-align: center;
}

.zone-estimator .map-shell {
  position: relative;
  z-index: 0;
  grid-area: map;
  min-width: 0;
  min-height: 790px;
  overflow: hidden;
  background: var(--estimate-water);
}

.zone-estimator #map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: var(--estimate-water);
}

.zone-estimator .leaflet-container {
  color: #1c252b;
  font-family: var(--font-body);
  cursor: crosshair;
}

.zone-estimator .leaflet-pane,
.zone-estimator .leaflet-control {
  z-index: auto;
}

.zone-estimator .leaflet-map-pane { z-index: 1; }
.zone-estimator .leaflet-tile-pane { z-index: 2; }
.zone-estimator .leaflet-overlay-pane { z-index: 4; }
.zone-estimator .leaflet-shadow-pane { z-index: 5; }
.zone-estimator .leaflet-marker-pane { z-index: 6; }
.zone-estimator .leaflet-tooltip-pane { z-index: 7; }
.zone-estimator .leaflet-popup-pane { z-index: 8; }
.zone-estimator .leaflet-control-container { position: relative; z-index: 9; }

.zone-estimator .water-mask {
  cursor: default;
}

.zone-estimator .map-toolbar {
  position: absolute;
  z-index: 20;
  top: 14px;
  left: 14px;
  display: flex;
  min-height: 48px;
  max-width: calc(100% - 88px);
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(190, 194, 199, 0.32);
  border-radius: 6px;
  color: #f1f2f3;
  background: rgba(12, 13, 13, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.zone-estimator .map-pickup-context {
  display: grid;
  min-width: 74px;
  line-height: 1;
}

.zone-estimator .map-pickup-context > span {
  color: #9ca1a5;
  font-family: var(--font-head);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.zone-estimator .map-pickup-context strong {
  max-width: 150px;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.zone-estimator .toolbar-divider {
  width: 1px;
  height: 27px;
  flex: 0 0 auto;
  background: rgba(190, 194, 199, 0.22);
}

.zone-estimator .map-toolbar button {
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  color: #f0f1f2;
  background: transparent;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zone-estimator .map-toolbar button:hover {
  color: #e04a52;
}

.zone-estimator .map-instruction {
  overflow: hidden;
  color: #aeb2b5;
  font-size: 0.69rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .map-preview {
  position: absolute;
  z-index: 20;
  bottom: 18px;
  left: 18px;
  display: grid;
  min-width: 250px;
  max-width: min(430px, calc(100% - 36px));
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 0.05rem 0.65rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(190, 194, 199, 0.34);
  border-radius: 6px;
  color: #f5f6f7;
  background: rgba(10, 11, 11, 0.95);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.zone-estimator .map-preview.is-hovering {
  right: auto;
  bottom: auto;
}

.zone-estimator .map-preview[hidden] {
  display: none;
}

.zone-estimator .preview-swatch {
  width: 8px;
  height: 34px;
  grid-row: 1 / span 2;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 2px;
  background: var(--estimate-overflow);
}

.zone-estimator .preview-region {
  overflow: hidden;
  color: #f5f6f7;
  font-size: 0.76rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .map-preview strong {
  grid-row: 1 / span 2;
  grid-column: 3;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
}

.zone-estimator .preview-meta {
  overflow: hidden;
  color: #9ca1a5;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .map-status {
  position: absolute;
  z-index: 22;
  top: 72px;
  left: 14px;
  max-width: min(420px, calc(100% - 28px));
  padding: 0.55rem 0.75rem;
  transform: translateY(-5px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 4px;
  opacity: 0;
  color: #fff;
  background: rgba(82, 7, 15, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  font-size: 0.72rem;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.zone-estimator .map-status.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.zone-estimator .leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid rgba(190, 194, 199, 0.34) !important;
  border-radius: 5px !important;
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.28) !important;
}

.zone-estimator .leaflet-control-zoom a {
  border-color: rgba(190, 194, 199, 0.18) !important;
  color: #f1f2f3 !important;
  background: rgba(12, 13, 13, 0.95) !important;
}

.zone-estimator .leaflet-control-zoom a:hover {
  color: #fff !important;
  background: #242526 !important;
}

.zone-estimator .leaflet-control-attribution {
  color: #a4a9ac;
  background: rgba(9, 10, 10, 0.78) !important;
  font-size: 0.58rem;
}

.zone-estimator .leaflet-control-attribution a {
  color: #d6d8da;
}

.zone-estimator .map-pin {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  color: #fff;
  background: linear-gradient(145deg, var(--red-light), var(--red-dark));
  box-shadow:
    0 0 0 2px rgba(158, 0, 1, 0.34),
    0 5px 16px rgba(0, 0, 0, 0.42);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 800;
}

.zone-estimator .map-pin > span {
  transform: rotate(45deg);
}

.zone-estimator .map-pin.map-pin-dropoff {
  border-color: #111313;
  color: #111313;
  background: linear-gradient(145deg, #fff, #a7adb1);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.72),
    0 5px 16px rgba(0, 0, 0, 0.38);
}

.zone-estimator .legend-panel {
  grid-area: legend;
  min-width: 0;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--estimate-line);
  border-right: 1px solid var(--estimate-line);
  background:
    radial-gradient(circle at 0 0, rgba(158, 0, 1, 0.08), transparent 220px),
    linear-gradient(145deg, #101111, #0b0c0c);
}

.zone-estimator .estimate-legend-section {
  padding: 1rem;
  border-top: 0;
  border-radius: 0 0 6px 6px;
}

.zone-estimator .zone-heading h3 {
  max-width: 165px;
  overflow: hidden;
  font-size: 1.45rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .zone-count {
  flex: 0 0 auto;
  padding: 0.2rem 0.38rem;
  border: 1px solid var(--estimate-line);
  border-radius: 3px;
  color: #aeb2b5;
  background: rgba(255, 255, 255, 0.025);
  font-family: var(--font-head);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zone-estimator .zone-help {
  margin-bottom: 0.8rem;
}

.zone-estimator .zone-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
}

.zone-estimator .zone-tier {
  min-width: 0;
}

.zone-estimator .zone-tier + .zone-tier {
  padding-top: 0.45rem;
  border-top: 1px solid rgba(190, 194, 199, 0.12);
}

.zone-estimator .zone-tier-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0.1rem 0.25rem;
}

.zone-estimator .zone-tier-heading strong,
.zone-estimator .zone-tier-heading span {
  font-family: var(--font-head);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.zone-estimator .zone-tier-heading strong { color: #dfe2e3; }
.zone-estimator .zone-tier-heading span { color: #858b8f; }

.zone-estimator .zone-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
}

.zone-estimator .zone-item {
  min-width: 0;
}

.zone-estimator .zone-row {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 50px;
  grid-template-columns: 25px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "swatch price"
    "swatch copy";
  gap: 0.05rem 0.3rem;
  align-items: center;
  padding: 0.28rem;
  border: 1px solid rgba(190, 194, 199, 0.08);
  border-radius: 4px;
  color: inherit;
  background: rgba(255, 255, 255, 0.018);
  box-shadow: inset 0 -2px 0 var(--zone-color);
  text-align: left;
}

.zone-estimator .zone-row:hover {
  border-color: rgba(226, 229, 231, 0.36);
  background: #222323;
}

.zone-estimator .zone-row[aria-pressed="true"] {
  border-color: rgba(240, 242, 243, 0.64);
  background: #252626;
  box-shadow:
    inset 0 -3px 0 var(--zone-color),
    inset 0 0 0 1px rgba(240, 242, 243, 0.11);
}

.zone-estimator .zone-swatch {
  grid-area: swatch;
  display: grid;
  width: 25px;
  height: 29px;
  place-items: center;
  border: 1px solid rgba(10, 14, 16, 0.5);
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.zone-estimator .numbered-swatch {
  font-family: var(--font-head);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.zone-estimator .zone-copy {
  min-width: 0;
  grid-area: copy;
}

.zone-estimator .zone-copy strong,
.zone-estimator .zone-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-estimator .zone-copy strong {
  color: #e4e6e7;
  font-size: 0.54rem;
}

.zone-estimator .zone-copy small {
  display: none;
}

.zone-estimator .overflow-legend .zone-copy small {
  display: block;
  color: #9ca1a5;
  font-size: 0.54rem;
  line-height: 1.2;
  white-space: normal;
}

.zone-estimator .zone-price {
  min-width: 0;
  grid-area: price;
  align-self: end;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1;
}

.zone-estimator .overflow-legend {
  display: grid;
  width: 100%;
  min-height: 46px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  grid-template-areas: "swatch copy price";
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.55rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(190, 194, 199, 0.18);
  border-radius: 4px;
  color: inherit;
  background: rgba(116, 125, 134, 0.13);
  text-align: left;
}

.zone-estimator .overflow-legend .zone-price {
  align-self: center;
}

.zone-estimator .overflow-legend:hover,
.zone-estimator .overflow-legend[aria-pressed="true"] {
  border-color: rgba(226, 229, 231, 0.42);
  background: rgba(116, 125, 134, 0.25);
}

.zone-estimator .overflow-swatch {
  background:
    repeating-linear-gradient(135deg, #747d86 0, #747d86 5px, #9299a0 5px, #9299a0 10px);
}

.zone-estimator .water-key {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0.7rem 0 0;
  color: #92979a;
  font-size: 0.64rem;
  line-height: 1.4;
}

.zone-estimator .water-key > span {
  width: 22px;
  height: 12px;
  flex: 0 0 auto;
  border: 1px solid #edf0f1;
  border-radius: 2px;
  background: var(--estimate-water);
}

.zone-estimator .panel-footer {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.7rem;
  color: #858a8d;
  font-size: 0.6rem;
  line-height: 1.4;
}

.zone-estimator .loading-screen {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0.65rem;
  padding: 2rem;
  color: #f0f1f2;
  text-align: center;
  background:
    radial-gradient(circle at 50% 40%, #242526, #101111 46%, #080909 100%);
  transition: opacity 240ms ease, visibility 240ms ease;
}

.zone-estimator .loading-screen.is-hidden,
.zone-estimator .loading-screen[hidden] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.zone-estimator .loading-screen strong {
  font-family: var(--font-head);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.zone-estimator .loading-screen span {
  max-width: 390px;
  color: #9ca1a5;
  font-size: 0.8rem;
}

.zone-estimator .loading-mark {
  width: 42px;
  height: 42px;
  border: 3px solid #404345;
  border-top-color: #d43a43;
  border-radius: 50%;
  animation: estimate-spin 850ms linear infinite;
}

.zone-estimator .loading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.zone-estimator .loading-actions button,
.zone-estimator .loading-actions a {
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(190, 194, 199, 0.28);
  border-radius: 4px;
  color: #f2f3f4;
  background: #171818;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
}

@keyframes estimate-spin {
  to { transform: rotate(360deg); }
}

.estimate-request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.25rem 0;
}

.estimate-request-summary > div {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-bottom: 2px solid rgba(177, 22, 36, 0.7);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
}

.estimate-request-summary span,
.estimate-request-summary strong {
  display: block;
}

.estimate-request-summary span {
  margin-bottom: 0.2rem;
  color: var(--silver-dim);
  font-family: var(--font-head);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.estimate-request-summary strong {
  overflow: hidden;
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.05rem;
  line-height: 1.1;
  text-overflow: ellipsis;
}

#estimate-request {
  scroll-margin-top: 96px;
}

.zone-policy-title {
  margin: 0 0 1.25rem;
  color: var(--white);
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
}

.zone-account-form .form-help {
  margin: -0.35rem 0 0;
  color: var(--silver-dim);
  font-size: 0.76rem;
  line-height: 1.45;
}

.zone-account-form .form-success[hidden] {
  display: none;
}

@media (max-width: 980px) {
  .zone-estimator {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 590px auto auto auto;
    grid-template-areas:
      "pickup"
      "map"
      "dropoff"
      "request"
      "legend";
    overflow: visible;
  }

  .zone-estimator .legend-panel {
    border-right: 0;
  }

  .zone-estimator .pickup-card {
    margin: 1rem;
  }

  .zone-estimator .dropoff-card {
    margin: 1rem 1rem 0;
  }

  .zone-estimator .map-shell {
    min-height: 590px;
  }

  .zone-estimator .legend-panel {
    padding: 1rem;
    border-top: 1px solid var(--estimate-line);
  }

  .zone-estimator .estimate-legend-section {
    border-radius: 6px;
  }
}

@media (max-width: 640px) {
  .page-hero--quote {
    min-height: 300px;
  }

  .page-hero--quote .page-hero-content {
    padding: 2rem 0 2.25rem;
  }

  .page-hero--quote .page-hero-title {
    font-size: clamp(2.35rem, 12vw, 3.2rem);
  }

  .page-hero--quote .page-hero-sub {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .zone-estimate-section {
    padding-top: 2.25rem;
  }

  .zone-estimate-section .zone-intro {
    display: none;
  }

  .zone-estimate-section > .container {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  .estimate-notice {
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 0.85rem;
  }

  .estimate-notice-icon {
    width: 28px;
    height: 28px;
  }

  .zone-estimator {
    grid-template-rows: auto 430px auto auto auto;
    grid-template-areas:
      "pickup"
      "map"
      "dropoff"
      "request"
      "legend";
    border-radius: 6px;
  }

  .zone-estimator .pickup-card {
    grid-area: pickup;
    margin: 0.75rem;
  }

  .zone-estimator .dropoff-card {
    grid-area: dropoff;
    margin: 0.75rem 0.75rem 0;
  }

  .estimate-request-link {
    grid-area: request;
    width: auto;
    margin: 0.75rem;
  }

  .zone-estimator .map-shell {
    min-height: 430px;
    border-top: 1px solid var(--estimate-line);
    border-bottom: 1px solid var(--estimate-line);
  }

  .zone-estimator .legend-panel {
    grid-area: legend;
    padding: 0.75rem;
  }

  .zone-estimator .map-toolbar {
    top: 10px;
    right: 56px;
    left: 10px;
    max-width: none;
    gap: 0.45rem;
  }

  .zone-estimator .map-pickup-context strong {
    max-width: 116px;
  }

  .zone-estimator .toolbar-instruction-divider {
    display: none;
  }

  .zone-estimator .map-instruction {
    min-width: 0;
    white-space: normal;
  }

  .zone-estimator .map-preview {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
  }

  .zone-estimator .leaflet-control-zoom a {
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
  }

  .estimate-request-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .estimate-notice {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 0.65rem;
    padding: 0.7rem;
  }

  .estimate-notice-icon {
    width: 24px;
    height: 24px;
  }

  .estimate-notice strong {
    font-size: 0.95rem;
  }

  .estimate-notice p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .zone-estimator {
    grid-template-rows: auto 400px auto auto auto;
  }

  .zone-estimator .map-shell {
    min-height: 400px;
  }

  .zone-estimator .pickup-card,
  .zone-estimator .dropoff-card,
  .zone-estimator .estimate-legend-section {
    padding: 0.8rem;
  }

  .zone-estimator .map-toolbar {
    min-height: 45px;
  }

  .zone-estimator .map-instruction {
    display: block;
    font-size: 0.58rem;
    line-height: 1.15;
  }

  .zone-estimator .toolbar-instruction-divider {
    display: none;
  }

  .zone-estimator .zone-tier-grid {
    gap: 0.18rem;
  }

  .zone-estimator .zone-row {
    grid-template-columns: 21px minmax(0, 1fr);
    gap: 0.05rem 0.2rem;
    padding: 0.2rem;
  }

  .zone-estimator .zone-swatch {
    width: 21px;
    height: 27px;
  }

  .zone-estimator .zone-price {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zone-estimator *,
  .zone-estimator *::before,
  .zone-estimator *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .zone-estimator,
  .estimate-notice,
  .estimate-request-summary {
    break-inside: avoid;
  }
}
