.simplimus-termini {
	font-family: Poppins, sans-serif;
	color: var(--st-text, #3b3b3b);
}

.simplimus-termini.is-loading {
	opacity: 0.85;
	pointer-events: none;
}

.simplimus-termini.is-loading [data-st-calendar-grid]::after,
.simplimus-termini.is-loading [data-st-mini-calendar]::after {
	content: '';
	display: block;
	height: 4px;
	background: linear-gradient(90deg, transparent, var(--st-primary, #874d9d), transparent);
	animation: st-shimmer 1.2s infinite;
	margin-top: 8px;
	border-radius: 4px;
}

@keyframes st-shimmer {
	0% { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}

/* Calendar mode */
.simplimus-termini--calendar {
	background: var(--st-container-bg, #c6a9c6);
	border-radius: 28px;
	padding: 24px;
}

.st-calendar-card {
	background: var(--st-card-bg, #f5ecde);
	border-radius: 16px;
	padding: 20px;
}

.st-calendar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.st-nav {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--st-accent, #4a1e56);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
}

.st-nav:focus-visible,
.st-day-btn:focus-visible,
.st-slot-option:focus-visible,
.st-button:focus-visible,
.st-mini-nav:focus-visible {
	outline: 2px solid var(--st-primary, #874d9d);
	outline-offset: 2px;
}

.st-month-badge {
	min-width: 120px;
	height: 120px;
	border-radius: 50%;
	background: var(--st-accent, #4a1e56);
	color: #f5ecde;
	display: grid;
	place-items: center;
	text-align: center;
	font-weight: 600;
	line-height: 1.2;
	padding: 12px;
}

.st-program-title {
	font-weight: 600;
	margin: 0 0 12px;
	text-align: center;
}

.st-calendar-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 12px;
	color: rgba(59, 59, 59, 0.7);
}

.st-calendar-legend span::before {
	content: '';
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 3px;
	margin-right: 4px;
	vertical-align: middle;
}

.st-calendar-legend .st-legend-available::before { background: #fff; border: 1px solid rgba(135, 77, 157, 0.35); }
.st-calendar-legend .st-legend-full::before { background: rgba(135, 77, 157, 0.2); }
.st-calendar-legend .st-legend-empty::before { background: rgba(59, 59, 59, 0.08); }

.st-calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 8px;
}

.st-cal-cell {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: rgba(59, 59, 59, 0.6);
	padding: 6px 0;
}

.st-day-btn {
	border: 1px solid rgba(135, 77, 157, 0.25);
	background: #fff;
	border-radius: 12px;
	min-height: 44px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.st-day-btn.is-available:hover:not(:disabled) {
	background: rgba(135, 77, 157, 0.08);
}

.st-day-btn.is-selected {
	background: var(--st-accent, #4a1e56);
	color: #fff;
	border-color: var(--st-accent, #4a1e56);
}

.st-day-btn.is-full {
	background: rgba(135, 77, 157, 0.12);
	color: rgba(59, 59, 59, 0.55);
	text-decoration: line-through;
}

.st-day-btn.is-empty,
.st-day-btn.is-past,
.st-day-btn.is-off-day {
	opacity: 0.35;
	cursor: not-allowed;
	background: rgba(59, 59, 59, 0.04);
}

.st-day-btn.is-today:not(.is-selected) {
	box-shadow: inset 0 0 0 2px var(--st-primary, #874d9d);
}

.st-day-btn:disabled {
	cursor: not-allowed;
}

.st-day-btn.is-outside {
	visibility: hidden;
}

.st-slot-panel {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(135, 77, 157, 0.2);
}

.st-selected-date {
	font-weight: 600;
	margin: 0 0 10px;
}

.st-slot-list {
	display: grid;
	gap: 8px;
	max-height: 240px;
	overflow-y: auto;
}

.st-loading-skeleton {
	height: 48px;
	border-radius: 12px;
	background: linear-gradient(90deg, rgba(135, 77, 157, 0.08), rgba(135, 77, 157, 0.16), rgba(135, 77, 157, 0.08));
	background-size: 200% 100%;
	animation: st-skeleton 1.2s ease infinite;
}

@keyframes st-skeleton {
	0% { background-position: 100% 0; }
	100% { background-position: -100% 0; }
}

.st-slot-option {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border: 1px solid rgba(135, 77, 157, 0.25);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	width: 100%;
	text-align: left;
}

.st-slot-option.is-selected {
	border-color: var(--st-primary, #874d9d);
	box-shadow: 0 0 0 2px rgba(135, 77, 157, 0.15);
}

.st-slot-option strong {
	display: block;
}

.st-booking-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 18px;
}

.st-price {
	font-size: 22px;
	font-weight: 700;
	color: var(--st-primary, #874d9d);
}

.st-button {
	border: 0;
	border-radius: 14px;
	background: var(--st-primary, #874d9d);
	color: #fff;
	padding: 14px 22px;
	font-weight: 600;
	cursor: pointer;
	position: relative;
	min-width: 140px;
}

.st-button.is-loading::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: st-spin 0.7s linear infinite;
}

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

.st-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.st-message {
	margin-top: 12px;
	font-size: 14px;
}

.st-message.is-error { color: #b42318; }
.st-message.is-success { color: #027a48; }
.st-message.is-loading { color: #667085; }

.st-cart-link {
	display: inline-block;
	margin-top: 8px;
	color: var(--st-primary, #874d9d);
	font-weight: 600;
}

.st-field {
	display: grid;
	gap: 6px;
	margin-bottom: 12px;
}

.st-field span {
	font-size: 13px;
	font-weight: 600;
}

.st-field select {
	width: 100%;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1px solid rgba(135, 77, 157, 0.25);
}

.st-empty-slots {
	margin: 0;
	color: rgba(59, 59, 59, 0.65);
	font-size: 14px;
}

/* Dropdown mode */
.simplimus-termini--dropdown {
	background: var(--st-hd-background, #2e1240);
	border-radius: 22px;
	color: var(--st-hd-text, #fff);
}

.st-dropdown-shell {
	padding: 36px 42px;
}

.st-dropdown-kicker {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 600;
}

.st-dropdown-sub {
	margin: 0 0 18px;
	font-size: 12px;
	opacity: 0.72;
}

.st-dropdown-form {
	display: grid;
	grid-template-columns: minmax(180px, 1.2fr) minmax(220px, 1fr) minmax(160px, 1fr) auto;
	gap: 16px;
	align-items: end;
}

.st-dropdown-form select {
	background: var(--st-hd-surface, #4a1c63);
	color: var(--st-hd-text, #fff);
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 12px;
	padding: 12px 14px;
}

.st-mini-calendar .st-calendar-grid {
	gap: 4px;
}

.st-mini-calendar .st-day-btn {
	min-height: 32px;
	font-size: 12px;
}

.st-mini-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.st-mini-month {
	font-size: 13px;
	font-weight: 600;
}

.st-mini-nav {
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 50%;
	background: var(--st-hd-surface, #4a1c63);
	color: var(--st-hd-text, #fff);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}

.st-mini-hint {
	margin: 0;
	font-size: 12px;
	opacity: 0.72;
	grid-column: 1 / -1;
}

@media (max-width: 900px) {
	.st-dropdown-form {
		grid-template-columns: 1fr;
	}

	.st-dropdown-shell {
		padding: 24px 20px;
	}
}

@media (max-width: 768px) {
	.simplimus-termini--calendar {
		padding: 16px;
		border-radius: 20px;
	}

	.st-calendar-card {
		padding: 16px;
	}

	.st-month-badge {
		min-width: 88px;
		height: 88px;
		font-size: 14px;
	}

	.st-nav {
		width: 44px;
		height: 44px;
	}

	.st-day-btn {
		min-height: 48px;
	}

	.st-booking-footer {
		flex-direction: column;
		align-items: stretch;
		position: sticky;
		bottom: 0;
		background: var(--st-card-bg, #f5ecde);
		padding-top: 12px;
		margin-bottom: -4px;
	}

	.st-button {
		width: 100%;
		min-height: 48px;
	}

	.st-slot-list {
		max-height: 180px;
	}
}
