/**
 * YCF Bookings — frontend wizard styles.
 * Colors are driven by CSS variables set inline per the active theme/palette.
 */

.ycf-booking-wizard {
	--ycf-primary: #813b51;
	--ycf-accent: #dc6f3f;
	--ycf-bg: #fff7f1;
	--ycf-text: #2b2b2b;
	--ycf-radius: 10px;
	--ycf-border: rgba(0, 0, 0, 0.12);
	--ycf-sidebar-bg: #376b5a;
	--ycf-step-done: #a1acd4;
	--ycf-step-active: #813b51;
	--ycf-content-bg: #f4f5f7;
	--ycf-frame: #f3b0b1;

	width: 100%;
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	align-items: stretch;
	background: var(--ycf-content-bg);
	color: var(--ycf-text);
	border-radius: var(--ycf-radius);
	border: 8px solid var(--ycf-frame);
	box-sizing: border-box;
	font-size: 16px;
	line-height: 1.5;
	overflow: hidden;
}

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

.ycf-sidebar {
	flex: 0 0 220px;
	background: var(--ycf-sidebar-bg);
	padding: 32px 18px;
}

.ycf-sidebar-logo {
	display: block;
	max-width: 80px !important;
	height: auto;
	margin: 0 auto 32px;
}

.ycf-main {
	flex: 1 1 auto;
	min-width: 0;
	padding: 24px;
	background: var(--ycf-bg);
	container-type: inline-size;
}

.ycf-steps {
	display: flex;
	flex-direction: column;
	gap: 28px;
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: ycf-step;
}

.ycf-steps li {
	display: flex;
	align-items: center;
	gap: 12px;
	counter-increment: ycf-step;
}

.ycf-step-badge {
	position: relative;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
}

.ycf-step-check {
	display: none;
}

.ycf-step-label {
	font-size: 14px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.5);
	overflow-wrap: normal;
	word-break: keep-all;
}

.ycf-steps li.is-active .ycf-step-badge {
	background: var(--ycf-step-active);
	color: #fff;
}

.ycf-steps li.is-active .ycf-step-label {
	color: var(--ycf-bg);
}

.ycf-steps li.is-done .ycf-step-badge {
	background: var(--ycf-step-done);
	color: #fff;
}

.ycf-steps li.is-done .ycf-step-num {
	display: none;
}

.ycf-steps li.is-done .ycf-step-check {
	display: block;
}

.ycf-steps li.is-done .ycf-step-label {
	color: rgba(255, 255, 255, 0.85);
}

.ycf-panels {
	position: relative;
	transition: height 0.15s ease;
}

.ycf-panel {
	min-height: 80px;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	visibility: hidden;
	pointer-events: none;
}

.ycf-panel.is-visible {
	position: relative;
	visibility: visible;
	pointer-events: auto;
}

.ycf-field-label {
	display: block;
	margin: 0 0 6px;
	font-weight: 600;
	color: var(--ycf-primary);
}

.ycf-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.ycf-booking-wizard .ycf-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 14px 16px;
	text-align: left;
	background: #fff;
	color: var(--ycf-text);
	border: 2px solid transparent;
	border-radius: 8px;
	cursor: pointer;
	transition: border-color 0.15s ease, transform 0.05s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.ycf-booking-wizard .ycf-option:hover {
	border-color: var(--ycf-accent);
}

.ycf-booking-wizard .ycf-option.is-selected {
	border-color: var(--ycf-primary);
	box-shadow: inset 0 0 0 1px var(--ycf-primary);
}

.ycf-option-name {
	order: 1;
	font-weight: 600;
	color: var(--ycf-primary);
	flex: 1 1 auto;
}

.ycf-option small {
	display: inline-flex;
	align-items: center;
	order: 2;
	margin-left: 10px;
	padding: 3px 10px;
	background: #bcb45d;
	color: #fff7f1;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.ycf-option > .ycf-option-price {
	order: 3;
	margin-left: auto;
	font-size: 16px;
	font-weight: 700;
	color: var(--ycf-accent);
	white-space: nowrap;
}

.ycf-datetime {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 16px;
	align-items: start;
}

.ycf-datetime > * {
	min-width: 0;
}

@container (max-width: 520px) {
	.ycf-datetime {
		grid-template-columns: 1fr;
	}
}

.ycf-calendar {
	background: #fff;
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	padding: 14px;
}

.ycf-calendar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.ycf-cal-title {
	font-weight: 700;
}

.ycf-booking-wizard .ycf-cal-nav {
	width: 32px;
	height: 32px;
	background: transparent;
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: var(--ycf-text);
}

.ycf-booking-wizard .ycf-cal-nav:hover {
	border-color: var(--ycf-accent);
}

.ycf-cal-weekdays,
.ycf-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 4px;
}

.ycf-cal-grid {
	grid-auto-rows: minmax(0, 1fr);
}

.ycf-cal-weekdays {
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	opacity: 0.6;
	text-align: center;
}

.ycf-booking-wizard .ycf-cal-day {
	position: relative;
	width: 100%;
	min-width: 0;
	min-height: 0;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.03);
	border: none;
	border-radius: 6px;
	padding: 0;
	color: var(--ycf-text);
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
	cursor: not-allowed;
	opacity: 0.4;
	overflow: hidden;
}

.ycf-booking-wizard .ycf-cal-day.is-empty {
	background: transparent;
	visibility: hidden;
}

.ycf-booking-wizard .ycf-cal-day.has-slots {
	opacity: 1;
	cursor: pointer;
	font-weight: 600;
}

.ycf-booking-wizard .ycf-cal-day.has-slots::after {
	content: "";
	position: absolute;
	bottom: 4px;
	left: 50%;
	transform: translateX(-50%);
	width: 60%;
	height: 2px;
	background: var(--ycf-step-active);
	border-radius: 2px;
}

.ycf-booking-wizard .ycf-cal-day.has-slots:hover {
	background: rgba(0, 0, 0, 0.08);
}

.ycf-booking-wizard .ycf-cal-day.is-selected {
	background: var(--ycf-primary);
	color: #fff;
}

.ycf-booking-wizard .ycf-cal-day.is-selected::after {
	background: #fff;
}

.ycf-timeslots {
	background: #fff;
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	padding: 14px;
	max-height: 420px;
	overflow-y: auto;
}

.ycf-timeslots-head {
	font-weight: 700;
	color: var(--ycf-primary);
	text-align: center;
	margin-bottom: 12px;
	min-height: 1.2em;
}

.ycf-slots {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	min-width: 0;
}

.ycf-slots > * {
	min-width: 0;
}

.ycf-slots > .ycf-message {
	grid-column: 1 / -1;
}

@container (max-width: 340px) {
	.ycf-slots {
		grid-template-columns: repeat(2, 1fr);
	}
}

.ycf-booking-wizard .ycf-slot {
	padding: 10px 4px;
	text-align: center;
	background: rgba(0, 0, 0, 0.03);
	border: none;
	border-radius: var(--ycf-radius);
	cursor: pointer;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	color: var(--ycf-primary);
	white-space: nowrap;
}

.ycf-booking-wizard .ycf-slot:hover {
	background: rgba(0, 0, 0, 0.08);
}

.ycf-slot small {
	display: block;
	opacity: 0.7;
	font-size: 11px;
	font-weight: 400;
}

.ycf-booking-wizard .ycf-slot.is-selected {
	color: #fff;
	background: var(--ycf-primary);
	border-color: var(--ycf-primary);
}

@media (max-width: 640px) {
	.ycf-datetime {
		grid-template-columns: 1fr;
	}
}

.ycf-date-input,
.ycf-text-input {
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 16px;
	border: 2px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	background: #fff;
	color: var(--ycf-text);
	font-size: 16px;
}

.ycf-summary {
	background: #fff;
	border: 1px solid var(--ycf-border);
	border-radius: var(--ycf-radius);
	padding: 16px;
	margin-bottom: 16px;
}

.ycf-summary dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 6px 16px;
	margin: 0;
}

.ycf-summary dt {
	font-weight: 600;
	opacity: 0.7;
}

.ycf-summary dd {
	margin: 0;
	text-align: right;
}

.ycf-actions {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	margin-top: 20px;
}

.ycf-booking-wizard .ycf-btn {
	padding: 12px 20px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: var(--ycf-radius);
	cursor: pointer;
	background: var(--ycf-primary);
	color: #fff;
}

.ycf-booking-wizard .ycf-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.ycf-booking-wizard .ycf-back {
	background: transparent;
	color: var(--ycf-text);
	border: 2px solid var(--ycf-border);
}

.ycf-message {
	margin-top: 16px;
	padding: 12px;
	border-radius: var(--ycf-radius);
	background: rgba(220, 111, 63, 0.12);
	color: var(--ycf-text);
	border: 1px solid var(--ycf-accent);
}

.ycf-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 0;
	grid-column: 1 / -1;
}

.ycf-spinner {
	width: 32px;
	height: 32px;
	border: 3px solid var(--ycf-border);
	border-top-color: var(--ycf-accent);
	border-radius: 50%;
	animation: ycf-spin 0.7s linear infinite;
}

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

/* Dark theme readability tweaks. */
.ycf-booking-wizard[data-theme="dark"] .ycf-option,
.ycf-booking-wizard[data-theme="dark"] .ycf-slot,
.ycf-booking-wizard[data-theme="dark"] .ycf-date-input,
.ycf-booking-wizard[data-theme="dark"] .ycf-text-input,
.ycf-booking-wizard[data-theme="dark"] .ycf-summary {
	background: rgba(255, 255, 255, 0.06);
	color: var(--ycf-text);
}

@media (max-width: 720px) {
	.ycf-booking-wizard {
		flex-direction: column;
		width: 100%;
		max-width: 100%;
	}

	.ycf-sidebar {
		flex: 0 0 auto;
		width: 100%;
		box-sizing: border-box;
		padding: 16px;
	}

	.ycf-sidebar-logo {
		margin-bottom: 16px;
	}

	.ycf-steps {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 12px 16px;
	}

	.ycf-steps li {
		min-width: 0;
	}

	.ycf-step-label {
		overflow-wrap: break-word;
		word-break: break-word;
	}

	.ycf-main {
		width: 100%;
		box-sizing: border-box;
		padding: 16px;
	}

	.ycf-summary dl {
		grid-template-columns: 1fr;
	}

	.ycf-summary dd {
		text-align: left;
		margin-bottom: 6px;
	}
}

@media (max-width: 480px) {
	.ycf-step-label {
		font-size: 12px;
	}

	.ycf-sidebar {
		padding: 12px;
	}

	.ycf-main {
		padding: 12px;
	}

	.ycf-booking-wizard {
		border-width: 4px;
	}

	.ycf-calendar,
	.ycf-timeslots {
		padding: 10px;
	}

	.ycf-cal-weekdays,
	.ycf-cal-grid {
		gap: 3px;
	}

	.ycf-booking-wizard .ycf-cal-day {
		font-size: 12px;
	}

	.ycf-booking-wizard .ycf-option {
		flex-wrap: wrap;
	}

	.ycf-option-name {
		flex: 1 1 100%;
	}

	.ycf-option small {
		margin-left: 0;
	}
}
