@import "./../common/abstracts/_mixin.scss";
@import "./../common/abstracts/variable.scss";


.wot-theme-dark {
  @include b(picker) {
    @include when(border) {
      .wd-picker__cell {
        @include halfPixelBorder('top', $-cell-padding, $-dark-border-color);
      }
    }

    @include e(title) {
      color: $-dark-color;
    }

    @include e(label) {
      color: $-dark-color;
    }
    @include e(value) {
      color: $-dark-color;
    }

    @include e(placeholder) {
      color: $-dark-color-gray;
    }

    :deep(.wd-picker__arrow){
      color: $-dark-color;
    }

    @include e(cell) {
      background-color: $-dark-background2;
      color: $-dark-color;
      @include when(disabled) {
        .wd-picker__value {
          color: $-dark-color3;
        }
        .wd-picker__placeholder {
          color: $-dark-color-gray;
        }
      }
    }

    @include when(disabled) {
      .wd-picker__value {
        color: $-dark-color3;
      }

      .wd-picker__placeholder {
        color: $-dark-color-gray;
      }
    }

    @include e(action) {
      @include m(cancel) {
        color: $-dark-color;
      }
      @include when(loading) {
        color: $-dark-color3;
      }
    }
  }
}


@include b(picker) {
  @include edeep(popup) {
    border-radius: 16px 16px 0px 0px;
  }

  @include when(border) {
    .wd-picker__cell {
      @include halfPixelBorder('top', $-cell-padding);
    }
  }
  @include when(large) {
    .wd-picker__cell {
      font-size: $-cell-title-fs-large;
    }
    :deep(.wd-picker__arrow) {
      font-size: $-cell-icon-size-large;
    }
  }
  @include when(error) {
    .wd-picker__value,
    :deep(.wd-picker__arrow) {
      color: $-input-error-color;
    }
  }
  @include when(align-right) {
    .wd-picker__value {
      text-align: right;
    }
  }
  @include e(cell) {
    position: relative;
    display: flex;
    padding: $-cell-wrapper-padding $-cell-padding;
    align-items: flex-start;
    background-color: $-color-white;
    text-decoration: none;
    color: $-cell-title-color;
    font-size: $-cell-title-fs;
    overflow: hidden;
    line-height: $-cell-line-height;

    @include when(disabled) {
      .wd-picker__value {
        color: $-input-disabled-color;
      }
    }
  }

  @include when(disabled) {
    .wd-picker__value {
      color: $-picker-column-disabled-color;
    }
  }

  @include e(error-message){
    color: $-form-item-error-message-color;
    font-size: $-form-item-error-message-font-size;
    line-height: $-form-item-error-message-line-height;
    text-align: left;
    vertical-align: middle;
  }

  @include e(label) {
    position: relative;
    width: $-input-cell-label-width;
    margin-right: $-cell-padding;
    color: $-cell-title-color;
    box-sizing: border-box;

    @include when(required) {
      padding-left: 12px;

      &::after {
        position: absolute;
        left: 0;
        top: 2px;
        content: '*';
        font-size: $-cell-required-size;
        line-height: 1.1;
        color: $-cell-required-color;
      }
    }
  }

  @include e(value-wraper) {
    display: flex;
  }

  @include e(value) {
    flex: 1;
    margin-right: 10px;
    color: $-cell-value-color;
    
    @include when(ellipsis) {
      @include lineEllipsis;
    }
  }

  @include e(body) {
    flex: 1;
  }

  @include e(placeholder) {
    color: $-input-placeholder-color;
  }

  @include edeep(arrow) {
    display: block;
    font-size: $-cell-icon-size;
    color: $-cell-arrow-color;
    line-height: $-cell-line-height;
  }

  @include e(wraper) {
    padding-bottom: var(--window-bottom);
  }

  @include e(toolbar) {
    position: relative;
    display: flex;
    font-size: $-picker-toolbar-fs;
    height: $-picker-toolbar-height;
    line-height: $-picker-action-height;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
  }

  @include e(action) {
    display: block;
    border: none;
    outline: none;
    font-size: $-picker-toolbar-fs;
    color: $-picker-toolbar-finish-color;
    background: transparent;
    padding: 24px 15px 14px 15px;

    @include m(cancel) {
      color: $-picker-toolbar-cancel-color;
    }

    @include when(loading) {
      color: $-picker-loading-button-color;
    }
  }
  @include e(title) {
    display: block;
    padding-top: 10px;
    color: $-picker-toolbar-title-color;
    font-weight: $-action-sheet-weight;
  }
}
