/*
 * PropParrot rentals website (home page and /homes/{slug}/).
 * Builds on portal.css (tokens, buttons, the application dialog). Photo-led,
 * quiet chrome: the landlord's brand colour is an accent on buttons, chips and
 * links only, so every landlord's site looks calm whatever colour they pick.
 */
.rs { background: var(--pp-card); font-size: 16px; }
.rs-wrap { max-width: 1160px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.rs-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Header ---------- */
.rs-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--pp-card) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--pp-line-soft); }
.rs-top-row { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.rs-brand { display: flex; align-items: center; gap: 10px; color: var(--pp-ink); text-decoration: none; font-weight: 750; font-size: 1.05rem; letter-spacing: -.01em; min-width: 0; }
.rs-brand img { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex: none; }
.rs-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-spacer { flex: 1; }

/* ---------- Hero ---------- */
.rs-hero { padding-block: 56px 40px; background: linear-gradient(180deg, var(--pp-primary-soft), var(--pp-card) 85%); }
.rs-hero-grid { display: grid; gap: 32px; align-items: center; }
.rs-hero.has-cover .rs-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.rs-eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--pp-primary); margin: 0 0 10px; }
.rs-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.06; font-weight: 800; letter-spacing: -.025em; max-width: 16ch; }
.rs-about { margin: 18px 0 0; color: var(--pp-muted); font-size: 1.1rem; line-height: 1.6; max-width: 52ch; }
.rs-hero-meta { margin: 22px 0 0; color: var(--pp-muted); }
.rs-hero-meta::before { content: ""; display: inline-block; vertical-align: middle; width: 8px; height: 8px; margin: -2px 10px 0 4px; border-radius: 50%; background: var(--pp-good); box-shadow: 0 0 0 4px var(--pp-good-bg); }
.rs-hero-meta strong { color: var(--pp-ink); }
.rs-hero-photo { margin: 0; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; background: var(--pp-line-soft); }
.rs-hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
	.rs-hero { padding-block: 28px 28px; }
	.rs-hero.has-cover .rs-hero-grid { grid-template-columns: 1fr; gap: 22px; }
	.rs-hero.has-cover .rs-hero-photo { order: -1; border-radius: 18px; aspect-ratio: 16 / 10; }
}

/* ---------- Listings ---------- */
.rs-main { padding-block: 16px 72px; }
.rs-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 18px 0 20px; }
.rs-sec-head h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.015em; }
.rs-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; padding: 2px; }
.rs-filters::-webkit-scrollbar { display: none; }
.rs-filter { background: var(--pp-card); color: var(--pp-ink); border: 1px solid var(--pp-line); border-radius: 999px; min-height: 38px; padding: 8px 16px; font-weight: 600; flex: none; }
.rs-filter:hover { filter: none; border-color: var(--pp-ink); }
.rs-filter[aria-pressed="true"] { background: var(--pp-ink); color: var(--pp-card); border-color: var(--pp-ink); }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 32px 24px; }
.rs-none { color: var(--pp-muted); margin-top: 18px; }

.rs-card { min-width: 0; }
.rs-card[hidden] { display: none; }
.rs-card-link { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; border-radius: 18px; }
.rs-card-link:focus-visible { outline-offset: 6px; }
.rs-card-photo { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: var(--pp-primary-soft); }
.rs-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.rs-card-link:hover .rs-card-photo img { transform: scale(1.035); }
.rs-art { position: absolute; right: 8%; bottom: 0; width: 46%; height: auto; }
.rs-tag, .rs-count { position: absolute; z-index: 1; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 10px; line-height: 1.3; }
.rs-tag { left: 12px; top: 12px; background: rgba(255, 255, 255, .94); color: #17202c; }
.rs-count { right: 12px; bottom: 12px; background: rgba(17, 22, 29, .66); color: #fff; }
.rs-card-body { display: grid; gap: 6px; padding: 0 2px; }
.rs-card-row { display: flex; align-items: baseline; gap: 12px; }
.rs-card-row h3 { flex: 1; min-width: 0; margin: 0; font-size: 1.08rem; font-weight: 700; letter-spacing: -.005em; }
.rs-rent { margin: 0; font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.rs-rent small { font-weight: 500; font-size: .85rem; color: var(--pp-muted); margin-left: 1px; }
.rs-meta { margin: 0; color: var(--pp-muted); font-size: .94rem; }
.rs-chips { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rs-chips li { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--pp-primary-soft); color: color-mix(in srgb, var(--pp-primary) 82%, var(--pp-ink)); }
.rs-chips .rs-ic { width: 14px; height: 14px; }

.rs-empty { text-align: center; padding: 56px 16px 40px; display: grid; justify-items: center; gap: 10px; }
.rs-empty h1, .rs-empty h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.rs-empty p { margin: 0 0 8px; color: var(--pp-muted); max-width: 44ch; }
.rs-empty-ic { width: 44px; height: 44px; color: var(--pp-primary); background: var(--pp-primary-soft); border-radius: 50%; padding: 10px; box-sizing: content-box; }
.rs-empty + .rs-grid { margin-top: 24px; }

/* ---------- One home ---------- */
.rs-home { padding-block: 14px 64px; }
.rs-back { display: inline-block; color: var(--pp-muted); text-decoration: none; font-weight: 600; margin: 4px 0 14px; }
.rs-back:hover { color: var(--pp-ink); }

.rs-gallery { position: relative; }
.rs-gal { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; height: clamp(320px, 46vw, 520px); border-radius: 20px; overflow: hidden; }
.rs-gal-item { padding: 0; margin: 0; border: 0; border-radius: 0; background: var(--pp-line-soft); min-height: 0; overflow: hidden; cursor: zoom-in; display: block; }
.rs-gal-item:hover { filter: none; }
.rs-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .2s; }
.rs-gal-item:hover img { filter: brightness(.92); }
.rs-gal-item:first-child { grid-row: span 2; }
.rs-gal-item:nth-child(n+6) { display: none; }
.rs-gallery.few .rs-gal { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.rs-gallery.few .rs-gal-item:first-child { grid-row: auto; }
.rs-gallery.few .rs-gal-item:only-child { grid-column: span 2; }
.rs-gallery.mid .rs-gal { grid-template-columns: 2fr 1fr; }
.rs-gallery.mid .rs-gal-item:nth-child(n+4) { display: none; }
.rs-gal-all { position: absolute; right: 16px; bottom: 16px; background: var(--pp-card); color: var(--pp-ink); border: 1px solid var(--pp-line); box-shadow: 0 6px 18px -8px rgba(15, 25, 35, .35); min-height: 38px; }
.rs-gal-all:hover { filter: none; background: var(--pp-card); }
.rs-gal-count { display: none; }

@media (max-width: 799px) {
	.rs-home { padding-top: 0; }
	.rs-back { margin: 10px 0 10px; }
	.rs-gallery { margin-inline: calc(-1 * max(20px, env(safe-area-inset-left, 0px))); }
	.rs-gal, .rs-gallery.few .rs-gal { display: flex; height: auto; aspect-ratio: 4 / 3; max-width: 100vw; border-radius: 0; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
	.rs-gal::-webkit-scrollbar { display: none; }
	.rs-gal-item { display: block !important; flex: 0 0 100%; scroll-snap-align: start; height: 100%; }
	.rs-gal-all { display: none; }
	.rs-gal-count { display: block; position: absolute; right: 14px; bottom: 14px; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(17, 22, 29, .62); border-radius: 999px; padding: 4px 10px; pointer-events: none; }
}

.rs-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; margin-top: 32px; align-items: start; }
.rs-home-head { padding-bottom: 26px; border-bottom: 1px solid var(--pp-line); }
.rs-home-head h1 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.rs-facts { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--pp-ink); font-weight: 600; }
.rs-facts li { display: inline-flex; align-items: center; gap: 8px; }
.rs-facts .rs-ic { width: 20px; height: 20px; color: var(--pp-muted); }
.rs-block { padding: 28px 0; border-bottom: 1px solid var(--pp-line); }
.rs-block:last-child { border-bottom: 0; }
.rs-block h2 { margin: 0 0 16px; font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.rs-glance { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs-glance li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--pp-line); border-radius: 14px; font-weight: 600; min-width: 0; }
.rs-glance li span { min-width: 0; }
.rs-glance .rs-ic { width: 24px; height: 24px; color: var(--pp-primary); }
.rs-note { margin: 12px 0 0; color: var(--pp-muted); font-size: .92rem; }
.rs-desc { color: #2b3644; line-height: 1.7; max-width: 68ch; }
.rs-desc p { margin: 0 0 14px; }

.rs-side { position: sticky; top: 88px; }
.rs-price-card { border: 1px solid var(--pp-line); border-radius: 20px; padding: 24px; display: grid; gap: 14px; box-shadow: 0 18px 40px -28px rgba(15, 25, 35, .35); background: var(--pp-card); }
.rs-price { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
.rs-price small { font-size: 1rem; font-weight: 500; color: var(--pp-muted); letter-spacing: 0; }
.rs-costs { margin: 0; display: grid; gap: 0; }
.rs-costs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--pp-line-soft); font-size: .95rem; }
.rs-costs dt { color: var(--pp-muted); }
.rs-costs dd { margin: 0; font-weight: 700; text-align: right; }
.rs-price-card button.block { min-height: 52px; }
.rs-share .rs-ic { width: 18px; height: 18px; }
.rs-ask { margin: 2px 0 0; text-align: center; color: var(--pp-muted); font-size: .9rem; overflow-wrap: anywhere; }

.rs-more { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--pp-line); }
.rs-more h2 { margin: 0 0 22px; font-size: 1.4rem; font-weight: 800; letter-spacing: -.015em; }

/* Phone: price card becomes a section; a bar keeps Apply in reach. */
.rs-bar { display: none; }
@media (max-width: 899px) {
	.rs-home-grid { grid-template-columns: 1fr; gap: 0; margin-top: 22px; }
	.rs-side { position: static; margin-top: 8px; }
	.rs-price-card { box-shadow: none; }
	.rs-glance { gap: 8px; }
	.rs-glance li { padding: 12px; gap: 10px; font-size: .95rem; }
	.rs-has-bar .rs-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; gap: 12px; background: var(--pp-card); border-top: 1px solid var(--pp-line); padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); box-shadow: 0 -10px 30px -20px rgba(15, 25, 35, .4); transition: transform .2s ease; }
	.rs-has-bar .rs-bar.away { transform: translateY(110%); }
	.rs-bar p { flex: 1; margin: 0; color: var(--pp-muted); line-height: 1.25; }
	.rs-bar strong { color: var(--pp-ink); font-size: 1.15rem; }
	.rs-bar small { display: block; font-size: .82rem; }
	.rs-bar button { min-height: 48px; padding-inline: 22px; border-radius: 12px; font-size: 15px; }
	.rs-has-bar .rs-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) { .rs-glance { grid-template-columns: 1fr; } }

/* ---------- Lightbox ---------- */
.rs-lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: #0d1117; color: #fff; overflow: hidden; }
.rs-lightbox::backdrop { background: #0d1117; }
.rs-lightbox[open] { display: flex; flex-direction: column; }
.rs-lb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.rs-lb-count { font-weight: 600; font-size: 14px; color: rgba(255, 255, 255, .8); }
.rs-lb-close { background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; font-size: 26px; line-height: 1; }
.rs-lb-strip { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; min-height: 0; }
.rs-lb-strip::-webkit-scrollbar { display: none; }
.rs-lb-item { flex: 0 0 100%; scroll-snap-align: center; margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 0 max(16px, env(safe-area-inset-left, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)); min-height: 0; }
.rs-lb-item img { max-width: min(100%, 1400px); max-height: calc(100% - 40px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.rs-lb-item figcaption { color: rgba(255, 255, 255, .82); font-size: 15px; text-align: center; max-width: 60ch; }
.rs-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .14); color: #fff; border: 0; width: 48px; height: 48px; min-height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; padding: 0 0 4px; }
.rs-lb-nav:hover { background: rgba(255, 255, 255, .24); filter: none; }
.rs-lb-nav.prev { left: 20px; } .rs-lb-nav.next { right: 20px; }
@media (max-width: 700px), (hover: none) { .rs-lb-nav { display: none; } }

/* ---------- Footer, toast ---------- */
.rs-foot { border-top: 1px solid var(--pp-line); background: var(--pp-bg); padding-block: 32px 40px; color: var(--pp-muted); font-size: .92rem; }
.rs-foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px; }
.rs-foot strong { color: var(--pp-ink); }
.rs-foot p { margin: 6px 0 0; }
.rs-foot a { color: inherit; }
.rs-foot-small { font-size: .82rem; color: var(--pp-faint); }
.rs-toast { position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; background: var(--pp-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5); }
.rs .pp-notice.ok.rs-applied { margin: 0 0 20px; }

@media (prefers-reduced-motion: reduce) {
	.rs-card-photo img, .rs-bar { transition: none; }
	.rs-gal, .rs-lb-strip { scroll-behavior: auto; }
}
