/* ============================================================
   FairRoofQuote.com — estimate.css
   Shared styles for all 3 estimate pages:
   /roofing-estimate, /roof-repair-estimate, /roof-replacement-estimate
   ============================================================ */

/* ── ESTIMATE HERO ── */
.estimate-hero {
  background: var(--surface);
  padding: 48px 24px 56px;
  border-bottom: 1px solid var(--border);
}

.estimate-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 56px;
  align-items: start;
}

.estimate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--forest-light);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.estimate-eyebrow svg {
  width: 11px;
  height: 11px;
  stroke: var(--forest);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.estimate-h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.estimate-h1 em {
  font-style: normal;
  color: var(--forest);
}

.estimate-sub {
  font-size: 16px;
  color: var(--ink-mid);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: 24px;
}

/* ── AUTHOR BYLINE ── */
.author-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 0;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.author-info {}

.author-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1px;
}

.author-title {
  font-size: 12px;
  color: var(--ink-light);
}

.author-updated {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 2px;
}

/* ── FORM PANEL ── */
.estimate-form-panel {
  position: sticky;
  top: 84px; /* below fixed header */
}

.estimate-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--forest);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.estimate-form-header {
  padding: 20px 20px 0;
}

.estimate-form-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.estimate-form-sub {
  font-size: 12px;
  color: var(--ink-light);
  margin-bottom: 14px;
}

.estimate-form-privacy {
  font-size: 11px;
  color: var(--ink-light);
  text-align: center;
  padding: 10px 20px 16px;
  line-height: 1.5;
}

.estimate-form-privacy a { color: var(--forest); }

/* ── TRUST MINI-ROW (below form) ── */
.estimate-trust-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
}

.estimate-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-mid);
}

.estimate-trust-item svg {
  width: 14px;
  height: 14px;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
}

.breadcrumb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-light);
}

.breadcrumb-inner a {
  color: var(--ink-light);
  text-decoration: none;
}

.breadcrumb-inner a:hover { color: var(--forest); }

.breadcrumb-sep { color: var(--border-mid); }
.breadcrumb-current { color: var(--ink); font-weight: 500; }

/* ── CONTENT SECTIONS ── */
.estimate-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* What affects cost section */
.affects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.affects-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.affects-icon {
  width: 32px;
  height: 32px;
  background: var(--forest-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.affects-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.affects-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.affects-card p {
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* Steps */
.estimate-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.estimate-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.estimate-step-num {
  width: 30px;
  height: 30px;
  background: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  margin-top: 2px;
}

.estimate-step-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.estimate-step-text p {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* FAQ */
.estimate-faq { margin-top: 28px; }

.estimate-faq-item {
  border-bottom: 1px solid var(--border);
}

.estimate-faq-item:first-child { border-top: 1px solid var(--border); }

.estimate-faq-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font);
  transition: color 0.15s;
}

.estimate-faq-btn:hover { color: var(--forest); }
.estimate-faq-btn[aria-expanded="true"] { color: var(--forest); }

.estimate-faq-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  transition: transform 0.2s;
}

.estimate-faq-btn[aria-expanded="true"] .estimate-faq-icon { transform: rotate(45deg); }

.estimate-faq-answer {
  display: none;
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
}

.estimate-faq-answer a { color: var(--forest); }
.estimate-faq-answer.is-open { display: block; }

/* Related links */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.related-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.related-tile:hover {
  border-color: var(--forest);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.related-tile-text p:first-child {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.related-tile-text p:last-child {
  font-size: 11px;
  color: var(--ink-light);
}

.related-tile-arrow {
  width: 28px;
  height: 28px;
  background: var(--forest-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.related-tile:hover .related-tile-arrow { background: var(--forest); }

.related-tile-arrow svg {
  width: 14px;
  height: 14px;
  stroke: var(--forest);
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  transition: stroke 0.15s;
}

.related-tile:hover .related-tile-arrow svg { stroke: #fff; }

/* ── BOTTOM CTA ── */
.estimate-cta {
  background: var(--forest);
  padding: 48px 24px;
  text-align: center;
  margin-top: 0;
}

.estimate-cta h2 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.estimate-cta p {
  font-size: 15px;
  color: #9FD4B8;
  margin-bottom: 24px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .estimate-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .estimate-form-panel { position: static; }
  .estimate-h1 { font-size: 28px; }
  .affects-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .estimate-h1 { font-size: 24px; }
  .affects-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ESTIMATE PAGE — FULL WIDTH CALCULATOR FLOW
   Used by roofing-estimate.html (and future estimate pages
   that use the calculator-first approach)
   ============================================================ */

/* ── Full-width calculator hero ── */
.estimate-calc-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px 0;
}

.estimate-calc-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.estimate-calc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--forest-light);
  color: var(--forest);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 20px;
  margin-bottom: 18px;
  letter-spacing: 0.2px;
  text-decoration: none;
}

.estimate-calc-eyebrow svg {
  width: 11px;
  height: 11px;
  stroke: var(--forest);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.estimate-calc-h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 12px;
}

.estimate-calc-h1 em {
  font-style: normal;
  color: var(--forest);
}

.estimate-calc-sub {
  font-size: 17px;
  color: var(--ink-mid);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 600px;
}

/* ── Full-width calc panels ── */
.calc-panel-fw {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--forest);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 32px 36px 36px;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.05);
  max-width: 860px;
  margin: 0 auto;
}

.calc-panel-fw.calc-panel--hidden { display: none; }

/* Step header inside full-width panel */
.calc-fw-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.calc-fw-header-left {}

.calc-fw-step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--forest);
  background: var(--forest-light);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.calc-fw-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}

.calc-fw-sub {
  font-size: 13px;
  color: var(--ink-light);
}

/* Author byline in header area */
.calc-fw-author {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  flex-shrink: 0;
  min-width: 260px;
}

.calc-fw-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.calc-fw-author-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.calc-fw-author-title {
  font-size: 11px;
  color: var(--ink-light);
  margin-top: 1px;
}

.calc-fw-author-date {
  font-size: 10px;
  color: var(--ink-light);
  margin-top: 1px;
}

/* Full-width fields grid */
.calc-fw-fields {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.calc-fw-field {}

.calc-fw-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-mid);
  margin-bottom: 6px;
}

/* Reuse calc-select from homepage styles */

.calc-fw-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calc-fw-btn {
  padding: 13px 32px;
  background: var(--forest);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  letter-spacing: 0.1px;
}

.calc-fw-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.calc-fw-btn:not(:disabled):hover { background: var(--forest-mid); }
.calc-fw-btn:not(:disabled):active { transform: scale(0.99); }

.calc-fw-btn--gold {
  background: var(--gold);
}
.calc-fw-btn--gold:not(:disabled):hover { background: #9A7209; }

.calc-fw-disclaimer {
  font-size: 12px;
  color: var(--ink-light);
  margin-left: 4px;
}

/* ── Step 2: result ── */
.calc-fw-result-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 28px;
}

.calc-fw-result-box {
  background: var(--forest-light);
  border: 1px solid rgba(28,92,66,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  text-align: center;
  min-width: 240px;
}

.calc-fw-result-range {
  font-size: 36px;
  font-weight: 800;
  color: var(--forest);
  letter-spacing: -1.5px;
  line-height: 1;
  margin-bottom: 6px;
}

.calc-fw-result-note {
  font-size: 12px;
  color: var(--forest);
  font-weight: 500;
  opacity: 0.75;
}

.calc-fw-result-details {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.7;
  padding-top: 4px;
}

.calc-fw-cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.calc-fw-cta-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.calc-fw-back-btn {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--ink-light);
  cursor: pointer;
  font-family: var(--font);
  padding: 4px 0;
  transition: color 0.15s;
  margin-left: auto;
}

.calc-fw-back-btn:hover { color: var(--forest); }

/* ── Step 3: Networx form in full-width context ── */
.calc-fw-form-inner {
  max-width: 500px;
}

.calc-fw-form-inner p {
  font-size: 13px;
  color: var(--ink-mid);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── Progress indicator ── */
.calc-progress {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 860px;
  margin: 0 auto 0;
  padding: 20px 0 0;
}

.calc-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-light);
  flex: 1;
}

.calc-progress-step.active { color: var(--forest); }
.calc-progress-step.done   { color: var(--forest); opacity: 0.6; }

.calc-progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink-light);
  flex-shrink: 0;
  transition: background 0.2s;
}

.calc-progress-step.active .calc-progress-dot {
  background: var(--forest);
  color: #fff;
}

.calc-progress-step.done .calc-progress-dot {
  background: var(--forest);
  color: #fff;
  opacity: 0.6;
}

.calc-progress-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 8px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .estimate-calc-h1    { font-size: 28px; }
  .estimate-calc-sub   { font-size: 15px; }
  .calc-panel-fw       { padding: 24px 20px; }
  .calc-fw-fields      { grid-template-columns: 1fr 1fr; }
  .calc-fw-header      { flex-direction: column; gap: 14px; }
  .calc-fw-author      { min-width: 0; width: 100%; }
  .calc-fw-result-row  { grid-template-columns: 1fr; gap: 20px; }
  .calc-fw-result-box  { min-width: 0; }
  .calc-fw-cta-row     { flex-direction: column; align-items: flex-start; gap: 12px; }
  .calc-fw-back-btn    { margin-left: 0; }
}

@media (max-width: 480px) {
  .estimate-calc-h1 { font-size: 24px; }
  .calc-fw-fields   { grid-template-columns: 1fr; }
  .calc-progress    { display: none; }
}

/* ── MATERIAL COST TABLE ── */
.material-table-wrap {
  overflow-x: auto;
  margin-top: 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.material-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.material-table th {
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.material-table th:nth-child(2),
.material-table th:nth-child(3),
.material-table th:nth-child(4) {
  text-align: center;
}

.material-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}

.material-table td:nth-child(2),
.material-table td:nth-child(3),
.material-table td:nth-child(4) {
  text-align: center;
  white-space: nowrap;
}

.material-table td:first-child {
  font-weight: 700;
  color: var(--forest);
}

.material-table tr:last-child td { border-bottom: none; }

.material-table tr:nth-child(odd)  td { background: var(--forest-pale, #F0F9F4); }
.material-table tr:nth-child(even) td { background: var(--surface); }

.material-table tr:hover td { background: var(--forest-light); }

/* ── SIGNALS GRID (signs of replacement) ── */
.signals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.signal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.signal-num {
  width: 28px;
  height: 28px;
  background: var(--forest);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.signal-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.signal-card p {
  font-size: 12px;
  color: var(--ink-mid);
  line-height: 1.6;
}

/* ── INFO CARDS (insurance / financing / tax) ── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.info-card-icon {
  width: 34px;
  height: 34px;
  background: var(--forest-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.info-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--forest);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.info-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.info-card p {
  font-size: 13px;
  color: var(--ink-mid);
  line-height: 1.65;
}

.info-card a { color: var(--forest); }

/* ── WHAT'S INCLUDED LIST ── */
.included-list {
  list-style: none;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.included-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.5;
}

.included-check {
  width: 18px;
  height: 18px;
  background: var(--forest-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.included-check svg {
  width: 10px;
  height: 10px;
  stroke: var(--forest);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

@media (max-width: 768px) {
  .signals-grid  { grid-template-columns: 1fr 1fr; }
  .info-cards    { grid-template-columns: 1fr; }
  .included-list { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .signals-grid { grid-template-columns: 1fr; }
}
