/* GHL Team Capacity Booking — public widget (v2 redesign) */

.ghltcb-widget {
	--ghltcb-primary: #0b3556;
	--ghltcb-primary-contrast: #ffffff;
	--ghltcb-bg: #ffffff;
    padding: 0px 15px;
	--ghltcb-border: #e5e8ee;
	--ghltcb-muted: #6b7280;
	--ghltcb-text: #1a1f29;
	--ghltcb-surface: #f8fafc;
	--ghltcb-radius: 16px;
	--ghltcb-radius-sm: 10px;
	--ghltcb-shadow: 0 4px 24px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);

	max-width: 960px;
	/* Breathing room from whatever heading/text sits above this on the
	   page — the widget shouldn't visually hug the page's own content. */
	margin: 32px auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--ghltcb-text);
	box-sizing: border-box;
}

.ghltcb-widget * {
	box-sizing: border-box;
}

.ghltcb-widget-inner {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 0;
	border: 1px solid var(--ghltcb-border);
	border-radius: var(--ghltcb-radius);
	overflow: hidden;
	background: var(--ghltcb-bg);
	box-shadow: var(--ghltcb-shadow);
}

@media (max-width: 700px) {
	.ghltcb-widget-inner {
		grid-template-columns: 1fr;
	}
}

.ghltcb-widget-side {
	background: #0a1b3d;
	padding: 32px 24px;
	border-right: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 700px) {
	.ghltcb-widget-side {
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.08);
		padding: 24px 20px;
	}
}

/* Dark side-panel background — every text element inside it needs to be
   light, regardless of the main widget's own (light) color variables. */
.ghltcb-widget-side .ghltcb-widget-title {
	color: #ffffff;
}

.ghltcb-widget-side .ghltcb-widget-meta,
.ghltcb-widget-side .ghltcb-widget-tz {
	color: rgba(255, 255, 255, 0.72);
}

.ghltcb-widget-logo {
	max-width: 88px;
	max-height: 88px;
	
	margin-bottom: 16px;
	object-fit: contain;
}

.ghltcb-widget-title {
	margin: 0 0 10px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--ghltcb-primary);
}

.ghltcb-widget-meta {
	margin: 0 0 14px;
	font-size: 14px;
	color: var(--ghltcb-muted);
	line-height: 1.6;
}

.ghltcb-widget-tz {
	margin: 0;
	font-size: 13px;
	color: var(--ghltcb-muted);
	line-height: 1.5;
	display: flex;
	align-items: flex-start;
	gap: 6px;
}

.ghltcb-widget-main {
	padding: 32px;
}

@media (max-width: 700px) {
	.ghltcb-widget-main {
		padding: 20px;
	}
}

.ghltcb-step {
	animation: ghltcb-fade-in 0.25s ease;
}

@keyframes ghltcb-fade-in {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ---------- Calendar + Slots side-by-side layout ---------- */

/* :not([hidden]) matters here — a bare .ghltcb-step-calendar{display:grid}
   rule would have equal CSS specificity to the browser's own [hidden]
   default and (being an author rule) would win, silently defeating the
   hidden attribute JS uses to switch between steps. */
.ghltcb-step-calendar:not([hidden]) {
	display: grid;
	grid-template-columns: 1fr 200px;
	gap: 32px;
	align-items: start;
}

@media (max-width: 820px) {
	.ghltcb-step-calendar:not([hidden]) {
		grid-template-columns: 1fr;
		gap: 24px;
	}
}

.ghltcb-slots-col {
	/* Its own scroll area on tall slot lists, so picking a time never
	   requires scrolling the whole page — only this column, if needed. */
	max-height: 420px;
	overflow-y: auto;
}

@media (max-width: 820px) {
	.ghltcb-slots-col {
		max-height: none;
		overflow-y: visible;
	}
}

/* ---------- Calendar ---------- */

.ghltcb-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.ghltcb-cal-month-label {
	font-weight: 700;
	font-size: 17px;
}

.ghltcb-cal-nav {
	background: var(--ghltcb-bg);
	border: 1.5px solid var(--ghltcb-border);
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 16px;
	font-weight: 600;
	color: var(--ghltcb-primary);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ghltcb-cal-nav:hover:not(:disabled) {
	border-color: var(--ghltcb-primary);
	background: var(--ghltcb-surface);
}

.ghltcb-cal-nav:active:not(:disabled) {
	transform: scale(0.94);
}

.ghltcb-cal-nav:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.ghltcb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
	margin-bottom: 28px;
}

.ghltcb-cal-dow {
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--ghltcb-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding-bottom: 8px;
}

.ghltcb-cal-day {
	position: relative;
	aspect-ratio: 1 / 1;
	min-height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: none;
	border: none;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
	color: var(--ghltcb-text);
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.ghltcb-cal-day:hover:not(:disabled):not(.is-empty) {
	background: var(--ghltcb-border);
}

.ghltcb-cal-day:active:not(:disabled):not(.is-empty) {
	transform: scale(0.94);
}

.ghltcb-cal-day.is-empty {
	visibility: hidden;
	cursor: default;
}

.ghltcb-cal-day:disabled {
	color: #c7ccd4;
	cursor: not-allowed;
}

.ghltcb-cal-day.is-selected {
	background: var(--ghltcb-primary);
	color: var(--ghltcb-primary-contrast);
	font-weight: 700;
}

.ghltcb-cal-day.is-today:not(.is-selected)::after {
	content: '';
	position: absolute;
	bottom: 6px;
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--ghltcb-primary);
}

/* ---------- Slots ---------- */

.ghltcb-slots {
	border-left: 1px solid var(--ghltcb-border);
	padding-left: 24px;
}

@media (max-width: 820px) {
	.ghltcb-slots {
		border-left: none;
		border-top: 1px solid var(--ghltcb-border);
		padding-left: 0;
		padding-top: 20px;
	}
}

.ghltcb-slots-placeholder {
	color: var(--ghltcb-muted);
	font-size: 14px;
	margin: 0;
}

/* One per row in the narrow side column — matches the familiar
   "calendar next to a scrollable list of times" pattern. */
.ghltcb-slots-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

@media (max-width: 480px) {
	.ghltcb-slots-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

.ghltcb-slot-btn {
	padding: 8px 12px;
	border: 1.5px solid var(--ghltcb-primary);
	border-radius: 8px;
	background: var(--ghltcb-bg);
	color: var(--ghltcb-primary);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	text-align: center;
	transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.ghltcb-slot-btn:hover {
	background: var(--ghltcb-primary);
	color: var(--ghltcb-primary-contrast);
}

.ghltcb-slot-btn:active {
	transform: scale(0.96);
}

/* Skeleton loading state, shown while slots are being fetched */
.ghltcb-skeleton-grid {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ghltcb-skeleton-pill {
	height: 34px;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--ghltcb-surface) 25%, var(--ghltcb-border) 50%, var(--ghltcb-surface) 75%);
	background-size: 200% 100%;
	animation: ghltcb-shimmer 1.3s ease-in-out infinite;
}

@keyframes ghltcb-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ---------- Form ---------- */

.ghltcb-back-link {
	background: none;
	border: none;
	color: var(--ghltcb-primary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	padding: 0 0 18px;
}

.ghltcb-selected-summary {
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 24px;
}

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

.ghltcb-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 7px;
}

.ghltcb-field input[type="text"],
.ghltcb-field input[type="email"],
.ghltcb-field input[type="tel"] {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--ghltcb-border);
	border-radius: var(--ghltcb-radius-sm);
	font-size: 15px;
	background: var(--ghltcb-bg);
	color: var(--ghltcb-text);
	transition: border-color 0.15s ease;
}

.ghltcb-field input:hover {
	border-color: #c7ccd4;
}

.ghltcb-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 22px 0;
	font-size: 12.5px;
	color: var(--ghltcb-muted);
	line-height: 1.55;
}

.ghltcb-consent input {
	margin-top: 3px;
	flex-shrink: 0;
	width: 16px;
	height: 16px;
}

.ghltcb-submit-btn {
	background: var(--ghltcb-primary);
	color: var(--ghltcb-primary-contrast);
	border: none;
	border-radius: var(--ghltcb-radius-sm);
	padding: 14px 24px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	width: 100%;
	transition: opacity 0.15s ease, transform 0.1s ease;
}

.ghltcb-submit-btn:hover:not(:disabled) {
	opacity: 0.92;
}

.ghltcb-submit-btn:active:not(:disabled) {
	transform: scale(0.99);
}

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

.ghltcb-form-error {
	color: #b32d2e;
	background: #fdf2f2;
	border: 1px solid #f0c5c5;
	border-radius: var(--ghltcb-radius-sm);
	padding: 10px 14px;
	font-size: 13.5px;
	margin: 0 0 16px;
}

/* ---------- Done ---------- */

.ghltcb-step-done {
	text-align: center;
	padding: 48px 16px;
}

.ghltcb-success-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #e8f6ea;
	color: #1e6b1e;
	font-size: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 18px;
}

.ghltcb-success-message {
	font-size: 16px;
	color: var(--ghltcb-text);
	line-height: 1.6;
	margin: 0;
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.ghltcb-widget-error {
	border: 1px solid #f0c5c5;
	background: #fdf2f2;
	color: #7a1f1f;
	padding: 16px 20px;
	border-radius: var(--ghltcb-radius);
}

/* ---------- Accessibility: visible focus for keyboard users ---------- */

.ghltcb-widget button:focus-visible,
.ghltcb-widget input:focus-visible {
	outline: 2px solid var(--ghltcb-primary);
	outline-offset: 2px;
}

/* ---------- Mobile ---------- */

@media (max-width: 480px) {
	.ghltcb-cal-day {
		min-height: 38px;
		font-size: 13px;
	}
	.ghltcb-slots-grid,
	.ghltcb-skeleton-grid {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ---------- Dark mode ---------- */

/* Deliberately NOT auto-switching to a dark palette on prefers-color-scheme.
   The widget's background is set inline from the Appearance tab (business
   branding) and always wins over any CSS rule here — so a partial dark-mode
   override (flipping text/border colors while the background stays pinned
   light) previously produced near-invisible low-contrast text on phones
   with dark mode enabled. The widget now consistently shows the business's
   chosen colors regardless of visitor device theme, matching how GHL's own
   native widget behaves. */