/**
 * Bookd – frontend design layer.
 *
 * Loaded after recrm-public.css. Everything is scoped to .recrm-app (the
 * wrapper around both shortcodes) or body.recrm-page, so the plugin never
 * restyles the rest of the site and looks the same in any theme.
 */

/* =========================================================
   Design tokens
   ========================================================= */
.recrm-app,
.recrm-contact-popup {
	--recrm-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--recrm-ink: #121212;
	--recrm-text: #3f3d3a;
	--recrm-muted: #787571;
	--recrm-card: #faf8f5;
	--recrm-line: rgba(197, 160, 89, 0.28);
	--recrm-gold: #c5a059;
	--recrm-navy: #0f4c81;
	--recrm-radius: 10px;
	--recrm-max: 1240px;
}

/* =========================================================
   Page chrome (theme title, spacing, full-width layout)
   ========================================================= */

/* Classic themes: hide the page title (block themes have it removed in PHP). */
body.recrm-hide-title .entry-header,
body.recrm-hide-title .entry-title,
body.recrm-hide-title .page-header .page-title,
body.recrm-hide-title h1.page-title,
body.recrm-hide-title .page-header-title {
	display: none !important;
}

/* OceanWP prints the title in its own page header band. */
body.recrm-hide-title.recrm-tight header.page-header {
	display: none !important;
}

/* Classic themes: no empty gap or box above Bookd pages (Settings → Theme spacing). */
body.recrm-tight #primary.content-area,
body.recrm-tight .site-main,
body.recrm-tight #content-wrap {
	margin-top: 0 !important;
	padding-top: 0 !important;
}
body.recrm-tight .entry-content-wrap,
body.recrm-tight .inside-article,
body.recrm-tight .ast-article-single {
	padding-top: 0 !important;
}
body.recrm-tight .inside-article > .entry-content,
body.recrm-tight .entry-content-wrap > .entry-content {
	margin-top: 0 !important;
}
body.recrm-tight article.entry.content-bg,
body.recrm-tight .inside-article,
body.recrm-tight .ast-separate-container .ast-article-single {
	background: transparent !important;
	box-shadow: none !important;
}
body.recrm-tight .entry-hero {
	display: none !important;
}

/* Block themes: remove the empty top gap the title used to sit in. */
body.recrm-page .wp-site-blocks > main,
body.recrm-page .wp-site-blocks > main > .wp-block-group:first-child,
body.recrm-page .wp-site-blocks > main > .wp-block-post-content,
body.recrm-page .wp-site-blocks > main .entry-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}
body.recrm-page .wp-site-blocks > main {
	margin-bottom: 0 !important;
}

/* Full-bleed sections must not cause a sideways scrollbar. */
body.recrm-page {
	overflow-x: clip;
}

/* Never let the theme squeeze our wrapper into its narrow text column. */
.recrm-app {
	max-width: none !important;
	width: 100%;
	font-family: var(--recrm-font);
	color: var(--recrm-text);
	box-sizing: border-box;
}
.recrm-app *,
.recrm-app *::before,
.recrm-app *::after {
	box-sizing: border-box;
}

/* =========================================================
   Hero (listing page) – full screen width
   ========================================================= */
.recrm-app .recrm-hero {
	position: relative;
	width: 100vw;
	max-width: 100vw !important;
	margin: 0 0 0 calc(50% - 50vw) !important;
	min-height: clamp(380px, 52vh, 520px);
	display: flex;
	align-items: stretch;
	background: #1d2b3a url('../images/hero.jpg') center / cover no-repeat;
}
.recrm-app .recrm-overlay {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 64px 24px;
	background: linear-gradient(180deg, rgba(10, 18, 30, 0.35) 0%, rgba(10, 18, 30, 0.62) 100%);
}
.recrm-app .recrm-hero-content {
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	text-align: center;
	color: #fff;
}
.recrm-app .recrm-hero-content h1 {
	margin: 0 0 12px;
	font-family: var(--recrm-font);
	font-size: clamp(30px, 4.2vw, 50px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #fff;
}
.recrm-app .recrm-hero-content p {
	margin: 0;
	font-size: clamp(15px, 1.4vw, 18px);
	font-weight: 400;
	color: rgba(255, 255, 255, 0.88);
	letter-spacing: 0.02em;
}

/* Search bar */
.recrm-app .recrm-search-form {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 8px;
	max-width: 860px;
	margin: 32px auto 0;
	padding: 8px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
	backdrop-filter: none;
}
.recrm-app .recrm-search-form input,
.recrm-app .recrm-search-form select {
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #e7e2da;
	border-radius: 10px;
	background-color: #fff;
	font-family: var(--recrm-font);
	font-size: 15px;
	color: var(--recrm-ink);
	box-shadow: none;
	outline: none;
}
.recrm-app .recrm-search-form select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 36px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23787571' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}
.recrm-app .recrm-search-form input:focus,
.recrm-app .recrm-search-form select:focus {
	border-color: var(--recrm-gold);
	box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.18);
}
.recrm-app .recrm-search-form button {
	height: 48px;
	margin: 0;
	padding: 0 28px;
	border: 0;
	border-radius: 10px;
	background: var(--recrm-ink);
	color: #fff;
	font-family: var(--recrm-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease;
}
.recrm-app .recrm-search-form button:hover {
	background: var(--recrm-gold);
	color: var(--recrm-ink);
}

/* =========================================================
   Results toolbar
   ========================================================= */
.recrm-app .recrm-container {
	max-width: var(--recrm-max);
	margin: 0 auto;
	padding: 40px 24px 64px;
}
.recrm-app .recrm-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 24px;
	padding: 0;
}
.recrm-app .recrm-results h2 {
	margin: 0;
	font-family: var(--recrm-font);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--recrm-ink);
	letter-spacing: -0.01em;
}
.recrm-app .recrm-sort select {
	height: 40px;
	padding: 0 34px 0 12px;
	border: 1px solid #e0dbd2;
	border-radius: 8px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23787571' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--recrm-font);
	font-size: 14px;
	color: var(--recrm-ink);
	cursor: pointer;
}

/* =========================================================
   Property grid – equal-height cards
   ========================================================= */
.recrm-app .recrm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 24px;
	align-items: stretch;
}
.recrm-app .recrm-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	margin: 0 !important;
	background: var(--recrm-card);
	border: 1px solid var(--recrm-line);
	border-radius: var(--recrm-radius);
	overflow: hidden;
	box-shadow: 0 10px 28px -14px rgba(18, 18, 18, 0.18);
	font-family: var(--recrm-font);
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.recrm-app .recrm-card:hover {
	transform: translateY(-4px);
	border-color: var(--recrm-gold);
	box-shadow: 0 22px 44px -18px rgba(197, 160, 89, 0.4);
}

/* Image: fixed ratio so every card starts the same */
.recrm-app a.recrm-card-image {
	position: relative;
	display: block;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #eeebe5;
}
.recrm-app .recrm-card-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.recrm-app .recrm-card:hover .recrm-card-image img {
	transform: scale(1.05);
}
.recrm-app .recrm-no-image {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	background: linear-gradient(135deg, #efebe4, #e5dfd5);
	color: var(--recrm-muted);
	font-size: 13px;
	letter-spacing: 0.04em;
}
.recrm-app .recrm-badge-featured {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--recrm-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
}

/* Body: column layout; the features + button always sit at the bottom */
.recrm-app .recrm-card-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: 18px 20px 20px;
}
.recrm-app .recrm-price {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--recrm-navy);
	letter-spacing: -0.01em;
}
.recrm-app .recrm-card h3 {
	margin: 0 0 8px;
	font-family: var(--recrm-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	color: var(--recrm-ink);
	/* Always reserve two lines so titles of any length align */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: calc(1.4em * 2);
}
.recrm-app .recrm-card h3 a {
	color: inherit;
	text-decoration: none;
}
.recrm-app .recrm-card h3 a:hover {
	color: var(--recrm-navy);
}
.recrm-app .recrm-card-body > p {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--recrm-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.recrm-app .recrm-card-body > p i {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--recrm-gold);
}

.recrm-app .recrm-features {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start !important;
	gap: 6px 16px;
	margin: auto 0 0;
	padding: 12px 0;
	border-top: 1px solid var(--recrm-line);
	border-bottom: 1px solid var(--recrm-line);
	min-height: 46px;
}
.recrm-app .recrm-features span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: var(--recrm-text);
	white-space: nowrap;
}
.recrm-app .recrm-features i {
	font-size: 13px;
	color: var(--recrm-muted);
}

.recrm-app .recrm-card-buttons {
	margin-top: 16px !important;
}
.recrm-app .recrm-card-buttons > a {
	height: 42px !important;
	min-height: 42px !important;
	border-radius: 6px !important;
	font-size: 12px !important;
	letter-spacing: 0.06em !important;
}
/* "View details" takes the row; WhatsApp becomes a compact icon button */
.recrm-app .recrm-card-buttons > a.recrm-btn-details {
	flex: 1 1 auto !important;
	width: auto !important;
}
.recrm-app .recrm-card-buttons > a.recrm-btn-whatsapp {
	flex: 0 0 42px !important;
	width: 42px !important;
	padding: 0 !important;
	gap: 0 !important;
}
.recrm-app .recrm-card-buttons > a.recrm-btn-whatsapp .recrm-btn-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
}
.recrm-app .recrm-card-buttons > a.recrm-btn-whatsapp .recrm-btn-icon {
	font-size: 18px !important;
	margin: 0 !important;
}

/* Empty state */
.recrm-app .recrm-no-results {
	padding: 56px 16px;
	text-align: center;
	background: var(--recrm-card);
	border: 1px dashed var(--recrm-line);
	border-radius: var(--recrm-radius);
	color: var(--recrm-muted);
	font-size: 15px;
}

/* =========================================================
   Single property page
   ========================================================= */
.recrm-app--property .recrm-single-property {
	padding-top: 28px;
}
.recrm-app .recrm-enquire-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 46px;
	margin-bottom: 14px;
	border: 0;
	border-radius: 6px;
	background: var(--recrm-ink);
	color: #fff;
	font-family: var(--recrm-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.recrm-app .recrm-enquire-btn:hover {
	background: var(--recrm-gold);
	color: var(--recrm-ink);
}
.recrm-contact-whatsapp i,
.recrm-contact-call i {
	margin-right: 6px;
}

/* =========================================================
   Enquiry popup – full-screen fade
   ========================================================= */
.recrm-contact-popup {
	position: fixed !important;
	inset: 0 !important;
	width: 100vw !important;
	max-width: none !important;
	height: 100vh !important;
	height: 100dvh !important;
	margin: 0 !important;
	z-index: 999999 !important;
}
.recrm-contact-popup .recrm-contact-popup-overlay {
	position: fixed !important;
	inset: 0 !important;
	background: rgba(12, 14, 18, 0.62) !important;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: recrmFadeIn 0.25s ease;
}
@keyframes recrmFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
body.recrm-popup-open {
	overflow: hidden;
}

/* =========================================================
   Utilities
   ========================================================= */
.recrm-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
.recrm-app .screen-reader-text,
.recrm-contact-popup .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	border: 0;
	word-wrap: normal !important;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
	.recrm-app .recrm-search-form {
		grid-template-columns: 1fr 1fr;
	}
	.recrm-app .recrm-search-form input {
		grid-column: 1 / -1;
	}
	.recrm-app .recrm-search-form button {
		grid-column: 1 / -1;
	}
}
@media (max-width: 600px) {
	.recrm-app .recrm-overlay {
		padding: 48px 16px;
	}
	.recrm-app .recrm-search-form {
		grid-template-columns: 1fr;
	}
	/* Themes already add side gutters on phones; don't double them. */
	.recrm-app .recrm-container {
		padding: 28px 0 48px;
	}
	.recrm-app .recrm-toolbar {
		flex-direction: row;
		align-items: center;
		gap: 10px;
	}
	.recrm-app .recrm-results h2 {
		font-size: 16px;
		white-space: nowrap;
	}
	.recrm-app .recrm-sort select {
		font-size: 13px;
	}
	.recrm-app .recrm-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
}
