/* ============================================================
   Let's AI Booking - frontend
   מסילת ימים אופקית במקום לוח חודשי: חלון ההזמנה קצר,
   ולוח חודשי היה משאיר רוב התאים אפורים וריקים.
   ============================================================ */

.lab-widget {
	--lab-ink: #152232;
	--lab-muted: #5b6b7d;
	--lab-line: #dbe4ec;
	--lab-surface: #ffffff;
	--lab-soft: #f5f8fa;
	--lab-brand: #1e3f68;
	--lab-brand-2: #48cbcd;
	--lab-brand-dark: #16304f;
	--lab-brand-wash: rgba(30, 63, 104, 0.09);
	--lab-teal: #17797b;
	--lab-danger: #b3261e;
	--lab-font: 'Heebo', 'Rubik', system-ui, Arial, sans-serif;

	direction: rtl;
	text-align: right;
	font-family: var(--lab-font);
	color: var(--lab-ink);
	line-height: 1.6;
	background: var(--lab-surface);
	border: 1px solid var(--lab-line);
	border-radius: 22px;
	padding: 30px 30px 34px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 20px 50px rgba(21, 34, 50, 0.08), 0 2px 8px rgba(21, 34, 50, 0.05);
}

.lab-widget::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--lab-brand), var(--lab-brand-2));
}

.lab-widget *,
.lab-widget *::before,
.lab-widget *::after {
	box-sizing: border-box;
}

/* תבניות רבות מגדירות גופן לכותרות, כפתורים ושדות טופס בסלקטור ספציפי יותר,
   ואז חלק מהטקסטים בווידג'ט היו נשארים בגופן של התבנית. הכפייה כאן שומרת
   על מראה אחיד בכל אתר שבו התוסף מותקן. */
.lab-widget,
.lab-widget *,
.lab-widget *::before,
.lab-widget *::after {
	font-family: var(--lab-font) !important;
}

.lab-widget :focus-visible {
	outline: 2px solid var(--lab-brand);
	outline-offset: 2px;
}

/* ===== כותרת ===== */
.lab-widget .lab-head {
	text-align: center;
	margin-bottom: 22px;
}

.lab-widget .lab-logo {
	display: block;
	width: auto;
	height: 38px;
	max-width: 190px;
	margin: 0 auto 18px;
	object-fit: contain;
}

.lab-widget .lab-title {
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	margin: 0 0 8px;
	line-height: 1.3;
}

.lab-widget .lab-subtitle {
	font-size: 1.06rem;
	font-weight: 600;
	color: var(--lab-ink);
	max-width: 540px;
	margin: 0 auto;
	line-height: 1.6;
}

.lab-widget .lab-intro {
	font-size: 1rem;
	font-weight: 500;
	color: var(--lab-ink);
	max-width: 580px;
	margin: 14px auto 0;
	line-height: 1.75;
}

.lab-widget .lab-bullets {
	list-style: none;
	margin: 20px auto 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	max-width: 640px;
}

.lab-widget .lab-bullets li {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--lab-ink);
	margin: 0;
	padding: 7px 14px;
	background: var(--lab-soft);
	border: 1px solid var(--lab-line);
	border-radius: 999px;
}

.lab-widget .lab-bullets li::before {
	content: none;
}

.lab-widget .lab-bullets svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--lab-teal);
}

/* ===== מד התקדמות ===== */
.lab-widget .lab-progress {
	margin: 0 auto 26px;
	max-width: 420px;
}

.lab-widget .lab-progress-track {
	display: block;
	height: 3px;
	border-radius: 3px;
	background: var(--lab-line);
	overflow: hidden;
	margin-bottom: 9px;
}

.lab-widget .lab-progress-fill {
	display: block;
	height: 100%;
	width: 33%;
	border-radius: 3px;
	background: linear-gradient(90deg, var(--lab-brand), var(--lab-brand-2));
	transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lab-widget[data-step="2"] .lab-progress-fill { width: 66%; }
.lab-widget[data-step="3"] .lab-progress-fill { width: 100%; }
.lab-widget[data-step="4"] .lab-progress-fill { width: 100%; }

.lab-widget .lab-progress-labels {
	display: flex;
	justify-content: space-between;
	font-size: 11.5px;
	color: #9aabb9;
}

.lab-widget .lab-step.is-active {
	color: var(--lab-brand-dark);
	font-weight: 600;
}

/* ===== פאנלים ===== */
.lab-widget .lab-panel {
	display: none;
}

.lab-widget .lab-panel.is-active {
	display: block;
	animation: lab-fade 0.28s ease both;
}

@keyframes lab-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.lab-widget .lab-prompt {
	font-size: 1.06rem;
	font-weight: 700;
	margin: 0 0 14px;
}

.lab-widget .lab-back {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: none;
	border: none;
	color: var(--lab-muted);
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	margin-bottom: 14px;
}

.lab-widget .lab-back::before {
	content: '\203A';
	font-size: 16px;
	line-height: 1;
}

.lab-widget .lab-back:hover {
	color: var(--lab-brand);
}

/* ===== שלב 1: סוג שיחה ===== */
.lab-widget .lab-type-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 12px;
}

.lab-widget .lab-type-card {
	display: flex;
	align-items: center;
	gap: 14px;
	text-align: right;
	background: var(--lab-surface);
	border: 1.5px solid var(--lab-line);
	border-radius: 16px;
	padding: 18px;
	cursor: pointer;
	color: inherit;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.lab-widget .lab-type-card:hover {
	border-color: rgba(30, 63, 104, 0.5);
	box-shadow: 0 10px 26px rgba(30, 63, 104, 0.12);
	transform: translateY(-2px);
}

.lab-widget .lab-type-card.is-selected {
	border-color: var(--lab-brand);
	background: var(--lab-brand-wash);
}

.lab-widget .lab-type-icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border-radius: 13px;
	background: var(--lab-brand-wash);
	color: var(--lab-brand-dark);
	display: flex;
	align-items: center;
	justify-content: center;
}

.lab-widget .lab-type-icon svg {
	width: 20px;
	height: 20px;
}

.lab-widget .lab-type-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lab-widget .lab-type-label {
	font-weight: 700;
	font-size: 1.02rem;
}

.lab-widget .lab-type-desc {
	font-size: 0.86rem;
	color: var(--lab-muted);
}

.lab-widget .lab-type-meta {
	font-size: 11.5px;
	font-weight: 600;
	color: var(--lab-teal);
	margin-top: 3px;
}

/* ===== שלב 2: מסילת ימים ===== */
.lab-widget .lab-rail-wrap {
	position: relative;
	margin-bottom: 24px;
}

.lab-widget .lab-rail {
	display: flex;
	gap: 9px;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 3px 1px 10px;
	scrollbar-width: thin;
	scrollbar-color: var(--lab-line) transparent;
}

.lab-widget .lab-rail::-webkit-scrollbar {
	height: 4px;
}

.lab-widget .lab-rail::-webkit-scrollbar-thumb {
	background: var(--lab-line);
	border-radius: 4px;
}

.lab-widget .lab-day {
	flex: 0 0 auto;
	scroll-snap-align: start;
	width: 78px;
	padding: 12px 6px 11px;
	border: 1.5px solid var(--lab-line);
	border-radius: 15px;
	background: var(--lab-surface);
	cursor: pointer;
	text-align: center;
	color: inherit;
	transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.lab-widget .lab-day:hover {
	border-color: rgba(30, 63, 104, 0.5);
	transform: translateY(-2px);
}

.lab-widget .lab-day.is-selected {
	border-color: var(--lab-brand);
	background: var(--lab-brand);
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(30, 63, 104, 0.3);
}

.lab-widget .lab-day-dow {
	display: block;
	font-size: 11.5px;
	color: var(--lab-muted);
	margin-bottom: 1px;
}

.lab-widget .lab-day-num {
	display: block;
	font-size: 1.45rem;
	font-weight: 800;
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
}

.lab-widget .lab-day-mon {
	display: block;
	font-size: 11px;
	color: var(--lab-muted);
}

.lab-widget .lab-day-count {
	display: block;
	margin-top: 6px;
	font-size: 10.5px;
	font-weight: 600;
	color: var(--lab-teal);
}

.lab-widget .lab-day.is-selected .lab-day-dow,
.lab-widget .lab-day.is-selected .lab-day-mon,
.lab-widget .lab-day.is-selected .lab-day-count {
	color: rgba(255, 255, 255, 0.86);
}

/* ===== שלב 2: שעות ===== */
.lab-widget .lab-times-title {
	font-size: 0.95rem;
	font-weight: 700;
	margin: 0 0 14px;
}

.lab-widget .lab-times-group {
	margin-bottom: 18px;
}

.lab-widget .lab-times-group:last-child {
	margin-bottom: 0;
}

.lab-widget .lab-group-label {
	display: block;
	font-size: 11px;
	letter-spacing: 0.05em;
	color: #9aabb9;
	margin-bottom: 8px;
}

.lab-widget .lab-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
	gap: 8px;
}

.lab-widget .lab-slot {
	border: 1.5px solid var(--lab-line);
	background: var(--lab-surface);
	color: var(--lab-ink);
	border-radius: 11px;
	padding: 11px 6px;
	font-size: 0.95rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.lab-widget .lab-slot:hover {
	border-color: var(--lab-brand);
	background: var(--lab-brand);
	color: #ffffff;
}

/* ===== מצבים ריקים והודעות ===== */
.lab-widget .lab-empty {
	text-align: center;
	padding: 30px 16px;
	background: var(--lab-soft);
	border-radius: 16px;
}

.lab-widget .lab-empty-title {
	font-weight: 700;
	margin: 0 0 4px;
}

.lab-widget .lab-empty-text {
	font-size: 0.9rem;
	color: var(--lab-muted);
	margin: 0;
}

.lab-widget .lab-hint {
	font-size: 0.9rem;
	color: var(--lab-muted);
	margin: 0;
	padding: 18px 0;
}

.lab-widget .lab-skeleton {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
	gap: 8px;
}

.lab-widget .lab-skeleton span {
	height: 42px;
	border-radius: 11px;
	background: linear-gradient(90deg, #eef3f7, #dbe4ec, #eef3f7);
	background-size: 200% 100%;
	animation: lab-shimmer 1.2s linear infinite;
}

@keyframes lab-shimmer {
	from { background-position: 200% 0; }
	to   { background-position: -200% 0; }
}

/* ===== שלב 3: טופס ===== */
.lab-widget .lab-summary {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--lab-brand-wash);
	border: 1px solid rgba(30, 63, 104, 0.22);
	border-radius: 15px;
	padding: 14px 16px;
	margin-bottom: 22px;
}

.lab-widget .lab-summary-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: var(--lab-brand);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.lab-widget .lab-summary-icon svg {
	width: 19px;
	height: 19px;
}

.lab-widget .lab-summary-main {
	font-weight: 700;
	font-size: 0.98rem;
}

.lab-widget .lab-summary-sub {
	font-size: 0.84rem;
	color: var(--lab-muted);
}

.lab-widget .lab-summary-note {
	display: flex;
	gap: 8px;
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(72, 203, 205, 0.14);
	color: var(--lab-ink);
	font-size: 0.85rem;
	line-height: 1.6;
}

.lab-widget .lab-summary-note[hidden] {
	display: none;
}

.lab-widget .lab-field {
	margin-bottom: 13px;
}

.lab-widget .lab-field label {
	display: block;
	font-size: 0.85rem;
	color: var(--lab-muted);
	margin-bottom: 5px;
}

.lab-widget .lab-req {
	color: var(--lab-danger);
}

.lab-widget .lab-field input {
	width: 100%;
	border: 1.5px solid var(--lab-line);
	border-radius: 12px;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 1rem;
	color: var(--lab-ink);
	background: var(--lab-surface);
	transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.lab-widget .lab-field input:focus {
	outline: none;
	border-color: var(--lab-brand);
	box-shadow: 0 0 0 3px var(--lab-brand-wash);
}

.lab-widget .lab-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 18px 0 14px;
	font-size: 0.84rem;
	color: var(--lab-muted);
	line-height: 1.55;
}

.lab-widget .lab-consent input {
	margin: 3px 0 0;
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	accent-color: var(--lab-brand);
}

.lab-widget .lab-consent a {
	color: var(--lab-brand-dark);
	text-decoration: underline;
}

.lab-widget .lab-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lab-widget .lab-error {
	color: var(--lab-danger);
	font-size: 0.88rem;
	min-height: 20px;
	margin-bottom: 6px;
}

.lab-widget .lab-submit {
	width: 100%;
	border: none;
	border-radius: 14px;
	padding: 15px 24px;
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 700;
	color: #ffffff;
	background: var(--lab-brand);
	cursor: pointer;
	transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.lab-widget .lab-submit:hover:not(:disabled) {
	background: var(--lab-brand-dark);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(30, 63, 104, 0.3);
}

.lab-widget .lab-submit:disabled {
	opacity: 0.6;
	cursor: default;
}

/* ===== שלב 4: אישור ===== */
.lab-widget .lab-done {
	text-align: center;
	padding: 16px 0 8px;
}

.lab-widget .lab-done-icon {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(72, 203, 205, 0.16);
	color: var(--lab-teal);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
}

.lab-widget .lab-done-icon svg {
	width: 28px;
	height: 28px;
}

.lab-widget .lab-done-title {
	font-size: 1.25rem;
	font-weight: 800;
	margin: 0 0 6px;
}

.lab-widget .lab-done-text {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 6px;
}

.lab-widget .lab-done-note {
	font-size: 0.9rem;
	color: var(--lab-muted);
	margin: 0;
}

/* ===== מובייל ===== */
@media (max-width: 640px) {
	.lab-widget {
		padding: 22px 16px 26px;
		border-radius: 18px;
	}

	.lab-widget .lab-title {
		font-size: 1.3rem;
	}

	.lab-widget .lab-subtitle {
		font-size: 1rem;
	}

	.lab-widget .lab-intro {
		font-size: 0.95rem;
	}

	.lab-widget .lab-bullets {
		gap: 8px;
	}

	.lab-widget .lab-bullets li {
		font-size: 0.9rem;
		padding: 6px 12px;
	}

	.lab-widget .lab-type-grid {
		grid-template-columns: 1fr;
	}

	.lab-widget .lab-rail {
		margin-inline: -16px;
		padding-inline: 16px;
	}

	.lab-widget .lab-slots {
		grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.lab-widget *,
	.lab-widget .lab-panel.is-active {
		animation: none !important;
		transition: none !important;
	}
}
