/*
 * dd/mm/yyyy date control. Loaded on the frontend and in wp-admin, so it may
 * not assume the Snow Stream token layer is present - every value here is
 * either literal or falls back.
 */
.ssc-date-field {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	max-width: 100%;
}

.ssc-date-field .ssc-date-input {
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 2.25rem;
}

.ssc-date-field .ssc-date-open {
	position: absolute;
	inset-inline-end: 2px;
	top: 2px;
	bottom: 2px;
	width: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--ssc-color-primary, #17427a);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.ssc-date-field .ssc-date-open:hover,
.ssc-date-field .ssc-date-open:focus-visible {
	background: rgba(23, 66, 122, 0.08);
}

/*
 * Kept in the layout rather than display:none - a hidden input cannot be asked
 * for its calendar. It sits under the button, invisible and untouchable, and is
 * only ever driven from script.
 */
.ssc-date-field .ssc-date-shadow {
	position: absolute;
	inset-inline-end: 2px;
	bottom: 0;
	width: 2rem;
	height: 1px;
	padding: 0;
	margin: 0;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* wp-admin table rows give inputs a fixed width; keep the control from overflowing. */
.wp-admin .ssc-date-field { width: 12rem; }
.wp-admin .ssc-date-field .ssc-date-input { width: 100%; }
