/*
 * Regal Booking Engine - payment option, balance page and history styles.
 *
 * Loaded alongside rbe.css on the booking form, and on its own on the guest
 * balance page. The `!important` declarations and the long
 * `body.single-product` / `.rbe-shortcode` selectors exist because
 * WooCommerce renders the payment choice inside
 * `.woocommerce-variation-add-to-cart`, which product templates and page
 * builders frequently style as a horizontal flex row; the payment options
 * and the purchase button must stack regardless.
 */

.rbe-payment-choice {
	margin: 2.4rem 0 1.6rem;
	padding: 1.8rem;
	border: 1px solid #dedede;
}

.rbe-payment-choice h3 {
	margin: 0 0 1.4rem;
}

.rbe-payment-choice label {
	display: block;
	padding: 1.3rem;
	border: 1px solid #e2e2e2;
	margin: 0 0 1rem;
	cursor: pointer;
}

.rbe-payment-choice label:has(input:checked) {
	border-color: #d52941;
}

.rbe-payment-choice small {
	display: block;
	margin: 0.5rem 0 0 3rem;
	line-height: 1.5;
}

.rbe-payment-choice input {
	accent-color: #d52941;
}

.rbe-pay-now {
	font-weight: 700;
	margin: 1.8rem 0 0;
}

/* Payment choices and WooCommerce's purchase button must stack, even if the
   product template styles the variation form as a horizontal flex container. */

.rbe + form.variations_form {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	width: 100% !important;
	max-width: 100% !important;
}

.rbe + form.variations_form .rbe-payment-choice {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	flex: 0 0 auto;
}

.rbe + form.variations_form .single_variation_wrap,
.rbe + form.variations_form .woocommerce-variation-add-to-cart {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box;
	flex: 0 0 auto;
}

/* Match the existing step headings (1–3) rather than the theme's h3 styles. */

.rbe + form.variations_form .rbe-payment-choice h3 {
	font-family: inherit;
	font-size: 1.8rem;
	font-weight: 700;
	line-height: 1.35;
	margin: 0 0 1.4rem;
	text-transform: none;
	letter-spacing: normal;
}

/* WooCommerce inserts the payment choice INSIDE .woocommerce-variation-add-to-cart.
   Oxygen/theme styles may make that INNER wrapper a horizontal flex row.
   Stack its children explicitly; adjusting form.variations_form alone is insufficient. */

body.single-product form.variations_form .woocommerce-variation-add-to-cart.variations_button,
body.single-product form.variations_form .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
}

body.single-product form.variations_form .woocommerce-variation-add-to-cart > .rbe-payment-choice {
	display: block !important;
	float: none !important;
	flex: 0 0 auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	box-sizing: border-box !important;
}

body.single-product form.variations_form .woocommerce-variation-add-to-cart > .single_add_to_cart_button {
	display: block !important;
	position: static !important;
	float: none !important;
	clear: both !important;
	flex: 0 0 auto !important;
	align-self: stretch !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	white-space: normal !important;
	box-sizing: border-box !important;
}

.rbe-payment-choice label[hidden] {
	display: none !important;
}

/* Keep the deposit availability notice separate from the payment options. */

.rbe-deposit-expired {
	margin: 2rem 0 0 0 !important;
	color: #c22136;
}

/* Branded, keyboard-accessible payment choice radios. */

.rbe-payment-choice label input[type="radio"][name="rbe_payment_choice"] {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	vertical-align: middle;
	flex: 0 0 auto;
	width: 2.2rem;
	height: 2.2rem;
	box-sizing: border-box;
	margin: 0 0.8rem 0 0;
	padding: 0;
	border: 1px solid #cfcfcf;
	border-radius: 50%;
	background-color: #fff;
	background-image: none;
	cursor: pointer;
	transition: background-color .15s ease, border-color .15s ease;
}

.rbe-payment-choice label input[type="radio"][name="rbe_payment_choice"]:checked {
	background-color: #D52941;
	border-color: #D52941;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 1.5rem 1.5rem;
}

.rbe-payment-choice label input[type="radio"][name="rbe_payment_choice"]:focus-visible {
	outline: 2px solid #D52941;
	outline-offset: 3px;
}

/* Payment radio polish: use an accessible native input as the control,
   but draw the radio/check on its adjacent label text to avoid theme radio styling. */

.rbe-payment-choice label:has( > input[name="rbe_payment_choice"]) {
	position: relative;
}

.rbe-payment-choice label > input[type="radio"][name="rbe_payment_choice"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	clip-path: inset(50%) !important;
}

.rbe-payment-choice label > input[name="rbe_payment_choice"] + strong {
	display: block;
	position: relative;
	padding-left: 3.2rem;
	line-height: 2.2rem;
}

.rbe-payment-choice label > input[name="rbe_payment_choice"] + strong::before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	width: 2.2rem;
	height: 2.2rem;
	box-sizing: border-box;
	border: 1px solid #cfcfcf;
	border-radius: 50%;
	background: #fff;
}

.rbe-payment-choice label > input[name="rbe_payment_choice"]:checked + strong::before {
	background: #D52941;
	border-color: #D52941;
}

.rbe-payment-choice label > input[name="rbe_payment_choice"]:checked + strong::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 2.2rem;
	height: 2.2rem;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 1.5rem 1.5rem no-repeat;
}

.rbe-payment-choice label > input[name="rbe_payment_choice"]:focus-visible + strong::before {
	outline: 2px solid #D52941;
	outline-offset: 3px;
}

.rbe-payment-choice label > small {
	margin: 0.5rem 0 0 3.2rem;
}

/* Identical checkout stacking when embedded outside a product page. */

.rbe-shortcode form.variations_form .woocommerce-variation-add-to-cart.variations_button,
.rbe-shortcode form.variations_form .woocommerce-variation-add-to-cart {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
	justify-content: flex-start !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	box-sizing: border-box !important;
}

.rbe-shortcode form.variations_form .woocommerce-variation-add-to-cart > .rbe-payment-choice {
	display: block !important;
	float: none !important;
	flex: 0 0 auto !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	box-sizing: border-box !important;
}

.rbe-shortcode form.variations_form .woocommerce-variation-add-to-cart > .single_add_to_cart_button {
	display: block !important;
	position: static !important;
	float: none !important;
	clear: both !important;
	flex: 0 0 auto !important;
	align-self: stretch !important;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	white-space: normal !important;
	box-sizing: border-box !important;
}

/* Customer payment history, shown in the account area and on the balance page. */

.rbe-payment-history {
	margin: 3rem 0 0;
}

.rbe-payment-history ul {
	margin: 0 0 1.5rem;
	padding-left: 2rem;
}

.rbe-payment-history li {
	margin: 0 0 0.5rem;
}

/* Guest balance page, rendered as a standalone page by the plugin. */

.rbe-balance-page {
	max-width: 680px;
	margin: 50px auto;
	padding: 24px;
}

.rbe-balance-page h2 {
	margin: 0 0 0.5rem;
}

.rbe-balance-page form {
	margin: 2.5rem 0;
}

.rbe-balance-page input[type="number"] {
	max-width: 12rem;
}

.rbe-balance-page button[type="submit"] {
	cursor: pointer;
}

/* Guest payment progress and instalment selection. */
.rbe-balance-progress {
	margin: 2.4rem 0;
	padding: 2rem;
	border: 1px solid #dedede;
	background: #fafafa;
}
.rbe-balance-progress-heading,
.rbe-balance-progress-values {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	flex-wrap: wrap;
}
.rbe-balance-progress-heading h2 { margin: 0 0 1rem; font-size: 1.8rem; }
.rbe-balance-progress-heading strong { color: #D52941; }
.rbe-balance-progress-track {
	height: 12px;
	width: 100%;
	background: #e5e5e5;
	overflow: hidden;
	border-radius: 999px;
	margin: 1rem 0;
}
.rbe-balance-progress-fill {
	height: 100%;
	background: #D52941;
	border-radius: inherit;
}
.rbe-balance-choices { padding: 0; margin: 0; border: 0; min-width: 0; }
.rbe-balance-choices legend { font-weight: 700; font-size: 1.8rem; margin-bottom: 1.2rem; }
.rbe-balance-choice {
	display: flex;
	gap: 1rem;
	align-items: center;
	padding: 1.5rem;
	border: 1px solid #d5d5d5;
	margin: 0 0 1rem;
	cursor: pointer;
}
.rbe-balance-choice:has(input:checked) { border-color: #D52941; }
/* Match the main booking form: hide the native radio, draw the brand check next to its label. */
.rbe-balance-choice { position: relative; }
.rbe-balance-choice input[type="radio"] {
 position: absolute !important;
 width: 1px !important;
 height: 1px !important;
 opacity: 0 !important;
 overflow: hidden !important;
 clip-path: inset(50%) !important;
 margin: 0 !important;
 padding: 0 !important;
 border: 0 !important;
}
.rbe-balance-choice > span {
 display: block;
 position: relative;
 padding-left: 3.2rem;
 line-height: 2.2rem;
}
.rbe-balance-choice > span::before {
 content: "";
 position: absolute;
 top: 0;
 left: 0;
 width: 2.2rem;
 height: 2.2rem;
 box-sizing: border-box;
 border: 1px solid #cfcfcf;
 border-radius: 50%;
 background: #fff;
}
.rbe-balance-choice input[type="radio"]:checked + span::before {
 background: #D52941;
 border-color: #D52941;
}
.rbe-balance-choice input[type="radio"]:checked + span::after {
 content: "";
 position: absolute;
 top: 0;
 left: 0;
 width: 2.2rem;
 height: 2.2rem;
 background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 1.5rem 1.5rem no-repeat;
}
.rbe-balance-choice input[type="radio"]:focus-visible + span::before {
 outline: 2px solid #D52941;
 outline-offset: 3px;
}
.rbe-balance-custom { margin: 1rem 0 2rem; }
.rbe-balance-custom[hidden] { display: none !important; }
.rbe-balance-custom label, .rbe-balance-custom small { display: block; margin: 0.5rem 0; }
.rbe-balance-custom input[type="number"] { display: block; max-width: 18rem; width: 100%; }
.rbe-balance-validation { color: #C22136; }

/* Secure booking-reference lookup when opening the balance page without a link. */
.rbe-balance-lookup label { display:block; font-weight:700; margin-bottom:0.6rem; }
.rbe-balance-lookup input[type="email"], .rbe-balance-lookup input[name="booking_reference"] { display:block; width:100%; max-width:35rem; padding:12px; border:1px solid #aaa; border-radius:0; }
.rbe-lookup-notice { padding:1.4rem; border-left:3px solid #D52941; background:#f7f7f7; }

/* Balance-payment actions: consistent with the main Regal booking button. */
.rbe-balance-page button[type="submit"] {
	font-size: 1.4rem !important;
	line-height: 1 !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	background: #D52941 !important;
	color: #fff !important;
	padding: 15px 25px !important;
	border-radius: 0 !important;
	outline: none;
	border: none !important;
	cursor: pointer;
}
.rbe-balance-page button[type="submit"]:focus-visible {
	outline: 2px solid #D52941;
	outline-offset: 3px;
}

/* Balance reference and amount: consistent, compact hierarchy. */
.rbe-balance-reference, .rbe-history-reference { font-size: 1.6rem; }
.rbe-balance-page > h2 { font-size: 1.8rem; line-height: 1.4; }

/* Manage Booking: complete, scoped customer dashboard styling. */
.rbe-manage-booking {box-sizing:border-box;max-width:760px;margin:0 auto;padding:0;font-family:inherit;color:#242424;}
.rbe-manage-booking *, .rbe-manage-booking *::before, .rbe-manage-booking *::after{box-sizing:border-box;}
.rbe-manage-summary,.rbe-manage-payment{background:#fff;border:1px solid #dedede;padding:26px;margin:0 0 22px;border-radius:0;}
.rbe-manage-identity{display:flex;align-items:center;gap:16px;padding-bottom:23px;border-bottom:1px solid #dedede;}
.rbe-manage-icon{width:47px;height:47px;display:flex;align-items:center;justify-content:center;flex:none;background:#fbeff1;color:#D52941;font-size:23px;font-weight:700;}
.rbe-manage-eyebrow{font-size:12px;letter-spacing:.8px;font-weight:600;color:#737373;text-transform:uppercase;}
.rbe-manage-reference{font-size:1.6rem;font-weight:700;line-height:1.3;margin:3px 0 0;overflow-wrap:anywhere;}
.rbe-manage-fee{margin:20px 0;}

.rbe-manage-progress{background:#f7f7f7;padding:22px;border:0;}
.rbe-manage-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:16px;}
.rbe-manage-progress-heading h2{font-size:1.8rem;line-height:1.25;margin:0;font-weight:700;}
.rbe-manage-progress-heading strong{color:#D52941;font-size:14px;}
.rbe-manage-progress-track{background:#a5a5a5;border-radius:999px;overflow:hidden;width:100%;height:13px;}
.rbe-manage-progress-fill{background:#D52941;height:100%;border-radius:999px;}
.rbe-manage-progress-values{display:flex;justify-content:space-between;gap:12px;margin-top:19px;}
.rbe-manage-progress-values>div:last-child{text-align:right;}
.rbe-manage-progress-values span{font-size:12px;letter-spacing:.8px;text-transform:uppercase;font-weight:600;color:#737373;}
.rbe-manage-progress-values strong{display:block;}
.rbe-manage-progress-values span.woocommerce-Price-currencySymbol{font-size:1.6rem!important;font-weight:600!important;color:var(--typography-1)!important;}
.rbe-manage-due{margin:20px 0 0;}
.rbe-manage-due strong{color:#242424;}
.rbe-manage-payment-title{font-size:24px;font-weight:700;line-height:1.25;margin:0 0 6px;}
.rbe-manage-payment-intro{font-size:14px;color:#737373;line-height:1.5;margin:0 0 23px;}
.rbe-manage-booking .rbe-manage-payment-form{margin:0;}
.rbe-manage-choices{padding:0;margin:0;border:0;min-width:0;}
.rbe-manage-option{display:flex;align-items:center;gap:13px;width:100%;padding:17px 18px;border:1px solid #d5d5d5;border-radius:0;background:#fff;cursor:pointer;margin:0 0 10px;position:relative;}
.rbe-manage-option:has(input:checked){border-color:#D52941;background:#fcf3f5;}
.rbe-manage-option input[type=radio]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;clip-path:inset(50%)!important;margin:0!important;padding:0!important;}
.rbe-manage-radio{width:22px;height:22px;border:2px solid #adaeb4;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:#fff;}
.rbe-manage-option input:checked+.rbe-manage-radio{border-color:#D52941;background:#D52941;}
.rbe-manage-option input:checked+.rbe-manage-radio::after{content:'✓';font-size:14px;font-weight:700;line-height:1;color:#fff;}
.rbe-manage-option input:focus-visible+.rbe-manage-radio{outline:2px solid #D52941;outline-offset:3px;}
.rbe-manage-option-label{font-size:15px;font-weight:600;line-height:1.3;flex:1;min-width:0;}
.rbe-manage-option-price{font-size:15px;font-weight:700;white-space:nowrap;line-height:1;}
.rbe-manage-custom{padding:18px;margin:0 0 16px;background:#f8f8f8;border:1px solid #dedede;}
.rbe-manage-custom[hidden]{display:none!important;}
.rbe-manage-custom>label{display:block;font-size:15px;font-weight:700;margin:0 0 12px;}
.rbe-manage-amount-field{display:flex;width:100%;height:44px;background:#fff;border:1px solid #dedede;border-radius:0;overflow:hidden;}
.rbe-manage-amount-prefix{width:46px;flex:none;display:flex;align-items:center;justify-content:center;border-right:1px solid #dedede;color:#666;font-size:16px;background:#fff;}
.rbe-manage-booking .rbe-manage-amount-input,.rbe-manage-booking .rbe-manage-amount-input:focus{display:block;flex:1;width:100%;max-width:none!important;min-width:0;height:100%!important;min-height:0!important;padding:10px 12px!important;margin:0!important;background:#fff!important;background-image:none!important;color:#242424!important;border:0!important;border-radius:0!important;box-shadow:none!important;outline:none!important;font-size:15px!important;line-height:1.3!important;appearance:none!important;-webkit-appearance:none!important;}
.rbe-manage-amount-field:focus-within{border-color:#D52941;}
.rbe-manage-custom small{font-size:13px;color:#737373;margin:12px 0 0;}
.rbe-manage-custom .rbe-balance-validation{font-size:12px;margin:7px 0 0;color:#c22136;}
.rbe-manage-booking .rbe-manage-submit,.rbe-manage-booking .rbe-manage-submit:hover{display:block;width:100%!important;max-width:none!important;background:#D52941!important;color:#fff!important;border:0!important;border-radius:0!important;padding:15px 25px!important;font-size:14px!important;text-transform:uppercase!important;cursor:pointer;text-align:center;}
.rbe-manage-booking .rbe-manage-submit:hover{background:#b82039!important;}
.rbe-manage-booking .rbe-manage-submit:disabled{opacity:.45;cursor:not-allowed;}
.rbe-manage-notice{padding:18px;border:1px solid #dedede;background:#fff;font-size:15px;}
@media(max-width:500px){.rbe-manage-summary,.rbe-manage-payment{padding:18px;}.rbe-manage-progress{padding:16px;}.rbe-manage-option{padding:14px 11px;gap:9px;}.rbe-manage-option-label,.rbe-manage-option-price{font-size:13px;}.rbe-manage-custom{padding:15px;}}

/* Manage Booking: direct visitor lookup. Explicit, isolated styling that matches the booking form. */
.rbe-balance-page.rbe-manage-lookup {
 box-sizing:border-box;max-width:760px;margin:0 auto 22px;padding:30px;
 border:1px solid #dedede;border-radius:0;background:#fff;color:#242424;font-family:inherit;
}
.rbe-manage-lookup .rbe-manage-lookup-title {
 margin:0 0 9px!important;font-size:24px;line-height:1.25;font-weight:700;color:#242424;
}
.rbe-manage-lookup .rbe-manage-lookup-description {
 margin:0 0 27px!important;font-size:14px;line-height:1.65;color:#777;
}
.rbe-manage-lookup .rbe-manage-lookup-form {margin:0!important;padding:0!important;}
.rbe-manage-lookup .rbe-manage-lookup-field {margin:0 0 22px;}
.rbe-manage-lookup .rbe-manage-lookup-label {
 display:block;margin:0 0 9px!important;font-size:14px;line-height:1.4;font-weight:700;color:#242424;
}
.rbe-balance-page.rbe-manage-lookup input.rbe-manage-lookup-input,
.rbe-balance-page.rbe-manage-lookup input.rbe-manage-lookup-input:focus {
 display:block;box-sizing:border-box;width:100%!important;max-width:none!important;
 height:auto!important;min-height:0!important;margin:0!important;
 padding:12px 12px 11px 12px!important;
 background:#fff!important;background-image:none!important;color:#242424!important;
 border:1px solid #dedede!important;border-radius:0!important;
 box-shadow:none!important;outline:none!important;
 font-family:inherit!important;font-size:15px!important;line-height:1.4!important;font-weight:400!important;
 appearance:none!important;-webkit-appearance:none!important;
}
.rbe-manage-lookup input.rbe-manage-lookup-input::placeholder {color:#999;opacity:1;}
.rbe-balance-page.rbe-manage-lookup input.rbe-manage-lookup-input:focus {border-color:#D52941!important;}
.rbe-balance-page.rbe-manage-lookup button.rbe-manage-lookup-submit,
.rbe-balance-page.rbe-manage-lookup button.rbe-manage-lookup-submit:hover {
 box-sizing:border-box;display:block;width:100%!important;max-width:none!important;
 margin:6px 0 0!important;padding:15px 25px!important;
 background:#D52941!important;color:#fff!important;border:0!important;border-radius:0!important;
 font-family:inherit!important;font-size:1.4rem!important;line-height:1!important;
 font-weight:700!important;letter-spacing:normal!important;text-transform:uppercase!important;
 box-shadow:none!important;cursor:pointer;text-align:center;
}
.rbe-balance-page.rbe-manage-lookup button.rbe-manage-lookup-submit:hover {background:#b82039!important;}
.rbe-balance-page.rbe-manage-lookup button.rbe-manage-lookup-submit:focus-visible {
 outline:2px solid #D52941!important;outline-offset:3px!important;
}
.rbe-manage-lookup .rbe-manage-lookup-notice{margin:0 0 20px;}
@media(max-width:480px){.rbe-balance-page.rbe-manage-lookup{padding:20px;}.rbe-manage-lookup .rbe-manage-lookup-title{font-size:21px;}}
