/**
 * Order Request — frontend (button + modal).
 *
 * DESIGN SOURCE. This deliberately reuses the plugin's existing visual language rather than
 * introducing a new one:
 *
 *   • Accent            → var(--rbfw_color_primary)  (free plugin, rbfw_dynamic_css.php)
 *   • Booking panel     → white card, 12px radius, 0 4px 20px rgba(0,0,0,.08)  (.mp_right_section)
 *   • Primary button    → full width, primary bg, 16px/700, 10px pad, 5px radius (.rbfw-book-now-btn)
 *   • Form card + fields→ Pro's modern registration form (css/rbfw-regf-modern.css):
 *                         #eef4fa→#e8f0f8 gradient card, 12px radius,
 *                         uppercase 11px micro-labels in #5a6f85,
 *                         48px inputs, 10px radius, 1px #d4e0ec, focus #7ba3c9.
 *
 * The request button therefore reads as a sibling of "Book Now" (same size and rhythm, outline
 * instead of filled so the primary action stays visually primary), and the modal reads as the
 * same form family the customer already meets elsewhere in the booking flow.
 */

:root {
	--rbfw-or-ink: #1e3a5f;
	--rbfw-or-muted: #5a6f85;
	--rbfw-or-line: #d4e0ec;
	--rbfw-or-focus: #7ba3c9;
	--rbfw-or-placeholder: #9aafc3;
	--rbfw-or-danger: #e53e3e;
}

/* ══ Button block, printed directly above "Book Now" ═════════════════════ */

.rbfw-or-actions {
	margin: 0;
}

/* "or" rule, shown only when both buttons are offered. */
.rbfw-or-divider {
	position: relative;
	margin: 16px 0 12px;
	text-align: center;
}

.rbfw-or-divider::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 1px;
	background: #e6ebf1;
}

.rbfw-or-divider span {
	position: relative;
	padding: 0 12px;
	background: #fff;
	color: #9aafc3;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
}

/* Matches .rbfw-book-now-btn's geometry exactly, outlined instead of filled. */
.rbfw-or-actions button.rbfw-or-request-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	margin-top: 0;
	padding: 10px !important;
	border: 2px solid var(--rbfw_color_primary, #ff3726);
	border-radius: 5px;
	background: transparent;
	color: var(--rbfw_color_primary, #ff3726);
	font-size: 16px !important;
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.rbfw-or-actions button.rbfw-or-request-btn:hover:not(:disabled),
.rbfw-or-actions button.rbfw-or-request-btn:focus-visible:not(:disabled) {
	background: var(--rbfw_color_primary, #ff3726);
	color: #fff;
}

.rbfw-or-actions button.rbfw-or-request-btn:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.rbfw-or-actions button.rbfw-or-request-btn i {
	font-size: 15px;
}

.rbfw-or-hint {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 6px;
	margin: 8px 0 0;
	color: var(--rbfw-or-muted);
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.rbfw-or-hint i {
	margin-top: 2px;
	color: #7ba3c9;
}

/* Kept in the DOM only so its disabled state can drive the request button. */
.rbfw-or-hidden-booknow {
	display: none !important;
}

/* ══ Modal ═══════════════════════════════════════════════════════════════ */

body.rbfw-or-modal-open {
	overflow: hidden;
}

.rbfw-or-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 28px 16px;
	overflow-y: auto;
}

.rbfw-or-modal[hidden] {
	display: none;
}

.rbfw-or-modal__backdrop {
	position: fixed;
	inset: 0;
	background: rgba(15, 32, 52, .62);
	backdrop-filter: blur(2px);
}

/* Same card treatment as .mp_right_section: white, 12px, soft lift. */
.rbfw-or-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 56px);
	margin: auto;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(15, 32, 52, .28);
	overflow: hidden;
	font-size: 14px;
	color: var(--rbfw-or-ink);
	animation: rbfw-or-pop .18s ease-out;
}

@keyframes rbfw-or-pop {
	from { transform: translateY(10px); opacity: 0; }
	to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.rbfw-or-modal__panel { animation: none; }
}

/* Head — the same gradient the modern registration card uses. */
.rbfw-or-modal__head {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 22px;
	border-bottom: 1px solid #e3ecf5;
	background: linear-gradient(135deg, #eef4fa 0%, #e8f0f8 100%);
}

.rbfw-or-modal__head::after {
	content: "\f573"; /* file-signature */
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	position: absolute;
	top: 6px;
	right: 58px;
	font-size: 64px;
	line-height: 1;
	color: rgba(30, 58, 95, .05);
	pointer-events: none;
}

.rbfw-or-modal__title {
	position: relative;
	z-index: 1;
	margin: 0;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
	color: var(--rbfw-or-ink);
}

.rbfw-or-modal__sub {
	position: relative;
	z-index: 1;
	margin: 4px 0 0;
	color: var(--rbfw-or-muted);
	font-size: 13px;
	line-height: 1.5;
}

.rbfw-or-modal__x {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid #d4e0ec;
	border-radius: 8px;
	background: #fff;
	color: var(--rbfw-or-muted);
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease;
}

.rbfw-or-modal__x:hover {
	border-color: var(--rbfw-or-focus);
	color: var(--rbfw-or-ink);
}

.rbfw-or-modal__body {
	flex: 1 1 auto;
	padding: 20px 22px;
	overflow-y: auto;
}

.rbfw-or-modal__intro {
	margin: 0 0 14px;
	color: var(--rbfw-or-muted);
	font-size: 13px;
	line-height: 1.6;
}

/* Estimated-total strip. */
.rbfw-or-summary:not(:empty) {
	margin-bottom: 18px;
}

.rbfw-or-summary__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid #d4e0ec;
	border-left: 3px solid var(--rbfw_color_primary, #ff3726);
	border-radius: 10px;
	background: #f7fafd;
}

.rbfw-or-summary__row span {
	color: var(--rbfw-or-muted);
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .08em;
}

.rbfw-or-summary__row strong {
	color: var(--rbfw-or-ink);
	font-size: 18px;
	font-weight: 700;
}

.rbfw-or-msg {
	margin-bottom: 16px;
	padding: 11px 14px;
	border-left: 3px solid var(--rbfw-or-danger);
	border-radius: 8px;
	background: #fef2f2;
	color: #9b2c2c;
	font-size: 13px;
	line-height: 1.55;
}

.rbfw-or-msg[hidden] {
	display: none;
}

/* ── Fields: Pro modern-form language ────────────────────────────────────── */

.rbfw-or-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px 18px;
}

.rbfw-or-item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	margin: 0;
}

.rbfw-or-item--full {
	grid-column: 1 / -1;
}

.rbfw-or-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	color: var(--rbfw-or-muted);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.rbfw-or-required {
	margin-left: 2px;
	color: var(--rbfw-or-danger);
	font-weight: 700;
}

.rbfw-or-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
}

.rbfw-or-modal .rbfw-or-control {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 12px 42px 12px 14px;
	border: 1px solid var(--rbfw-or-line);
	border-radius: 10px;
	background: #fff;
	box-shadow: none;
	color: var(--rbfw-or-ink);
	font-size: 15px;
	line-height: 1.4;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.rbfw-or-modal textarea.rbfw-or-control {
	min-height: 84px;
	padding-right: 14px;
	resize: vertical;
}

.rbfw-or-modal .rbfw-or-control:focus {
	outline: none;
	border-color: var(--rbfw-or-focus);
	box-shadow: 0 0 0 3px rgba(123, 163, 201, .18);
}

.rbfw-or-modal .rbfw-or-control::placeholder {
	color: var(--rbfw-or-placeholder);
}

.rbfw-or-field-icon {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	transform: translateY(-50%);
	color: var(--rbfw-or-placeholder);
	font-size: 15px;
	pointer-events: none;
}

.rbfw-or-help {
	display: block;
	margin-top: 6px;
	color: var(--rbfw-or-placeholder);
	font-size: 12px;
	line-height: 1.45;
}

/* Upload control, styled as a drop-zone rather than a raw file input. */
.rbfw-or-drop {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px;
	border: 1px dashed var(--rbfw-or-line);
	border-radius: 10px;
	background: #f7fafd;
	color: var(--rbfw-or-muted);
	font-size: 14px;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.rbfw-or-drop:hover {
	border-color: var(--rbfw-or-focus);
	background: #f1f7fc;
}

.rbfw-or-drop i {
	font-size: 18px;
	color: var(--rbfw-or-focus);
}

.rbfw-or-drop input[type="file"] {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	color: var(--rbfw-or-muted);
}

/* Acknowledgement. */
.rbfw-or-ack label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--rbfw-or-line);
	border-radius: 10px;
	background: #f7fafd;
	color: var(--rbfw-or-ink);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.55;
	cursor: pointer;
}

.rbfw-or-ack input[type="checkbox"] {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin: 1px 0 0;
	accent-color: var(--rbfw_color_primary, #ff3726);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.rbfw-or-modal__foot {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 22px;
	border-top: 1px solid #e3ecf5;
	background: #fbfdff;
}

.rbfw-or-modal__foot button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity .15s ease, background .15s ease;
}

.rbfw-or-modal__foot .rbfw-or-cancel {
	border: 1px solid var(--rbfw-or-line);
	background: #fff;
	color: var(--rbfw-or-muted);
}

.rbfw-or-modal__foot .rbfw-or-cancel:hover {
	border-color: var(--rbfw-or-focus);
	color: var(--rbfw-or-ink);
}

.rbfw-or-modal__foot .rbfw-or-submit {
	border: 1px solid var(--rbfw_color_primary, #ff3726);
	background: var(--rbfw_color_primary, #ff3726);
	color: #fff;
}

.rbfw-or-modal__foot .rbfw-or-submit:hover:not(:disabled) {
	opacity: .9;
}

.rbfw-or-modal__foot .rbfw-or-submit:disabled {
	opacity: .6;
	cursor: wait;
}

/* ── Success state ───────────────────────────────────────────────────────── */

.rbfw-or-done {
	padding: 18px 0 8px;
	text-align: center;
}

.rbfw-or-done[hidden] {
	display: none;
}

.rbfw-or-done__tick {
	width: 60px;
	height: 60px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #dcfce7;
	color: #166534;
	font-size: 30px;
	line-height: 60px;
}

.rbfw-or-done h4 {
	margin: 0 0 8px;
	color: var(--rbfw-or-ink);
	font-size: 18px;
	font-weight: 700;
}

.rbfw-or-done p {
	margin: 0 0 16px;
	color: var(--rbfw-or-muted);
	font-size: 14px;
	line-height: 1.6;
}

.rbfw-or-done__link {
	display: inline-block;
	padding: 11px 22px;
	border-radius: 8px;
	background: var(--rbfw_color_primary, #ff3726);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.rbfw-or-done__link:hover {
	color: #fff;
	opacity: .9;
}

/* ── Small screens ───────────────────────────────────────────────────────── */

@media (max-width: 560px) {
	.rbfw-or-modal {
		padding: 0;
	}

	.rbfw-or-modal__panel {
		max-width: none;
		min-height: 100%;
		max-height: none;
		border-radius: 0;
	}

	.rbfw-or-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.rbfw-or-modal__head,
	.rbfw-or-modal__body,
	.rbfw-or-modal__foot {
		padding-right: 16px;
		padding-left: 16px;
	}

	.rbfw-or-modal__head::after {
		display: none;
	}

	.rbfw-or-modal__foot {
		position: sticky;
		bottom: 0;
		flex-direction: column-reverse;
	}

	.rbfw-or-modal__foot button {
		width: 100%;
	}
}
