.webform-entity-autofill__wrapper {
  position: relative;
  margin-top: 0.25rem;
}

.webform-entity-autofill__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #c9d4dd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  max-height: 18rem;
  overflow-y: auto;
  z-index: 10;
}

.webform-entity-autofill__suggestion {
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #eef1f4;
}

.webform-entity-autofill__suggestion:last-child {
  border-bottom: 0;
}

.webform-entity-autofill__suggestion.is-active {
  background: #eef3f7;
}

.webform-entity-autofill__suggestion-primary {
  font-weight: 500;
}

.webform-entity-autofill__suggestion-secondary {
  font-size: 0.85em;
  color: #666;
  margin-top: 0.1rem;
}

.webform-entity-autofill__messages {
  color: #b00;
  font-size: 0.875rem;
  min-height: 1em;
  margin-top: 0.25rem;
}

.webform-entity-autofill__reset {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid #c9d4dd;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.webform-entity-autofill__filled {
  background-color: #f4f4f4;
  color: #555;
  cursor: not-allowed;
}

/* Block interaction for filled fields. The wrapper keeps pointer-events so
 * the not-allowed cursor shows; the children (inputs + labels) are disabled.
 *
 * For text inputs/textareas this also prevents click-focus, which is needed
 * with floating-label styles: a focused readonly input would otherwise still
 * trigger the "label floats up" :focus rule even though the user cannot type. */
.webform-entity-autofill__filled-wrapper {
  cursor: not-allowed;
}

.webform-entity-autofill__filled-wrapper input,
.webform-entity-autofill__filled-wrapper textarea,
.webform-entity-autofill__filled-wrapper select,
.webform-entity-autofill__filled-wrapper label,
.webform-entity-autofill__filled-wrapper .select-styled,
.webform-entity-autofill__filled-wrapper .select-options {
  pointer-events: none;
  opacity: 0.7;
}

/* Keep the group's legend (title) fully readable + interactive. */
.webform-entity-autofill__filled-wrapper > legend,
.webform-entity-autofill__filled-wrapper > legend * {
  cursor: auto;
  pointer-events: auto;
  opacity: 1;
}
