/* RoofScour Calculator — calculator.css */

/* ── Wrap ── */
.rsc-wrap {
  font-family: 'DM Sans', sans-serif;
  background: #1a1f2e;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #c8832a;
  max-width: 860px;
  margin: 0 auto;
}

/* ── Location bar ── */
.rsc-location-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,131,42,0.15);
  border-bottom: 1px solid rgba(200,131,42,0.25);
  padding: 8px 20px;
  font-size: 12px;
  color: #e09840;
}
.rsc-location-bar svg { flex-shrink: 0; }
.rsc-location-bar strong { color: #f5f0e8; }
.rsc-location-change {
  margin-left: auto;
  cursor: pointer;
  font-weight: 600;
  color: #c8832a;
}
.rsc-location-change:hover { color: #e09840; }

/* ── Tabs ── */
.rsc-tabs {
  display: flex;
  background: #1a1f2e;
  padding: 10px 16px 0;
  gap: 6px;
  border-bottom: 1px solid rgba(245,240,232,0.08);
}
.rsc-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px 11px;
  border: none;
  background: transparent;
  color: rgba(245,240,232,0.4);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: all 0.15s;
  position: relative;
  bottom: -1px;
}
.rsc-tab:hover { color: rgba(245,240,232,0.75); background: rgba(255,255,255,0.04); }
.rsc-tab.active {
  background: #f5f0e8;
  color: #1a1f2e;
}
.rsc-tab-both.active {
  background: #c8832a;
  color: #fff;
}
.rsc-bundle-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 2px 7px;
  border-radius: 10px;
}
.rsc-tab:not(.active) .rsc-bundle-badge {
  background: rgba(200,131,42,0.25);
  color: #e09840;
}

/* ── Body ── */
.rsc-body { background: #ffffff; }

/* ── Sections ── */
.rsc-section {
  padding: 22px 28px;
  border-bottom: 1px solid rgba(26,31,46,0.08);
}
.rsc-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4a5268;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rsc-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(26,31,46,0.08);
}
.rsc-auto-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  background: #e4f5f0;
  color: #0F6E56;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0;
  text-transform: none;
}
.rsc-optional {
  font-size: 10px;
  color: #888780;
  font-weight: 400;
}

/* ── Fields ── */
.rsc-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.rsc-field { display: flex; flex-direction: column; gap: 5px; }
.rsc-field label {
  font-size: 11px;
  font-weight: 600;
  color: #4a5268;
}
.rsc-field select,
.rsc-field input[type="text"] {
  appearance: none;
  -webkit-appearance: none;
  background: #f5f0e8;
  border: 1px solid rgba(26,31,46,0.15);
  border-radius: 8px;
  padding: 9px 32px 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #1a1f2e;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234a5268' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.rsc-field input[type="text"] {
  background-image: none;
  padding-right: 12px;
}
.rsc-field select:focus,
.rsc-field input[type="text"]:focus {
  outline: none;
  border-color: #c8832a;
  box-shadow: 0 0 0 3px rgba(200,131,42,0.12);
}

/* ── Add-ons ── */
.rsc-addons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.rsc-addon {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  background: #f5f0e8;
  border: 1px solid rgba(26,31,46,0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.rsc-addon:hover { border-color: rgba(26,31,46,0.2); background: #ede6d8; }
.rsc-addon.checked { border-color: #c8832a; background: #fdf3e3; }
.rsc-addon input { display: none; }
.rsc-addon-box {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border: 1.5px solid rgba(26,31,46,0.2);
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.15s;
}
.rsc-addon.checked .rsc-addon-box {
  background: #c8832a;
  border-color: #c8832a;
}
.rsc-addon-box svg { display: none; }
.rsc-addon.checked .rsc-addon-box svg { display: block; }
.rsc-addon-info { flex: 1; }
.rsc-addon-name { font-size: 12px; font-weight: 600; color: #1a1f2e; display: block; }
.rsc-addon-desc { font-size: 11px; color: #4a5268; margin-top: 1px; line-height: 1.4; display: block; }
.rsc-addon-price { font-size: 12px; font-weight: 700; color: #c8832a; white-space: nowrap; }
.rsc-addon-bundled { font-size: 10px; font-weight: 400; color: #854F0B; }

/* ── Results ── */
.rsc-results {
  background: #1a1f2e;
  padding: 24px 28px;
}
.rsc-results-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.rsc-results-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.38);
  margin-bottom: 6px;
}
.rsc-results-range {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.rsc-res-low  { font-family: 'DM Serif Display', serif; font-size: 18px; color: rgba(245,240,232,0.45); }
.rsc-res-mid  { font-family: 'DM Serif Display', serif; font-size: 34px; color: #e09840; line-height: 1; }
.rsc-res-high { font-family: 'DM Serif Display', serif; font-size: 18px; color: rgba(245,240,232,0.45); }
.rsc-res-sep  { font-size: 13px; color: rgba(245,240,232,0.25); }
.rsc-results-note {
  font-size: 11px;
  color: rgba(245,240,232,0.3);
  margin-top: 4px;
}
.rsc-savings {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,131,42,0.18);
  border: 1px solid rgba(200,131,42,0.3);
  color: #e09840;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 20px;
}

/* ── Breakdown ── */
.rsc-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(245,240,232,0.07);
  margin-bottom: 18px;
}
.rsc-bd-item {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rsc-bd-hl { background: rgba(200,131,42,0.12); }
.rsc-bd-label { font-size: 10px; color: rgba(245,240,232,0.35); }
.rsc-bd-val   { font-size: 15px; font-weight: 500; color: rgba(245,240,232,0.85); }
.rsc-bd-hl .rsc-bd-val { color: #e09840; }

/* ── CTA row ── */
.rsc-cta-row { display: flex; gap: 8px; flex-wrap: wrap; }
.rsc-btn-primary {
  flex: 1;
  min-width: 140px;
  padding: 12px 18px;
  background: #c8832a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  text-align: center;
}
.rsc-btn-primary:hover { background: #e09840; }
.rsc-btn-secondary {
  flex: 1;
  min-width: 120px;
  padding: 12px 18px;
  background: transparent;
  color: rgba(245,240,232,0.6);
  border: 1px solid rgba(245,240,232,0.15);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.rsc-btn-secondary:hover { color: #f5f0e8; border-color: rgba(245,240,232,0.3); }

/* ── Modal ── */
.rsc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,31,46,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.rsc-modal {
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(26,31,46,0.2);
}
.rsc-modal h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #1a1f2e;
  margin: 0 0 6px;
}
.rsc-modal p {
  font-size: 13px;
  color: #4a5268;
  line-height: 1.6;
  margin-bottom: 18px;
}
.rsc-modal-estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fdf3e3;
  border: 1px solid rgba(200,131,42,0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.rsc-modal-service { font-size: 12px; color: #4a5268; }
.rsc-modal-location { font-size: 11px; color: #888780; margin-top: 2px; }
.rsc-modal-price {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: #c8832a;
}
.rsc-modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(26,31,46,0.2);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #1a1f2e;
  margin-bottom: 10px;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.rsc-modal-input:focus { outline: none; border-color: #c8832a; }
.rsc-modal-input::placeholder { color: rgba(26,31,46,0.35); }
.rsc-modal-skip {
  display: block;
  text-align: center;
  font-size: 12px;
  color: #4a5268;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: 6px;
}
.rsc-modal-skip:hover { color: #1a1f2e; }
.rsc-modal-success {
  text-align: center;
  padding: 10px 0;
}
.rsc-modal-success h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  color: #1a1f2e;
  margin: 12px 0 6px;
}
.rsc-modal-success p {
  font-size: 13px;
  color: #4a5268;
  margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .rsc-section { padding: 18px 16px; }
  .rsc-results  { padding: 20px 16px; }
  .rsc-tab      { padding: 8px 12px 10px; font-size: 12px; }
  .rsc-bundle-badge { display: none; }
  .rsc-res-mid  { font-size: 26px; }
  .rsc-cta-row  { flex-direction: column; }
  .rsc-tabs     { padding: 8px 10px 0; gap: 4px; }
}
