/**
 * BranchOut Booking - Booking Form Styles
 *
 * Clean, modern styling for the booking form.
 */

/* Form Wrapper */
.bo-booking-form-wrapper {
	max-width: 500px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Form */
.bo-booking-form {
	background: #fff;
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Form Notices */
.bo-booking-form-notice {
	padding: 15px 20px;
	border-radius: 8px;
	background: #f8f9fa;
	color: #666;
	text-align: center;
}

.bo-booking-form-notice.bo-notice-error {
	background: #fef2f2;
	color: #dc2626;
}

/* Form Messages */
.bo-form-messages {
	margin-bottom: 20px;
}

.bo-form-messages:empty {
	display: none;
}

.bo-form-message {
	padding: 12px 16px;
	border-radius: 8px;
	margin-bottom: 10px;
	font-size: 14px;
}

.bo-form-message-success {
	background: #ecfdf5;
	color: #047857;
	border: 1px solid #a7f3d0;
}

.bo-form-message-error {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

.bo-form-message-info {
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
}

/* Form Rows */
.bo-form-row {
	margin-bottom: 20px;
}

.bo-form-row:last-child {
	margin-bottom: 0;
}

/* Split Row */
.bo-form-row-split {
	display: flex;
	gap: 15px;
}

.bo-form-col {
	flex: 1;
}

/* Labels */
.bo-booking-form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 14px;
	color: #333;
}

.bo-booking-form .required {
	color: #dc2626;
}

/* Inputs */
.bo-booking-form input[type="text"],
.bo-booking-form input[type="email"],
.bo-booking-form input[type="tel"],
.bo-booking-form input[type="number"],
.bo-booking-form input[type="date"],
.bo-booking-form input[type="time"],
.bo-booking-form select {
	width: 100%;
	padding: 12px 14px;
	font-size: 15px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #333;
	transition: border-color 0.2s, box-shadow 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.bo-booking-form input:hover,
.bo-booking-form select:hover {
	border-color: #9ca3af;
}

.bo-booking-form input:focus,
.bo-booking-form select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.bo-booking-form input.is-invalid,
.bo-booking-form select.is-invalid {
	border-color: #dc2626;
}

.bo-booking-form input.is-invalid:focus,
.bo-booking-form select.is-invalid:focus {
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Select styling */
.bo-booking-form select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
	background-position: right 10px center;
	background-repeat: no-repeat;
	background-size: 20px;
	padding-right: 40px;
	cursor: pointer;
}

/* Number input arrows */
.bo-booking-form input[type="number"] {
	-moz-appearance: textfield;
}

.bo-booking-form input[type="number"]::-webkit-outer-spin-button,
.bo-booking-form input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Selected Room Display */
.bo-selected-room {
	padding: 12px 16px;
	background: #f8f9fa;
	border-radius: 8px;
	display: flex;
	gap: 8px;
}

.bo-room-label {
	color: #666;
}

.bo-room-name {
	font-weight: 600;
	color: #333;
}

/* Availability Status */
.bo-availability-status {
	margin-bottom: 20px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	display: none;
}

.bo-availability-status.is-visible {
	display: block;
}

.bo-availability-status.is-checking {
	background: #f3f4f6;
	color: #6b7280;
}

.bo-availability-status.is-available {
	background: #ecfdf5;
	color: #047857;
}

.bo-availability-status.is-unavailable {
	background: #fef2f2;
	color: #dc2626;
}

.bo-availability-status.is-warning {
	background: #fffbeb;
	color: #b45309;
}

/* Capacity Info */
.bo-capacity-info {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: #6b7280;
}

.bo-capacity-info.is-warning {
	color: #b45309;
}

/* Submit Button */
.bo-form-submit {
	margin-top: 25px;
}

.bo-submit-button {
	width: 100%;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: #2271b1;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s, transform 0.1s;
}

.bo-submit-button:hover {
	background: #1a5a8e;
}

.bo-submit-button:active {
	transform: translateY(1px);
}

.bo-submit-button:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.3);
}

.bo-submit-button:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	transform: none;
}

.bo-submit-button.is-loading {
	position: relative;
	color: transparent;
}

.bo-submit-button.is-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: bo-spin 0.8s linear infinite;
}

@keyframes bo-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Success State */
.bo-booking-form.is-success {
	text-align: center;
	padding: 40px 30px;
}

.bo-success-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 20px;
	background: #ecfdf5;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bo-success-icon svg {
	width: 32px;
	height: 32px;
	color: #047857;
}

.bo-success-title {
	font-size: 20px;
	font-weight: 600;
	color: #333;
	margin-bottom: 10px;
}

.bo-success-message {
	color: #666;
	line-height: 1.6;
}

/* Field Validation Errors */
.bo-field-error {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: #dc2626;
}

/* Responsive */
@media (max-width: 540px) {
	.bo-booking-form {
		padding: 20px;
	}

	.bo-form-row-split {
		flex-direction: column;
		gap: 20px;
	}

	.bo-booking-form input[type="text"],
	.bo-booking-form input[type="email"],
	.bo-booking-form input[type="tel"],
	.bo-booking-form input[type="number"],
	.bo-booking-form input[type="date"],
	.bo-booking-form input[type="time"],
	.bo-booking-form select {
		padding: 10px 12px;
		font-size: 16px; /* Prevent iOS zoom */
	}

	.bo-submit-button {
		padding: 12px 20px;
	}
}

/* Dark Mode Support (optional, for themes that support it) */
@media (prefers-color-scheme: dark) {
	.bo-booking-form-wrapper.supports-dark-mode .bo-booking-form {
		background: #1f2937;
		box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
	}

	.bo-booking-form-wrapper.supports-dark-mode label {
		color: #e5e7eb;
	}

	.bo-booking-form-wrapper.supports-dark-mode input,
	.bo-booking-form-wrapper.supports-dark-mode select {
		background: #374151;
		border-color: #4b5563;
		color: #e5e7eb;
	}
}
