/**
 * Days row: day cards of equal height, with the availability bar or a word on the third line.
 */

.avco-widget__strip {
	display: grid;
	gap: var(--avco-w-s2);
	touch-action: pan-y;
}

.avco-widget__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--avco-w-s1);
	min-width: 0;
	height: var(--avco-w-card);
	padding: 0;
	border: 1px solid var(--avco-w-border);
	border-radius: var(--avco-w-r-day);
	background: var(--avco-w-surface);
	color: var(--avco-w-text);
	text-align: center;
	cursor: pointer;
}

.avco-widget__card > span {
	width: 100%;
	text-align: center;
}

.avco-widget__card:disabled,
.avco-widget__card[aria-disabled="true"] {
	cursor: default;
}

.avco-widget__card.is-today {
	border-color: var(--avco-w-brand);
}

.avco-widget:not([data-button-style="water_drop"]) .avco-widget__card.is-open:hover {
	border-color: currentcolor;
}

.avco-widget__cwd {
	color: var(--avco-w-text-2);
	font-size: 0.75em;
}

.avco-widget__cnum {
	font-size: 1em;
	font-weight: 600;
	line-height: 1.2;
	font-variant-numeric: proportional-nums;
}

.avco-widget__cind {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 14px;
	margin-top: var(--avco-w-s0);
}

.avco-widget__cnote {
	color: var(--avco-w-text-3);
	font-size: 0.75em;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.avco-widget__cnote:empty {
	display: none;
}

/* A day that cannot be picked: Off fill and faded text. */
.avco-widget__card.is-off {
	border-color: var(--avco-w-off);
	background: var(--avco-w-off);
	color: var(--avco-w-text-off);
}

.avco-widget__card.is-off .avco-widget__cwd,
.avco-widget__card.is-off .avco-widget__cnote {
	color: var(--avco-w-text-off);
}

.avco-widget__card.is-off.is-today {
	border-color: var(--avco-w-brand);
}

.avco-widget__card.is-selected {
	border-color: var(--avco-w-brand);
	background: var(--avco-w-brand);
	color: var(--avco-w-on-brand);
}

.avco-widget__card.is-selected .avco-widget__cwd,
.avco-widget__card.is-selected .avco-widget__cnote {
	color: var(--avco-w-on-brand);
}

/* Past cards have no third line; their weekday and date sit centred. */
.avco-widget__card.is-past {
	border-color: transparent;
	background: var(--avco-w-hatch);
	color: var(--avco-w-text-off);
	cursor: default;
}

.avco-widget__card.is-past .avco-widget__cwd {
	color: var(--avco-w-text-off);
}

.avco-widget__card.is-loading {
	border-color: var(--avco-w-off);
}

/* Reason tooltip above a card; the first and last cards keep it inside the row. */
.avco-widget__card > .avco-widget__tip {
	width: max-content;
	max-width: 16em;
	text-align: start;
	white-space: normal;
}

.avco-widget__card:first-child > .avco-widget__tip {
	left: auto;
	inset-inline-start: 0;
	transform: none;
}

.avco-widget__card:last-child > .avco-widget__tip {
	left: auto;
	inset-inline-end: 0;
	transform: none;
}

@media (hover: hover) {

	.avco-widget .avco-widget__card.has-tip:hover .avco-widget__tip {
		display: block;
		visibility: visible;
		opacity: 1;
	}

	.avco-widget .avco-widget__card.has-tip:hover {
		z-index: 6;
	}
}

.avco-widget .avco-widget__card.has-tip:focus-visible .avco-widget__tip {
	display: block;
	visibility: visible;
	opacity: 1;
}

.avco-widget .avco-widget__card.has-tip:focus-visible {
	z-index: 6;
}
