/* Effortless Modular Booking Platform — booking form styles */

.elmbp-booking-wrap {
	position: relative;
	max-width: 480px;
	font-family: inherit;
}

/*
 * Ensure the `hidden` attribute always wins inside the widget. Author rules
 * such as `.elmbp-loading { display: flex }` otherwise override the user-agent
 * `[hidden] { display: none }` rule, which would leave the loading overlay and
 * inactive steps permanently visible.
 */
.elmbp-booking-wrap [hidden] {
	display: none !important;
}

/* Calendar */
.elmbp-calendar-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.elmbp-prev-month,
.elmbp-next-month {
	background: none;
	border: 1px solid #ccc;
	border-radius: 4px;
	cursor: pointer;
	padding: 4px 10px;
	font-size: 18px;
	line-height: 1;
}

.elmbp-prev-month::before { content: "\2039"; }
.elmbp-next-month::before { content: "\203A"; }

.elmbp-month-label {
	font-weight: 600;
	font-size: 1rem;
}

.elmbp-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.elmbp-day-header {
	text-align: center;
	font-size: 0.75rem;
	font-weight: 600;
	color: #666;
	padding: 4px 0;
}

.elmbp-day {
	aspect-ratio: 1;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.875rem;
	background: #f0f0f0;
	color: #999;
}

.elmbp-day.elmbp-available {
	background: #e8f4fd;
	color: #1a73e8;
	font-weight: 600;
}

.elmbp-day.elmbp-selected {
	background: #1a73e8;
	color: #fff;
	font-weight: 600;
}

.elmbp-day.elmbp-next-available {
	box-shadow: 0 0 0 2px #1a73e8 inset;
}

.elmbp-day.elmbp-available:hover,
.elmbp-day.elmbp-available:focus {
	background: #1a73e8;
	color: #fff;
	outline: none;
}

.elmbp-day:disabled {
	cursor: default;
	opacity: 0.4;
}

/* Slots */
.elmbp-slots-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.elmbp-slot {
	padding: 8px 16px;
	border: 1px solid #1a73e8;
	border-radius: 20px;
	background: #fff;
	color: #1a73e8;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 600;
	transition: background 0.15s, color 0.15s;
}

.elmbp-tz-label {
	width: 100%;
	font-size: 0.75rem;
	color: #888;
	margin-top: 4px;
}

.elmbp-slot:hover,
.elmbp-slot:focus {
	background: #1a73e8;
	color: #fff;
	outline: none;
}

/* Form */
.elmbp-customer-form label {
	display: block;
	font-weight: 600;
	font-size: 0.875rem;
	margin: 12px 0 4px;
}

.elmbp-customer-form input,
.elmbp-customer-form textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.875rem;
	box-sizing: border-box;
}

.elmbp-customer-form input:focus,
.elmbp-customer-form textarea:focus {
	outline: none;
	border-color: #1a73e8;
	box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.elmbp-submit {
	margin-top: 16px;
	width: 100%;
	padding: 12px;
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.elmbp-submit:hover { background: #1558b0; }
.elmbp-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Stripe card element */
.elmbp-card-element {
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
}

.elmbp-card-errors {
	color: #e53935;
	font-size: 0.8125rem;
	margin-top: 4px;
	min-height: 1.2em;
}

/* Back buttons */
.elmbp-back-to-calendar,
.elmbp-back-to-slots {
	background: none;
	border: none;
	color: #1a73e8;
	cursor: pointer;
	font-size: 0.875rem;
	padding: 0;
	margin-bottom: 12px;
}

/* Selected labels */
.elmbp-selected-date,
.elmbp-selected-slot {
	font-weight: 600;
	color: #333;
	margin: 0 0 12px;
}

/* Success */
.elmbp-step-success {
	text-align: center;
	padding: 32px 0;
}

.elmbp-success-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #34a853;
	color: #fff;
	font-size: 28px;
	line-height: 56px;
	margin: 0 auto 16px;
}

/* Loading spinner */
.elmbp-loading {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.elmbp-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid #e0e0e0;
	border-top-color: #1a73e8;
	border-radius: 50%;
	animation: elmbp-spin 0.7s linear infinite;
}

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

/* Error */
.elmbp-form-error,
.elmbp-error {
	color: #e53935;
	font-size: 0.875rem;
	margin: 8px 0 0;
}

.elmbp-no-slots {
	color: #666;
	font-style: italic;
}

/* Popup / modal */
.elmbp-popup-trigger {
	padding: 12px 24px;
	background: #1a73e8;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.elmbp-popup-trigger:hover {
	background: #1558b0;
}

.elmbp-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}

.elmbp-modal[hidden] {
	display: none;
}

.elmbp-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.elmbp-modal-dialog {
	position: relative;
	z-index: 1;
	background: #fff;
	border-radius: 8px;
	padding: 28px 24px 24px;
	width: 100%;
	max-width: 540px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.elmbp-modal-close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	color: #666;
}

.elmbp-modal-close:hover {
	color: #111;
}
