.country-picker {
  position: relative;
}

.field .country-picker input {
  display: block;
  width: 100%;
  padding-inline-end: 3.4rem;
}

.country-picker input::-webkit-search-cancel-button {
  display: none;
}

.country-toggle {
  position: absolute;
  inset-block: 1px;
  inset-inline-end: 1px;
  width: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.country-toggle::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-inline-end: 2px solid;
  border-block-end: 2px solid;
  transform: translateY(-2px) rotate(45deg);
}

.country-toggle[aria-expanded='true']::before {
  transform: translateY(2px) rotate(225deg);
}

.country-options {
  position: absolute;
  z-index: 4;
  inset-inline: 0;
  max-height: min(16rem, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--paper, var(--espresso-2));
  box-shadow: 0 8px 18px rgb(0 0 0 / 12%);
}

.country-options li {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
}

.country-options li:hover,
.country-options li[aria-selected='true'] {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.field-validation {
  font-weight: 600;
}

.form-add-files[hidden],
.form-file[hidden],
.form-file-list[hidden] {
  display: none;
}

.form-add-files,
.form-file-remove {
  border: 1px solid var(--brass, var(--bronze, currentColor));
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.form-add-files {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form-add-files:hover,
.form-file-remove:hover {
  border-color: currentColor;
}

.form-add-files:focus-visible,
.form-file-remove:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.form-file-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.form-file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 46px;
  padding-inline: 0.75rem 0.25rem;
  border: 1px solid var(--line);
  font-size: 0.9rem;
}

.form-file-name {
  overflow-wrap: anywhere;
}

.form-file-remove {
  min-width: 44px;
  min-height: 44px;
  border-color: transparent;
  font-size: 1.25rem;
}

.form-add-files:disabled,
.form-file-remove:disabled {
  cursor: default;
  opacity: 0.6;
}

.form-upload-status {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
}

.form-upload-label {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.form-upload-progress:not([hidden]) {
  display: block;
  width: 100%;
  height: 0.5rem;
  margin-top: 0.55rem;
  accent-color: var(--brass, var(--bronze, currentColor));
}
