/* ==========================================================================
   Christmas booking pop-up form (markup: inc/christmas-booking-popup.php)
   Christmas Photography page only. Form fields come from Contact Form 7.
   ========================================================================== */

.xbp {
	--xbp-bg: #fbf5ee;
	--xbp-red: #8b1d2c;
	--xbp-red-dark: #741624;
	--xbp-gold: #b8935a;
	--xbp-gold-soft: #d8c3a2;
	--xbp-ink: #2d2622;
	--xbp-ink-soft: #5e4a40;
	--xbp-field: #fffdf9;
	--xbp-border: #cdb89a;
	--xbp-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
	--xbp-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility 0s linear .3s;
}
.xbp[hidden] { display: none; }
.xbp.is-open { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
html.xbp-lock, html.xbp-lock body { overflow: hidden; }
.xbp *, .xbp *::before, .xbp *::after { box-sizing: border-box; }

.xbp__overlay {
	position: absolute;
	inset: 0;
	background: rgba(55, 44, 38, .55);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	cursor: pointer;
}

/* ---------- Dialog ---------- */
.xbp__dialog {
	position: relative;
	display: grid;
	grid-template-columns: 43% 57%;
	width: 100%;
	max-width: 1120px;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow: hidden;
	padding: 6px;
	background: var(--xbp-bg);
	background-image: radial-gradient(110% 80% at 70% 15%, #fffaf4 0%, var(--xbp-bg) 60%, #f6ebdf 100%);
	border: 1px solid #e9dccb;
	border-radius: 22px;
	box-shadow: 0 30px 80px rgba(40, 25, 20, .35), 0 6px 18px rgba(40, 25, 20, .18);
	color: var(--xbp-ink);
	font-variant-numeric: lining-nums;
	transform: translateY(16px) scale(.97);
	transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
.xbp.is-open .xbp__dialog { transform: none; }

.xbp__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	width: 42px;
	height: 42px;
	padding: 0;
	display: grid;
	place-items: center;
	border-radius: 50%;
	border: 1.5px solid #3a2e29;
	background: #fff;
	color: #1f1714;
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease;
}
.xbp__close:hover { transform: rotate(90deg); background: #fbf4ee; }
.xbp__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Photo ---------- */
.xbp__media {
	position: relative;
	overflow: hidden;
	border-radius: 16px 0 0 16px;
	min-height: 100%;
}
.xbp__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 40%;
	display: block;
}

/* ---------- Content ---------- */
.xbp__content {
	position: relative;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	padding: 34px 48px 26px 44px;
	text-align: center;
}

.xbp__eyebrow {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin: 0 0 10px;
	font-family: var(--xbp-sans);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .24em;
	text-transform: uppercase;
	color: var(--xbp-gold);
}
.xbp__eyebrow::before,
.xbp__eyebrow::after,
.xbp__terms::before,
.xbp__terms::after,
.xbp__divider::before,
.xbp__divider::after {
	content: "";
	height: 1px;
	background: var(--xbp-gold-soft);
}
.xbp__eyebrow::before, .xbp__eyebrow::after { width: 48px; flex: none; }

.xbp__title {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--xbp-serif);
	font-weight: 500;
	font-size: clamp(30px, 3vw, 40px);
	line-height: 1.1;
	letter-spacing: -.005em;
	color: var(--xbp-red);
	text-transform: none;
}
.xbp__subtitle {
	margin: 10px 0 0;
	font-family: var(--xbp-serif);
	font-style: italic;
	font-size: clamp(20px, 2vw, 27px);
	line-height: 1.2;
	color: var(--xbp-ink);
}
.xbp__subtitle em { font-style: italic; }

.xbp__divider {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 10px auto 6px;
	width: min(240px, 70%);
}
.xbp__divider::before, .xbp__divider::after { flex: 1; }
.xbp__divider svg { width: 20px; height: 20px; fill: var(--xbp-gold); }

/* ---------- CF7 form ---------- */
.xbp__form .wpcf7 { margin: 0; }
.xbp__form form { margin: 0; text-align: left; }
.xbp__form form > p { margin: 0; }
/* CF7 wraps the fields in <p>/<br> (auto-paragraphs); keep them out of the layout */
.xbp__form .xbp-fields > p,
.xbp__form .xbp-submit-wrap > p { display: contents; }
.xbp__form br { display: none; }
.xbp-fields { display: grid; gap: 12px; }

/* Desktop: Email + Phone side by side, Name and Package full width */
@media (min-width: 861px) {
	.xbp-fields { grid-template-columns: 1fr 1fr; column-gap: 14px; }
	.xbp-field { grid-column: 1 / -1; min-width: 0; }
	.xbp-field:has([data-name="your-email"]),
	.xbp-field:has([data-name="your-phone"]) { grid-column: auto; }
}

.xbp-field { display: block; margin: 0; cursor: default; }
.xbp-label {
	display: block;
	margin-bottom: 6px;
	font-family: var(--xbp-sans);
	font-size: 15px;
	font-weight: 500;
	color: var(--xbp-ink);
}
.xbp-field .wpcf7-form-control-wrap { display: block; position: relative; }

.xbp__form input.wpcf7-form-control:not([type="submit"]),
.xbp__form select.wpcf7-form-control {
	display: block;
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--xbp-border);
	border-radius: 8px;
	background: var(--xbp-field);
	box-shadow: none;
	font-family: var(--xbp-serif);
	font-size: 18px;
	font-variant-numeric: lining-nums;
	color: var(--xbp-ink);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.xbp__form input.wpcf7-form-control::placeholder { color: #8d7a6c; opacity: 1; }
.xbp__form select.wpcf7-form-control {
	padding-right: 44px;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d2622' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
}
.xbp__form select.wpcf7-form-control:invalid,
.xbp__form select.wpcf7-form-control.is-placeholder { color: #8d7a6c; }
.xbp__form input.wpcf7-form-control:focus,
.xbp__form select.wpcf7-form-control:focus {
	outline: none;
	border-color: var(--xbp-gold);
	box-shadow: 0 0 0 3px rgba(184, 147, 90, .22);
}
.xbp__form .wpcf7-not-valid { border-color: #c0392b !important; }
.xbp__form span.wpcf7-not-valid-tip {
	position: static; /* site-wide CSS positions tips inside the input */
	display: block;
	margin-top: 4px;
	top: auto;
	right: auto;
	font-family: var(--xbp-sans);
	font-size: 12.5px;
	color: #b3261e;
}

/* Submit */
.xbp-submit-wrap { position: relative; margin-top: 16px; }
.xbp__form .xbp-submit,
.xbp__form input[type="submit"].xbp-submit {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #9a2333 0%, var(--xbp-red-dark) 100%);
	box-shadow: 0 8px 18px rgba(116, 22, 36, .28);
	font-family: var(--xbp-sans);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
	transition: transform .2s ease, filter .2s ease;
}
.xbp__form .xbp-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
.xbp__form .xbp-submit:focus-visible { outline: 3px solid var(--xbp-gold); outline-offset: 3px; }
.xbp__form .xbp-submit:disabled { opacity: .7; cursor: wait; }
.xbp__form .wpcf7-spinner {
	position: absolute;
	top: 50%;
	right: 16px;
	margin: -12px 0 0;
	background-color: rgba(255, 255, 255, .85);
}
.xbp__form .wpcf7-response-output {
	margin: 12px 0 0 !important;
	padding: 10px 14px !important;
	border-radius: 8px;
	font-family: var(--xbp-sans);
	font-size: 13.5px;
	line-height: 1.45;
	text-align: center;
}
.xbp__form .wpcf7 form.invalid .wpcf7-response-output,
.xbp__form .wpcf7 form.unaccepted .wpcf7-response-output { border-color: #d8a24a; background: #fff8ec; color: #6b4a12; }
.xbp__form .wpcf7 form.failed .wpcf7-response-output,
.xbp__form .wpcf7 form.aborted .wpcf7-response-output,
.xbp__form .wpcf7 form.spam .wpcf7-response-output { border-color: #c0392b; background: #fdf0ee; color: #8b1d1d; }

/* Thank-you state */
.xbp__thanks { padding: 28px 10px 10px; }
.xbp__thanks[hidden] { display: none; }
.xbp__thanks svg { width: 64px; height: 64px; fill: none; stroke: var(--xbp-red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.xbp__thanks h3 { margin: 10px 0 6px; font-family: var(--xbp-serif); font-size: 34px; font-weight: 600; color: var(--xbp-red); }
.xbp__thanks p { margin: 0 auto; max-width: 420px; font-family: var(--xbp-serif); font-size: 20px; line-height: 1.4; color: var(--xbp-ink); }
.xbp__thanks-btn {
	margin-top: 22px;
	padding: 12px 36px;
	border: 0;
	border-radius: 999px;
	background: linear-gradient(180deg, #a5875f 0%, #8c6f4b 100%);
	font-family: var(--xbp-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff;
	cursor: pointer;
}
.xbp.is-sent .xbp__form { display: none; }

/* Footer lines */
.xbp__terms {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 16px 0 0;
	font-family: var(--xbp-serif);
	font-style: italic;
	font-size: 17px;
	color: var(--xbp-ink);
}
.xbp__terms::before, .xbp__terms::after { flex: 1; }

/* ---------- Short laptop screens ---------- */
@media (min-width: 861px) and (max-height: 860px) {
	.xbp__content { padding-top: 22px; padding-bottom: 18px; }
	.xbp__eyebrow { margin-bottom: 6px; font-size: 12px; }
	.xbp__title { font-size: 36px; }
	.xbp__subtitle { margin-top: 4px; font-size: 22px; }
	.xbp__divider { margin: 6px auto 2px; }
	.xbp-fields { gap: 8px; }
	.xbp-label { margin-bottom: 4px; font-size: 14px; }
	.xbp__form input.wpcf7-form-control:not([type="submit"]),
	.xbp__form select.wpcf7-form-control { height: 42px; font-size: 17px; }
	.xbp-submit-wrap { margin-top: 12px; }
	.xbp__form .xbp-submit { height: 46px; }
	.xbp__terms { margin-top: 10px; font-size: 16px; }
}

/* ---------- Tablet & mobile: stacked ---------- */
@media (max-width: 860px) {
	.xbp { padding: 12px; }
	.xbp__dialog {
		grid-template-columns: 1fr;
		max-width: 560px;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
		overflow-y: auto;
		overscroll-behavior: contain;
		border-radius: 18px;
	}
	.xbp__media { height: clamp(150px, 26vh, 260px); min-height: 0; border-radius: 13px 13px 0 0; }
	.xbp__media img { object-position: 50% 55%; } /* keep the baby's face in the short banner crop */
	.xbp__content { overflow: visible; padding: 20px 22px 20px; }
	.xbp__close { top: 12px; right: 12px; width: 38px; height: 38px; }
	.xbp__close svg { width: 18px; height: 18px; }
	.xbp__eyebrow { font-size: 11.5px; gap: 10px; }
	.xbp__eyebrow::before, .xbp__eyebrow::after { width: 30px; }
	.xbp__title { font-size: clamp(26px, 7vw, 36px); }
	.xbp__subtitle { font-size: clamp(18px, 4.8vw, 23px); }
}

@media (max-width: 420px) {
	.xbp { padding: 8px; }
	.xbp__dialog { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 5px; }
	.xbp__media { height: clamp(130px, 20vh, 180px); }
	.xbp__content { padding: 16px 14px 16px; }
	.xbp-fields { gap: 9px; }
	.xbp-label { font-size: 14px; margin-bottom: 4px; }
	.xbp__form input.wpcf7-form-control:not([type="submit"]),
	.xbp__form select.wpcf7-form-control { height: 44px; font-size: 17px; padding: 0 12px; }
	.xbp__form select.wpcf7-form-control { padding-right: 38px; background-position: right 10px center; } /* dropdown is enough on small phones */
	.xbp__form .xbp-submit { font-size: 15px; letter-spacing: .12em; }
	.xbp__terms { font-size: 15px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.xbp, .xbp__dialog, .xbp__close, .xbp__form .xbp-submit { transition: none; }
}

/* ==========================================================================
   Christmas page contact section form ("Christmas Page Enquiry", #contact)
   Markup comes from CF7 (inc/christmas-enquiry-form.php); base styles are the
   site's .home-gormc / .cta-form rules in custom.css. Layout (tablet/desktop):
   Name (full width) / Email | Mobile / Package (full width). Phones: stacked.
   ========================================================================== */
@media (min-width: 768px) {
	.xmas-enquiry .cta-form .form-input:nth-child(1) { grid-column: 1 / -1; }
}
.xmas-enquiry .form-input-select { margin-bottom: 0; }
.xmas-enquiry .cta-form input,
.xmas-enquiry .cta-form select { font-variant-numeric: lining-nums; }
.xmas-enquiry .wpcf7-form-control-wrap select option { color: var(--charcoal, #2d2d2d); }
