.commune-picker {
  position: relative;
  display: grid;
  grid-template-columns: var(--field-icon) minmax(0, 1fr) 32px;
  grid-template-rows: 18px 24px;
  align-items: center;
  column-gap: var(--field-gap);
  min-width: 0;
  min-height: 56px;
  padding: 7px var(--field-inset);
  cursor: text;
  font-family: "DM Sans", "Segoe UI", sans-serif;
}
.commune-pin { grid-area: 1 / 1 / 3 / 2; display: grid; place-items: center; color: var(--brand-action); }
.commune-label { grid-area: 1 / 2 / 2 / 3; font-size: 12px; line-height: 18px; font-weight: 550; color: var(--brand-muted); cursor: text; }
.commune-picker:has(.commune-clear[hidden]) { grid-template-columns: var(--field-icon) minmax(0, 1fr) 16px; }
.commune-picker:has(.commune-clear[hidden])::after {
  content: "";
  grid-area: 1 / 3 / 3 / 4;
  justify-self: end;
  margin-right: 4px;
  width: 6px;
  height: 6px;
  border: solid var(--brand-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
.commune-input {
  grid-area: 2 / 2 / 3 / 3;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--brand-ink);
  background: transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 620;
  line-height: 22px;
}
.commune-input::placeholder { color: var(--brand-muted); opacity: 1; font-weight: 530; }
.commune-input:focus-visible { border-radius: 2px; outline-offset: 1px; }
.commune-clear {
  grid-area: 1 / 3 / 3 / 4;
  display: grid;
  place-items: center;
  width: 36px;
  height: 40px;
  justify-self: end;
  border: 0;
  border-radius: 5px;
  color: var(--brand-muted);
  background: transparent;
  font: inherit;
  font-size: 21px;
  cursor: pointer;
}
.commune-clear:hover { background: var(--brand-tint); }
.commune-popup {
  position: absolute;
  z-index: 8;
  inset: calc(100% + 6px) auto auto 0;
  width: max(100%, 270px);
  max-width: calc(100vw - 40px);
  max-height: min(330px, 45dvh);
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--brand-white);
  border: 1px solid var(--brand-line);
  border-radius: 9px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-dark) 13%, transparent);
  padding: 4px;
}
.commune-popup[hidden], .commune-clear[hidden], .commune-message[hidden] { display: none; }
.commune-list { list-style: none; padding: 0; margin: 0; }
.commune-option { display: grid; gap: 1px; padding: 7px 10px; border-radius: 4px; cursor: pointer; line-height: 1.35; }
.commune-option.active, .commune-option:hover { background: var(--brand-tint); color: var(--brand-hover); }
.commune-option[aria-selected="true"] .commune-name { font-weight: 720; }
.commune-name { font-size: 15px; overflow-wrap: anywhere; }
.commune-code, .commune-message { color: var(--brand-muted); font-size: 12px; }
.commune-message { margin: 0; padding: 10px; line-height: 1.4; }
.commune-input[aria-invalid="true"] {
  color: var(--brand-error);
  outline: 2px solid var(--brand-error);
  outline-offset: 1px;
  border-radius: 2px;
}
.commune-picker:has(.commune-input[aria-invalid="true"]) .commune-message {
  color: var(--brand-error);
  background: var(--brand-error-tint);
}
.commune-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 680px) {
  .commune-popup {
    position: static;
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin-top: 5px;
    box-shadow: none;
  }
}
