/* GL Appointment Booking — public calendar (scoped to avoid theme conflicts) */

.glab-booking,
.glab-booking *,
.glab-booking *::before,
.glab-booking *::after {
	box-sizing: border-box;
}

.glab-booking-empty {
	padding: 16px;
	border: 1px dashed #d4d4d8;
	border-radius: 8px;
	color: #525252;
	background: #fafafa;
}

.glab-booking-chooser {
	margin: 16px 0;
}
.glab-booking-chooser > label {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
}
.glab-booking-chooser > select {
	width: 100%;
	max-width: 360px;
	padding: 8px 10px;
	border: 1px solid #d4d4d8;
	border-radius: 6px;
	margin-bottom: 16px;
}

/* Wrapper used on single product pages for full-width layout */
.glab-booking-wrap {
	width: 100%;
	max-width: 100%;
	clear: both;
	margin: 1.5em 0;
}

.glab-booking {
	font-family: inherit;
	color: #18181b;
	background: #fff;
	border: 1px solid #e4e4e7;
	border-radius: 12px;
	padding: 20px;
	margin: 16px 0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	width: 100%;
	max-width: 640px;
}

/* WooCommerce single product page — title already shown in product summary */
.glab-booking--product-page .glab-booking__title,
.single-product .glab-booking .glab-booking__title {
	display: none;
}

.glab-booking__header {
	border-bottom: 1px solid #f4f4f5;
	padding-bottom: 12px;
	margin-bottom: 18px;
}

.glab-booking--product-page .glab-booking__header,
.single-product .glab-booking__header {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 12px;
	justify-content: flex-end;
}

.glab-booking__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.3;
}

.glab-booking__pricing {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
}

.glab-booking__price {
	font-size: 1.1rem;
	font-weight: 700;
}

.glab-booking__price .woocommerce-Price-amount {
	color: inherit;
}

.glab-booking__deposit {
	font-size: 0.85rem;
	color: #16a34a;
	font-weight: 600;
}

/* Stack calendar above time slots (avoids cramped side-by-side on product pages) */
.glab-booking__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.glab-booking__col {
	min-width: 0;
	width: 100%;
}

/* Calendar */
.glab-booking .glab-cal {
	border: 1px solid #e4e4e7;
	border-radius: 10px;
	padding: 12px;
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.glab-booking .glab-cal__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.glab-booking .glab-cal__title {
	font-weight: 600;
	font-size: 0.95rem;
	flex: 1;
	text-align: center;
}

.glab-booking .glab-cal__prev,
.glab-booking .glab-cal__next {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	min-width: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	background: #f4f4f5;
	font-size: 1.25rem;
	line-height: 1;
	color: #18181b;
	font-family: inherit;
}

.glab-booking .glab-cal__prev:hover,
.glab-booking .glab-cal__next:hover {
	background: #e4e4e7;
}

.glab-booking .glab-cal__prev:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.glab-booking .glab-cal__weekdays,
.glab-booking .glab-cal__grid {
	display: grid !important;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
	width: 100%;
}

.glab-booking .glab-cal__weekdays {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	color: #71717a;
	letter-spacing: 0;
	margin-bottom: 6px;
}

.glab-booking .glab-cal__weekday {
	display: block !important;
	min-width: 0;
	text-align: center;
	padding: 4px 0;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.glab-booking .glab-cal__day {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: auto;
	min-height: 38px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	cursor: pointer;
	font-size: 0.875rem;
	line-height: 1;
	color: #18181b;
	border: 1px solid transparent;
	background: transparent;
	font-family: inherit;
	font-weight: 500;
}

.glab-booking .glab-cal__day--empty {
	visibility: hidden;
	pointer-events: none;
	border: 0;
	min-height: 38px;
}

.glab-booking .glab-cal__day--available {
	background: #ecfdf5;
	color: #047857;
}

.glab-booking .glab-cal__day--available:hover {
	background: #d1fae5;
	border-color: #a7f3d0;
}

.glab-booking .glab-cal__day--unavailable,
.glab-booking .glab-cal__day--past {
	color: #d4d4d8;
	background: #fafafa;
	cursor: not-allowed;
	pointer-events: none;
}

.glab-booking .glab-cal__day--today {
	border-color: #18181b;
}

.glab-booking .glab-cal__day--selected,
.glab-booking .glab-cal__day--selected:hover {
	background: #18181b !important;
	color: #fff !important;
	border-color: #18181b !important;
}

.glab-booking .glab-cal__day:focus {
	outline: 2px solid #18181b;
	outline-offset: 1px;
}

/* Slots pane */
.glab-booking .glab-booking__pane > h4 {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: #3f3f46;
	line-height: 1.4;
}

.glab-booking .glab-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
	gap: 8px;
	width: 100%;
}

.glab-booking .glab-slots:not(:empty) {
	min-height: 48px;
	margin-bottom: 20px;
}

.glab-booking .glab-slot {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 10px 8px;
	white-space: nowrap;
	cursor: pointer;
	text-align: center;
	border: 1px solid #e4e4e7;
	border-radius: 8px;
	font-size: 0.875rem;
	line-height: 1.2;
	color: #18181b;
	background: #fff;
	font-family: inherit;
	font-weight: 500;
	transition:
		border-color 0.15s,
		background 0.15s;
}

.glab-booking .glab-slot:hover {
	border-color: #18181b;
}

.glab-booking .glab-slot--selected,
.glab-booking .glab-slot--selected:hover {
	background: #18181b !important;
	color: #fff !important;
	border-color: #18181b !important;
}

.glab-booking .glab-slot--unavailable {
	color: #d4d4d8;
	background: #fafafa;
	cursor: not-allowed;
	text-decoration: line-through;
	pointer-events: none;
}

.glab-booking .glab-slots__empty {
	grid-column: 1 / -1;
	color: #71717a;
	font-size: 0.9rem;
	padding: 12px 0;
}

/* Form */
.glab-booking .glab-booking__form {
	margin-top: 4px;
	border-top: 1px solid #f4f4f5;
	padding-top: 18px;
	width: 100%;
}

.glab-booking .glab-booking__fields {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	width: 100%;
}

@media (min-width: 520px) {
	.glab-booking .glab-booking__fields {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.glab-booking-wrap--product .glab-booking .glab-booking__fields {
		grid-template-columns: 1fr;
	}
}

.glab-booking .glab-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 0.88rem;
	margin: 0;
}

.glab-booking .glab-field--full {
	grid-column: 1 / -1;
}

.glab-booking .glab-field > span {
	font-weight: 600;
	color: #3f3f46;
}

.glab-booking .glab-field > span em {
	color: #ef4444;
	font-style: normal;
}

.glab-booking .glab-field input,
.glab-booking .glab-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid #d4d4d8 !important;
	border-radius: 6px;
	font: inherit;
	font-size: 1rem;
	line-height: 1.4;
	background: #fff !important;
	background-image: none !important;
	color: #18181b !important;
	box-shadow: none !important;
	appearance: none;
	-webkit-appearance: none;
}

.glab-booking .glab-field input:focus,
.glab-booking .glab-field textarea:focus {
	outline: 2px solid #18181b;
	outline-offset: 0;
	border-color: #18181b !important;
}

.glab-booking .glab-booking__notes {
	margin: 0 0 16px 0;
	font-size: 0.88rem;
	color: #71717a;
	line-height: 1.55;
}

.glab-booking .glab-booking__summary {
	margin-top: 0;
	margin-bottom: 12px;
	padding: 10px 12px;
	background: #f4f4f5;
	border-radius: 8px;
	font-size: 0.9rem;
}

.glab-booking .glab-booking__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 14px;
}

.woocommerce-page button.button.glab-booking__submit,
.woocommerce-page button.button.alt.glab-booking__submit,
.glab-booking .glab-booking__submit {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	padding: 12px 24px;
	margin: 0;
	border: 0 !important;
	border-radius: 8px;
	background: #18181b !important;
	color: #fff !important;
	font-weight: 600;
	cursor: pointer;
	font-size: 0.95rem;
	line-height: 1.3;
	font-family: inherit;
	text-decoration: none;
	width: 100%;
	max-width: 100%;
}

@media (min-width: 520px) {
	.glab-booking .glab-booking__submit {
		width: auto;
	}
}

.glab-booking .glab-booking__submit:hover {
	background: #27272a !important;
	color: #fff !important;
}

.glab-booking .glab-booking__submit:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.glab-booking .glab-booking__msg {
	font-size: 0.88rem;
	flex: 1;
	min-width: 0;
}

.glab-booking .glab-booking__msg--err {
	color: #b91c1c;
}

.glab-booking .glab-booking__msg--ok {
	color: #047857;
}

/* Divi / WooCommerce overrides inside product summary */
.et_pb_module .glab-booking,
.woocommerce div.product .glab-booking,
.woocommerce-page div.product .glab-booking {
	float: none !important;
	width: 100% !important;
	max-width: 640px;
}

.woocommerce div.product .glab-booking span,
.woocommerce div.product .glab-booking .glab-cal__weekday {
	float: none !important;
	width: auto !important;
}

/* Admin status badges */
.glab-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 600;
	background: #e4e4e7;
	color: #18181b;
}
.glab-status-pending {
	background: #fef3c7;
	color: #92400e;
}
.glab-status-confirmed {
	background: #dcfce7;
	color: #166534;
}
.glab-status-completed {
	background: #dbeafe;
	color: #1e40af;
}
.glab-status-cancelled {
	background: #fee2e2;
	color: #991b1b;
}
