/**
 * RBFW Pro — Registration form (modern layout)
 *
 * Ported from the Tour Booking Manager attendee form design so the rental
 * registration form matches it. Scoped under .rbfw-regf-form; the rental field
 * names / inputs / JS hooks are unchanged — this is presentation only.
 */

/* Card */
.rbfw-regf-form {
	position: relative;
	padding: 24px 24px 20px;
	border-radius: 12px;
	background: linear-gradient(135deg, #eef4fa 0%, #e8f0f8 100%);
	overflow: hidden;
	margin-top: 4px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.rbfw-regf-form::after {
	content: "\f2bb"; /* address-card */
	font-family: "Font Awesome 5 Free";
	font-weight: 400;
	position: absolute;
	top: 12px;
	right: 16px;
	font-size: 72px;
	line-height: 1;
	color: rgba(30, 58, 95, 0.06);
	pointer-events: none;
}

.rbfw-regf-form__title {
	position: relative;
	z-index: 1;
	margin: 0 0 20px;
	padding: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	color: #1e3a5f;
	letter-spacing: -0.01em;
}

/* Grid — container-adaptive: collapses to one aligned column when the form
   sits in a narrow column (e.g. a sidebar), two columns when there's room. */
.rbfw-regf-form .rbfw-regf-grid {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px 20px;
}

.rbfw-regf-form .rbfw-regf-grid .rbfw-field--email,
.rbfw-regf-form .rbfw-regf-grid .rbfw-field--full {
	grid-column: 1 / -1;
}

/* Field item */
.rbfw-regf-form .rbfw-regf-item {
	display: flex;
	flex-direction: column;
	margin: 0;
	width: 100%;
	max-width: 100%;
}

/* Label */
.rbfw-regf-form .rbfw-field-label,
.rbfw-regf-form .rbfw_regf_group > label:first-child {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #5a6f85;
	white-space: normal;
	width: 100%;
}

.rbfw-regf-form .rbfw-required {
	color: #e53e3e;
	font-weight: 700;
	margin-left: 2px;
}

/* Input wrap */
.rbfw-regf-form .rbfw-field-input-wrap {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
}

/* Inputs — both wrapped (built-in) and bare (custom) fields */
.rbfw-regf-form .rbfw-field-input-wrap input.formControl,
.rbfw-regf-form .rbfw-field-input-wrap select.formControl,
.rbfw-regf-form .rbfw-field-input-wrap textarea.formControl,
.rbfw-regf-form .rbfw_regf_group > input.rbfw_regf_field,
.rbfw-regf-form .rbfw_regf_group > select.rbfw_regf_field,
.rbfw-regf-form .rbfw_regf_group > textarea.rbfw_regf_field,
.rbfw-regf-form .rbfw_regf_group > .rbfw_regf_file_wrap input {
	width: 100%;
	min-height: 48px;
	padding: 12px 44px 12px 14px;
	border: 1px solid #d4e0ec;
	border-radius: 10px;
	font-size: 15px;
	line-height: 1.4;
	color: #1e3a5f;
	background: #fff;
	box-shadow: none;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rbfw-regf-form .rbfw-field-input-wrap textarea.formControl,
.rbfw-regf-form .rbfw_regf_group > textarea.rbfw_regf_field {
	min-height: 96px;
	padding-right: 14px;
	resize: vertical;
}

.rbfw-regf-form .rbfw-field-input-wrap input.formControl:focus,
.rbfw-regf-form .rbfw-field-input-wrap select.formControl:focus,
.rbfw-regf-form .rbfw-field-input-wrap textarea.formControl:focus,
.rbfw-regf-form .rbfw_regf_group > input.rbfw_regf_field:focus,
.rbfw-regf-form .rbfw_regf_group > select.rbfw_regf_field:focus,
.rbfw-regf-form .rbfw_regf_group > textarea.rbfw_regf_field:focus {
	outline: none;
	border-color: #7ba3c9;
	box-shadow: 0 0 0 3px rgba(123, 163, 201, 0.18);
}

.rbfw-regf-form .rbfw_regf_group > input.rbfw_regf_field,
.rbfw-regf-form .rbfw_regf_group > select.rbfw_regf_field {
	padding-right: 14px;
}

.rbfw-regf-form input::placeholder {
	color: #9aafc3;
}

/* Field icons */
.rbfw-regf-form .rbfw-field-icon {
	position: absolute;
	top: 50%;
	right: 14px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9aafc3;
	font-size: 16px;
	pointer-events: none;
}

.rbfw-regf-form .rbfw-field-icon--at {
	font-size: 18px;
	font-weight: 600;
}

/* Phone field with prefix */
.rbfw-regf-form .rbfw-field-input-wrap--phone {
	background: #fff;
	border: 1px solid #d4e0ec;
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rbfw-regf-form .rbfw-field-input-wrap--phone:focus-within {
	border-color: #7ba3c9;
	box-shadow: 0 0 0 3px rgba(123, 163, 201, 0.18);
}

.rbfw-regf-form .rbfw-phone-prefix {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	padding: 0 12px;
	border-right: 1px solid #d4e0ec;
	color: #5a6f85;
	font-size: 14px;
	font-weight: 600;
	background: #f8fbfe;
}

.rbfw-regf-form .rbfw-phone-prefix .fa-chevron-down {
	font-size: 10px;
	color: #9aafc3;
}

.rbfw-regf-form .rbfw-field-input-wrap--phone input.formControl {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding-left: 12px;
	padding-right: 14px;
	min-height: 46px;
}

.rbfw-regf-form .rbfw-field-input-wrap--phone input.formControl:focus {
	box-shadow: none;
}

/* Radio / checkbox option rows (custom fields) */
.rbfw-regf-form .rbfw_regf_group > label:not(:first-child) {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 10px 8px 0;
	padding: 8px 12px;
	border: 1px solid #d4e0ec;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	color: #1e3a5f;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.rbfw-regf-form .rbfw_regf_group > label:not(:first-child):hover {
	border-color: #7ba3c9;
	background: #f8fbfe;
}

.rbfw-regf-form .rbfw_regf_group > label:not(:first-child) input {
	width: auto;
	min-height: 0;
	margin: 0;
}

/* File field */
.rbfw-regf-form .rbfw_regf_file_wrap {
	width: 100%;
}

/* Responsive */
@media only screen and (max-width: 640px) {
	.rbfw-regf-form .rbfw-regf-grid {
		grid-template-columns: 1fr;
	}
	.rbfw-regf-form .rbfw-regf-grid .rbfw-field--name,
	.rbfw-regf-form .rbfw-regf-grid .rbfw-field--phone {
		grid-column: 1 / -1;
	}
	.rbfw-regf-form {
		padding: 18px 16px 16px;
	}
	.rbfw-regf-form__title {
		font-size: 18px;
		margin-bottom: 16px;
	}
}

/* ===== Conditional-logic messages (injected by rbfw-form-conditions.js) ===== */
.rbfw-regf-form .rbfw-cond-message {
	grid-column: 1 / -1;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 4px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.45;
	border: 1px solid transparent;
}
.rbfw-regf-form .rbfw-cond-message::before {
	content: "\f534"; /* dashicons-info */
	font-family: dashicons;
	font-size: 16px;
	line-height: 1.2;
	flex-shrink: 0;
}
.rbfw-regf-form .rbfw-cond-message--info {
	background: #eff6ff; border-color: #bfdbfe; color: #1e40af;
}
.rbfw-regf-form .rbfw-cond-message--warning {
	background: #fffbeb; border-color: #fde68a; color: #92400e;
}
.rbfw-regf-form .rbfw-cond-message--warning::before { content: "\f227"; /* warning */ }
.rbfw-regf-form .rbfw-cond-message--error,
.rbfw-regf-form .rbfw-cond-message--block {
	background: #fef2f2; border-color: #fecaca; color: #991b1b;
}
.rbfw-regf-form .rbfw-cond-message--error::before,
.rbfw-regf-form .rbfw-cond-message--block::before { content: "\f534"; }

/* Booking button blocked by a conditional rule */
.rbfw-book-now-btn.rbfw-cond-blocked,
.mp_rbfw_book_now_submit.rbfw-cond-blocked {
	opacity: .55;
	pointer-events: none;
	cursor: not-allowed;
}
