/* =====================================================================
   Site Popup — Cavendish Beach brand
   Editable via wp-admin → Popup (ACF options page).
   ===================================================================== */

:root {
	--cav-popup-teal: #57C3BD;
	--cav-popup-teal-dark: #3fa9a3;
	--cav-popup-gold: #F5AF27;
	--cav-popup-cream: #F6EEE1;
	--cav-popup-card: #ffffff;
	--cav-popup-ink: #2c2a26;
	--cav-popup-muted: #726658;
}

.cav-popup {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cav-popup[hidden] {
	display: none;
}

.cav-popup.is-visible {
	opacity: 1;
	visibility: visible;
}

.cav-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 20, 0.55);
	cursor: pointer;
}

/* --- Dialog --------------------------------------------------------- */
.cav-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: var(--cav-popup-cream);
	border-radius: 18px;
	padding: 40px 44px 32px;
	box-shadow: 0 30px 80px rgba(28, 25, 20, 0.35);
	text-align: center;
	transform: translateY(12px);
	transition: transform 0.3s ease;
}

.cav-popup.is-visible .cav-popup__dialog {
	transform: translateY(0);
}

/* --- Close button --------------------------------------------------- */
.cav-popup__close {
	position: absolute;
	top: 18px;
	right: 18px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(114, 102, 88, 0.12);
	color: var(--cav-popup-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.cav-popup__close:hover,
.cav-popup__close:focus {
	background: rgba(114, 102, 88, 0.22);
	color: var(--cav-popup-ink);
}

/* --- Header --------------------------------------------------------- */
.cav-popup__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 17px;
	color: var(--cav-popup-ink);
}

.cav-popup__brand-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--cav-popup-gold);
}

.cav-popup__eyebrow {
	margin: 14px 0 6px;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--cav-popup-muted);
}

.cav-popup__heading {
	margin: 0;
	font-family: Cruz, Georgia, serif;
	font-size: 46px;
	line-height: 1.05;
	color: var(--cav-popup-ink);
}

.cav-popup__subheading {
	margin: 12px auto 0;
	max-width: 460px;
	font-family: "Gotham", sans-serif;
	font-size: 17px;
	line-height: 1.5;
	color: var(--cav-popup-muted);
}

/* --- Card ----------------------------------------------------------- */
.cav-popup__card {
	display: flex;
	margin-top: 26px;
	text-align: left;
	background: var(--cav-popup-card);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 12px 30px rgba(28, 25, 20, 0.08);
}

.cav-popup__media {
	position: relative;
	flex: 0 0 42%;
	min-height: 240px;
	background: #eef3ec;
}

.cav-popup__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cav-popup__media-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cav-popup-teal);
	background: repeating-linear-gradient(
		45deg,
		#e7f0e4,
		#e7f0e4 14px,
		#dfeadb 14px,
		#dfeadb 28px
	);
}

.cav-popup__badge {
	position: absolute;
	top: 16px;
	left: 16px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--cav-popup-teal);
	color: #fff;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cav-popup__body {
	flex: 1;
	padding: 30px 32px;
}

.cav-popup__label {
	margin: 0 0 8px;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--cav-popup-teal);
}

.cav-popup__title {
	margin: 0 0 12px;
	font-family: Cruz, Georgia, serif;
	font-size: 34px;
	line-height: 1.1;
	color: var(--cav-popup-ink);
}

.cav-popup__desc {
	margin: 0 0 22px;
	font-family: "Gotham", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: var(--cav-popup-muted);
}

/* --- Button --------------------------------------------------------- */
.cav-popup__button {
	display: inline-block;
	padding: 15px 30px;
	border-radius: 999px;
	background: var(--cav-popup-teal);
	color: #fff !important;
	font-family: GothamBold, "Gotham", sans-serif;
	font-size: 15px;
	text-decoration: none;
	transition: background 0.25s ease;
}

.cav-popup__button:hover,
.cav-popup__button:focus {
	background: var(--cav-popup-gold);
	color: #fff !important;
}

/* --- Footer actions ------------------------------------------------- */
.cav-popup__dismiss {
	display: inline-block;
	margin: 26px auto 0;
	padding: 0;
	border: none;
	background: none;
	font-family: "Gotham", sans-serif;
	font-size: 15px;
	color: var(--cav-popup-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.cav-popup__dismiss:hover {
	color: var(--cav-popup-muted);
}

.cav-popup__note {
	margin: 14px 0 0;
	font-family: "Gotham", sans-serif;
	font-style: italic;
	font-size: 13px;
	color: rgba(114, 102, 88, 0.7);
}

/* --- Responsive ----------------------------------------------------- */
@media (max-width: 600px) {
	.cav-popup {
		padding: 14px;
	}

	.cav-popup__dialog {
		padding: 32px 20px 24px;
		border-radius: 14px;
	}

	.cav-popup__heading {
		font-size: 32px;
	}

	.cav-popup__card {
		flex-direction: column;
	}

	.cav-popup__media {
		flex-basis: auto;
		min-height: 170px;
	}

	.cav-popup__body {
		padding: 24px 22px;
	}

	.cav-popup__title {
		font-size: 27px;
	}
}
