@import '../../style/var';
@import '../../style/mixins/_hairline';

.hl-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  padding: $padding-sm;
  overflow: hidden;
  color: $cell-text-color;
  font-size: $cell-font-size;
  line-height: $cell-line-height;
  background-color: $cell-background-color;

  &:not(:last-child) {
    @include hairline-bottom($cell-border-color, $padding-sm);
  }

  &--borderless::after {
    display: none;
  }

  &__wrap {
    display: flex;
    width: 100%;
  }

  &__content,
  &__value {
    flex: 1;
  }

  &__main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  &__label {
    margin-top: $cell-label-margin-top;
    color: $cell-label-color;
    font-size: $cell-label-font-size;
    line-height: $cell-label-line-height;
  }

  &__title {
    display: flex;
    align-items: center;
    min-width: 100px;
    span {
      margin-right: 2px;
    }
  }

  &__value {
    position: relative;
    overflow: hidden;
    color: $black;
    vertical-align: middle;

    &--alone {
      color: $text-color;
      text-align: left;
    }
    &--left {
      text-align: left;
    }
    &--right {
      text-align: right;
    }
  }

  &__left,
  &__right {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  &__left-icon,
  &__right-icon {
    min-width: 1em;
    // height: $cell-line-height;
    font-size: $cell-icon-size;
    line-height: $cell-line-height;
  }

  &__left-icon {
    // position: relative;
    // top: 2px;
    margin-right: 2px;
    // color: #c3c3c3;
    .hl-image {
      top: 2px;
    }
  }

  &__right-icon {
    margin-left: 5px;
    color: $cell-right-icon-color;
  }

  &--clickable {
    &:active {
      background-color: $cell-active-color;
    }
  }

  &--required {
    overflow: visible;

    &::before {
      position: absolute;
      top: 50%;
      left: 4px;
      margin-top: -10px;
      color: $cell-required-color;
      font-size: $cell-font-size;
      content: '*';
    }
  }

  &--center {
    align-items: center;
  }

  &--large {
    padding-top: $cell-large-vertical-padding;
    padding-bottom: $cell-large-vertical-padding;

    .hl-cell__title {
      font-size: $cell-large-title-font-size;
    }

    .hl-cell__label {
      font-size: $cell-large-label-font-size;
    }
  }
}
