/* Municipality picker (web/js/gemeente-kiezer.js).
   Same field format as the other selects: .field with the label above, the control, and the
   .help text below. The input takes the select look (chevron) from site.css tokens; the only
   addition is the searchable popup list. Needs site.css loaded first. */

.gk-box { position: relative; }
.gk-box input[role="combobox"] {
  padding-right: 32px; cursor: text; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.gk-box input[role="combobox"][aria-expanded="true"] {
  background-image: linear-gradient(135deg, transparent 50%, var(--ink-3) 50%), linear-gradient(45deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; }

.gk-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px);
  margin: 0; padding: 4px; list-style: none;
  max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow-high); }
.gk-list[hidden] { display: none; }
.gk-list [role="option"] {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 9px 10px; border-radius: 6px;
  font-size: 15px; line-height: 1.3; cursor: pointer; }
.gk-list [role="option"]:hover { background: var(--surface-2); }
.gk-list [role="option"][aria-selected="true"] { background: var(--brand-soft); color: var(--brand-ink);
  box-shadow: inset 3px 0 0 var(--brand); }
.gk-alt { font-size: 12px; color: var(--ink-3); text-align: right; }
.gk-list [aria-selected="true"] .gk-alt { color: inherit; }

.gk-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (pointer: coarse), (max-width: 760px) {
  .gk-list [role="option"] { min-height: 44px; font-size: 16px; }
  .gk-box input[role="combobox"] { background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px; }
  .gk-box input[role="combobox"][aria-expanded="true"] { background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; }
}
@media (forced-colors: active) {
  .gk-list [role="option"][aria-selected="true"] { outline: 2px solid Highlight; }
}

/* Home quick calculator: the municipality takes its own row under salary and region; the
   field keeps the plain select look (the big display figures are for the amount only). */
.quickcalc-fields .qc-gemeente { grid-column: 1 / -1; }
.quickcalc-fields .gk input[role="combobox"] { font-family: inherit; font-stretch: normal; font-weight: 400; font-size: 15px; text-align: left; }
@media (pointer: coarse), (max-width: 760px) { .quickcalc-fields .gk input[role="combobox"] { font-size: 16px; } }
