/* Calendar date states are shared by the full calendar and the light widget popover. */
.spektrix-date-time {
	min-width: 0;
	container-type: inline-size;
}

.spektrix-date-time [data-event-controls] {
	box-sizing: border-box;
	min-width: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	background: #fff;
	border: 1px solid #d8d2e0;
	color: #000;
	color-scheme: light;
}

.spektrix-date-time [data-event-controls] :is(h3, span, p:not(.spektrix-error)) {
	color: #000;
}

.spektrix-date-time .spektrix-calendar-nav {
	margin-bottom: 1rem;
}

.spektrix-date-time .spektrix-calendar-nav h3 {
	font-size: clamp(1rem, 2.5vw, 1.35rem);
	line-height: 1.3;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar-nav button {
	background: transparent;
	border-color: #c8bed5;
	border-radius: 8px;
	color: #000;
	min-height: 44px;
}

.spektrix-date-time .spektrix-calendar {
	gap: clamp(0.25rem, 1vw, 0.65rem);
}

.spektrix-date-time .spektrix-calendar > .spektrix-loading {
	grid-column: 1 / -1;
	min-height: 18rem;
	margin: 0;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-weekday {
	color: #000;
	font-size: 0.875rem;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button {
	background: #e3d4f0;
	border-color: #674987;
	border-radius: 8px;
	color: #000;
	font-weight: 600;
	min-height: 48px;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button:disabled {
	background: #f8f8f8;
	border-color: #ececec;
	color: #999;
	font-weight: 400;
	opacity: 1;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button[aria-pressed="true"] {
	background: #1d053c;
	border-color: #1d053c;
	color: #fff;
	box-shadow: inset 0 0 0 2px #dbc6ed;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button:hover:not(:disabled):not([aria-pressed="true"]) {
	background: #d4b7e8;
	border-color: #1d053c;
	color: #000;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar-nav button:hover:not(:disabled) {
	background: #dbc6ed;
	border-color: #dbc6ed;
	color: #000;
}

/* Keep special dates identifiable in enabled, disabled, hovered and selected states. */
:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button.spektrix-highlighted-day {
	background: #ffe5a3;
	border-color: #8a5700;
	color: #382300;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button.spektrix-highlighted-day::after {
	content: " *";
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button.spektrix-highlighted-day:disabled {
	background: #fff5dc;
	border-color: #d2bc8c;
	color: #80745d;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button.spektrix-highlighted-day:hover:not(:disabled):not([aria-pressed="true"]) {
	background: #ffd370;
	border-color: #684100;
	color: #382300;
}

:is(.spektrix-date-time, .spektrix-widget-picker) .spektrix-calendar button.spektrix-highlighted-day[aria-pressed="true"] {
	background: #684100;
	border-color: #684100;
	color: #fff;
	box-shadow: inset 0 0 0 2px #ffe5a3;
}

.spektrix-booking .spektrix-calendar-key {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.75rem 0 0;
	color: #000;
	font-size: 0.875rem;
	line-height: 1.5;
}

.spektrix-booking .spektrix-calendar-key::before {
	content: "*";
	display: inline-grid;
	place-items: center;
	flex: 0 0 1.5rem;
	height: 1.5rem;
	border: 1px solid #8a5700;
	border-radius: 4px;
	background: #ffe5a3;
	color: #382300;
	font-weight: 600;
}

.spektrix-booking .spektrix-highlight-message {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border: 1px solid #8a5700;
	border-left-width: 4px;
	background: #fff5dc;
	color: #382300;
	white-space: pre-line;
}

.spektrix-date-time [data-times]:not(:empty) {
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #d8d2e0;
}

.spektrix-date-time [data-times] > h3 {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	line-height: 1.4;
}

.spektrix-date-time .spektrix-times,
.spektrix-upsell-dialog .spektrix-upsell-dialog__times {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
	grid-auto-rows: 1fr;
	gap: 0.75rem;
}

.spektrix-date-time .spektrix-times > :is(a, button),
.spektrix-upsell-dialog .spektrix-upsell-dialog__times > button.spektrix-upsell-time {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	min-height: 56px;
	margin: 0;
	padding: 0.75rem;
	border: 1px solid #c8bed5;
	border-radius: 8px;
	background: #fff;
	color: #000;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
}

.spektrix-date-time .spektrix-times > :is(a:hover, button:hover:not(:disabled), button[aria-pressed="true"]),
.spektrix-upsell-dialog .spektrix-upsell-dialog__times > button.spektrix-upsell-time:hover:not(:disabled) {
	background: #dbc6ed;
	border-color: #dbc6ed;
	color: #000;
}

.spektrix-date-time .spektrix-times > button:disabled,
.spektrix-upsell-dialog .spektrix-upsell-dialog__times > button.spektrix-upsell-time:disabled {
	background: #f2f2f2;
	border-color: #ddd;
	color: #666;
	opacity: 1;
}

.spektrix-date-time .spektrix-times > .spektrix-time-loading:disabled {
	background: #e9e6ef;
	border-color: #b9afc5;
	border-style: dashed;
	color: #62566f;
	cursor: wait;
}

.spektrix-date-time .spektrix-time-loading::after {
	content: "";
	width: 0.8em;
	height: 0.8em;
	flex-shrink: 0;
	margin-left: 0.5em;
	border: 2px solid #b9afc5;
	border-top-color: #1d053c;
	border-radius: 50%;
	animation: spektrix-loading-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.spektrix-date-time .spektrix-time-loading::after {
		animation: none;
	}
}

.spektrix-date-time :is([data-calendar-status], [data-times] > p):not(.spektrix-error) {
	color: #555;
	font-size: 0.925rem;
	line-height: 1.6;
}

.spektrix-date-time :is([data-calendar-status], [data-times] > p, [data-booking-status]) {
	margin: 1rem 0 0;
}

.spektrix-date-time [data-booking-status]:empty {
	display: none;
}

@container (max-width: 30rem) {
	.spektrix-calendar-nav {
		flex-wrap: wrap;
	}

	.spektrix-calendar-nav :is(h3, [data-widget-month-label]) {
		order: -1;
		flex: 0 0 100%;
		margin: 0 0 0.5rem;
	}
}
