@class-prefix-number-keyboard: ~'adm-number-keyboard';

.@{class-prefix-number-keyboard} {
  &-main {
    display: flex;
    flex-wrap: wrap;
    flex: 1;
    &&-confirmed-style .@{class-prefix-number-keyboard}-key-sign {
      background-color: var(--adm-color-background);
    }
  }

  &-popup.adm-popup {
    width: 100%;
    user-select: none;
    z-index: 1050;
    .adm-popup-body {
      background-color: var(--adm-color-box);
    }
  }

  &-wrapper {
    display: flex;
  }

  &-header {
    height: 34px;
    line-height: 34px;
    border-top: solid 1px var(--adm-color-border);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    color: var(--adm-color-weak);
    background-color: var(--adm-color-background);
    &-close-button {
      padding: 0 12px;
      font-size: 16px;
    }
    &&-with-title {
      justify-content: space-between;
      .@{class-prefix-number-keyboard}-header-close-button {
        padding-right: 0;
      }
    }
  }

  &-footer {
    background: var(--adm-color-white);
  }

  &-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  &-confirm {
    width: 25%;
  }

  &-key {
    flex: 1 33.33%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    font-size: 22px;
    box-sizing: border-box;
    border: solid 1px var(--adm-color-border);
    border-bottom: none;
    border-left: none;

    &:nth-child(3n),
    &:last-child {
      border-right: none;
    }

    &::before {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 100%;
      height: 100%;
      background-color: var(--adm-color-text-dark-solid);
      border: inherit;
      border-color: var(--adm-color-text-dark-solid);
      border-radius: inherit;
      transform: translate(-50%, -50%);
      opacity: 0;
      content: ' ';
      box-sizing: content-box;
    }

    &&-mid {
      flex-basis: 66.67%;
    }

    &&-sign:active::before {
      opacity: 0.1;
    }

    &&-extra {
      border-left: solid 1px var(--adm-color-border);
      border-right: none;
    }

    &&-extra,
    &&-number {
      background-color: var(--adm-color-background);
      &:active::before {
        opacity: 0.1;
      }
    }

    &&-ok {
      background-color: var(--adm-color-primary);
      color: var(--adm-color-white);
      height: 144px;
      font-size: 16px;
      border: none;
    }
  }
}
