/*
 * Regal Booking Engine - booking form styles.
 *
 * Typography follows the site's root sizing, where 1rem = 10px.
 *
 * Two structural assumptions are load-bearing:
 *
 * 1. `section.rbe` is the immediate previous sibling of
 *    `form.variations_form`, which the `.rbe + form.variations_form`
 *    selectors below rely on to hide WooCommerce's own variation controls
 *    and restyle its purchase button.
 * 2. The theme defines the `--grayscale-4` custom property, which supplies
 *    the control borders. Without it those borders fall back to the
 *    browser default.
 *
 * `!important` is used deliberately and only where a single-product theme
 * or page-builder template would otherwise win on specificity.
 */

.rbe {
	margin: 2.4rem 0 2rem;
	font-family: inherit;
	font-size: 1.8rem;
	line-height: 1.55;
}

.rbe h2 {
	font-size: 3rem;
	line-height: 1.25;
	margin: 0 0 1rem;
	font-weight: 700;
}

.rbe > p {
	font-size: 2.2rem;
	line-height: 1.5;
	margin: 0 0 2.4rem;
}

.rbe h3 {
	font-size: 1.8rem;
	line-height: 1.35;
	margin: 2rem 0 1.4rem;
	font-weight: 700;
}

.rbe-transmissions,
.rbe-weeks {
	display: grid;
	grid-template-columns: repeat(2,minmax(0,1fr));
	gap: 1.6rem;
}

.rbe-transmission,
.rbe-week {
	font-family: inherit;
	font-size: 2rem;
	border: 1px solid var(--grayscale-4) !important;
	border-radius: 0 !important;
	background: #f7f7f7 !important;
	color: #222 !important;
	cursor: pointer;
	text-align: center;
	transition: background .15s,color .15s;
	padding: 1.6rem !important;
	box-shadow: none !important;
	text-transform: none !important;
	line-height: 1 !important;
}

.woocommerce .rbe button.rbe-transmission,
.rbe button.rbe-transmission {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 1.6rem !important;
	font-weight: 600;
	gap: 1rem;
}

.rbe-week {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .8rem;
}

.rbe-week strong {
	font-size: 1.6rem;
	line-height: 1.35;
}

.rbe-week span {
	font-size: 1.6rem;
}

.rbe-week small {
	font-size: 1.6rem;
}

.rbe .selected {
	background: #d52941 !important;
	border-color: #d52941 !important;
	color: #fff !important;
}

.rbe .full {
	background: #eee !important;
	color: #999 !important;
	cursor: not-allowed;
	opacity: .85;
}

.rbe-week-heading {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.6rem;
	flex-wrap: wrap;
	margin: 2.4rem 0 1.6rem;
}

.rbe-week-heading h3 {
	margin: 0;
}

.rbe-filter {
	font-family: inherit;
	font-size: 16px !important;
	min-width: 22rem;
	max-width: 100%;
	padding: 12px 12px 11px 12px !important;
	border: 1px solid var(--grayscale-4) !important;
	border-radius: 0 !important;
	line-height: 1 !important;
	outline: none;
}

.woocommerce .rbe button.rbe-more,
.rbe button.rbe-more {
	font-family: inherit;
	font-size: 1.6rem !important;
	width: 100%;
	margin-top: 1.6rem;
	background: transparent !important;
	color: #333 !important;
	border: 1px solid var(--grayscale-4) !important;
	border-radius: 0 !important;
	padding: 1.5rem !important;
	cursor: pointer;
}

.rbe-more[hidden] {
	display: none !important;
}

.rbe-summary {
	background: #f7f7f7;
	color: #222;
	border-radius: 0;
	padding: 2.4rem;
	margin-top: 2.8rem;
	font-size: 1.6rem;
}

.rbe-summary h3 {
	font-size: 1.8rem;
	margin: 0 0 1.8rem;
}

.rbe-summary dl {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.4rem;
	margin: 0;
}

.rbe-summary dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
}

.rbe-message {
	color: #b32424;
	font-size: 1.8rem;
}

.rbe + form.variations_form .variations,
.rbe + form.variations_form .single_variation,
.rbe + form.variations_form .reset_variations {
	display: none !important;
}

.rbe + form.variations_form .single_add_to_cart_button {
	display: block !important;
	box-sizing: border-box !important;
	float: none !important;
	clear: both !important;
	font-family: inherit;
	font-size: 1.4rem !important;
	line-height: 1 !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	background: #d52941 !important;
	color: white !important;
	width: 100% !important;
	max-width: none !important;
	padding: 15px 25px !important;
	border-radius: 0 !important;
	outline: none;
	border: none !important;
	cursor: pointer;
}

.rbe + form.variations_form .single_add_to_cart_button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.rbe + form.variations_form .quantity {
	display: none !important;
}

@media (max-width:600px) {
	.rbe h2 {
		font-size: 2.6rem;
	}
	.rbe > p {
		font-size: 1.9rem;
	}
	.rbe-transmission {
		font-size: 1.6rem;
	}
	.rbe-week {
		padding: 1.6rem !important;
	}
	.rbe-week strong {
		font-size: 1.6rem;
	}
	.rbe-week span {
		font-size: 1.6rem;
	}
	.rbe-week small {
		font-size: 1.4rem;
	}
	.rbe-filter {
		min-width: 0;
		width: 100%;
	}
}

/* Ensure the purchase button spans the entire booking form in Oxygen and WooCommerce. */

.rbe + form.variations_form .woocommerce-variation-add-to-cart,
.rbe + form.variations_form .single_variation_wrap {
	width: 100% !important;
	max-width: none !important;
}

/* Single-column choices on small mobile screens. */

@media (max-width: 479px) {
	.rbe-transmissions,
	.rbe-weeks {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Match the course-week dropdown's custom chevron and positioning exactly. */

.rbe select.rbe-location {
	display: block;
	width: 100%;
	max-width: 100%;
	font-family: inherit;
	font-size: 16px;
	padding: 12px 12px 11px 12px;
	border: 1px solid var(--grayscale-4);
	border-radius: 0;
	line-height: 1;
	outline: none;
	background-color: #fff;
}

.rbe select.rbe-filter,
.rbe select.rbe-location {
	-webkit-appearance: none;
	appearance: none;
	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='%23222222' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.5rem center;
	background-size: 1.6rem;
}
