/* Shared by search cards and My Shortlist. */
.monthly-budget-trigger[hidden], .monthly-listing[hidden] { display: none !important; }
.monthly-budget-trigger {
  min-height: 44px; flex: 0 0 auto; padding: 8px 13px; border: 1px solid var(--t-control-line);
  border-radius: 8px; background: var(--t-canvas); color: var(--t-ink); font: inherit;
  font-size: .875rem; font-weight: 650; line-height: 1.25; cursor: pointer;
}
.monthly-budget-trigger:hover, .monthly-budget-trigger.monthly-enabled {
  color: var(--t-gold-ink); border-color: var(--t-gold-fill); background: var(--t-gold-soft);
}
body.sr2-compact-filters #sr2Bar .monthly-budget-trigger { grid-column: 1 / -1; grid-row: 2; }
/* Give the control its own row on phones so neither its label nor Beds/baths
   is clipped. Wider compact layouts can comfortably fit it beside Price. */
@media (min-width: 520px) and (max-width: 900px) {
  body.sr2-compact-filters #sr2Bar .sr2-controls:has(.monthly-budget-trigger:not([hidden])) {
    grid-template-columns: minmax(48px, .75fr) minmax(84px, 1.15fr) minmax(72px, 1fr) minmax(48px, .75fr) auto;
  }
  body.sr2-compact-filters #sr2Bar .sr2-controls.sr2-type-locked:has(.monthly-budget-trigger:not([hidden])) {
    grid-template-columns: minmax(48px, 1fr) minmax(84px, 1.2fr) minmax(72px, 1.1fr) auto;
  }
  body.sr2-compact-filters #sr2Bar .monthly-budget-trigger {
    grid-column: 2; grid-row: 1; min-width: 0; padding: 5px;
    font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  body.sr2-compact-filters #mlsQuickPrice { grid-column: 1; grid-row: 1; }
}
.monthly-listing { text-align: left; }
.sr-card .monthly-listing { padding: 0 14px 10px; }
.monthly-row-button {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%;
  min-height: 48px; padding: 8px 12px; border: 1px solid var(--t-control-line);
  border-radius: 8px; background: var(--t-surface-1); color: var(--t-ink); font: inherit;
  line-height: 1.3; text-align: left; cursor: pointer;
}
.monthly-row-button:hover { border-color: var(--t-gold-ink); }
.monthly-row-button strong, .monthly-row-button small { display: block; }
.monthly-row-button strong { font-size: .875rem; }
.monthly-row-button small { margin-top: 2px; color: var(--t-ink-2); font-size: .75rem; font-weight: 500; }
.monthly-chevron { color: var(--t-gold-ink); font-size: 1.25rem; }
.monthly-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cmp-saved-item .monthly-listing, .cmp-home .monthly-listing { margin-block: 9px; }
.monthly-sheet {
  box-sizing: border-box; inset: 0; width: min(450px, calc(100% - 28px)); max-width: 100%;
  max-height: 85vh; max-height: 85dvh; margin: auto; overflow-y: auto; overscroll-behavior: contain;
  padding: 20px; background: var(--t-canvas); color: var(--t-ink); border: 1px solid var(--t-control-line);
  border-radius: 16px; box-shadow: 0 18px 70px rgb(0 0 0 / 25%); font-family: inherit;
}
.monthly-sheet::backdrop { background: rgb(12 18 28 / 52%); }
.monthly-heading, .monthly-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.monthly-heading h2 { margin: 0; color: var(--t-ink); font-family: inherit; font-weight: 700; font-size: 1.3rem; line-height: 1.25; }
.monthly-heading h2:focus { outline: none; }
.monthly-close, .monthly-primary, .monthly-secondary {
  min-height: 44px; padding: 9px 14px; border: 1px solid var(--t-control-line);
  border-radius: 8px; background: var(--t-canvas); color: var(--t-ink); font: inherit; font-size: .9rem;
  font-weight: 650; line-height: 1.35; cursor: pointer;
}
.monthly-close { flex-shrink: 0; width: 44px; padding: 0; font-size: 1.45rem; }
.monthly-primary { border-color: var(--t-gold-fill); background: var(--t-gold-fill); color: var(--t-on-primary); }
.monthly-secondary { border-color: var(--t-control-line); }
.monthly-intro, .monthly-address, .monthly-note, .monthly-gap { margin: 8px 0; font-size: .9rem; line-height: 1.45; }
.monthly-note, .monthly-address, .monthly-intro { color: var(--t-ink-2); }
.monthly-field { display: block; margin: 18px 0 5px; font-size: .9rem; font-weight: 650; }
.monthly-input { display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 46px;
  border: 1px solid var(--t-control-line); border-radius: 8px; background: var(--t-canvas); }
.monthly-input span { color: var(--t-ink-2); white-space: nowrap; font-size: .9rem; }
.monthly-input input { min-width: 0; min-height: 44px; flex: 1; padding: 0; border: 0; background: transparent; color: var(--t-ink); font: inherit; font-size: 16px; }
.monthly-input:focus-within, .monthly-sheet button:focus-visible, .monthly-budget-trigger:focus-visible,
.monthly-row-button:focus-visible { outline: 2px solid var(--t-gold-ink); outline-offset: 2px; }
.monthly-input input:focus { outline: none; }
.monthly-remember { display: flex; align-items: center; gap: 8px; min-height: 44px; margin: 6px 0; font-size: .875rem; }
.monthly-remember input { width: 18px; height: 18px; }
.monthly-actions { flex-wrap: wrap; margin: 12px 0 2px; }
.monthly-actions button { flex: 1 1 auto; }
.monthly-amount { margin: 12px 0 0; font-size: 1rem; color: var(--t-ink-2); }
.monthly-amount strong { font-size: 2rem; line-height: 1.2; color: var(--t-ink); }
.monthly-gap { font-weight: 650; }
.monthly-cost-lines { margin: 12px 0; }
.monthly-cost-lines > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--t-control-line); }
.monthly-cost-lines dt, .monthly-cost-lines dd { margin: 0; font-size: .875rem; }
.monthly-cost-lines dd { font-weight: 650; white-space: nowrap; }
.monthly-sources { color: var(--t-ink-2); font-size: .85rem; }
.monthly-sources summary, .monthly-inline, .monthly-detail-link { min-height: 44px; align-content: center; color: var(--t-gold-ink); cursor: pointer; }
.monthly-sources summary { padding: 10px 0; box-sizing: border-box; }
.monthly-sources ul { margin: 0 0 5px; padding-left: 18px; }
.monthly-sources li { margin: 3px 0; }
.monthly-budget-line { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: .825rem; }
.monthly-inline, .monthly-detail-link { padding: 6px 0; border: 0; background: transparent; font: inherit; font-size: .85rem; text-decoration: underline; text-underline-offset: .15em; }
.monthly-detail-link { display: inline-flex; align-items: center; }
.monthly-note { font-size: .8rem; }
.monthly-error:not(:empty) { font-size: .875rem; font-weight: 600; }
.monthly-error:empty { display: none; }
@media (max-width: 600px) {
  .monthly-sheet { top: auto; bottom: 0; width: 100%; margin: 0; padding: 18px 16px max(18px, env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; }
  .monthly-actions { flex-direction: column; align-items: stretch; }
}
