/* it-1110 (BPDGo#374): a Location field's parts — State, County, City, ZIP — each its own cell. */

/* The part's input and its suggestion list (the chip picker's list styles, anchored under the field). */
.location-part__box {
  position: relative;
}
/* The box with its "couldn't place" warning under it — one piece, the box row of a form's grid (it-1350). */
.location-part__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.location-part__box md-outlined-text-field {
  width: 100%;
}

/* A value that couldn't be placed: what came in, with the warning (the reason is the hover). */
.location-part__unplaced {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  color: var(--md-sys-color-error);
}
.location-part__warn {
  display: inline-flex;
  align-items: flex-start;
  gap: var(--space-1);
  color: var(--md-sys-color-error);
}

/* An inline edit's answer redraws a secret Location field's other parts masked, each wrapped for its out-of-band swap:
   the wrapper takes no box, so the cell stays a cell of the grid. */
.location-oob {
  display: contents;
}

/* A Location filter row (it-1110): the test, the miles (within), and the place picker with its suggestions — on ONE
   line (it-1360, BPDGo#511: Aldo — "we shouldn't have this cludgy 2-line situation"). The filter panel stretches every
   select in a value cell to the cell's width, which pushed the place under the test; here the test and the miles take
   their own widths and the place the rest. */
.location-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: flex-start;
}
.filter-panel__value .location-filter md-outlined-select {
  width: auto;
}
.location-filter__test {
  min-width: 12.5rem; /* "Couldn't be placed" and the menu arrow */
}
.location-filter__miles {
  min-width: 9.375rem;
}
.location-filter__place {
  position: relative;
  flex: 1;
  min-width: 13.75rem;
}
.location-filter__place md-outlined-text-field {
  width: 100%;
}

/* "Fill from existing fields" (it-1110 D14): the builder's dialog. */
.location-fill {
  max-width: 40rem;
}
.location-fill__parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.location-fill__part {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.location-fill__select {
  width: 100%;
  padding: var(--space-2);
  border: 1px solid var(--md-sys-color-outline);
  border-radius: var(--md-sys-shape-corner-extra-small, 0.25rem);
  background: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  font: inherit;
}
.location-fill__preview {
  padding: var(--space-3);
  border-radius: var(--md-sys-shape-corner-small, 0.5rem);
  background: var(--md-sys-color-surface-container);
}
