/* ============================================================
   Studio Booking Widget
   ============================================================ */

.sg-booking-widget {
	margin-bottom: 24px;
	font-family: inherit;
}

/* ── Head ── */
.sg-booking-widget__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.sg-booking-widget__title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sg-booking-widget__type-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: 3px 10px;
	border-radius: 99px;
	background: #EFF6FF;
	color: #2563EB;
}

/* ── Prompt ── */
.sg-booking-prompt {
	font-size: 13px;
	color: #64748B;
	margin: 0 0 14px;
	min-height: 20px;
	transition: color .2s;
}

.sg-booking-prompt--error {
	color: #EF4444;
	font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   Shared container — calendar + time picker
   Default (mobile / non-hourly): single column, stacked.
   On desktop when a date is selected (.has-times):
   calendar on left, time picker on right, 50/50 split.
══════════════════════════════════════════════════════════ */
.sg-booking-cal-and-times {
	margin-bottom: 16px;
}

/* ── Shared outer box when side-by-side ── */
@media (min-width: 480px) {
	.sg-booking-cal-and-times--hourly.has-times {
		display: grid;
		grid-template-columns: 1fr 1fr;
		align-items: stretch;
		border: 1px solid #E2E8F0;
		border-radius: 10px;
		overflow: hidden;
	}

	/* Calendar: lose its own border/radius; get a right divider instead */
	.sg-booking-cal-and-times--hourly.has-times .sg-booking-cal-wrap {
		border: none;
		border-radius: 0;
		margin-bottom: 0;
		border-right: 1px solid #E2E8F0;
	}

	/* Time picker: lose its own border/radius; fill the right cell */
	.sg-booking-cal-and-times--hourly.has-times .sg-booking-times {
		border: none;
		border-radius: 0;
		margin-bottom: 0;
		display: flex !important;   /* override the inline style="display:none" once shown */
		flex-direction: column;
	}

	/* Make the slot columns grow to fill available height */
	.sg-booking-cal-and-times--hourly.has-times .sg-time-cols {
		flex: 1;
		min-height: 0;
	}

	.sg-booking-cal-and-times--hourly.has-times .sg-time-slots-grid {
		/* Fill the right panel's height rather than capping at 240px */
		max-height: none;
		flex: 1;
	}
}

/* ── Calendar wrapper (standalone, non-side-by-side) ── */
.sg-booking-cal-wrap {
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 0; /* margin now on the shared container */
}

.sg-booking-cal__nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #F8FAFC;
	border-bottom: 1px solid #E2E8F0;
}

.sg-booking-cal__month-label {
	font-size: 14px;
	font-weight: 600;
	color: #1E293B;
}

.sg-booking-cal__nav-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 6px;
	color: #475569;
	line-height: 1;
	transition: background .15s, color .15s;
}

.sg-booking-cal__nav-btn:hover {
	background: #E2E8F0;
	color: #1E293B;
}

/* ── Calendar grid ── */
.sg-booking-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	padding: 10px;
	gap: 3px;
}

.sg-bcal-header {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	text-align: center;
	color: #94A3B8;
	padding: 4px 0;
}

.sg-bcal-day {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	border-radius: 6px;
	cursor: pointer;
	color: #1E293B;
	transition: background .12s, color .12s;
	user-select: none;
	outline: none;
	line-height: 15px;
	padding: 10px;
}

.sg-bcal-day:not(.sg-bcal-day--past):not(.sg-bcal-day--blocked):not(.sg-bcal-day--empty):hover,
.sg-bcal-day:not(.sg-bcal-day--past):not(.sg-bcal-day--blocked):not(.sg-bcal-day--empty):focus {
	background: #DBEAFE;
	color: #1D4ED8;
}

.sg-bcal-day--empty  { cursor: default; }

.sg-bcal-day--past {
	color: #CBD5E1;
	cursor: default;
}

.sg-bcal-day--blocked {
	color: #CBD5E1;
	cursor: not-allowed;
	position: relative;
}

.sg-bcal-day--blocked::after {
	content: '';
	position: absolute;
	width: 60%;
	height: 1px;
	background: #CBD5E1;
	transform: rotate(-45deg);
}

.sg-bcal-day--from,
.sg-bcal-day--to {
	background: #2563EB;
	color: #fff;
	font-weight: 600;
}

.sg-bcal-day--from:hover,
.sg-bcal-day--to:hover {
	background: #1D4ED8;
	color: #fff;
}

.sg-bcal-day--in-range {
	background: #DBEAFE;
	color: #1D4ED8;
	border-radius: 0;
}

/* ═══════════════════════════════════════════════════════════
   AM/PM Hourly Time-Slot Picker — right panel / two columns
══════════════════════════════════════════════════════════ */
.sg-booking-times {
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 16px;
}

/* Header row */
.sg-time-slots-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #F8FAFC;
	border-bottom: 1px solid #E2E8F0;
	flex-shrink: 0;
}

.sg-time-slots-label {
	font-size: 13px;
	font-weight: 600;
	color: #475569;
	display: flex;
	align-items: center;
	gap: 6px;
}

.sg-time-slots-range {
	font-size: 13px;
	font-weight: 600;
	color: #2563EB;
	letter-spacing: .01em;
}

/* ── Two-column wrapper ── */
.sg-time-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	overflow: hidden;
}

.sg-time-col {
	padding: 12px;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.sg-time-col + .sg-time-col {
	border-left: 1px solid #E2E8F0;
}

.sg-time-col__head {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: #94A3B8;
	margin-bottom: 8px;
	padding-bottom: 6px;
	border-bottom: 1px solid #F1F5F9;
	flex-shrink: 0;
}

/* Scrollable slot list inside each column */
.sg-time-slots-grid {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 240px;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #CBD5E1 transparent;
}

.sg-time-slots-grid::-webkit-scrollbar       { width: 4px; }
.sg-time-slots-grid::-webkit-scrollbar-track { background: transparent; }
.sg-time-slots-grid::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 2px; }

/* Individual hour slot button */
.sg-time-slot {
	display: block;
	width: 100%;
	padding: 7px 10px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	border: 1.5px solid #E2E8F0;
	border-radius: 7px;
	background: #fff;
	color: #374151;
	cursor: pointer;
	transition: background .12s, border-color .12s, color .12s;
	user-select: none;
	white-space: nowrap;
	flex-shrink: 0;
}

.sg-time-slot:hover {
	border-color: #93C5FD;
	background: #EFF6FF;
	color: #1D4ED8;
}

/* Selected slot (start OR end) */
.sg-time-slot--selected {
	background: #2563EB;
	border-color: #2563EB;
	color: #fff;
	font-weight: 700;
}

.sg-time-slot--selected:hover {
	background: #1D4ED8;
	border-color: #1D4ED8;
	color: #fff;
}

/* End slots that are too early (≤ selected start) */
.sg-time-slot--disabled {
	color: #C1C9D4;
	border-color: #EDF0F3;
	background: #F3F5F7;
	cursor: not-allowed;
	pointer-events: none;
	opacity: 0.45;
	text-decoration: line-through;
	text-decoration-color: #B0BAC6;
	font-style: italic;
}

/* Hint below the columns */
.sg-time-slots-hint {
	padding: 8px 14px 10px;
	font-size: 12px;
	color: #94A3B8;
	margin: 0;
	border-top: 1px solid #F1F5F9;
	background: #FAFAFA;
	flex-shrink: 0;
}

/* ── Summary table ── */
.sg-booking-summary {
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	overflow: hidden;
	margin-bottom: 16px;
}

.sg-booking-summary__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.sg-booking-summary__table td {
	padding: 10px 14px;
	border-bottom: 1px solid #F1F5F9;
	color: #1E293B;
}

.sg-booking-summary__table td:first-child {
	color: #64748B;
	font-size: 13px;
	width: 40%;
}

.sg-booking-summary__table tr:last-child td {
	border-bottom: none;
}

.sg-booking-summary__total-row td {
	background: #F8FAFC;
	font-size: 15px;
}

.sg-booking-summary__total-row td:first-child {
	color: #1E293B;
}

/* ── Responsive ── */
@media (max-width: 479px) {
	.sg-booking-cal__grid {
		padding: 6px;
		gap: 2px;
	}

	.sg-bcal-day {
		font-size: 12px;
		padding: 8px 4px;
	}

	.sg-time-slot {
		font-size: 12px;
		padding: 6px;
	}

	.sg-time-slots-range {
		font-size: 12px;
	}

	.sg-time-slots-grid {
		max-height: 200px;
	}
}
