/**
 * Lines and states under the calendar: captions, empty and error blocks, buttons and the link.
 */

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

.avco-widget__cap.is-tertiary {
	color: var(--avco-w-text-3);
}

.avco-widget__capline {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--avco-w-s3);
}

.avco-widget__caps {
	display: flex;
	flex-direction: column;
	gap: var(--avco-w-s1);
}

.avco-widget__empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--avco-w-s3);
	padding: var(--avco-w-s1) 0;
}

/* The paused line is plain body text, not a caption. */
.avco-widget__muted {
	color: var(--avco-w-text-2);
}

.avco-widget__errtext {
	display: flex;
	align-items: center;
	gap: var(--avco-w-s2);
	color: var(--avco-w-error-text);
}

.avco-widget__btn {
	height: var(--avco-w-tap);
	padding: 0 var(--avco-w-s4);
	border: 1px solid var(--avco-w-border);
	border-radius: var(--avco-w-r);
	background: var(--avco-w-surface);
	color: var(--avco-w-text);
	font-size: 0.875em;
	font-weight: 600;
	white-space: nowrap;
	cursor: pointer;
}

.avco-widget__btn:disabled {
	cursor: default;
}

.avco-widget__link {
	display: inline-block;
	height: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--avco-w-text-2);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* The caption wraps before the Clear link does. */
.avco-widget__capline > .avco-widget__link {
	flex-shrink: 0;
}

/* Custom duration: time selects and the status line. */
.avco-widget__span {
	display: flex;
	flex-direction: column;
	gap: var(--avco-w-s3);
}

.avco-widget__cap.is-primary {
	color: var(--avco-w-text);
}

.avco-widget__tpair {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--avco-w-s3);
}

.avco-widget__tsel {
	display: flex;
	flex-direction: column;
	gap: var(--avco-w-s2);
	min-width: 0;
}

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

.avco-widget__select {
	display: block;
	width: 100%;
	min-width: 0;
	height: var(--avco-w-tap);
	padding: 0 var(--avco-w-s3);
	border: 1px solid var(--avco-w-border);
	border-radius: var(--avco-w-r);
	background: var(--avco-w-surface);
	color: var(--avco-w-text);
}

/* Selects keep the browser's own arrow. */
.avco-widget .avco-widget__select {
	appearance: auto;
}

.avco-widget__select:disabled {
	background: var(--avco-w-off);
	color: var(--avco-w-text-3);
}

.avco-widget__status {
	display: flex;
	align-items: center;
	gap: var(--avco-w-s2);
	min-height: 24px;
	color: var(--avco-w-text-3);
	font-size: 0.875em;
}

.avco-widget__status.is-ok {
	color: var(--avco-w-text);
}

.avco-widget__status.is-bad {
	color: var(--avco-w-error-text);
}

.avco-widget__status svg {
	flex-shrink: 0;
}

.avco-widget__okmark {
	color: var(--avco-w-success-mark);
}

.avco-widget__err {
	display: flex;
	align-items: center;
	gap: var(--avco-w-s2);

	/* 8px from the calendar: the body's 12px gap less 4px. */
	margin-top: calc(var(--avco-w-s1) * -1);
	color: var(--avco-w-error-text);
	font-size: 0.875em;
	line-height: normal;
}

.avco-widget__err svg {
	flex-shrink: 0;
}
