/* Free rent check (/tools/rent-check/) — widget styles on top of parity.css tokens.
 * Layout: a full-width map with the form / result card floating over its left edge (stacked below 860px). */

.rc-hero { padding-bottom: 8px; }
.rc-hero .p-head { text-align: center; margin-bottom: 0; }
.rc-tool-section { padding-top: 24px; padding-bottom: 48px; }

/* ---- stage: map + floating card ---- */
.rc-stage {
  position: relative;
  height: 620px;
  border-radius: var(--p-radius-xl);
  overflow: hidden;
  box-shadow: var(--p-shadow-card);
  background: #eef5f1;
}
.rc-map { position: absolute; inset: 0; cursor: crosshair; }
.rc-map.leaflet-container { background: #eef5f1; font-family: inherit; }
/* Sage duotone shared with the deal comparables map (core/includes/map_duotone_filter.html). */
.rc-map .leaflet-tile-pane { filter: url(#da-map-duotone); }
.rc-map .leaflet-control-zoom {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--p-shadow-sm);
}
.rc-map .leaflet-control-zoom a {
  width: 34px; height: 34px; line-height: 34px;
  color: var(--p-ink);
  border-bottom: 1px solid var(--p-border);
}
.rc-map .leaflet-control-zoom a:last-child { border-bottom: none; }

.rc-card-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 20px;
  width: 372px;
  z-index: 500; /* above Leaflet panes (400) */
  display: flex;
  flex-direction: column;
  pointer-events: none; /* the empty strip under a short card stays clickable on the map */
}
.rc-step, .rc-result {
  pointer-events: auto;
  max-height: 100%;
  overflow-y: auto;
  background: var(--p-card);
  border-radius: var(--p-radius-lg);
  box-shadow: var(--p-shadow-lg);
  padding: 22px;
}
.rc-step { display: flex; flex-direction: column; gap: 18px; }
.rc-step[hidden], .rc-result[hidden] { display: none; }

/* ---- form ---- */
.rc-label {
  display: block;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--p-muted);
  margin-bottom: 8px;
}
.rc-optional { font-weight: 400; color: var(--p-muted-2); }
.rc-field { border: 0; margin: 0; padding: 0; min-width: 0; }

.rc-search-box { position: relative; }
.rc-search-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--p-muted-2); pointer-events: none; }
.rc-search-box input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 40px;
  border: 1px solid var(--p-border-strong);
  border-radius: var(--p-radius);
  font: inherit;
  font-size: 15px;
  color: var(--p-text);
  background: var(--p-bg-2);
  transition: border-color var(--p-fast), background var(--p-fast);
}
.rc-search-box input::-webkit-search-cancel-button { display: none; }
.rc-find {
  position: absolute;
  right: 6px; top: 6px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: var(--p-radius-sm);
  background: var(--p-accent);
  color: #fff;
  cursor: pointer;
}
.rc-find:hover { background: var(--p-accent-hover); }
.rc-find[disabled] { opacity: 0.55; cursor: wait; }
.rc-hint { margin: 8px 0 0; font-size: 13px; color: var(--p-muted-2); }

.rc-results {
  list-style: none;
  margin: 8px 0 0;
  padding: 4px;
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
  box-shadow: var(--p-shadow-sm);
}
.rc-results button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--p-radius-sm);
  background: transparent;
  font: inherit;
  font-size: 14px;
  line-height: 1.35;
  color: var(--p-text);
  cursor: pointer;
}
.rc-results button:hover { background: var(--p-accent-tint); }

.rc-options { display: flex; flex-direction: column; gap: 16px; }

/* Segmented pills built on radios — keyboard and form semantics stay native. */
.rc-seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: var(--p-radius);
  background: var(--p-bg-2);
  box-shadow: inset 0 0 0 1px var(--p-border);
}
.rc-seg label { position: relative; display: block; }
.rc-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rc-seg span {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: calc(var(--p-radius) - 3px);
  font-size: 14px;
  font-weight: 500;
  color: var(--p-muted);
  white-space: nowrap;
  transition: background var(--p-fast), color var(--p-fast);
}
.rc-seg--beds span { font-size: 13px; }
.rc-seg label:hover span { color: var(--p-ink); }
.rc-seg input:checked + span { background: var(--p-card); color: var(--p-accent-deep); font-weight: 600; box-shadow: var(--p-shadow-xs); }
.rc-seg input:focus-visible + span { box-shadow: var(--p-focus-ring); }

.rc-search-box input:focus,
.rc-field input:focus { outline: none; box-shadow: var(--p-focus-ring); border-color: var(--p-accent); background: #fff; }
.rc-field input[inputmode="numeric"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--p-border-strong);
  border-radius: var(--p-radius);
  font: inherit;
  font-size: 15px;
  color: var(--p-text);
  background: var(--p-bg-2);
}
.rc-field[hidden] { display: none; }
.rc-field input[aria-invalid="true"] { border-color: #9f2d1f; }
.rc-field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(159, 45, 31, 0.18); }
.rc-field-error { margin-top: 6px; font-size: 13px; }

.rc-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--p-accent-deep);
  cursor: pointer;
}
.rc-link:hover { text-decoration: underline; }
.rc-submit { width: 100%; min-height: 48px; }
.rc-submit[disabled] { opacity: 0.55; cursor: not-allowed; }
.rc-error { color: #9f2d1f; font-size: 14px; margin: 0; }

/* ---- result ---- */
.rc-back { margin-bottom: 14px; color: var(--p-muted); }
.rc-kicker { font-size: 13px; font-weight: 600; color: var(--p-muted); margin: 0 0 2px; }
.rc-figure { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; color: var(--p-ink); line-height: 1.1; margin: 0; }
.rc-figure small { font-size: 16px; font-weight: 500; letter-spacing: 0; color: var(--p-muted); margin-left: 4px; }

/* p25–p75 band: the middle half spans 20–80 % of the track, the dot is the estimate. */
.rc-band { margin: 18px 0 4px; }
.rc-band-track { position: relative; height: 8px; border-radius: 999px; background: var(--p-bg-3); }
.rc-band-mid { position: absolute; left: 20%; right: 20%; top: 0; bottom: 0; border-radius: 999px; background: var(--p-accent); opacity: 0.45; }
.rc-band-dot {
  position: absolute; top: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: #f5b400;
  border: 2px solid var(--p-ink);
}
.rc-band-labels { position: relative; height: 20px; margin-top: 6px; font-size: 13px; color: var(--p-muted); }
.rc-band-labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.rc-band-labels span:first-child { left: 20%; }
.rc-band-labels span:last-child { left: 80%; }
.rc-band-caption { margin: 2px 0 0; font-size: 13px; color: var(--p-muted-2); text-align: center; }

.rc-meta { margin: 16px 0 0; font-size: 14px; color: var(--p-text); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--p-radius-pill);
  font-size: 13px;
  font-weight: 600;
  background: var(--p-accent-tint);
  color: var(--p-accent-deep);
}
.rc-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rc-badge--medium { background: #fff6e5; color: #8a5a00; }
.rc-note { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--p-muted-2); }

.rc-card-cta { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--p-border); }
.rc-card-cta .p-btn { width: 100%; }
.rc-card-cta .rc-note { margin-top: 8px; text-align: center; }
.rc-card-cta .rc-note a { color: var(--p-accent-deep); }

.rc-empty h3 { margin: 0 0 6px; font-size: 19px; color: var(--p-ink); }
.rc-empty p { margin: 0 0 14px; font-size: 14px; color: var(--p-muted); }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-chip {
  padding: 6px 12px;
  border-radius: var(--p-radius-pill);
  border: 1px solid var(--p-border-strong);
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--p-text);
  cursor: pointer;
}
.rc-chip:hover { border-color: var(--p-accent); color: var(--p-accent-deep); }

/* ---- map pin + price tag ---- */
.rc-pin-icon { background: none; border: 0; }
.rc-pin {
  display: block;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #f5b400;
  border: 3px solid var(--p-ink);
  box-shadow: 0 0 0 5px rgba(245, 180, 0, 0.28), 0 3px 8px rgba(0, 0, 0, 0.3);
  cursor: grab;
}
.rc-pin-tag.leaflet-tooltip {
  padding: 4px 10px;
  border: 0;
  border-radius: var(--p-radius-pill);
  background: var(--p-ink);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
.rc-pin-tag.leaflet-tooltip::before { display: none; }

/* ---- below the stage ---- */
.rc-disclaimer { max-width: 760px; margin: 18px auto 0; text-align: center; font-size: 14px; color: var(--p-muted-2); }
/* The shared section paddings stack to ~230px between blocks here; keep it ~96px. */
.rc-how-section { padding-top: 48px; padding-bottom: 48px; }
.rc-how-section .p-head { margin-bottom: 24px; }
.rc-faq { padding: 48px 24px 80px; }
.rc-how ol { margin: 0; padding-left: 22px; font-size: 17px; line-height: 1.6; color: var(--p-text); }
.rc-how li + li { margin-top: 10px; }
.rc-cta { text-align: center; }
.rc-cta .p-btn { margin-top: 20px; }

@media (max-width: 860px) {
  /* The whole card first, the map under it. */
  .rc-stage {
    display: flex; flex-direction: column; gap: 14px;
    height: auto; overflow: visible; box-shadow: none; background: none; border-radius: 0;
  }
  .rc-card-panel { position: static; width: auto; order: 1; pointer-events: auto; }
  .rc-map { order: 2; position: relative; height: 340px; border-radius: var(--p-radius-lg); overflow: hidden; box-shadow: var(--p-shadow-ring); }
  .rc-step, .rc-result { max-height: none; box-shadow: var(--p-shadow-card); padding: 18px; }
  /* .p-btn is nowrap; the long CTA label would run past the edge at 360px. */
  .rc-cta .p-btn, .rc-card-cta .p-btn { width: 100%; white-space: normal; line-height: 1.3; text-align: center; padding-left: 20px; padding-right: 20px; }
  .rc-tool-section, .rc-how-section { padding-bottom: 40px; }
  .rc-how-section { padding-top: 40px; }
  .rc-faq { padding: 40px 20px 64px; }
}
