@import '../../style/mixins';
@import '../../style/themes/default';
@ActionSheetPrefixCls: fm-action-sheet;

@import './base';

.@{ActionSheetPrefixCls} {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: @fill-base;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-overflow-scrolling: touch;

  &-header {
    position: relative;
    padding-bottom: 1px;
    .hairline('bottom');
  }

  &-title,
  &-message {
    margin: @h-spacing-lg auto;
    padding: 0 @h-spacing-lg;
    text-align: center;
  }

  &-title {
    font-size: @font-size-heading;
  }

  &-message {
    color: @color-text-caption;
    font-size: @font-size-base;
  }

  &-button-list {
    text-align: center;
    color: @color-text-base;
    max-height: 7 * @actionsheet-item-height;
    overflow-y: auto;

    &-item {
      font-size: @actionsheet-item-font-size;
      padding: 0 8 * @hd;
      margin: 0;
      position: relative;
      height: @actionsheet-item-height;
      line-height: @actionsheet-item-height;
      box-sizing: content-box;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow-x: hidden;
      .hairline('top');
      &&-active {
        background-color: @fill-tap;
      }
      &:first-child {
        .hairline-remove('top')
      }
    }
    &-item-content {
      display: inline-block;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .@{ActionSheetPrefixCls}-destructive-button {
      color: @brand-error;
    }
  }

  &-button-list::-webkit-scrollbar {
    display: none;
  }

  .@{ActionSheetPrefixCls}-cancel-button {
    padding-top: @v-spacing-sm;
    position: relative;
    text-align: center;

    &-mask {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: @v-spacing-sm;
      background-color: #e7e7ed;
      .hairline('top');
      .hairline('bottom');
    }
  }
}
