/* ============================================================
   Cringleford Booking – Frontend Booking Form Styles
   ============================================================ */

/* ── Wrapper ────────────────────────────────────────────────── */
#cb-booking-wrapper {
	max-width: 560px;
	margin: 0 auto;
	font-family: inherit;
}

/* ── Heading ────────────────────────────────────────────────── */
.cb-form-title {
	font-size: 1.5em;
	font-weight: 700;
	margin: 0 0 8px;
	color: #1d2327;
}

.cb-form-intro {
	color: #646970;
	margin: 0 0 24px;
	font-size: 0.95em;
}

/* ── Setting selector ───────────────────────────────────────── */
.cb-setting-fieldset {
	border: none;
	margin: 0 0 24px;
	padding: 0;
}

.cb-field-label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 10px;
	color: #374151;
}

.cb-required {
	color: #e53e3e;
	margin-left: 2px;
}

.cb-setting-cards {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.cb-setting-card {
	flex: 1;
	min-width: 180px;
	cursor: pointer;
}

.cb-setting-radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.cb-setting-card-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 18px 16px;
	border: 2px solid #d1d5db;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
	user-select: none;
}

.cb-setting-card:hover .cb-setting-card-inner {
	border-color: #2271b1;
	background: #f0f6ff;
}

.cb-setting-card--active .cb-setting-card-inner {
	border-color: #2271b1;
	background: #eff6ff;
	box-shadow: 0 0 0 3px rgba(34,113,177,.18);
}

.cb-setting-icon {
	font-size: 1.8em;
	line-height: 1;
}

.cb-setting-name {
	font-size: 0.88em;
	font-weight: 600;
	color: #1d2327;
	line-height: 1.3;
}

/* ── Slots spinner ──────────────────────────────────────────── */
#cb-slots-spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 3px solid #e2e8f0;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: cb-spin 0.75s linear infinite;
	margin: 12px auto;
}

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

/* ── No-slots notice ────────────────────────────────────────── */
#cb-no-slots {
	display: none;
	padding: 16px;
	background: #fff8e1;
	border-left: 4px solid #f59e0b;
	border-radius: 0 4px 4px 0;
	color: #92400e;
	font-size: 0.9em;
}

/* ── Form ───────────────────────────────────────────────────── */
#cb-booking-form {
	display: none; /* shown by JS once slots are loaded */
	background: #fff;
	border: 1px solid #dde1e7;
	border-radius: 8px;
	padding: 28px 32px;
	box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ── Form rows ──────────────────────────────────────────────── */
.cb-field {
	margin-bottom: 18px;
}

.cb-field label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 6px;
	color: #374151;
}

.cb-field .cb-required {
	color: #e53e3e;
	margin-left: 2px;
}

.cb-field input,
.cb-field select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 1em;
	color: #1d2327;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
	-webkit-appearance: none;
	appearance: none;
}

.cb-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
}

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

/* ── Submit button ──────────────────────────────────────────── */
.cb-submit-row {
	margin-top: 24px;
}

.cb-submit-btn {
	display: inline-block;
	width: 100%;
	padding: 12px 24px;
	background: #2271b1;
	color: #fff;
	font-size: 1em;
	font-weight: 600;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.2s;
	letter-spacing: 0.02em;
}

.cb-submit-btn:hover:not(:disabled) {
	background: #135e96;
}

.cb-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* ── Messages ───────────────────────────────────────────────── */
.cb-message {
	display: none;
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 20px;
	font-size: 0.95em;
	line-height: 1.5;
}

.cb-message-success {
	background: #d1fae5;
	border: 1px solid #6ee7b7;
	color: #065f46;
}

.cb-message-error {
	background: #fee2e2;
	border: 1px solid #fca5a5;
	color: #991b1b;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media ( max-width: 480px ) {
	#cb-booking-form {
		padding: 20px 16px;
	}
	.cb-setting-cards {
		flex-direction: column;
	}
	.cb-setting-card {
		min-width: 0;
	}
}
