/*
 * "Pick a date" and its empty-day fallback (partials/pick-a-date.php).
 *
 * Loaded on All Classes and What's On, which sit on different grounds — beige and cream — so
 * nothing here paints a background behind the control itself. The fallback card does, because it
 * has to read as a panel rather than as a stray paragraph.
 */

/*
 * The control is now the LAST CHIP in the filter row, not a labelled box above it.
 *
 * It was `display: inline-flex` with a label and a 44px date field, sitting in a wrapper above
 * the chips — and at some widths the field's own line box overlapped the chip row beneath it.
 * Making it a chip removes the overlap by removing the second row: there is one row of controls
 * now, and `gap` on the row owns the spacing rather than two elements each guessing at margins.
 */
.sc-pickdate {
	display: contents;
}

/*
 * The chip takes the HOST PAGE's pill class for its shape — .all-classes-chip on All Classes,
 * .whats-on-chip on What's On — so it is the same height, radius, border and type as the pills
 * beside it on whichever page it lands. Only the icon and its alignment are added here.
 *
 * align-items: center rather than the baseline the craft chips use, because an icon has no
 * baseline and would sit low against the text.
 */
.sc-pickdate-chip {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
}

.sc-pickdate-chip .sc-cal-icon {
	width: 15px;
	height: 14px;
	border-width: 2px;
}

/*
 * Chosen: NOTHING here paints it.
 *
 * This used to hard-code #fe415f, which is All Classes' active-chip pink. What's On's pills use
 * var(--primary) and a different border weight, so a date chosen there would have looked like a
 * chip from the other page.
 *
 * The script already sets aria-pressed on this button, so each page's own
 * [aria-pressed="true"] rule colours it — one definition of "this filter is on", per page,
 * wherever the control is dropped.
 */
.sc-pickdate-chip[aria-pressed="true"] .sc-cal-icon { opacity: 1; }

.sc-pickdate-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	max-width: 46rem;
	margin: 1.5rem 0 0;
	padding: 1.6rem 1.75rem;
	border: 1px solid #ffd9e1;
	border-radius: 18px;
	background: #fff1f4;
}

.sc-pickdate-empty[hidden] {
	display: none;
}

.sc-pickdate-empty-line {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.55;
}

.sc-pickdate-request {
	align-self: flex-start;
}

@media (max-width: 575.98px) {
	.sc-pickdate {
		width: 100%;
	}

	.sc-pickdate-input {
		flex: 1 1 auto;
		min-width: 0;
	}

	.sc-pickdate-empty {
		padding: 1.25rem 1.1rem;
	}

	.sc-pickdate-request {
		align-self: stretch;
		text-align: center;
	}
}
