.Form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.Form_config {
  position: relative;
}

.Form_textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 134px;
  padding: 12px;
  font-family: "Martian Mono", monospace;
  font-size: 14px;
  font-weight: 300;
  line-height: 22px;
  color: inherit;
  resize: vertical;
  background-color: var(--main-bg);
  border: none;
  border-radius: 8px;
}

.Form_textarea::placeholder {
  opacity: 0%;
}

.Form_textarea:focus-visible {
  outline-color: var(--accent);
}

.Form_loader {
  position: absolute;
  bottom: 16px;
  left: 16px;
  max-width: calc(100% - 12px * 2);
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  color: var(--text-secondary);
  overflow-wrap: break-word;
  background-color: var(--main-bg);
  opacity: 0%;
  transition: opacity 0.2s linear;
  pointer-events: none;
}

.Form_messages {
  margin-top: -16px;

  &:empty {
    display: none;
  }
}

.Form_placeholder {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  font-family: "Martian Mono", monospace;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-secondary);
  pointer-events: none;
  opacity: 0%;
}

.Form_textarea:placeholder-shown ~ .Form_placeholder {
  pointer-events: none;
  opacity: 100%;
}

.Form_textarea:placeholder-shown ~ .Form_placeholder a {
  pointer-events: initial;
}

.Form.is-loading .Form_loader {
  opacity: 100%;
}

.Form_loader::after {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-left: 1ch;
  content: "";
  background-image:
    radial-gradient(var(--main-bg) 60%, transparent 60%),
    conic-gradient(transparent, currentcolor);
  border-radius: 50%;
  animation-name: form-loader;
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(0.5, 0.2, 0.5, 0.8);
  animation-iteration-count: infinite;
}

@keyframes form-loader {
  0% {
    transform: rotate(0);
  }

  100% {
    transform: rotate(360deg);
  }
}

.Form_coverage {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
}

.Form_region {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.Form_select {
  display: inline-block;
  width: fit-content;
  max-width: 200px;
  height: 28px;
  padding: 0.2125em 1.25em 0.25em 0.5em;
  overflow: hidden;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.42;
  color: var(--accent);
  text-overflow: ellipsis;
  white-space: nowrap;
  background-color: var(--main-bg);
  background-image: url(./arrow-light.svg);
  background-repeat: no-repeat;
  background-position: 96% 54%;
  border: none;
  border-radius: 4px;
  appearance: none;

  @media (prefers-color-scheme: dark) {
    background-image: url(./arrow-dark.svg);
  }
}
