/*
 * Roc Quote — shared estimator UI styles.
 * Brand-neutral layout; each demo sets its palette through CSS variables on
 * :root (see each demo's brand.css). Breakpoint: two columns at ≥ 980px.
 */
.rq-app {
  --rq-radius: 14px;
  --rq-radius-sm: 10px;
  --rq-shadow: 0 1px 2px rgba(10, 25, 40, 0.05), 0 10px 30px rgba(10, 25, 40, 0.07);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink, #1a2540);
  font-size: 16px;
  line-height: 1.55;
}
.rq-app *, .rq-app *::before, .rq-app *::after { box-sizing: border-box; }
.rq-app :focus-visible { outline: 3px solid var(--accent, var(--brand)); outline-offset: 2px; border-radius: 4px; }

/* Demo mode header */
.rq-head { margin: 0 0 18px; }
.rq-switch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--rq-radius);
  padding: 12px 16px;
}
.rq-switch-label { font-weight: 700; font-family: Manrope, system-ui, sans-serif; }
.rq-switch-link {
  color: var(--brand-dark, #132243); font-weight: 700; text-decoration: none; font-size: 15px;
  border-bottom: 2px solid var(--accent, var(--brand)); padding-bottom: 1px;
}
.rq-switch-link:hover { color: var(--brand); }

.rq-notice {
  background: #fff7e6; border: 1px solid #ecd39c; color: #6b5210;
  border-radius: var(--rq-radius-sm); padding: 10px 14px; font-size: 14.5px; margin-bottom: 14px;
}

/* Layout */
.rq-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.rq-aside { display: none; }

/* Stepper */
.rq-stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rq-stepper { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.rq-step {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  background: var(--card, #fff); border-radius: 999px; padding: 6px 12px 6px 7px;
  font: 600 13.5px/1 'DM Sans', sans-serif; color: var(--muted); cursor: default;
}
.rq-step.is-done { cursor: pointer; color: var(--brand-dark); }
.rq-step.is-done:hover { border-color: var(--brand); color: var(--brand); }
.rq-step.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }
.rq-step-num {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.07); font-size: 12px; font-weight: 800;
}
.rq-step.is-current .rq-step-num { background: rgba(255,255,255,0.22); }
.rq-step.is-done .rq-step-num { background: var(--brand); color: #fff; }
.rq-mini-total { font-weight: 800; font-variant-numeric: tabular-nums; font-size: 14.5px; color: var(--brand-dark); }

/* Panels */
.rq-panel { display: none; }
.rq-panel.is-active { display: block; animation: rq-fade 0.25s ease; }
@keyframes rq-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rq-panel.is-active { animation: none; } }
.rq-panel-title {
  font: 800 22px/1.25 Manrope, system-ui, sans-serif; letter-spacing: -0.015em;
  margin: 0 0 6px; color: var(--brand-dark);
}
.rq-fields > * + * { margin-top: 18px; }

.rq-note {
  background: color-mix(in srgb, var(--brand) 7%, white);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, white);
  color: var(--brand-dark); border-radius: var(--rq-radius-sm);
  padding: 10px 14px; font-size: 14.5px; margin: 0 0 14px;
}
.rq-note-warn { background: #fff7e6; border-color: #ecd39c; color: #6b5210; }

/* Cards (services, frequency) */
.rq-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.rq-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  background: var(--card, #fff); border: 2px solid var(--line); border-radius: var(--rq-radius);
  padding: 16px; font: inherit; color: inherit; transition: border-color .15s ease, box-shadow .15s ease;
}
.rq-card:hover { border-color: var(--brand); }
.rq-card.is-selected { border-color: var(--brand); box-shadow: var(--rq-shadow); background: color-mix(in srgb, var(--brand) 4%, white); }
.rq-card-title { font-weight: 800; font-family: Manrope, sans-serif; font-size: 16.5px; color: var(--brand-dark); }
.rq-card-desc { font-size: 14px; color: var(--muted); }
.rq-card-meta { font-size: 13.5px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }

/* Fieldsets and inputs */
.rq-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rq-label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 8px; font-family: Manrope, sans-serif; }
.rq-choice {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--rq-radius-sm);
  padding: 11px 14px; background: var(--card, #fff); font-size: 15px;
}
.rq-choice.is-selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, white); font-weight: 600; }
.rq-fieldset .rq-choice + .rq-choice { margin-top: 8px; }
.rq-choice input, .rq-check-card input, .rq-toggle input, .rq-contact-card input { accent-color: var(--brand); width: 17px; height: 17px; }

.rq-number-row { display: flex; align-items: stretch; gap: 8px; max-width: 220px; }
.rq-input {
  width: 100%; font: inherit; color: inherit; padding: 10px 12px;
  border: 2px solid var(--line); border-radius: var(--rq-radius-sm); background: #fff;
}
.rq-input:focus { border-color: var(--brand); outline: none; }
.rq-number-field .rq-input { text-align: center; font-weight: 700; }
.rq-stepper-btn {
  width: 44px; border: 2px solid var(--line); background: var(--card, #fff); border-radius: var(--rq-radius-sm);
  font-size: 18px; font-weight: 800; cursor: pointer; color: var(--brand-dark);
}
.rq-stepper-btn:hover { border-color: var(--brand); color: var(--brand); }
.rq-hint { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); }

/* Areas editor */
.rq-areas { display: grid; gap: 10px; }
.rq-area-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.rq-area-unit { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.rq-remove {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff;
  font-size: 16px; cursor: pointer; color: var(--muted); line-height: 1;
}
.rq-remove:hover { border-color: #c0392b; color: #c0392b; }
.rq-add-area {
  justify-self: start; border: 2px dashed var(--line); background: transparent; color: var(--brand-dark);
  font: 700 14.5px 'DM Sans', sans-serif; padding: 10px 16px; border-radius: var(--rq-radius-sm); cursor: pointer;
}
.rq-add-area:hover { border-color: var(--brand); color: var(--brand); }

/* Toggles and add-on checks */
.rq-toggle {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--rq-radius); background: var(--card, #fff);
  padding: 14px 16px;
}
.rq-toggle.is-on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, white); }
.rq-toggle input { margin-top: 3px; }
.rq-toggle-title { font-weight: 800; font-family: Manrope, sans-serif; }
.rq-toggle .rq-hint { margin-top: 3px; }
.rq-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rq-check-card {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--rq-radius); background: var(--card, #fff); padding: 14px 16px;
}
.rq-check-card.is-selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, white); }
.rq-check-body { display: flex; flex-direction: column; gap: 4px; }
.rq-check-price { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-dark); }

/* Banners */
.rq-banner { border-radius: var(--rq-radius); padding: 16px 18px; border: 1.5px solid var(--line); background: #fff; display: grid; gap: 6px; }
.rq-banner strong { font-family: Manrope, sans-serif; font-size: 17px; color: var(--brand-dark); }
.rq-banner-fixed { border-color: #bfe3cd; background: #f2faf5; }
.rq-banner-range { border-color: color-mix(in srgb, var(--brand) 35%, white); background: color-mix(in srgb, var(--brand) 6%, white); }
.rq-banner-review { border-color: #ecd39c; background: #fff7e6; }
.rq-banner-wait { border-color: var(--line); }
.rq-review-list { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }

/* Visits and lines */
.rq-visit { border: 1px solid var(--line); border-radius: var(--rq-radius); background: var(--card, #fff); padding: 16px 18px; }
.rq-visit + .rq-visit { margin-top: 12px; }
.rq-visit-title { margin: 0 0 10px; font: 800 15px Manrope, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.rq-line { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rq-line:last-of-type { border-bottom: 0; }
.rq-line-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rq-line-label strong { font-weight: 700; font-size: 15px; }
.rq-line-detail { font-size: 13.5px; color: var(--muted); }
.rq-line-amount { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.rq-line-discount .rq-line-amount { color: #1c7c46; }
.rq-total-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  border-top: 2px solid var(--brand-dark); margin-top: 10px; padding-top: 10px;
}
.rq-total { font: 800 24px/1.1 Manrope, sans-serif; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
.rq-range-note { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.rq-assumption { font-size: 13.5px; color: var(--muted); margin: 12px 2px 0; }

/* Submit form */
.rq-submit { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--rq-radius); background: var(--card, #fff); padding: 18px; display: grid; gap: 16px; }
.rq-submit-title { margin: 0; font: 800 19px Manrope, sans-serif; color: var(--brand-dark); }
.rq-submit-note { margin: -8px 0 0; font-size: 14.5px; color: var(--muted); }
.rq-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.rq-contact-card {
  display: flex; flex-direction: column; gap: 3px; border: 2px solid var(--line); border-radius: var(--rq-radius-sm);
  padding: 12px 13px; cursor: pointer; position: relative; background: #fff;
}
.rq-contact-card.is-selected { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, white); }
.rq-contact-name { font-weight: 800; font-family: Manrope, sans-serif; }
.rq-contact-meta { font-size: 13px; color: var(--muted); }
.rq-contact-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); }
.rq-demo-note { margin: 0; font-size: 13px; color: var(--muted); }

.rq-button {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--brand); color: #fff; font: 700 16px 'DM Sans', sans-serif;
  padding: 13px 22px; border-radius: 999px; transition: background .15s ease, transform .15s ease;
}
.rq-button:hover { background: var(--brand-dark); }
.rq-button:active { transform: translateY(1px); }
.rq-button:disabled { opacity: 0.55; cursor: default; }
.rq-button-ghost { background: transparent; color: var(--brand-dark); border: 2px solid var(--line); }
.rq-button-ghost:hover { border-color: var(--brand); background: transparent; color: var(--brand); }
.rq-button-workbench { background: var(--brand-dark, #132243); }
.rq-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 18px; }
.rq-nav:empty { display: none; }

.rq-errors {
  background: #fdeceb; border: 1.5px solid #eab6b2; color: #8c2f28;
  border-radius: var(--rq-radius-sm); padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 4px;
  font-size: 14.5px; font-weight: 600;
}
.rq-errors p { margin: 0; }

/* Confirmation */
.rq-confirm {
  margin-top: 20px; border: 2px solid #bfe3cd; background: #f2faf5; border-radius: var(--rq-radius);
  padding: 20px; display: grid; gap: 10px;
}
.rq-confirm-title { font: 800 19px Manrope, sans-serif; color: #14572f; }
.rq-confirm-list { margin: 0; padding-left: 20px; font-size: 14.5px; display: grid; gap: 4px; }
.rq-confirm-date, .rq-confirm-note { margin: 0; font-size: 14px; color: #2c5c40; }
.rq-confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* Aside */
.rq-aside-title { margin: 0 0 12px; font: 800 18px Manrope, sans-serif; color: var(--brand-dark); }
.rq-aside-body { display: grid; gap: 12px; }
.rq-aside-empty { color: var(--muted); font-size: 14.5px; margin: 0; }
.rq-aside-foot { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }

/* Desktop: two columns */
@media (min-width: 980px) {
  .rq-layout { grid-template-columns: minmax(0, 7fr) minmax(300px, 4fr); gap: 28px; }
  .rq-aside {
    display: block; position: sticky; top: 18px;
    background: var(--card, #fff); border: 1px solid var(--line); border-radius: var(--rq-radius);
    padding: 20px; box-shadow: var(--rq-shadow);
  }
  .rq-mini-total { display: none; }
  .rq-panel.is-active { padding-bottom: 8px; }
}

/* Mobile */
@media (max-width: 979px) {
  .rq-app { font-size: 15.5px; }
  .rq-panel-title { font-size: 20px; }
  .rq-area-row { grid-template-columns: 1fr auto; grid-auto-rows: auto; }
  .rq-area-row .rq-area-surface { grid-column: 1 / -1; }
  .rq-total { font-size: 22px; }
  .rq-nav { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(to top, var(--bg, #fff) 75%, transparent); }
}
