/**
 * RAHM Homes Listings — Public-facing Styles (Minimal)
 *
 * Lightweight utilities for the fallback template and shortcodes.
 * Elementor handles all design when active — this file only provides
 * CSS custom properties, basic layout helpers, and the fallback wrapper.
 *
 * @package RAHM_Homes_Listings
 * @since   1.2.0
 */

/* ==========================================================================
   0. CSS Custom Properties
   ========================================================================== */

:root {
	--rahm-primary: #003366;
	--rahm-primary-light: #004c99;
	--rahm-accent: #c8102e;
	--rahm-success: #28a745;
	--rahm-warning: #ffc107;
	--rahm-danger: #c8102e;
	--rahm-info: #17a2b8;
	--rahm-gray-100: #f1f3f5;
	--rahm-gray-200: #e9ecef;
	--rahm-gray-300: #dee2e6;
	--rahm-gray-500: #adb5bd;
	--rahm-gray-600: #6c757d;
	--rahm-gray-700: #495057;
	--rahm-gray-800: #343a40;
	--rahm-gray-900: #212529;
	--rahm-white: #ffffff;
	--rahm-radius: 8px;
	--rahm-transition: 0.25s ease;
	--rahm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	--rahm-max-width: 1200px;
}

/* ==========================================================================
   1. Fallback Single-Listing Wrapper
   ========================================================================== */

.rahm-fallback-listing {
	max-width: var(--rahm-max-width);
	margin: 0 auto;
	padding: 2rem 1rem;
	font-family: var(--rahm-font);
	color: var(--rahm-gray-800);
	line-height: 1.6;
}

.rahm-fallback-listing *,
.rahm-fallback-listing *::before,
.rahm-fallback-listing *::after {
	box-sizing: border-box;
}

.rahm-fallback-listing h1 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--rahm-gray-900);
	margin: 0 0 0.25rem;
}

.rahm-fallback-listing h2 {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--rahm-gray-900);
	margin: 2rem 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--rahm-gray-200);
}

.rahm-fallback-listing table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.rahm-fallback-listing th,
.rahm-fallback-listing td {
	padding: 0.5rem 0.75rem;
	text-align: left;
	font-size: 0.9rem;
	border-bottom: 1px solid var(--rahm-gray-200);
}

.rahm-fallback-listing th {
	font-weight: 600;
	color: var(--rahm-gray-600);
	width: 40%;
}

.rahm-fallback-listing ul {
	padding-left: 1.25rem;
}

.rahm-fallback-listing ul li {
	margin-bottom: 0.25rem;
}

.rahm-fallback-listing a {
	color: var(--rahm-primary);
}

.rahm-fallback-listing a:hover {
	color: var(--rahm-primary-light);
}

.rahm-featured-image img {
	max-width: 100%;
	height: auto;
	border-radius: var(--rahm-radius);
	margin-bottom: 1.5rem;
}

/* ==========================================================================
   2. Search / Filter Bar (shortcode)
   ========================================================================== */

.rahm-search-bar {
	background: var(--rahm-white);
	border: 1px solid var(--rahm-gray-200);
	border-radius: var(--rahm-radius);
	padding: 1.25rem;
	margin-bottom: 2rem;
}

.rahm-search-fields {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 0.75rem;
	align-items: end;
}

.rahm-search-field label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--rahm-gray-600);
	margin-bottom: 0.35rem;
}

.rahm-search-field input,
.rahm-search-field select {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--rahm-gray-300);
	border-radius: var(--rahm-radius);
	font-size: 0.9rem;
	color: var(--rahm-gray-800);
	background: var(--rahm-white);
}

.rahm-search-field input:focus,
.rahm-search-field select:focus {
	outline: none;
	border-color: var(--rahm-primary);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

.rahm-search-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1rem;
	justify-content: flex-end;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */

.rahm-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 1.25rem;
	border: none;
	border-radius: var(--rahm-radius);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--rahm-transition);
}

.rahm-btn-primary {
	background: var(--rahm-primary);
	color: var(--rahm-white);
}

.rahm-btn-primary:hover {
	background: var(--rahm-primary-light);
}

.rahm-btn-secondary {
	background: var(--rahm-gray-200);
	color: var(--rahm-gray-700);
}

.rahm-btn-secondary:hover {
	background: var(--rahm-gray-300);
}

/* ==========================================================================
   4. Listing Grid (shortcode)
   ========================================================================== */

.rahm-listing-grid {
	display: grid;
	gap: 1.5rem;
}

.rahm-listing-grid.rahm-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rahm-listing-grid.rahm-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rahm-listing-grid.rahm-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   5. Listing Card (shortcode grid)
   ========================================================================== */

.rahm-listing-card,
.rahm-card {
	display: flex;
	flex-direction: column;
	background: var(--rahm-white);
	border-radius: var(--rahm-radius);
	overflow: hidden;
	border: 1px solid var(--rahm-gray-200);
	text-decoration: none;
	color: inherit;
	transition: box-shadow var(--rahm-transition);
}

.rahm-listing-card:hover,
.rahm-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.rahm-card-image {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--rahm-gray-100);
}

.rahm-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rahm-card-price {
	position: absolute;
	bottom: 0.5rem;
	left: 0.5rem;
	background: var(--rahm-primary);
	color: var(--rahm-white);
	padding: 0.25rem 0.6rem;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 700;
}

.rahm-card-status {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	background: var(--rahm-gray-600);
	color: var(--rahm-white);
}

.rahm-card-status.status-active     { background: var(--rahm-success); }
.rahm-card-status.status-pending    { background: var(--rahm-warning); color: var(--rahm-gray-900); }
.rahm-card-status.status-sold,
.rahm-card-status.status-closed     { background: var(--rahm-accent); }
.rahm-card-status.status-contingent { background: var(--rahm-info); }

.rahm-card-body {
	padding: 0.75rem 1rem;
}

.rahm-card-type {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--rahm-primary);
	margin-bottom: 0.35rem;
}

.rahm-card-stats {
	display: flex;
	gap: 0.75rem;
	font-size: 0.85rem;
	color: var(--rahm-gray-700);
	margin-bottom: 0.5rem;
}

.rahm-card-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.rahm-card-address {
	margin: 0 0 0.25rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--rahm-gray-900);
}

.rahm-card-location {
	font-size: 0.8rem;
	color: var(--rahm-gray-600);
	margin: 0 0 0.5rem;
}

.rahm-card-cta {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--rahm-primary);
}

.rahm-card-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--rahm-gray-500);
}

/* ==========================================================================
   6. Pagination
   ========================================================================== */

.rahm-pagination {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	margin-top: 2rem;
	flex-wrap: wrap;
}

.rahm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.6rem;
	border: 1px solid var(--rahm-gray-300);
	border-radius: var(--rahm-radius);
	font-size: 0.9rem;
	text-decoration: none;
	color: var(--rahm-gray-700);
	background: var(--rahm-white);
}

.rahm-pagination .page-numbers:hover {
	border-color: var(--rahm-primary);
	color: var(--rahm-primary);
}

.rahm-pagination .page-numbers.current {
	background: var(--rahm-primary);
	color: var(--rahm-white);
	border-color: var(--rahm-primary);
}

/* ==========================================================================
   7. No Results & Loading
   ========================================================================== */

.rahm-no-results {
	text-align: center;
	padding: 3rem 1rem;
	color: var(--rahm-gray-600);
}

.rahm-loading {
	display: flex;
	justify-content: center;
	padding: 3rem;
}

.rahm-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--rahm-gray-200);
	border-top-color: var(--rahm-primary);
	border-radius: 50%;
	animation: rahm-spin 0.8s linear infinite;
}

@keyframes rahm-spin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   8. Typography Helpers
   ========================================================================== */

.rahm-heading {
	font-weight: 700;
	color: var(--rahm-gray-900);
}

.rahm-text-muted {
	color: var(--rahm-gray-600);
	font-size: 0.85rem;
}

/* ==========================================================================
   9. Lazy-loaded Images
   ========================================================================== */

img.rahm-lazy {
	opacity: 0;
	transition: opacity 0.3s ease;
}

img.rahm-lazy.rahm-loaded {
	opacity: 1;
}

/* ==========================================================================
   10. Responsive Breakpoints
   ========================================================================== */

@media (max-width: 768px) {
	.rahm-fallback-listing {
		padding: 1rem;
	}

	.rahm-listing-grid.rahm-cols-3,
	.rahm-listing-grid.rahm-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.rahm-search-fields {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 480px) {
	.rahm-listing-grid.rahm-cols-2,
	.rahm-listing-grid.rahm-cols-3,
	.rahm-listing-grid.rahm-cols-4 {
		grid-template-columns: 1fr;
	}

	.rahm-search-fields {
		grid-template-columns: 1fr;
	}

	.rahm-fallback-listing h1 {
		font-size: 1.35rem;
	}
}

/* ==========================================================================
   11. Search Filters Widget (Elementor)
   ========================================================================== */

.rahm-search-filters-widget {
	font-family: var(--rahm-font);
}

.rahm-sf-form {
	background: var(--rahm-white);
	border: 1px solid var(--rahm-gray-200);
	border-radius: var(--rahm-radius);
	padding: 1.25rem;
	margin-bottom: 2rem;
}

/* ── Field Grid ── */

.rahm-sf-fields {
	display: grid;
	gap: 1rem;
	align-items: start;
}

.rahm-sf-layout-horizontal .rahm-sf-fields {
	grid-template-columns: repeat(3, 1fr);
}

.rahm-sf-layout-horizontal.rahm-sf-cols-2 .rahm-sf-fields {
	grid-template-columns: repeat(2, 1fr);
}

.rahm-sf-layout-horizontal.rahm-sf-cols-4 .rahm-sf-fields {
	grid-template-columns: repeat(4, 1fr);
}

.rahm-sf-layout-vertical .rahm-sf-fields {
	grid-template-columns: 1fr;
}

/* Wide fields span full row */
.rahm-sf-field-wide {
	grid-column: 1 / -1;
}

/* ── Labels ── */

.rahm-sf-label {
	display: block;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--rahm-gray-600);
	margin-bottom: 0.4rem;
}

/* ── Inputs & Selects ── */

.rahm-sf-field input[type="text"],
.rahm-sf-field input[type="number"],
.rahm-sf-field select {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--rahm-gray-300);
	border-radius: var(--rahm-radius);
	font-size: 0.9rem;
	color: var(--rahm-gray-800);
	background: var(--rahm-white);
	transition: border-color var(--rahm-transition), box-shadow var(--rahm-transition);
}

.rahm-sf-field input:focus,
.rahm-sf-field select:focus {
	outline: none;
	border-color: var(--rahm-primary);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.12);
}

/* ── Price Range Dual Inputs ── */

.rahm-sf-price-inputs {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.rahm-sf-price-input-group {
	position: relative;
	flex: 1;
}

.rahm-sf-price-prefix {
	position: absolute;
	left: 0.6rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--rahm-gray-500);
	font-size: 0.85rem;
	pointer-events: none;
}

.rahm-sf-price-input-group input {
	padding-left: 1.5rem !important;
}

.rahm-sf-price-separator {
	color: var(--rahm-gray-500);
	font-size: 0.85rem;
	flex-shrink: 0;
}

/* ── Dual Range Slider ── */

.rahm-sf-range-slider {
	position: relative;
	width: 100%;
	height: 28px;
}

.rahm-sf-range-slider input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	width: 100%;
	top: 10px;
	height: 6px;
	background: transparent;
	pointer-events: none;
	z-index: 2;
	margin: 0;
	padding: 0;
}

.rahm-sf-range-slider input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--rahm-primary);
	border: 2px solid var(--rahm-white);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	pointer-events: all;
	position: relative;
	z-index: 3;
}

.rahm-sf-range-slider input[type="range"]::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--rahm-primary);
	border: 2px solid var(--rahm-white);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	pointer-events: all;
}

.rahm-sf-range-track {
	position: absolute;
	top: 12px;
	left: 0;
	right: 0;
	height: 4px;
	background: var(--rahm-gray-200);
	border-radius: 2px;
	z-index: 1;
}

.rahm-sf-range-fill {
	position: absolute;
	height: 100%;
	background: var(--rahm-primary);
	border-radius: 2px;
}

/* ── Checkbox Group (Property Types) ── */

.rahm-sf-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
}

.rahm-sf-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--rahm-gray-800);
}

.rahm-sf-checkbox input[type="checkbox"] {
	width: 16px;
	height: 16px;
	border: 1px solid var(--rahm-gray-300);
	border-radius: 3px;
	accent-color: var(--rahm-primary);
	cursor: pointer;
	flex-shrink: 0;
}

.rahm-sf-checkbox-label small {
	color: var(--rahm-gray-500);
	font-size: 0.8em;
}

/* ── Actions ── */

.rahm-sf-actions {
	display: flex;
	gap: 0.5rem;
	margin-top: 1.25rem;
	justify-content: flex-end;
	flex-wrap: wrap;
}

.rahm-sf-submit {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.65rem 1.5rem;
	border: none;
	border-radius: var(--rahm-radius);
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	background: var(--rahm-primary);
	color: var(--rahm-white);
	transition: background var(--rahm-transition);
}

.rahm-sf-submit:hover {
	background: var(--rahm-primary-light);
}

.rahm-sf-search-icon {
	font-size: 1rem;
}

.rahm-sf-reset {
	display: inline-flex;
	align-items: center;
	padding: 0.65rem 1.25rem;
	border: none;
	border-radius: var(--rahm-radius);
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	background: var(--rahm-gray-200);
	color: var(--rahm-gray-700);
	transition: background var(--rahm-transition);
}

.rahm-sf-reset:hover {
	background: var(--rahm-gray-300);
}

/* ── Result Count ── */

.rahm-sf-result-count {
	font-size: 0.9rem;
	color: var(--rahm-gray-600);
	margin-bottom: 1rem;
	font-weight: 500;
}

.rahm-sf-result-count strong {
	color: var(--rahm-gray-900);
}

/* ── Responsive ── */

@media (max-width: 768px) {
	.rahm-sf-layout-horizontal .rahm-sf-fields,
	.rahm-sf-layout-horizontal.rahm-sf-cols-3 .rahm-sf-fields,
	.rahm-sf-layout-horizontal.rahm-sf-cols-4 .rahm-sf-fields {
		grid-template-columns: 1fr 1fr;
	}

	.rahm-sf-actions {
		justify-content: stretch;
	}

	.rahm-sf-submit,
	.rahm-sf-reset {
		flex: 1;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.rahm-sf-layout-horizontal .rahm-sf-fields,
	.rahm-sf-layout-horizontal.rahm-sf-cols-2 .rahm-sf-fields,
	.rahm-sf-layout-horizontal.rahm-sf-cols-3 .rahm-sf-fields,
	.rahm-sf-layout-horizontal.rahm-sf-cols-4 .rahm-sf-fields {
		grid-template-columns: 1fr;
	}

	.rahm-sf-price-inputs {
		flex-direction: column;
	}

	.rahm-sf-price-separator {
		display: none;
	}

	.rahm-sf-checkbox-group {
		flex-direction: column;
		gap: 0.4rem;
	}
}

/* ==========================================================
   Section 12 — Listing Map Widget (v2.0.0)
   ========================================================== */

/* ── canvas ──────────────────────────────────────────────── */
.rahm-listing-map-wrap {
	position: relative;
	width: 100%;
}

.rahm-listing-map-canvas {
	width: 100%;
	min-height: 300px;
}

/* ── info window ─────────────────────────────────────────── */
.rahm-lm-info-window {
	display: flex;
	gap: 0.75rem;
	max-width: 320px;
	font-family: var(--rahm-font, inherit);
}

.rahm-lm-iw-thumb {
	width: 90px;
	height: 70px;
	object-fit: cover;
	border-radius: var(--rahm-radius, 6px);
	flex-shrink: 0;
}

.rahm-lm-iw-body {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.rahm-lm-iw-price {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--rahm-primary, #003366);
}

.rahm-lm-iw-address {
	font-size: 0.85rem;
	color: #444;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rahm-lm-iw-meta {
	font-size: 0.8rem;
	color: #666;
}

.rahm-lm-iw-link {
	display: inline-block;
	margin-top: 0.3rem;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--rahm-accent, #c8102e);
	text-decoration: none;
}

.rahm-lm-iw-link:hover {
	text-decoration: underline;
}

/* ── polygon controls ────────────────────────────────────── */
.rahm-lm-clear-polygon {
	margin: 8px;
	padding: 6px 14px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: var(--rahm-radius, 6px);
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--rahm-primary, #003366);
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
	transition: background 0.2s, color 0.2s;
}

.rahm-lm-clear-polygon:hover {
	background: var(--rahm-accent, #c8102e);
	color: #fff;
	border-color: var(--rahm-accent, #c8102e);
}

/* ── Google info window overrides ────────────────────────── */
.gm-style-iw-d {
	overflow: visible !important;
}

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
	.rahm-lm-info-window {
		flex-direction: column;
		max-width: 200px;
	}

	.rahm-lm-iw-thumb {
		width: 100%;
		height: 100px;
	}
}

/* ==========================================================
   Section 13 — Lead Capture Form Widget (v2.2.0)
   ========================================================== */

/* ── form wrapper ────────────────────────────────────────── */
.rahm-lc-wrap {
	max-width: 520px;
	margin: 0 auto;
}

.rahm-lc-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: #fff;
	padding: 2rem;
	border-radius: var(--rahm-radius, 8px);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	font-family: var(--rahm-font, inherit);
	position: relative;
}

/* ── title & subtitle ────────────────────────────────────── */
.rahm-lc-title {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--rahm-primary, #003366);
	margin: 0 0 0.2rem;
	line-height: 1.3;
}

.rahm-lc-subtitle {
	font-size: 0.92rem;
	color: #555;
	margin: 0 0 0.5rem;
	line-height: 1.5;
}

/* ── fields ──────────────────────────────────────────────── */
.rahm-lc-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.rahm-lc-field label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #333;
}

.rahm-lc-req {
	color: var(--rahm-accent, #c8102e);
}

.rahm-lc-form input[type="text"],
.rahm-lc-form input[type="email"],
.rahm-lc-form input[type="tel"],
.rahm-lc-form textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	font-size: 0.95rem;
	font-family: inherit;
	border: 1px solid #dde1e7;
	border-radius: var(--rahm-radius, 6px);
	background: #f7f8fa;
	color: #222;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.rahm-lc-form input:focus,
.rahm-lc-form textarea:focus {
	outline: none;
	border-color: var(--rahm-primary, #003366);
	box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.rahm-lc-form textarea {
	resize: vertical;
	min-height: 80px;
}

/* ── consent checkbox ────────────────────────────────────── */
.rahm-lc-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-weight: 400;
	font-size: 0.82rem;
	color: #555;
	cursor: pointer;
}

.rahm-lc-consent input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
}

/* ── submit button ───────────────────────────────────────── */
.rahm-lc-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	padding: 0.75rem 1.5rem;
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	color: #fff;
	background: var(--rahm-primary, #003366);
	border: none;
	border-radius: var(--rahm-radius, 6px);
	cursor: pointer;
	transition: background 0.2s, transform 0.1s;
}

.rahm-lc-submit:hover {
	background: var(--rahm-accent, #c8102e);
}

.rahm-lc-submit:active {
	transform: scale(0.98);
}

.rahm-lc-submit:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.rahm-lc-spinner {
	display: inline-flex;
	align-items: center;
}

/* ── status messages ─────────────────────────────────────── */
.rahm-lc-message {
	padding: 0.75rem 1rem;
	border-radius: var(--rahm-radius, 6px);
	font-size: 0.9rem;
	line-height: 1.5;
}

.rahm-lc-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.rahm-lc-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ── responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
	.rahm-lc-form {
		padding: 1.25rem;
	}

	.rahm-lc-title {
		font-size: 1.2rem;
	}
}

/* ==========================================================================
   Gallery Images — 16:9 base layout
   aspect-ratio keeps images proportional by default.
   The Elementor height controls override this if the user sets a value.
   ========================================================================== */

/* Slider (Swiper) gallery — aspect-ratio on the CONTAINER, not individual slides */
.rahm-gallery-main {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}
.rahm-gallery-main .swiper-slide {
	height: 100%;
}
.rahm-gallery-main .swiper-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Grid gallery */
.rahm-gallery-grid__item {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	position: relative;
}
.rahm-gallery-grid__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Pagination dots — outside the main slider, below it */
.rahm-gallery-wrapper {
	display: flex;
	flex-direction: column;
}
.rahm-gallery-pagination {
	position: static !important;
	text-align: center;
	padding: 8px 0 4px;
}
.rahm-gallery-pagination .swiper-pagination-bullet {
	background: #999;
	opacity: 1;
}
.rahm-gallery-pagination .swiper-pagination-bullet-active {
	background: #333;
}

/* Thumbnail strip — custom classes, no Swiper interference */
.rahm-gallery-thumbs {
	margin-top: 8px;
	overflow: hidden;
	box-sizing: border-box;
}
.rahm-thumb-track {
	display: flex;
	flex-wrap: nowrap;
	box-sizing: border-box;
}
.rahm-thumb-item {
	cursor: pointer;
	overflow: hidden;
	border-radius: 4px;
	background: #111;
	box-sizing: border-box;
	flex-shrink: 0;
}
.rahm-thumb-item.rahm-thumb-active {
	outline: 3px solid var(--rahm-primary, #003366);
	outline-offset: -3px;
}
.rahm-thumb-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ==========================================================================
   Gallery Widget — Navigation Arrow Base Styles
   These make Swiper arrow buttons accept background/shape/size from Elementor.
   Color, background-color, border-radius, and width/height are overridden
   by Elementor's generated CSS via the Navigation Arrows style panel.
   ========================================================================== */

.rahm-gallery-wrapper .swiper-button-next,
.rahm-gallery-wrapper .swiper-button-prev {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.45);
	transition: background-color 0.2s ease, opacity 0.2s ease;
	top: 50%;
	transform: translateY(-50%);
}

.rahm-gallery-wrapper .swiper-button-next::after,
.rahm-gallery-wrapper .swiper-button-prev::after {
	font-size: 22px;
	color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════════
   Stats Bar Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-stats-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	border-radius: 8px;
	overflow: hidden;
}

.rahm-stats-bar__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 18px 24px;
	flex: 1 1 0;
	min-width: 110px;
	text-align: center;
}

.rahm-stats-bar__icon svg {
	width: 28px;
	height: 28px;
}

.rahm-stats-bar__value {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
}

.rahm-stats-bar__label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.75;
}

.rahm-stats-bar__divider {
	width: 1px;
	align-self: stretch;
	margin: 10px 0;
}

@media (max-width: 600px) {
	.rahm-stats-bar__item {
		min-width: 80px;
		padding: 12px 10px;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Details Table Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-details-table__heading {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-details-table__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
}

.rahm-details-table__row {
	display: contents;
}

.rahm-details-table__label,
.rahm-details-table__value {
	padding: 10px 14px;
	font-size: 14px;
}

.rahm-details-table__label {
	font-weight: 600;
}

.rahm-details-table__status {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 600;
}

@media (max-width: 480px) {
	.rahm-details-table__grid {
		grid-template-columns: 1fr;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Additional Details Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-addl-details__heading {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-addl-details__grid {
	display: grid;
	gap: 0;
}

.rahm-addl-details__item {
	display: flex;
	justify-content: space-between;
	padding: 10px 14px;
	font-size: 14px;
}

.rahm-addl-details__key {
	font-weight: 600;
}

@media (max-width: 600px) {
	.rahm-addl-details__grid {
		grid-template-columns: 1fr !important;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Features Icons Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-features-icons__heading {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-features-icons__grid {
	display: grid;
	gap: 10px 16px;
}

.rahm-features-icons__item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 1.4;
}

.rahm-features-icons__circle {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid currentColor;
	display: flex;
	align-items: center;
	justify-content: center;
}

.rahm-features-icons__circle--yes {
	color: #c8a157;
	background-color: rgba(200, 161, 87, 0.12);
}

.rahm-features-icons__circle--no {
	color: #cccccc;
}

.rahm-features-icons__circle svg {
	width: 14px;
	height: 14px;
}

@media (max-width: 600px) {
	.rahm-features-icons__grid {
		grid-template-columns: 1fr 1fr !important;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Mortgage Calculator Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-mortgage {
	border-radius: 8px;
}

.rahm-mortgage__heading {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-mortgage__body {
	display: flex;
	gap: 30px;
	flex-wrap: wrap;
}

.rahm-mortgage__chart-col {
	flex: 0 0 220px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.rahm-mortgage__total {
	font-size: 28px;
	font-weight: 700;
	text-align: center;
}

.rahm-mortgage__total small {
	display: block;
	font-size: 12px;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.65;
}

.rahm-mortgage__fields-col {
	flex: 1 1 280px;
}

.rahm-mortgage__field {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.rahm-mortgage__field label {
	flex: 0 0 140px;
	font-size: 13px;
	font-weight: 600;
}

.rahm-mortgage__field input {
	flex: 1;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	padding: 8px 10px;
	font-size: 14px;
	background: #fff;
}

.rahm-mortgage__field input:focus {
	outline: none;
	border-color: var(--rahm-accent, #c8a157);
	box-shadow: 0 0 0 2px rgba(200, 161, 87, 0.2);
}

.rahm-mortgage__breakdown {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.rahm-mortgage__bd-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
}

.rahm-mortgage__bd-swatch {
	width: 12px;
	height: 12px;
	border-radius: 2px;
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.rahm-mortgage__body {
		flex-direction: column;
	}
	.rahm-mortgage__chart-col {
		flex: 0 0 auto;
	}
	.rahm-mortgage__field label {
		flex: 0 0 110px;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Floor Plans Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-floor-plans__heading {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 16px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-floor-plans__item {
	border: 1px solid #f0f0f0;
	border-radius: 6px;
	margin-bottom: 8px;
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.rahm-floor-plans__item:hover {
	border-color: #d0d0d0;
}

.rahm-floor-plans__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.2s ease;
}

.rahm-floor-plans__header:hover {
	background-color: rgba(0, 0, 0, 0.02);
}

.rahm-floor-plans__icon {
	font-size: 18px;
	flex-shrink: 0;
}

.rahm-floor-plans__name {
	font-weight: 700;
	font-size: 15px;
	flex-shrink: 0;
}

.rahm-floor-plans__stats {
	display: flex;
	gap: 16px;
	margin-left: auto;
	font-size: 13px;
	color: #666;
}

.rahm-floor-plans__stats span {
	white-space: nowrap;
}

.rahm-floor-plans__toggle {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	transition: transform 0.2s ease;
}

.rahm-floor-plans__item--open .rahm-floor-plans__toggle {
	transform: rotate(180deg);
}

@media (max-width: 600px) {
	.rahm-floor-plans__stats {
		display: none;
	}
}

/* ═══════════════════════════════════════════════════════════════
   Enquire Form Widget
   ═══════════════════════════════════════════════════════════════ */
.rahm-enquire {
	border-radius: 8px;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
	overflow: hidden;
}

.rahm-enquire__heading {
	font-size: 20px;
	font-weight: 700;
	padding: 18px 24px 14px;
	margin: 0;
	border-bottom: 3px solid var(--rahm-accent, #c8a157);
}

.rahm-enquire__body {
	padding: 24px;
}

.rahm-enquire--side .rahm-enquire__body {
	display: flex;
	gap: 30px;
}

.rahm-enquire--stacked .rahm-enquire__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* Agent card within enquire */
.rahm-enquire__agent {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	flex: 0 0 200px;
}

.rahm-enquire__photo {
	border-radius: 50%;
	object-fit: cover;
}

.rahm-enquire__agent-name {
	font-size: 17px;
	font-weight: 700;
}

.rahm-enquire__agent-title {
	font-size: 13px;
	color: #888;
}

.rahm-enquire__agent-phone a {
	color: inherit;
	text-decoration: none;
	font-size: 14px;
}

.rahm-enquire__agent-phone a:hover {
	text-decoration: underline;
}

/* Form */
.rahm-enquire__form-wrap {
	flex: 1 1 auto;
}

.rahm-enquire__form-title {
	font-size: 16px;
	font-weight: 700;
	margin: 0 0 14px;
}

.rahm-enquire__input {
	display: block;
	width: 100%;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	padding: 10px 12px;
	font-size: 14px;
	margin-bottom: 12px;
	background: #fff;
	box-sizing: border-box;
}

.rahm-enquire__input:focus {
	outline: none;
	border-color: var(--rahm-accent, #c8a157);
	box-shadow: 0 0 0 2px rgba(200, 161, 87, 0.2);
}

.rahm-enquire__textarea {
	resize: vertical;
	min-height: 80px;
}

.rahm-enquire__btn {
	display: inline-block;
	padding: 12px 28px;
	border: none;
	border-radius: 4px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s ease;
	width: 100%;
}

.rahm-enquire__btn:hover {
	opacity: 0.88;
}

.rahm-enquire__btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.rahm-enquire__status {
	margin-top: 10px;
	font-size: 14px;
}

@media (max-width: 600px) {
	.rahm-enquire--side .rahm-enquire__body {
		flex-direction: column;
	}
	.rahm-enquire__agent {
		flex: 0 0 auto;
	}
}
