/* Briant – randevu form feedback: scissors loader + success popup
   (appointment-feedback.js) */

/* The submit wrapper already provides the 44px gap above the button;
   the theme's default 35px input margin was stacking on top of it. */
.briant-appointment .bf-submit .wpcf7-submit {
	margin-top: 0;
}

/* CF7's stock spinner is replaced by the scissors loader */
.briant-appointment .wpcf7-spinner {
	display: none !important;
}

.briant-appointment .ba-cutloader {
	display: inline-block;
	width: 56px;
	height: 56px;
	vertical-align: middle;
	margin-left: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease;
}
.briant-appointment .ba-cutloader svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}
.briant-appointment form.submitting .ba-cutloader {
	opacity: 1;
	visibility: visible;
}

/* The hidden loader reserves 72px (56px + 16px margin) to the right of the
   button inside the centered .bf-submit, nudging the button off the form's
   axis. An equal invisible spacer on the left keeps it truly centered.
   (Phones are unaffected: there the loader is a centered block below.) */
@media (min-width: 768px) {
	.briant-appointment .bf-submit::before {
		content: '';
		display: inline-block;
		width: 72px;
		height: 1px;
		vertical-align: middle;
	}
}

/* success: the inline banner is replaced by the popup. CF7 also clears the
   banner text when it resets the form afterwards but still renders the box,
   so an empty banner is hidden in every state. */
.briant-appointment form.sent .wpcf7-response-output,
.briant-appointment form.resetting .wpcf7-response-output,
.briant-appointment .wpcf7-response-output:empty {
	display: none !important;
}

/* other responses (validation, mail failure): keep the banner, dress it
   for the theme instead of CF7's stock green/orange */
.briant-appointment .wpcf7-response-output {
	border: 1px solid rgba(201, 169, 106, .6) !important;
	background: rgba(201, 169, 106, .07);
	color: #4a4038;
	font-size: 14px;
	letter-spacing: .02em;
	text-align: center;
	padding: 14px 22px !important;
	margin: 28px 0 0 !important;
}

/* Turnstile widget: centered between the consent row and the button */
.briant-appointment .bf-turnstile {
	display: flex;
	justify-content: center;
	margin-top: 28px;
	min-height: 65px;
}

.briant-appointment .bf-turnstile {
	flex-wrap: wrap;
}
.briant-appointment .ba-turnstile-hint {
	flex-basis: 100%;
	margin: 10px 0 0;
	font-size: 14px;
	text-align: center;
	color: #a8442c;
}

/* ---- success popup ---- */
.ba-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(22, 12, 6, .55);
	opacity: 0;
	transition: opacity .25s ease;
}
.ba-popup-overlay[hidden] {
	display: none;
}
.ba-popup-overlay.is-open {
	opacity: 1;
}

.ba-popup {
	max-width: 520px;
	width: 100%;
	background: #fbf8f2;
	border: 1px solid rgba(201, 169, 106, .55);
	box-shadow: 0 24px 60px rgba(22, 12, 6, .28);
	padding: 44px 40px 40px;
	text-align: center;
	transform: translateY(14px) scale(.97);
	transition: transform .28s ease;
}
.ba-popup-overlay.is-open .ba-popup {
	transform: none;
}

.ba-popup__orn {
	display: block;
	width: 120px;
	height: 34px;
	margin: 0 auto 4px;
	overflow: visible;
}

.ba-popup__title {
	margin: 10px 0 0;
	font-size: 26px;
	font-weight: 400;
	letter-spacing: .06em;
	color: #1f1a16;
}

.ba-popup__text {
	margin: 16px auto 0;
	max-width: 40em;
	font-size: 15px;
	line-height: 1.8;
	color: #4a4038;
}

.ba-popup__close {
	margin-top: 30px;
	padding: 15px 52px;
	border: 1px solid #1f1a16;
	border-radius: 0;
	background: #1f1a16;
	color: #f5f1ea;
	font-size: 12px;
	letter-spacing: .24em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.ba-popup__close:hover,
.ba-popup__close:focus {
	background: #c9a96a;
	border-color: #c9a96a;
	color: #1f1a16;
	outline: none;
}

.bf-consent a {
	color: #b58e5f;
}

@media (max-width: 767px) {
	.briant-appointment .ba-cutloader {
		display: block;
		margin: 14px auto 0;
		width: 48px;
		height: 48px;
	}
	.ba-popup {
		padding: 34px 24px 30px;
	}
	.ba-popup__title {
		font-size: 22px;
	}
}
