@import 'moda-themes/themes';

.mo-input {
  color: color('cement');
  font-size: font-size('sm');
  font-family: font-family('sans');

  &__text {
    width: 100%;
    line-height: calc(5 / 3);
    padding: 0.75rem 0 0.75rem 0.75rem;
    border: 1px solid color('elephant');

    &--error {
      border-color: color('code-red');
      margin-bottom: 0.5rem;
    }
  }

  &__checkbox {
    margin-top: 0.8rem;
    width: fit-content;
    cursor: pointer;

    input,
    label {
      cursor: pointer;
    }
  }

  &__select {
    z-index: 1;
    line-height: 2;
    height: 2.75rem;
    padding: 0 0.75rem;
    position: relative;
    border: solid color('elephant');
    border-width: 1px 1px 0 1px;

    &-options {
      max-height: 12rem;
      overflow: scroll;
    }

    &-option {
      line-height: 4;
      cursor: pointer;

      &-text {
        padding-left: 13px;
      }

      &:hover {
        background-color: color('noise');
      }
    }

    .disabled {
      pointer-events: none;
    }

    .collapsible:focus {
      outline: none;
    }

    &:focus-within {
      outline: -webkit-focus-ring-color auto 5px;
    }

    .collapsible-container {
      background-color: color('white');
      border: solid color('elephant');
      border-width: 0 1px 1px 1px;
      width: calc(100% + 26px);
      margin-left: -13px;
      margin-top: -1px;
    }
  }

  &__error-text {
    margin-bottom: 1rem;
    color: color('code-red');
  }
}
