/**
 * Bananchal Farms — Contact Form 7 styling, plus the Book Now page.
 *
 * Loaded on the Contact and Book Now pages. CF7 ships almost no CSS of its own and
 * wraps everything in <p> by default, so most of the work here is undoing that and
 * making its inputs look like the rest of the theme.
 *
 * rgba() values repeat the RGB of --bf-green-darker (#12301b) and --bf-amber
 * (#f5b715); custom properties cannot be used inside rgba().
 *
 * 1. CF7 reset
 * 2. Fields
 * 3. Validation + response messages
 * 4. Book Now hero
 * 5. Book Now layout
 * 6. Responsive
 */

/* ==========================================================================
   1. CF7 reset — the plugin's own wrappers get in the way of the grid
   ========================================================================== */

.bf-cf7 .wpcf7-form-control-wrap {
	display: block;
}

/* CF7 auto-inserts <br> and wraps rows in <p>; neither suits a Bootstrap grid. */
.bf-cf7 .wpcf7-form > p,
.bf-cf7 .wpcf7-form > br,
.bf-cf7 .row > br {
	display: none;
}

.bf-cf7__notice {
	padding: 0.9rem 1.1rem;
	border-left: 3px solid var(--bf-amber);
	background-color: var(--bf-sand);
	color: var(--bf-ink);
	font-size: 0.95rem;
}

/* ==========================================================================
   2. Fields
   ========================================================================== */

.bf-cf7__label {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--bf-green-dark);
	font-size: 0.8rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.bf-cf7__label abbr {
	border: 0;
	color: var(--bf-amber-dark);
	text-decoration: none;
}

.bf-cf7 .form-control {
	padding: 0.8rem 1rem;
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius);
	background-color: var(--bf-white);
	color: var(--bf-ink);
	font-family: var(--bf-font-body);
	font-size: 1rem;
	transition: border-color var(--bf-transition), box-shadow var(--bf-transition);
}

.bf-cf7 select.form-control {
	/* A 231-item country list needs the native picker, not a styled listbox. */
	appearance: auto;
	-webkit-appearance: auto;
}

.bf-cf7 .form-control:hover {
	border-color: var(--bf-muted);
}

/* Amber, matching every other focus state in the theme. */
.bf-cf7 .form-control:focus {
	border-color: var(--bf-amber);
	box-shadow: 0 0 0 3px rgba(245, 183, 21, 0.28);
	outline: none;
}

.bf-cf7 textarea.form-control {
	min-height: 8rem;
	resize: vertical;
}

.bf-cf7 .wpcf7-submit {
	margin-top: 0.5rem;
}

/* CF7's AJAX spinner sits inline and shoves the button sideways otherwise. */
.bf-cf7 .wpcf7-spinner {
	margin: 0 0 0 0.75rem;
	vertical-align: middle;
}

/* ==========================================================================
   3. Validation + response messages
   ========================================================================== */

.bf-cf7 .wpcf7-not-valid {
	border-color: #b3261e;
}

.bf-cf7 .wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.35rem;
	color: #b3261e;
	font-size: 0.85rem;
}

.bf-cf7 .wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 0.9rem 1.1rem;
	border: 1px solid var(--bf-line);
	border-left-width: 3px;
	border-radius: var(--bf-radius);
	background-color: var(--bf-cream);
	font-size: 0.95rem;
}

.bf-cf7 form.sent .wpcf7-response-output {
	border-left-color: var(--bf-green);
	background-color: rgba(47, 107, 58, 0.08);
	color: var(--bf-green-dark);
}

.bf-cf7 form.invalid .wpcf7-response-output,
.bf-cf7 form.unaccepted .wpcf7-response-output,
.bf-cf7 form.failed .wpcf7-response-output,
.bf-cf7 form.spam .wpcf7-response-output {
	border-left-color: #b3261e;
	background-color: rgba(179, 38, 30, 0.06);
	color: #8c1d18;
}

/* ==========================================================================
   4. Book Now hero
   ========================================================================== */

.bf-booknow-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 320px;
	padding: 2rem 0 2.5rem;
	background-color: var(--bf-green-darker);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	color: var(--bf-white);
}

@media (min-width: 768px) {
	.bf-booknow-hero {
		min-height: 380px;
		padding: 2.5rem 0 3rem;
	}
}

.bf-booknow-hero__inner {
	width: 100%;
}

.bf-booknow-hero__scrim { display: none; }

.bf-booknow-hero__title {
	margin: 0;
	color: var(--bf-white);
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 500;
	line-height: 1.1;
	max-width: 720px;
	text-shadow: 0 2px 26px rgba(18, 48, 27, 0.42);
}

/* ==========================================================================
   5. Book Now layout
   ========================================================================== */

.bf-booknow__panel {
	padding: clamp(1.5rem, 4vw, 2.75rem);
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius-lg);
	background-color: var(--bf-white);
	box-shadow: var(--bf-shadow);
}

.bf-booknow__title {
	margin-bottom: 0.75rem;
}

.bf-booknow__intro {
	margin-bottom: 2rem;
	color: var(--bf-muted);
	line-height: 1.8;
}

.bf-booknow__aside {
	position: sticky;
	top: calc(var(--bf-header-h) + 1.5rem);
}

.bf-booknow__points {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.bf-booknow__points li {
	display: flex;
	gap: 1rem;
	padding: 1.1rem 0;
	border-top: 1px solid var(--bf-line);
}

.bf-booknow__points li:first-child {
	border-top: 0;
	padding-top: 0;
}

.bf-booknow__point-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: var(--bf-amber);
	color: var(--bf-charcoal);
	font-size: 1.05rem;
	line-height: 1;
}

.bf-booknow__point-title {
	margin-bottom: 0.2rem;
	font-size: 1.15rem;
	line-height: 1.3;
}

.bf-booknow__points p {
	margin: 0;
	color: var(--bf-muted);
	font-size: 0.95rem;
	line-height: 1.7;
}

.bf-booknow__direct {
	padding: 1.5rem;
	border: 1px solid var(--bf-line);
	border-radius: var(--bf-radius-lg);
	background-color: var(--bf-white);
}

.bf-booknow__direct-link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.5rem 0;
	color: var(--bf-green-dark);
	font-size: 0.98rem;
}

.bf-booknow__direct-link i {
	color: var(--bf-amber-dark);
}

.bf-booknow__direct-link:hover {
	color: var(--bf-amber-dark);
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
	/* Nothing to stick to once the aside drops under the form. */
	.bf-booknow__aside {
		position: static;
	}
}
