/* Brothers Gutters — Instant Estimate widget (mobile-first) */

/* Ensure [hidden] always wins over display rules */
[data-ie-step][hidden],
[hidden] {
  display: none !important;
}

/* Hide sticky CTAs while Instant Estimate flow is past step 1 */
body.ie-flow-open .mobile-cta,
body.ie-flow-open .float-estimate {
  display: none !important;
}

/* Dedicated estimate page: never show sticky CTAs (they reload / fight the wizard) */
body.ie-estimate-page .mobile-cta,
body.ie-estimate-page .float-estimate {
  display: none !important;
}

.ie-widget {
  background: var(--surface-card, #fff);
  border: 1px solid var(--border, rgba(13,27,42,0.12));
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: 0 12px 40px rgba(13, 27, 42, 0.08);
  max-width: none;
  margin: 0 auto;
  /* Never stuck invisible from site .reveal */
  opacity: 1 !important;
  transform: none !important;
}
.ie-widget * { box-sizing: border-box; }
.ie-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange, #C95A12);
  margin: 0 0 0.35rem;
}
.ie-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--ink, #0D1B2A);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.ie-sub {
  font-size: 0.95rem;
  color: var(--ink-secondary, #3D4F5F);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}
.ie-progress {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0 0 1.25rem;
  flex-wrap: nowrap;
}
.ie-progress li {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-muted, #5C6B7A);
  padding: 0.4rem 0.15rem;
  border-bottom: 3px solid var(--border, #ddd);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ie-progress li.is-active {
  color: var(--orange, #C95A12);
  border-bottom-color: var(--orange, #C95A12);
}
.ie-progress li.is-done {
  color: var(--navy, #0D1B2A);
  border-bottom-color: var(--navy, #0D1B2A);
}
.ie-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ie-row input[type="text"],
.ie-row input[type="tel"],
.ie-row input[type="email"],
.ie-field input,
.ie-field select {
  width: 100%;
  padding: 0.9rem 1rem;
  min-height: 44px;
  border: 1px solid var(--border, #cfd6dd);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink, #0D1B2A);
}
.ie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.25rem;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  background: var(--orange, #C95A12);
  color: #fff;
  width: 100%;
}
.ie-btn:hover { background: var(--orange-hover, #A6350A); }
.ie-btn:disabled { opacity: 0.65; cursor: wait; }
.ie-btn-secondary {
  background: transparent;
  color: var(--navy, #0D1B2A);
  border: 1px solid var(--border, #cfd6dd);
  order: 2;
}
.ie-btn-secondary:hover { background: var(--surface, #F5F2Ed); }
.ie-btn-block { width: 100%; }
.ie-help {
  font-size: 0.8rem;
  color: var(--ink-muted, #5C6B7A);
  margin: 0.75rem 0 0;
  line-height: 1.45;
}
.ie-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
.ie-metric {
  background: var(--surface, #F5F2ED);
  border-radius: 10px;
  padding: 0.85rem;
}
.ie-metric-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted, #5C6B7A);
  margin-bottom: 0.25rem;
}
.ie-metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy, #0D1B2A);
}
.ie-addr {
  font-weight: 700;
  color: var(--ink, #0D1B2A);
  margin: 0 0 0.75rem;
}

/* Map on measure step */
.ie-map-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 1rem;
  background: var(--surface, #F5F2ED);
  border: 1px solid var(--border, rgba(13,27,42,0.1));
}
.ie-map-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.ie-map-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-muted, #5C6B7A);
  background: rgba(245, 242, 237, 0.92);
}
.ie-map-loading[hidden] { display: none !important; }

.ie-choices {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.ie-choice {
  text-align: left;
  padding: 0.9rem 1rem;
  min-height: 44px;
  border-radius: 10px;
  border: 2px solid var(--border, #cfd6dd);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink, #0D1B2A);
  font-size: 0.95rem;
}
.ie-choice.is-selected,
.ie-choice:hover {
  border-color: var(--orange, #C95A12);
  background: rgba(201, 90, 18, 0.06);
}
.ie-choice small {
  display: block;
  font-weight: 500;
  color: var(--ink-muted, #5C6B7A);
  margin-top: 0.2rem;
}
.ie-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.ie-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--ink-secondary, #3D4F5F);
}
.ie-price-box {
  background: var(--navy, #0D1B2A);
  color: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin: 0 0 1rem;
  text-align: center;
}
.ie-price-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 0.35rem;
}
.ie-price-range {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.ie-price-note {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.5rem;
  line-height: 1.4;
}
.ie-disclaimer {
  font-size: 0.78rem;
  color: var(--ink-muted, #5C6B7A);
  line-height: 1.45;
  margin: 0.75rem 0 0;
}
.ie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1rem;
}
/* Primary (non-secondary) first on mobile */
.ie-actions .ie-btn:not(.ie-btn-secondary) { order: 1; }
.ie-actions .ie-btn-secondary { order: 2; width: 100%; }

.ie-error {
  color: #c0392b;
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}
.ie-success {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.ie-success h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  color: var(--ink, #0D1B2A);
}
.ie-honeypot {
  position: absolute !important;
  left: -9999px !important;
  height: 0 !important;
  width: 0 !important;
  opacity: 0 !important;
}
.ie-section {
  padding: 2.5rem 0 5rem;
  background: linear-gradient(180deg, var(--surface, #F5F2ED) 0%, #fff 100%);
}
.ie-section .wrap { max-width: none; }
.ie-hero-panel {
  display: grid;
  gap: 1.5rem;
}

/* Extra bottom space so Continue/Submit clear residual chrome on phones */
@media (max-width: 767px) {
  .ie-section,
  .ie-widget {
    padding-bottom: 5rem;
  }
  .ie-section {
    padding-top: 2rem;
  }
  .ie-progress li {
    font-size: 0.6rem;
    letter-spacing: 0.02em;
  }
}

@media (min-width: 520px) {
  .ie-metrics { grid-template-columns: repeat(4, 1fr); }
  .ie-map-wrap { height: 240px; }
}

@media (min-width: 768px) {
  .ie-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
  }
  .ie-row input[type="text"] { flex: 1; min-width: 12rem; }
  .ie-row .ie-btn { width: auto; flex: 0 0 auto; }
  .ie-fields { grid-template-columns: 1fr 1fr; }
  .ie-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .ie-actions .ie-btn:not(.ie-btn-secondary) {
    order: 2;
    width: auto;
    flex: 1;
  }
  .ie-actions .ie-btn-secondary {
    order: 1;
    width: auto;
    flex: 0 0 auto;
  }
  .ie-map-wrap { height: 280px; }
  .ie-section { padding: 3.5rem 0; }
  .ie-progress li { font-size: 0.7rem; }
}

@media (min-width: 900px) {
  .ie-hero-panel {
    grid-template-columns: 1fr 1.1fr;
    align-items: start;
    gap: 2rem;
    max-width: none;
    margin: 0 auto;
  }
  .ie-hero-copy { padding-top: 1rem; }
}

/* FULLSCREEN estimate page — Will 2026-09-28 */
body.ie-estimate-page {
  min-height: 100vh;
  min-height: 100svh;
}
body.ie-estimate-page .ie-section {
  min-height: calc(100svh - 64px);
  padding-top: calc(64px + 1rem);
  padding-bottom: 2rem;
  box-sizing: border-box;
}
body.ie-estimate-page .ie-section .wrap {
  max-width: none;
  width: 100%;
  padding-left: clamp(1rem, 3vw, 2.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
}
body.ie-estimate-page .ie-hero-panel {
  max-width: none;
  width: 100%;
  margin: 0;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}
body.ie-estimate-page .ie-widget {
  max-width: none;
  width: 100%;
  margin: 0;
  min-height: min(70vh, 820px);
  box-sizing: border-box;
}
body.ie-estimate-page .ie-map-wrap {
  height: min(42vh, 360px);
}
@media (max-width: 767px) {
  body.ie-estimate-page .ie-section,
  body.ie-estimate-page .ie-widget {
    padding-bottom: 1.5rem;
  }
}
@media (min-width: 768px) {
  body.ie-estimate-page .ie-section {
    padding-top: calc(80px + 1.5rem);
    padding-bottom: 2.5rem;
    min-height: calc(100svh - 80px);
  }
  body.ie-estimate-page .ie-map-wrap {
    height: min(48vh, 420px);
  }
}
@media (min-width: 900px) {
  body.ie-estimate-page .ie-hero-panel {
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.2fr);
    align-items: stretch;
  }
  body.ie-estimate-page .ie-widget {
    min-height: calc(100svh - 160px);
  }
  body.ie-estimate-page .ie-hero-copy {
    padding-top: 0.5rem;
  }
}
@media (min-width: 1200px) {
  body.ie-estimate-page .ie-section .wrap {
    padding-left: clamp(1.5rem, 4vw, 3.5rem);
    padding-right: clamp(1.5rem, 4vw, 3.5rem);
  }
}

/* FULLBLEED estimate — Will 2026-09-27c */
/* Dedicated estimate page: .ie-fullbleed section */
.ie-fullbleed {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-top: clamp(5.75rem, 12vw, 8rem) !important;
  padding-bottom: 3rem !important;
  box-sizing: border-box !important;
}
.ie-fullbleed > .wrap {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding-left: clamp(1rem, 3vw, 2.75rem) !important;
  padding-right: clamp(1rem, 3vw, 2.75rem) !important;
  box-sizing: border-box !important;
}
.ie-fullbleed .ie-hero-panel,
.ie-fullbleed .ie-widget {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.ie-fullbleed .ie-hero-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 1.5rem !important;
}
@media (min-width: 900px) {
  .ie-fullbleed .ie-hero-panel {
    grid-template-columns: minmax(260px, 0.85fr) minmax(480px, 1.5fr) !important;
  }
}
body.ie-estimate-page .wrap {
  max-width: none !important;
}

