/* RentCafe Live Availability
   Fonts are inherited from the theme so the widget matches the rest of the site.
   Every color and size is a variable; the Elementor Style tab overrides them. */

.rca {
	--rca-accent: #24476b;
	--rca-accent-ink: #ffffff;
	--rca-surface: #ffffff;
	--rca-ink: #1e2a33;
	--rca-muted: #5b6770;
	--rca-line: #dce1e5;
	--rca-special: #f5e9bf;
	--rca-now: #2f7d4f;
	--rca-radius: 6px;
	--rca-gap: 24px;
	--rca-ratio: 1 / 1;
	--rca-fit: cover;

	color: var(--rca-ink);
	font: inherit;
	line-height: 1.5;
}

.rca *,
.rca *::before,
.rca *::after { box-sizing: border-box; }

.rca p,
.rca h3,
.rca ul { margin: 0; }

/* ---------- Filters ---------- */

.rca-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	padding: 0 0 20px;
	margin: 0 0 16px;
	border-bottom: 1px solid var(--rca-line);
}

.rca-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 150px;
	max-width: 220px;
}

.rca-field label {
	font-size: 0.8125rem;
	color: var(--rca-muted);
}

.rca-field select,
.rca-field input {
	width: 100%;
	min-height: 44px;
	padding: 8px 10px;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--rca-ink);
	background: var(--rca-surface);
	border: 1px solid var(--rca-line);
	border-radius: var(--rca-radius);
}

.rca-reset {
	min-height: 44px;
	padding: 8px 4px;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--rca-accent);
	background: none;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.rca-reset[hidden] { display: none; }

/* ---------- Summary bar ---------- */

.rca-bar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 16px;
	margin-bottom: 16px;
}

.rca-count { font-weight: 600; }

.rca-updated {
	font-size: 0.8125rem;
	color: var(--rca-muted);
}

.rca-updated.is-fresh { color: var(--rca-now); }

/* ---------- Grid / list ---------- */

.rca-units {
	display: grid;
	grid-template-columns: repeat(var(--rca-cols, 3), minmax(0, 1fr));
	gap: var(--rca-gap);
}

/* Shortcode-only fallbacks; the Elementor widget uses its own responsive columns. */
@media (max-width: 1024px) {
	.rca--fixed-cols .rca-units { grid-template-columns: repeat(min(var(--rca-cols, 3), 2), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.rca--fixed-cols .rca-units { grid-template-columns: 1fr; }
}

.rca--list .rca-units { grid-template-columns: 1fr; }

/* ---------- Card ---------- */

.rca-card {
	display: flex;
	flex-direction: column;
	background: var(--rca-surface);
	border: 1px solid var(--rca-line);
	border-radius: var(--rca-radius);
	overflow: hidden;
}

.rca-card[hidden] { display: none; }

.rca-media {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--rca-ratio);
	background: #f3f5f6;
	border-bottom: 1px solid var(--rca-line);
}

/* Absolutely positioned so tall or wide images can't stretch the shape. */
.rca-media > img,
.rca-media > .rca-zoom,
.rca-media > .rca-media-empty {
	position: absolute;
	inset: 0;
}

.rca-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var(--rca-fit);
	object-position: center;
}

/* Thumbnail button that opens the full-size image. */
.rca-zoom {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	border-radius: 0;
	cursor: zoom-in;
	overflow: hidden;
}

.rca-zoom img { transition: transform 0.3s ease; }
.rca-zoom:hover img { transform: scale(1.04); }

.rca-zoom-hint {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	color: #fff;
	background: rgba(20, 28, 34, 0.72);
	border-radius: 999px;
	pointer-events: none;
}

.rca-zoom:focus-visible {
	outline: 3px solid var(--rca-accent);
	outline-offset: -3px;
}

.rca-media-empty {
	display: block;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(var(--rca-line), var(--rca-line)) center / 40% 1px no-repeat,
		linear-gradient(var(--rca-line), var(--rca-line)) center / 1px 40% no-repeat;
}

.rca-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	padding: 18px 20px 20px;
}

/* The availability date is the thing renters scan for first. */
.rca-avail {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--rca-muted);
}

.rca-avail::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: 2px solid currentColor;
}

.is-now .rca-avail { color: var(--rca-now); }
.is-now .rca-avail::before { background: currentColor; }

.rca-title {
	font-size: 1.25rem;
	line-height: 1.25;
	font-weight: 700;
	color: var(--rca-ink);
}

.rca-plan {
	font-size: 0.9375rem;
	color: var(--rca-muted);
}

.rca-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 0 14px;
	padding: 0;
	list-style: none;
	font-size: 0.9375rem;
}

.rca-facts li { margin: 0; }

.rca-price {
	display: flex;
	align-items: baseline;
	gap: 2px;
	margin-top: 6px;
}

.rca-price-amt {
	font-size: 1.5rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1.2;
}

.rca-price-per {
	font-size: 0.9375rem;
	color: var(--rca-muted);
}

.rca-deposit {
	font-size: 0.875rem;
	color: var(--rca-muted);
}

.rca-special {
	padding: 8px 10px;
	font-size: 0.875rem;
	background: var(--rca-special);
	border-radius: calc(var(--rca-radius) * 0.66);
}

.rca-apply {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	min-height: 44px;
	margin-top: auto;
	padding: 10px 18px;
	font-weight: 600;
	color: var(--rca-accent-ink);
	background: var(--rca-accent);
	border-radius: var(--rca-radius);
	text-decoration: none;
	transition: filter 0.15s ease;
}

.rca-apply:hover,
.rca-apply:focus-visible {
	color: var(--rca-accent-ink);
	filter: brightness(1.12);
}

.rca-apply:focus-visible,
.rca-reset:focus-visible,
.rca-field select:focus-visible,
.rca-field input:focus-visible {
	outline: 2px solid var(--rca-accent);
	outline-offset: 2px;
}

/* Button sits at the bottom so buttons line up across a row. */
.rca-body > :nth-last-child(2) { margin-bottom: 10px; }

/* ---------- List layout ---------- */

@media (min-width: 641px) {
	.rca--list .rca-card { flex-direction: row; }
	.rca--list .rca-media {
		flex: 0 0 220px;
		aspect-ratio: auto;
		min-height: 220px;
		border-bottom: 0;
		border-right: 1px solid var(--rca-line);
	}
	.rca--list .rca-body {
		display: grid;
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"avail price"
			"title price"
			"plan  apply"
			"facts apply"
			"special special";
		align-items: start;
		column-gap: 24px;
	}
	.rca--list .rca-avail   { grid-area: avail; }
	.rca--list .rca-title   { grid-area: title; }
	.rca--list .rca-plan    { grid-area: plan; }
	.rca--list .rca-facts   { grid-area: facts; }
	.rca--list .rca-price   { grid-area: price; justify-self: end; margin-top: 0; }
	.rca--list .rca-deposit { display: none; }
	.rca--list .rca-special { grid-area: special; margin-top: 8px; }
	.rca--list .rca-apply   { grid-area: apply; justify-self: end; align-self: end; margin-top: 0; }
	.rca--list .rca-body > :nth-last-child(2) { margin-bottom: 0; }
}

/* ---------- States ---------- */

.rca-empty {
	padding: 32px 20px;
	text-align: center;
	color: var(--rca-muted);
	border: 1px dashed var(--rca-line);
	border-radius: var(--rca-radius);
}

.rca-empty[hidden] { display: none; }

.rca-admin-note {
	margin-bottom: 16px !important;
	padding: 10px 14px;
	font-size: 0.875rem;
	background: #fcf0f1;
	border-left: 4px solid #d63638;
}

.rca.is-updating .rca-units { opacity: 0.6; transition: opacity 0.2s; }

/* Flash a card whose price or date just changed. */
.rca-card.is-changed { box-shadow: 0 0 0 2px var(--rca-accent); transition: box-shadow 0.6s ease; }

.rca .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.rca *, .rca *::before { transition: none !important; }
}

/* ---------- Full-size image pop-up ----------
   Lives at the end of <body>, outside the widget, so its colors are fixed. */

.rca-lightbox {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	color: #fff;
	background: transparent;
	border: 0;
	overflow: hidden;
}

.rca-lightbox::backdrop { background: rgba(12, 16, 20, 0.88); }

.rca-lightbox[open] { animation: rca-lb-in 0.18s ease-out; }
@keyframes rca-lb-in { from { opacity: 0; } to { opacity: 1; } }

.rca-lb-stage {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	height: 100%;
	padding: max(56px, env(safe-area-inset-top)) 64px max(24px, env(safe-area-inset-bottom));
}

.rca-lb-figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	min-height: 0;
	max-width: 100%;
	margin: 0;
}

.rca-lb-img {
	display: block;
	max-width: min(100%, 1400px);
	max-height: calc(100dvh - 160px);
	object-fit: contain;
	background: #fff;
	border-radius: 4px;
	cursor: zoom-out;
}

.rca-lb-caption {
	max-width: 70ch;
	font-size: 0.9375rem;
	text-align: center;
	color: rgba(255, 255, 255, 0.88);
}

.rca-lb-btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font: inherit;
	font-size: 26px;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.rca-lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.rca-lb-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rca-lb-btn[hidden] { display: none; }

.rca-lb-close { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.rca-lb-prev  { left: 12px; top: 50%; transform: translateY(-50%); }
.rca-lb-next  { right: 12px; top: 50%; transform: translateY(-50%); }

.rca-lb-count {
	position: absolute;
	top: max(22px, env(safe-area-inset-top));
	left: 20px;
	margin: 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.75);
}

html.rca-lb-open { overflow: hidden; }

@media (max-width: 640px) {
	.rca-lb-stage { padding-left: 12px; padding-right: 12px; }
	.rca-lb-prev, .rca-lb-next { top: auto; bottom: max(16px, env(safe-area-inset-bottom)); transform: none; }
	.rca-lb-img { max-height: calc(100dvh - 200px); }
}

@media (prefers-reduced-motion: reduce) {
	.rca-lightbox[open] { animation: none; }
	.rca-zoom img { transition: none; }
}
