/* Estimate V35.4 — compact progressive UX, real address predictions, no fake fallback. */
#estimateDetails[data-estimate-release="estimate-v35.4"] {
  --v354-green: #0b7a2c;
  --v354-green-dark: #064b1c;
  --v354-green-soft: #edf8ef;
  --v354-paper: #fffdf8;
  --v354-card: #ffffff;
  --v354-ink: #102216;
  --v354-muted: #53645a;
  --v354-line: rgba(9, 84, 34, 0.18);
  --v354-shadow: 0 10px 26px rgba(7, 42, 20, 0.08);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-dialog.request-dialog {
  max-width: 1080px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress {
  --v354-progress: 16.66%;
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  margin: 0 0 12px;
  padding: 10px 14px 12px;
  border: 1px solid var(--v354-line);
  border-radius: 13px;
  color: var(--v354-green-dark);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(9px);
  box-shadow: 0 6px 15px rgba(6, 49, 20, 0.07);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress span,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress strong {
  font-size: 12px;
  font-weight: 900;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress strong {
  color: var(--v354-muted);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress i {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfeae1;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress i::after {
  content: "";
  display: block;
  width: var(--v354-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0b7a2c, #4fcf76);
  transition: width 180ms ease;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .request-form {
  display: grid;
  gap: 10px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage {
  margin: 0;
  overflow: clip;
  border: 1px solid var(--v354-line);
  border-radius: 15px;
  background: var(--v354-card);
  box-shadow: 0 4px 12px rgba(6, 49, 20, 0.04);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary {
  min-height: 66px;
  display: grid;
  grid-template-columns: 34px 1fr 22px;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  color: var(--v354-green-dark);
  cursor: pointer;
  list-style: none;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary::-webkit-details-marker {
  display: none;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary > b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--v354-green);
  font-size: 13px;
  font-weight: 950;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary span {
  display: grid;
  gap: 2px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary strong {
  color: inherit;
  font-size: 14px;
  font-weight: 950;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary small {
  color: var(--v354-muted);
  font-size: 11px;
  font-weight: 750;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary > i {
  color: var(--v354-green);
  font-size: 26px;
  font-style: normal;
  font-weight: 500;
  transform: rotate(90deg);
  transition: transform 150ms ease;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage[open] > summary {
  border-bottom: 1px solid var(--v354-line);
  background: var(--v354-green-soft);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage[open] > summary > i {
  transform: rotate(-90deg);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage.is-ready > summary small {
  color: var(--v354-green);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-body {
  padding: 14px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage .request-block {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage .request-block > h3 {
  display: none;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--v354-line);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav button {
  min-height: 44px;
  min-width: 118px;
  border: 1px solid var(--v354-line);
  border-radius: 11px;
  padding: 8px 16px;
  color: var(--v354-green-dark);
  background: #fff;
  font-weight: 900;
  cursor: pointer;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav button.is-primary {
  margin-left: auto;
  color: #fff;
  border-color: var(--v354-green);
  background: var(--v354-green);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-grid legend {
  grid-column: 1 / -1;
  margin: 0 0 3px;
  color: var(--v354-green-dark);
  font-size: 12px;
  font-weight: 900;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--v354-line);
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--v354-ink);
  background: #fff;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card:hover,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card:hover,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card:focus-within,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card:focus-within {
  transform: translateY(-1px);
  border-color: rgba(11, 122, 44, 0.55);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card.is-selected,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card.is-selected {
  border-color: rgba(11, 122, 44, 0.70);
  background: var(--v354-green-soft);
  box-shadow: inset 0 0 0 1px rgba(11, 122, 44, 0.08);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card input,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  accent-color: var(--v354-green);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card span {
  display: grid;
  gap: 3px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card strong {
  color: inherit;
  font-size: 12px;
  font-weight: 920;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card small {
  color: var(--v354-muted);
  font-size: 10px;
  line-height: 1.3;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .service-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .service-choice legend {
  grid-column: 1 / -1;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .request-options,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-utility-card-grid,
#estimateDetails[data-estimate-release="estimate-v35.4"] .mini-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-utility-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .request-options legend,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-utility-card-grid legend {
  grid-column: 1 / -1;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional {
  margin-top: 10px;
  border: 1px solid var(--v354-line);
  border-radius: 12px;
  overflow: clip;
  background: rgba(255,255,255,0.62);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional > summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 9px 13px;
  color: var(--v354-green-dark);
  cursor: pointer;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional > summary span {
  display: grid;
  gap: 2px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional > summary strong {
  color: inherit;
  font-size: 12px;
  font-weight: 920;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional > summary small,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-address-help {
  color: var(--v354-muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional-body {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--v354-line);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-address-help {
  display: block;
  margin-top: 5px;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestions {
  border-color: rgba(11, 122, 44, 0.28);
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(5, 35, 17, 0.18);
}

.address-suggestion-attribution {
  padding: 7px 11px;
  border-top: 1px solid rgba(0,0,0,0.08);
  color: #4c5650;
  background: #fafafa;
  font-family: Roboto, Arial, sans-serif;
  font-size: 12px;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  white-space: nowrap;
  text-align: right;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-review .submit-estimate {
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] {
  --v354-green: #55d47d;
  --v354-green-dark: #ecfff1;
  --v354-green-soft: rgba(39, 127, 67, 0.28);
  --v354-paper: #07170e;
  --v354-card: #0b2115;
  --v354-ink: #f6f3eb;
  --v354-muted: rgba(246, 243, 235, 0.70);
  --v354-line: rgba(201, 242, 211, 0.16);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-optional,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav button {
  color: var(--v354-ink);
  border-color: var(--v354-line);
  background: rgba(255,255,255,0.045);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage[open] > summary,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card.is-selected,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card.is-selected {
  background: var(--v354-green-soft);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary > b,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav button.is-primary {
  color: #04150b;
  background: #82e69f;
  border-color: #82e69f;
}

[data-theme="dark"] .address-suggestion-attribution {
  color: rgba(255,255,255,0.72);
  border-color: rgba(255,255,255,0.10);
  background: #111b15;
}

@media (max-width: 900px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-dialog.request-dialog {
    width: 100%;
    max-width: none;
    border-radius: 0;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-progress {
    top: 0;
    border-radius: 10px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-grid,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .service-choice,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-utility-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .request-options,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .mini-checks {
    grid-template-columns: 1fr 1fr;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-check-card {
    min-height: 54px;
    padding: 8px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .map-confirmation {
    grid-template-columns: 1fr;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .map-visual {
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-body {
    padding: 11px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary {
    grid-template-columns: 31px 1fr 18px;
    min-height: 61px;
    padding: 9px 11px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage > summary > b {
    width: 31px;
    height: 31px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-grid,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .service-choice,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .request-options,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-utility-card-grid,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .mini-checks {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-card small {
    display: none;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage-nav button {
    min-width: 0;
    flex: 1;
  }
}

/* Native selects remain the source of truth, but their original label rows are removed from visual flow. */
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-select-owner {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-propertyType,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-photoMode,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-choice-woodPreference {
  grid-column: 1 / -1;
}

/* ========================================================================== */
/* HOTFIX MODAL V35.4A — prevent global fixed bars from covering form content */
/* Scope: estimate and emergency modal stacking/scroll safety only.             */
/* ========================================================================== */

#estimateDetails.estimate-modal:not([hidden]),
#emergency.emergency-modal:not([hidden]) {
  z-index: 1000 !important;
}

#estimateDetails:not([hidden]) .estimate-dialog.request-dialog,
#emergency:not([hidden]) .emergency-dialog.request-dialog {
  max-height: calc(100dvh - max(20px, env(safe-area-inset-top)) - max(20px, env(safe-area-inset-bottom))) !important;
  scroll-padding-bottom: calc(104px + env(safe-area-inset-bottom));
  padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
}

#estimateDetails:not([hidden]) .request-form,
#emergency:not([hidden]) .request-form {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

@supports selector(body:has(*)) {
  body:has(#estimateDetails:not([hidden])) .trust-cta-strip,
  body:has(#emergency:not([hidden])) .trust-cta-strip,
  body:has(#estimateDetails:not([hidden])) .mobile-tabbar,
  body:has(#emergency:not([hidden])) .mobile-tabbar {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  body:has(#estimateDetails:not([hidden])),
  body:has(#emergency:not([hidden])) {
    padding-bottom: 0 !important;
  }
}

@media (max-width: 900px) {
  #estimateDetails.estimate-modal:not([hidden]),
  #emergency.emergency-modal:not([hidden]) {
    padding:
      max(8px, env(safe-area-inset-top))
      max(8px, env(safe-area-inset-right))
      max(8px, env(safe-area-inset-bottom))
      max(8px, env(safe-area-inset-left)) !important;
  }

  #estimateDetails:not([hidden]) .estimate-dialog.request-dialog,
  #emergency:not([hidden]) .emergency-dialog.request-dialog {
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
    scroll-padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }
}

/* ========================================================================== */
/* ESTIMATE V35.5 — premium required-field guidance and validation             */
/* ========================================================================== */

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-required-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px 13px;
  border: 1px solid rgba(15, 59, 29, 0.16);
  border-radius: 12px;
  color: #304236;
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-required-legend > span,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-required-mark {
  color: #c6281b !important;
  font-weight: 950 !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-field-error {
  display: block;
  margin-top: 7px;
  color: #a7160d !important;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] input.estimate-v355-invalid,
#estimateDetails[data-estimate-release="estimate-v35.4"] textarea.estimate-v355-invalid,
#estimateDetails[data-estimate-release="estimate-v35.4"] select.estimate-v355-invalid {
  border-color: #d33a2c !important;
  box-shadow: 0 0 0 3px rgba(211, 58, 44, 0.14) !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-invalid.service-choice,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-invalid.estimate-utility-card-grid,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-invalid.estimate-scheduler,
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-invalid.map-confirmation {
  border-color: #d33a2c !important;
  box-shadow: 0 0 0 3px rgba(211, 58, 44, 0.12) !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] label:has(> input.estimate-v355-invalid) {
  color: #85140d;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
  padding: 12px 14px 12px 42px;
  border: 1px solid rgba(198, 40, 27, 0.36);
  border-radius: 13px;
  color: #71140e;
  background:
    radial-gradient(circle at 21px 21px, #c6281b 0 9px, transparent 10px),
    linear-gradient(180deg, #fff4f2, #fff9f8);
  box-shadow: 0 8px 20px rgba(100, 18, 12, 0.08);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary strong {
  color: #77150e;
  font-size: 13px;
  font-weight: 950;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary span {
  color: #7d302a;
  font-size: 12px;
  font-weight: 700;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage.has-validation-errors {
  border-color: rgba(198, 40, 27, 0.48);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage.has-validation-errors > summary {
  background: linear-gradient(180deg, #fff5f3, #fffaf9);
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage.has-validation-errors > summary > b {
  color: #fff;
  border-color: #b92016;
  background: #b92016;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-address-help {
  display: block;
  margin-top: 7px;
  padding-left: 22px;
  position: relative;
  color: #405347;
  font-weight: 700;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-address-help::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #0b8b36;
  font-size: 10px;
  font-weight: 950;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] #estimateStatus.estimate-v355-status-error {
  display: block;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(198, 40, 27, 0.32);
  border-radius: 11px;
  color: #75160f;
  background: #fff4f2;
  font-weight: 850;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-required-legend {
  color: rgba(255, 250, 240, 0.86);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-field-error {
  color: #ffb8ae !important;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary {
  color: #ffd8d2;
  border-color: rgba(255, 126, 112, 0.42);
  background:
    radial-gradient(circle at 21px 21px, #e45c4f 0 9px, transparent 10px),
    linear-gradient(180deg, rgba(104, 24, 18, 0.56), rgba(66, 18, 14, 0.46));
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary strong,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary span,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-address-help {
  color: #ffe5e0;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v354-stage.has-validation-errors > summary {
  background: rgba(119, 29, 22, 0.34);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] #estimateStatus.estimate-v355-status-error {
  color: #ffd8d2;
  border-color: rgba(255, 126, 112, 0.38);
  background: rgba(104, 24, 18, 0.42);
}

@media (max-width: 520px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-required-legend {
    margin-bottom: 9px;
    padding: 9px 11px;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-error-summary {
    padding: 11px 11px 11px 38px;
    background-position: 0 0;
  }
}


/* Estimate V35.8 — compact pin confirmation and Geoapify address UX. */
#estimateDetails[data-estimate-release="estimate-v35.4"] .map-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  row-gap: 5px;
  width: 100%;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .map-check > input {
  grid-column: 1;
  margin: 2px 0 0;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .map-check > span {
  grid-column: 2;
  min-width: 0;
  line-height: 1.35;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .map-check > .estimate-v358-map-confirm-error {
  grid-column: 2;
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1.3;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-attribution {
  padding: 7px 12px 9px;
  color: #526057;
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-attribution {
  color: rgba(255, 250, 240, 0.68);
}

@media (max-width: 700px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] .map-check {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 9px;
  }
}


/* Estimate V35.8A — professional fallback when live address suggestions are unavailable. */
#estimateDetails[data-estimate-release="estimate-v35.4"] .estimate-v355-address-help::before {
  content: "i";
  color: #fff;
  background: #0b7d34;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
  text-transform: none;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-guidance {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(11, 122, 44, 0.16);
  color: #244a31;
  background: #eef8f0;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border-left: 4px solid #d78312;
  color: #3e3526;
  background: #fff9ec;
  text-align: left;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback strong {
  color: #6d4205;
  font-size: 13px;
  font-weight: 950;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback span {
  color: #473d2e;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback small {
  color: #715b39;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-guidance {
  color: #e7ffed;
  border-color: rgba(130, 230, 159, 0.18);
  background: rgba(36, 111, 57, 0.30);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback {
  color: #fff1d7;
  border-left-color: #f2a82c;
  background: rgba(85, 53, 5, 0.72);
}

[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback strong,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback span,
[data-theme="dark"] #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback small {
  color: #fff1d7;
}

@media (max-width: 520px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-guidance,
  #estimateDetails[data-estimate-release="estimate-v35.4"] .address-suggestion-fallback {
    padding: 11px 12px;
  }
}


/* ========================================================================== */
/* Estimate V35.8C — isolated visual hotfix: pin confirmation + light agenda */
/* HOME V34.2, Geoapify, Agenda V35.7, Admin and reminders remain untouched.  */
/* ========================================================================== */

/* Keep one confirmation sentence and place its validation message below it. */
#estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) !important;
  align-items: start !important;
  column-gap: 10px !important;
  row-gap: 5px !important;
  width: 100% !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check > input[name="mapConfirmed"] {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 2px 0 0 !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check > span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
  color: inherit;
  line-height: 1.4 !important;
}

#estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check > .estimate-v355-field-error.estimate-v358-map-confirm-error {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: block !important;
  width: 100% !important;
  margin: 1px 0 0 !important;
  padding: 0 0 0 32px !important;
  color: #a7160d !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
}

/* Light theme: selected appointment must remain clearly readable. */
html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected {
  color: #062f17 !important;
  border-color: #11883b !important;
  background: linear-gradient(180deg, #e7f8ec 0%, #d6f1df 100%) !important;
  box-shadow: inset 0 0 0 2px rgba(17, 136, 59, 0.18), 0 8px 18px rgba(5, 58, 25, 0.12) !important;
}

html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected > span,
html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected > strong {
  color: #062f17 !important;
  text-shadow: none !important;
}

html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected > small {
  color: #064617 !important;
  background: #c6eacb !important;
  text-shadow: none !important;
}

html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected:hover,
html:not([data-theme="dark"]) #estimateDetails .availability-slot.estimate-slot-v351.is-selected:focus-visible {
  color: #041f0f !important;
  border-color: #087a27 !important;
  background: linear-gradient(180deg, #def5e5 0%, #caebd4 100%) !important;
  outline: 3px solid rgba(8, 122, 39, 0.20) !important;
  outline-offset: 2px !important;
}

/* Preserve the approved high-contrast dark-mode selected state. */
html[data-theme="dark"] #estimateDetails .availability-slot.estimate-slot-v351.is-selected > span,
html[data-theme="dark"] #estimateDetails .availability-slot.estimate-slot-v351.is-selected > strong {
  color: #fffaf0 !important;
}

@media (max-width: 700px) {
  #estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check {
    grid-template-columns: 24px minmax(0, 1fr) !important;
    column-gap: 9px !important;
  }

  #estimateDetails[data-estimate-release="estimate-v35.4"] label.terms-check.map-check > .estimate-v355-field-error.estimate-v358-map-confirm-error {
    padding-left: 33px !important;
  }
}
