/**
* Copyright (c) 2022 - present TinyVue Authors.
* Copyright (c) 2022 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/

@import '../custom.less';
@import './vars.less';

@amount-prefix-cls: ~'@{css-prefix}amount';
@svg-prefix-cls: ~'@{css-prefix}svg';
@input-prefix-cls: ~'@{css-prefix}input';
@popover-prefix-cls: ~'@{css-prefix}popover';
@radio-prefix-cls: ~'@{css-prefix}radio';

.@{amount-prefix-cls} {
  .inject-Amount-vars();

  width: 270px;

  &-filter-box {
    .popover-left {
      font-size: 12px;
    }
  }

  & &-input-icon {
    .@{svg-prefix-cls} {
      fill: var(--tv-Amount-icon-color);
      width: var(--tv-Amount-icon-size);
      height: var(--tv-Amount-icon-size);
    }
  }

  &-popper {
    width: 270px;

    .popover-filter-content {
      margin-bottom: 12px;
      font-size: 12px;
      cursor: pointer;

      .@{radio-prefix-cls}-group {
        display: inline-block;
      }

      .popover-filter-botton {
        background-color: #f5f6f8;
        box-sizing: border-box;
        margin: 0 8px 8px 0;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        height: 24px;
        border-radius: 2px;
        min-width: 48px;
        text-align: center;
        max-width: none;
        padding: 1px 8px;
        border: 1px solid #f5f6f8;
        font-style: normal;

        &.is-checked {
          color: #fafafa;
          border-color: #fafafa;
        }

        .@{radio-prefix-cls}__input {
          display: none;
        }

        .@{radio-prefix-cls}__label {
          padding-left: 0;
          padding-right: 0;
          line-height: 20px;
          height: 20px;
          display: inline-block;
        }
      }

      .popover-filter-botton:nth-child(4),
      .popover-filter-botton:nth-child(8) {
        margin-right: 0;
      }
    }

    .popover-con {
      .module:not(:last-child) {
        margin-bottom: 12px;
      }

      .module {
        display: flex;
        justify-content: center;
        align-items: center;

        .popover-left {
          flex: 0 0 auto;
          margin-right: 8px;
          text-align: right;

          & + .tiny-date-container {
            width: 100%;
          }
        }

        .popover-right:not(.@{input-prefix-cls}-prefix):not(.@{input-prefix-cls}-suffiX) {
          .@{input-prefix-cls}__inner {
            padding: 0 8px;
          }
        }

        .popover-right.@{input-prefix-cls} {
          display: inline-block;
        }
      }
    }
  }

  .@{input-prefix-cls} {
    outline: none;
  }

  span.@{popover-prefix-cls}__reference {
    width: 100%;
  }
}