/*
 * Gravity Forms Postcode NL
 *
 * Layout and states only. Type, colours and the inputs themselves come from the theme and Gravity Forms.
 */

.gform_wrapper .gfpc.gfpc {
  container-type: inline-size;
  display: grid;
  gap: 0.5rem;
}

.gfpc__row {
  display: grid;
  gap: 0.5rem 1rem;
}

.gfpc__row--lookup {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, 1fr);
}

.gfpc__row--result {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.gform_wrapper .gfpc .gfpc__item {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: none;
  min-width: 0;
  padding: 0;
  width: auto;
}

.gform_wrapper .gfpc .gfpc__item input {
  margin: 0;
  width: 100%;
}

/* Filled in from the BAG: still fully legible, visibly not a field to type in. */
.gform_wrapper .gfpc input.gfpc__input--locked {
  background-color: color-mix(in srgb, currentColor 5%, transparent);
  cursor: default;
}

.gform_wrapper .gfpc input.gfpc__input--locked:focus {
  outline-offset: 2px;
}

.gform_wrapper .gfpc .gfpc__status {
  margin: 0;
}

.gfpc__status:empty {
  display: none;
}

/* A found address is announced to screen readers; sighted visitors see it in the street and city inputs. */
.gfpc__status[data-state="ok"],
.gfpc__status[data-state="searching"] {
  block-size: 1px;
  clip-path: inset(50%);
  inline-size: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}

.gfpc[aria-busy="true"] .gfpc__item--street input,
.gfpc[aria-busy="true"] .gfpc__item--city input {
  cursor: progress;
}

.gfpc__editor-note {
  font-size: 0.8125rem;
  margin: 0;
  opacity: 0.8;
}

.gfpc--admin {
  display: grid;
  gap: 0.5rem 1rem;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
}

.gfpc--admin .gfpc-admin-input {
  display: flex;
  flex-direction: column;
}

/* px, not rem: themes that shrink the root font size would otherwise move the breakpoint. */
@container (max-width: 420px) {
  .gfpc__row--lookup {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .gfpc__item--postcode {
    grid-column: 1 / -1;
  }

  .gfpc__row--result {
    grid-template-columns: minmax(0, 1fr);
  }
}
