/* Form controls beyond the base inputs: autocomplete, wizard sections, the filters card. */

.ac { position: relative; min-width: 0; }
.ac-input { width: 100%; }

.ac-list {
	position: absolute;
	z-index: 20;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 240px;
	overflow: auto;
	padding: var(--s1);
	border: 1px solid var(--line-strong);
	border-radius: var(--r2);
	background: var(--surface-2);
	box-shadow: var(--shadow-2);
}

.ac-option, .ac-status {
	display: block;
	width: 100%;
	text-align: left;
	padding: var(--s2) var(--s2);
	border: 0;
	border-radius: var(--r1);
	background: transparent;
	color: var(--text);
	line-height: 1.4;
}

.ac-status { color: var(--muted); cursor: default; }
.ac-option { cursor: pointer; }
.ac-option.is-active, .ac-option:hover { background: var(--surface-3); }
.ac-option .ac-meta { display: block; color: var(--muted); font-size: var(--t-caption); }

/* --- filters card ---------------------------------------------------------------------- */

.filters-card .toolbar-row > .field { flex: 0 1 auto; }
.filters-card .toolbar-row > .field:first-child { flex: 1 1 280px; }
.filters-card select, .filters-card .ac-input { min-width: 170px; }

/* --- round / step fields --------------------------------------------------------------- */

.round-field { display: flex; align-items: center; gap: var(--s2); color: var(--muted); }
.round-field input { width: 84px; }

/* --- wizard ---------------------------------------------------------------------------- */

.wizard { display: flex; flex-direction: column; gap: var(--s5); }
.create-panel .dialog-body { padding-left: var(--s8); padding-right: var(--s8); }
.wizard > label {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: var(--s2);
	max-width: 420px;
}
.wizard > label > input,
.wizard > label > select {
	width: 100%;
	padding-left: var(--s4);
}
.wizard > label:has(input[type="checkbox"]) {
	flex-direction: row;
	align-items: center;
	max-width: none;
	gap: var(--s3);
}
.wizard-section { display: flex; flex-direction: column; gap: var(--s3); }
.wizard-section > h3 {
	font-size: var(--t-label);
	font-weight: 560;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--muted);
	padding-bottom: var(--s2);
	border-bottom: 1px solid var(--line);
}
.wizard-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--s4);
}
.wizard-choice {
	display: flex;
	gap: var(--s3);
	padding: var(--s3) var(--s4);
	border: 1px solid var(--line);
	border-radius: var(--r2);
	background: var(--surface-2);
	cursor: pointer;
	align-items: flex-start;
}
.wizard-choice:hover { border-color: var(--line-strong); }
.wizard-choice.is-on { border-color: var(--accent); background: var(--accent-weak); }
.wizard-choice .choice-text { display: flex; flex-direction: column; gap: 2px; }
.wizard-choice .choice-title { font-weight: 580; }
.wizard-choice .choice-sub { color: var(--muted); font-size: var(--t-caption); line-height: var(--lh-body); }
