.common-form {
  display: flex;
  flex-direction: column;
  gap: 16px;

  .required {
    &:after {
      content: " *";
      color: #d92c21;
    }
  }

  .form-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
  }

  .form-sub-header {
    margin: 0;
    font-style: normal;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    color: #060c1b;
  }

  .form-element {
    width: 100%;
    position: relative;

    > label {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
      transition: 0.3s;

      font-style: normal;
      font-weight: 400;
      font-size: 12px;
      line-height: 130%;
      color: #4f4f4f;
    }

    .error-message {
      display: none;
      font-style: normal;
      font-weight: normal;
      font-size: 12px;
      line-height: 130%;
      align-items: center;
      color: #d92c21;
      padding-left: 20px;
      height: 13px;
      background-repeat: no-repeat;
      background-size: 15px 13px;
      margin-top: 3px;
    }

    &.error {
      // Labels are never recoloured by form state — only the field reacts.
      .material-input,
      .zen-input,
      .material-select,
      .settings-multiselect {
        border-color: #d92c21;
      }

      .error-message {
        display: block;
      }
    }

    &.country-code {
      max-width: 140px;
    }

    &.toggle-slide {
      display: flex;
      align-items: center;
      gap: 16px;

      label {
        margin: 0;
        font-weight: 400;
        font-size: 16px;
        line-height: 130%;
        color: #060c1b;
      }
    }

    &:hover {
      // Labels keep their static colour on hover/focus — no state highlight.
      // (The field border still reacts; only the label is left untouched.)
      .material-input,
      .zen-input,
      .app-select-toggle,
      .material-select,
      .dropdown-toggle {
        border-color: #b8b9bc;
      }
    }

    &:focus-within {
      .material-input,
      .zen-input,
      .app-select-toggle,
      .material-select,
      .dropdown-toggle {
        border-color: $color-primary;
      }
    }
  }
}

.material-input,
.zen-input {
  width: 100%;

  border: none;
  outline: none;
  border-bottom: 1px solid #d6d6d8;
  padding-bottom: 8px;
  transition: 0.3s;

  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 24px;
  color: #4f4f4f;

  &::placeholder {
    color: #bebebe;
  }

  &:focus {
    caret-color: $color-primary;
    border-color: $color-primary;
  }

  &[readonly],
  &[disabled] {
    cursor: not-allowed;
    color: #b8b9bc;
    border-color: #d0d0d2;
    background: #ffffff;
  }
}
