/**
 * Booking widget styles. Self-contained (own custom properties, own
 * palette) rather than reading the active theme's variables, since this
 * widget ships from the plugin and has to look reasonable under any theme.
 */

.sbs-booking-widget {
	--sbs-accent: #96525c;
	--sbs-accent-hover: #7c3f48;
	--sbs-line: #e0d7d2;
	--sbs-bg: #faf6f2;
	--sbs-ink: #2b2420;
	--sbs-ink-soft: #6b5f57;

	max-width: 600px;
	margin: 0 auto;
	padding: 40px;
	background: #fff;
	border: 1px solid var(--sbs-line);
	border-radius: 18px;
	box-shadow: 0 24px 60px -32px rgba(43, 36, 32, 0.28);
	font-family: inherit;
	color: var(--sbs-ink);
	box-sizing: border-box;
}

.sbs-booking-heading {
	margin: 0 0 28px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--sbs-line);
}

@media (max-width: 600px) {
	.sbs-booking-widget {
		padding: 24px 20px;
		border-radius: 14px;
	}
}

.sbs-booking-message {
	padding: 14px 18px;
	border-radius: 8px;
	margin-bottom: 20px;
}

.sbs-booking-message.sbs-message-success {
	background: #e4f3e6;
	color: #205a2b;
}

.sbs-booking-message.sbs-message-error {
	background: #fbe6e6;
	color: #7a2323;
}

.sbs-field {
	margin-bottom: 18px;
}

.sbs-field label {
	display: block;
	font-weight: 600;
	font-size: 0.92rem;
	margin-bottom: 8px;
}

.sbs-booking-widget select,
.sbs-booking-widget input[type="date"],
.sbs-booking-widget input[type="text"],
.sbs-booking-widget input[type="email"],
.sbs-booking-widget input[type="tel"],
.sbs-booking-widget textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--sbs-line);
	border-radius: 10px;
	font-family: inherit;
	font-size: 1rem;
	color: var(--sbs-ink);
	background: var(--sbs-bg);
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sbs-booking-widget select:hover:not(:disabled),
.sbs-booking-widget input:hover:not(:disabled),
.sbs-booking-widget textarea:hover {
	border-color: #cbbcb5;
}

.sbs-booking-widget select:disabled,
.sbs-booking-widget input:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.sbs-booking-widget select:focus,
.sbs-booking-widget input:focus,
.sbs-booking-widget textarea:focus {
	outline: none;
	border-color: var(--sbs-accent);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(150, 82, 92, 0.15);
}

.sbs-slot-button:focus-visible,
.sbs-submit:focus-visible {
	outline: 3px solid var(--sbs-accent);
	outline-offset: 2px;
}

.sbs-slots-grid {
	color: var(--sbs-ink-soft);
	font-size: 0.92rem;
}

/* Grid only once there are actual slot buttons — booking-widget.js also
   writes plain status text ("Loading…", "No times available that day.")
   into this same element, which a grid would squeeze into one 92px
   column. */
.sbs-slots-grid:has(.sbs-slot-button) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
	gap: 8px;
}

.sbs-slot-button {
	padding: 10px 8px;
	border: 1px solid var(--sbs-line);
	border-radius: 10px;
	background: #fff;
	color: var(--sbs-ink);
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 500;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.sbs-slot-button:hover {
	border-color: var(--sbs-accent);
	background: var(--sbs-bg);
}

.sbs-slot-button:active {
	transform: scale(0.97);
}

.sbs-slot-button.is-selected {
	background: var(--sbs-accent);
	border-color: var(--sbs-accent);
	color: #fff;
}

.sbs-honeypot {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.sbs-submit {
	display: block;
	width: 100%;
	margin-top: 8px;
	padding: 16px 32px;
	background: var(--sbs-accent);
	color: #fff;
	border: none;
	border-radius: 999px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
}

.sbs-submit:hover {
	background: var(--sbs-accent-hover);
}

.sbs-submit:not(:disabled):active {
	transform: translateY(1px);
}

.sbs-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
