@import '../style/var';
@import "../style/mixins/hairline";

.van-cell {
  position: relative;
  display: flex;
  width: 100%;
  overflow: hidden;
  box-sizing: border-box;
  color: @cell-text-color;
  font-size: @cell-font-size;
  line-height: @cell-line-height;
  background-color: @cell-background-color;
  padding: @cell-vertical-padding @cell-horizontal-padding;

  &:not(:last-child)::after {
    .hairline-bottom(@cell-border-color, 15px);
  }

  &--borderless::after {
    display: none;
  }

  &__label {
    color: @cell-label-color;
    font-size: @cell-label-font-size;
    margin-top: @cell-label-margin-top;
    line-height: @cell-label-line-height;
  }

  &__title,
  &__value {
    flex: 1;
  }

  &__value {
    color: @cell-value-color;
    overflow: hidden;
    text-align: right;
    position: relative;
    vertical-align: middle;

    &--alone {
      color: @text-color;
      text-align: left;
    }
  }

  &__left-icon,
  &__right-icon {
    min-width: 1em;
    height: @cell-line-height;
    font-size: @cell-icon-size;
    line-height: @cell-line-height;
  }

  &__left-icon {
    margin-right: 5px;
  }

  &__right-icon {
    margin-left: 5px;
    color: @cell-right-icon-color;
  }

  &--clickable {
    &:active {
      background-color: @cell-active-color;
    }
  }

  &--required {
    overflow: visible;

    &::before {
      content: '*';
      position: absolute;
      left: 7px;
      font-size: @cell-font-size;
      color: @cell-required-color;
    }
  }

  &--center {
    align-items: center;
  }

  &--large {
    padding-top: @cell-large-vertical-padding;
    padding-bottom: @cell-large-vertical-padding;

    .van-cell__title {
      font-size: @cell-large-title-font-size;
    }

    .van-cell__label {
      font-size: @cell-large-label-font-size;
    }
  }
}
