/*
 * Shared styling bridge (project plan section 7): both the Gutenberg block's
 * native style panel and Elementor's Style tab write into these same custom
 * properties via inline style attributes, so both editors theme one component.
 * --bp-primary-color / --bp-radius / --bp-font / --bp-max-width are the
 * per-instance knobs; everything else below is fixed chrome (neutral grays,
 * spacing, shadows).
 */
.bookingplugin-form {
	--bp-primary-color: #2271b1;
	--bp-radius: 4px;
	--bp-font: inherit;
	--bp-max-width: 440px;

	--bp-text: #111518;
	--bp-muted: #687279;
	--bp-border: #e0e5eb;
	--bp-surface: #ffffff;
	--bp-surface-muted: #f9fafb;
	--bp-danger: #b32d2e;
	--bp-success: #1e7e34;
	--bp-shadow: 0 10px 20px rgba(41, 51, 61, 0.08);

	max-width: var( --bp-max-width );
	width: 100%;
	padding: 24px;
	background: var( --bp-surface );
	border: 1px solid var( --bp-border );
	border-radius: var( --bp-radius );
	box-shadow: var( --bp-shadow );
	font-family: var( --bp-font );
	color: var( --bp-text );
	box-sizing: border-box;
}

.bookingplugin-form *,
.bookingplugin-form *::before,
.bookingplugin-form *::after {
	box-sizing: border-box;
}

.bookingplugin-form button,
.bookingplugin-form input,
.bookingplugin-form select {
	font-family: inherit;
	font-size: 15px;
	border-radius: var( --bp-radius );
}

.bookingplugin-layout-inline {
	max-width: 100%;
	display: flex;
	gap: 1.5rem;
	align-items: flex-start;
}

/* Step indicator */
.bookingplugin-steps {
	display: flex;
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
	gap: 8px;
}

.bookingplugin-step-item {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	color: var( --bp-muted );
}

.bookingplugin-step-dot {
	width: 8px;
	height: 8px;
	min-width: 8px;
	border-radius: 50%;
	background: var( --bp-border );
}

.bookingplugin-step-item.is-active .bookingplugin-step-dot {
	background: var( --bp-primary-color );
}

.bookingplugin-step-item.is-active {
	color: var( --bp-text );
}

.bookingplugin-step-item.is-done .bookingplugin-step-dot {
	background: var( --bp-muted );
}

.bookingplugin-step-title {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 600;
	color: var( --bp-text );
}

.bookingplugin-summary {
	margin: -8px 0 16px;
	font-size: 14px;
	color: var( --bp-muted );
}

.bookingplugin-empty {
	color: var( --bp-muted );
	font-size: 14px;
}

.bookingplugin-company-placeholder p {
	color: var( --bp-muted );
	font-size: 14px;
	margin: 0;
}

/* Buttons */
.bookingplugin-form button.bookingplugin-primary {
	display: block;
	width: 100%;
	min-height: 40px;
	margin-top: 8px;
	padding: 5px 20px;
	background-color: var( --bp-primary-color );
	color: var( --bp-text );
	border: none;
	font-weight: 500;
	cursor: pointer;
	transition: filter 0.15s ease;
}

.bookingplugin-form button.bookingplugin-primary:hover:not(:disabled) {
	filter: brightness(0.93);
}

.bookingplugin-form button.bookingplugin-primary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bookingplugin-nav-btn {
	flex: 0 0 auto;
	background: none;
	border: 1px solid var( --bp-border );
	width: 28px;
	height: 28px;
	line-height: 1;
	cursor: pointer;
	color: var( --bp-text );
}

.bookingplugin-back-link {
	display: inline-block;
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	color: var( --bp-muted );
	cursor: pointer;
	text-decoration: underline;
	margin-bottom: 12px;
}

.bookingplugin-back-link:hover {
	color: var( --bp-text );
}

/* Day-card strip: today (or the next day with anything left to book) as
 * card 1, tomorrow as card 2, and so on — horizontally scrollable up to
 * VISIBLE_DAYS (14) days out. */
.bookingplugin-scroll-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
}

.bookingplugin-day-cards {
	flex: 1;
	display: flex;
	gap: 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding-bottom: 4px;
}

.bookingplugin-day-card {
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: 112px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	border: 1px solid var( --bp-border );
	background: var( --bp-surface );
	border-radius: var( --bp-radius );
	padding: 12px 10px;
	text-align: center;
}

.bookingplugin-day-card.is-selected {
	border-color: var( --bp-primary-color );
}

.bookingplugin-day-card-date {
	font-size: 13px;
	font-weight: 600;
	color: var( --bp-text );
}

.bookingplugin-day-card-status {
	font-size: 11px;
	color: var( --bp-muted );
}

.bookingplugin-day-card.is-bookable .bookingplugin-day-card-status {
	color: var( --bp-success );
}

.bookingplugin-day-card button.bookingplugin-primary {
	margin-top: 0;
	min-height: 32px;
	padding: 4px 12px;
	font-size: 13px;
	width: 100%;
}

/* Slots */
.bookingplugin-slot-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.bookingplugin-slot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border: 1px solid var( --bp-border );
	background: var( --bp-surface );
	padding: 10px 14px;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.1s ease;
}

.bookingplugin-slot:hover:not(:disabled) {
	border-color: var( --bp-primary-color );
}

.bookingplugin-slot:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.bookingplugin-slot-time {
	font-weight: 500;
}

.bookingplugin-badge {
	font-size: 12px;
	font-weight: 500;
	padding: 2px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.bookingplugin-badge.is-open {
	background: rgba(30, 126, 52, 0.12);
	color: var( --bp-success );
}

.bookingplugin-badge.is-low {
	background: rgba(247, 181, 0, 0.18);
	color: #8a6300;
}

.bookingplugin-badge.is-full {
	background: rgba(179, 45, 46, 0.1);
	color: var( --bp-danger );
}

/* Details form */
.bookingplugin-field {
	display: block;
	margin-bottom: 14px;
	font-size: 13px;
	font-weight: 500;
	color: var( --bp-muted );
}

.bookingplugin-field input {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 8px 10px;
	border: 1px solid var( --bp-border );
	background: var( --bp-surface );
	color: var( --bp-text );
}

.bookingplugin-field input:focus {
	outline: none;
	border-color: var( --bp-primary-color );
}

/* Status */
.bookingplugin-error {
	color: var( --bp-danger );
	font-size: 14px;
	margin: 0 0 12px;
}

.bookingplugin-success {
	text-align: center;
	padding: 12px 0;
}

.bookingplugin-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(30, 126, 52, 0.12);
	color: var( --bp-success );
	font-size: 20px;
	margin-bottom: 12px;
}

.bookingplugin-success-message {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 4px;
	color: var( --bp-text );
}

.bookingplugin-success-ref {
	font-size: 13px;
	color: var( --bp-muted );
	margin: 0;
}
