.oms-booking-form-wrap,
.oms-booking-success {
	box-sizing: border-box;
	max-width: 700px;
	margin: 1.5rem auto;
	padding: clamp(1.25rem, 4vw, 2rem);
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(15, 16, 33, .08);
	color: #1f2937;
}

.oms-booking-form *,
.oms-booking-form-wrap *,
.oms-booking-success * {
	box-sizing: border-box;
}

.oms-booking-form__title,
.oms-booking-success h2 {
	margin: 0 0 1rem;
	padding-right: 3.25rem;
	color: #0f1021;
	font-size: clamp(1.35rem, 3vw, 1.8rem);
	font-weight: 700;
	line-height: 1.2;
}

.oms-booking-product {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: .85rem;
	padding: .875rem 1rem;
	border-radius: 10px;
	background: #f8fafc;
}

.oms-booking-product span {
	color: #2f5bff;
	font-weight: 700;
}

.oms-booking-product--cart > div {
	display: flex !important;
	min-width: 0;
	flex: 1 1 auto;
	flex-direction: column !important;
	gap: .35rem;
}

.oms-booking-modal .oms-booking-product--cart {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: start;
}

.oms-booking-product--cart strong,
.oms-booking-product--cart .oms-cart-booking-item {
	display: block;
}

.oms-cart-booking-item {
	overflow: hidden;
	color: #475569 !important;
	font-size: .95rem !important;
	font-weight: 500 !important;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.oms-booking-modal .oms-booking-product--cart > span {
	padding-left: 1rem;
	color: #475569;
	font-size: 1rem;
	font-weight: 700;
	white-space: nowrap;
}

.oms-cart-booking-cta {
	margin-top: 1rem;
}

.oms-booking-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .55rem .75rem;
}

.oms-booking-field {
	margin: 0;
}

.oms-booking-field--full {
	margin: .65rem 0 .75rem;
}

/* Astra applies a bottom margin to every paragraph in .entry-content.
 * Each booking field is a paragraph for accessible form markup, so cancel
 * that theme spacing only within the OMS form. */
.entry-content .oms-booking-form-wrap p.oms-booking-field {
	margin: 0 !important;
}

.entry-content .oms-booking-form-wrap p.oms-booking-field--full {
	margin: .65rem 0 .75rem !important;
}

.oms-booking-form-wrap .oms-booking-field label {
	display: block;
	margin-bottom: .45rem;
	color: #0f1021;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.35;
}

.oms-booking-form-wrap .oms-booking-field input,
.oms-booking-form-wrap .oms-booking-field textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: .72rem .85rem;
	border: 1px solid #cbd5e1 !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: #1f2937 !important;
	font-family: inherit !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.35 !important;
}

.oms-booking-form-wrap .oms-booking-field textarea {
	min-height: 84px;
	resize: vertical;
}

/* Date and time retain the browser's accessible picker, while the field
 * chrome, text, calendar icon and clock icon match the rest of the form. */
.oms-booking-form-wrap .oms-booking-field input[type="date"],
.oms-booking-form-wrap .oms-booking-field input[type="time"] {
	color-scheme: light;
	cursor: pointer;
	font-variant-numeric: tabular-nums;
}

.oms-booking-form-wrap .oms-booking-field input[type="date"]::-webkit-datetime-edit,
.oms-booking-form-wrap .oms-booking-field input[type="time"]::-webkit-datetime-edit {
	padding: 0;
}

.oms-booking-form-wrap .oms-booking-field input[type="date"]::-webkit-calendar-picker-indicator,
.oms-booking-form-wrap .oms-booking-field input[type="time"]::-webkit-calendar-picker-indicator {
	margin: 0;
	opacity: .8;
	cursor: pointer;
}

.oms-booking-field input:focus,
.oms-booking-field textarea:focus,
.oms-booking-trigger:focus-visible,
.oms-booking-submit:focus-visible,
.oms-booking-modal__close:focus-visible {
	outline: 3px solid rgba(47, 91, 255, .35);
	outline-offset: 2px;
	border-color: #2f5bff;
}

.oms-booking-field [aria-invalid="true"] {
	border-color: #dc2626;
}

.oms-booking-form__required {
	margin: 0 0 .75rem;
	font-size: .875rem;
}

.entry-content .oms-booking-form-wrap p.oms-booking-form__required {
	margin: 0 0 .75rem !important;
}

.oms-booking-form__required span,
.oms-booking-field label span {
	color: #be123c;
}

.oms-booking-submit,
.oms-booking-trigger {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .75rem 1.1rem;
	border: 0;
	border-radius: 8px;
	background: linear-gradient(135deg, #2f5bff, #8b5cf6);
	color: #fff;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.oms-booking-submit:hover,
.oms-booking-trigger:hover {
	background: linear-gradient(135deg, #2448d4, #7546de);
}

.oms-booking-submit:disabled {
	cursor: wait;
	opacity: .65;
}

.oms-booking-notice,
.oms-booking-form__message {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border-radius: 8px;
	font-weight: 600;
}

/* The AJAX status box is intentionally empty before the form is submitted.
 * Do not let that empty element consume vertical space in the modal. */
.oms-booking-form__message:empty {
	display: none;
}

.oms-booking-form__message:not(:empty) {
	margin: .5rem 0 .75rem;
	padding: .6rem .75rem;
}

.oms-booking-notice--error,
.oms-booking-form__message.is-error {
	border-left: 4px solid #dc2626;
	background: #fef2f2;
	color: #991b1b;
}

.oms-booking-form__message.is-success {
	border-left: 4px solid #16a34a;
	background: #f0fdf4;
	color: #166534;
}

.oms-booking-form__honeypot {
	position: absolute !important;
	overflow: hidden !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	border: 0 !important;
	clip: rect(0, 0, 0, 0) !important;
}

.oms-booking-modal[hidden] {
	display: none;
}

.oms-booking-modal {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.oms-booking-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 16, 33, .72);
}

.oms-booking-modal__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 740px);
	max-height: none;
	margin: auto 0;
	overflow: visible;
}

.oms-booking-modal__panel .oms-booking-form-wrap,
.oms-booking-modal__panel .oms-booking-success {
	margin: 0;
}

.oms-booking-modal__close {
	position: absolute;
	z-index: 2;
	top: 1rem !important;
	right: 3.7rem !important;
	display: grid !important;
	width: 42px !important;
	height: 42px !important;
	min-height: 42px !important;
	padding: 0 !important;
	border: 1px solid #0f1021 !important;
	border-radius: 50% !important;
	place-items: center;
	background: #0f1021 !important;
	box-shadow: 0 5px 14px rgba(15, 16, 33, .18) !important;
	color: #fff !important;
	font-family: Arial, sans-serif !important;
	font-size: 1.65rem !important;
	font-weight: 400 !important;
	line-height: 1 !important;
	cursor: pointer !important;
	transition: background .15s ease, transform .15s ease;
}

.oms-booking-modal__close:hover {
	transform: scale(1.06);
	background: #2f5bff !important;
}

.oms-booking-success__details {
	display: grid !important;
	grid-template-columns: minmax(130px, .45fr) 1fr;
	align-items: start;
	gap: .65rem 1rem;
	margin: 1.25rem 0;
}

.oms-booking-modal .oms-booking-success {
	width: 100%;
	max-width: 700px;
	padding: clamp(1.5rem, 4vw, 2rem) !important;
	border-radius: 16px !important;
	color: #1f2937 !important;
}

.oms-booking-modal .oms-booking-success h2 {
	margin: 0 3.75rem 1rem 0 !important;
	padding: 0 !important;
	color: #0f1021 !important;
	font-size: clamp(1.6rem, 4vw, 2.15rem) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	letter-spacing: 0 !important;
}

.oms-booking-modal .oms-booking-success > p {
	margin: 0 !important;
	color: #475569 !important;
	font-size: 1rem !important;
	font-weight: 400 !important;
	line-height: 1.55 !important;
}

/* The site theme also styles definition lists. These rules keep the booking
 * summary as two clean columns and prevent theme float/position rules from
 * stacking text on top of itself. */
.oms-booking-modal .oms-booking-success__details > dt,
.oms-booking-modal .oms-booking-success__details > dd {
	position: static !important;
	float: none !important;
	clear: none !important;
	display: block !important;
	width: auto !important;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: #1f2937 !important;
	font-size: .98rem !important;
	line-height: 1.45 !important;
	text-align: left !important;
	word-break: break-word;
}

.oms-booking-modal .oms-booking-success__details dt {
	font-weight: 700 !important;
}

.oms-booking-modal .oms-booking-success__details dd {
	font-weight: 400 !important;
}

.oms-booking-modal .oms-booking-success__details dd > div,
.oms-booking-modal .oms-booking-success__details dd > span {
	position: static !important;
	float: none !important;
	display: block !important;
	margin: 0 0 .45rem !important;
	padding: 0 !important;
	line-height: 1.45 !important;
}

.oms-booking-modal .oms-booking-success__details dd > div:last-child,
.oms-booking-modal .oms-booking-success__details dd > span:last-child {
	margin-bottom: 0 !important;
}

.oms-booking-modal .oms-booking-success__details dd strong,
.oms-booking-modal .oms-booking-success__details dd span {
	position: static !important;
	float: none !important;
	font-size: inherit !important;
	line-height: inherit !important;
}

.oms-booking-modal .oms-booking-success__details dd br {
	display: block !important;
	content: "";
	margin-top: .2rem;
}

.oms-booking-modal .oms-booking-success__shop {
	position: static !important;
	display: grid !important;
	gap: .3rem;
	margin: 0 !important;
	padding: 1rem 0 0 !important;
	border-top: 1px solid #e2e8f0 !important;
	color: #475569 !important;
	font-size: .95rem !important;
	line-height: 1.45 !important;
}

.oms-booking-modal .oms-booking-success__shop strong,
.oms-booking-modal .oms-booking-success__shop span {
	position: static !important;
	float: none !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	color: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	text-align: left !important;
}

.oms-booking-modal .oms-booking-success__shop strong {
	color: #0f1021 !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
}

/* Keep WAPF selection text on separate lines in the classic WooCommerce cart. */
.woocommerce-cart-form .product-name .variation {
	display: grid !important;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: .2rem .45rem;
	margin: .35rem 0 0 !important;
	padding: 0 !important;
}

.woocommerce-cart-form .product-name .variation dt,
.woocommerce-cart-form .product-name .variation dd {
	position: static !important;
	float: none !important;
	clear: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: .92em !important;
	line-height: 1.4 !important;
	text-align: left !important;
	word-break: break-word;
}

.woocommerce-cart-form .product-name .variation dt {
	font-weight: 600 !important;
}

.oms-booking-modal-open {
	overflow: hidden;
}

@media (max-width: 560px) {
	.oms-booking-grid {
		grid-template-columns: 1fr;
	}

	.oms-booking-product {
		align-items: flex-start;
		flex-direction: column;
	}

	.oms-booking-form__title {
		padding-right: 3rem;
	}

	.oms-booking-modal__close {
		top: .75rem !important;
		right: .75rem !important;
	}

	.oms-booking-success__details {
		grid-template-columns: 1fr;
		gap: .25rem;
	}
}
