/* stylelint-disable order/properties-order */
@import '../../style/themes/index';
@import '../../style/mixins/index';

// input start
.otp-container {
  padding: @spacing[24];
  text-align: center;

  &--wrap-style {
    width: fit-content;
    margin: 0;

    @media @breakpoint-md {
      margin: 0 auto;
    }

    div {
      &:not(:last-child) {
        margin-right: 16px;
      }

      position: relative;

      // gach chan duoi text input
      &::after {
        position: absolute;
        bottom: 8px;
        left: 50%;
        width: 16px;
        height: 1px;
        background: @color-gray-300;
        transform: translateX(-50%);
        content: '';
      }
    }
  }

  &--input-style {
    width: 100% !important;
    max-width: 44px;
    height: 44px;
    padding: 9px 16px;
    border-color: @color-gray-300;

    @media @breakpoint-mobile {
      padding: 8px;
    }

    @media @breakpoint-md {
      max-width: 48px;
      height: 48px;
    }

    &:focus,
    &:hover {
      border-color: @color-primary-500;
      box-shadow: none;
    }

    &::-webkit-outer-spin-button,
    &::-webkit-inner-spin-button {
      margin: 0;
      /* stylelint-disable-next-line property-no-vendor-prefix */
      -webkit-appearance: none;
    }

    /* Firefox */
    &[type='number'] {
      /* stylelint-disable-next-line property-no-vendor-prefix */
      -moz-appearance: textfield;
    }
  }

  &--count-down {
    display: inline-block;
    // count down text start
    .@{ant-prefix}-statistic,
    .@{ant-prefix}-statistic * {
      display: contents;
    }

    .@{ant-prefix}-statistic-content {
      display: inline-block;

      &-value {
        color: @color-gray-400;
        font-weight: @typography-font-medium;
        font-size: @caption-1-size;
        line-height: @mobile-caption-line-height*1px;
        @media only screen and (max-width: @mobile-max-width) {
          font-size: @mobile-caption-1-size;
        }
      }
    }
  }

  .btn-resend-otp:disabled {
    color: @color-gray-300;
  }

  // status
  .otp-error {
    .otp-container--input-style {
      border-color: @color-error-500;
    }
  }

  @media only screen and (max-width: @mobile-max-width) {
    padding: 12px;
    text-align: left;

    .@{ant-prefix}-btn-link {
      min-width: auto;
      padding: 0;
      text-align: left;
    }
  }
}
