@mixin cell-theme($color, $border) {
  .ui-cell-footer {
    color: $color
  }
}

.ui-cell {
  position: relative;
  @include cell-theme(#989898, $base-btn-default-border);

  &.theme-info {
    @include cell-theme($base-btn-info-bg, $base-btn-info-border);
  }
  &.theme-success {
    @include cell-theme($base-btn-success-bg, $base-btn-success-border);
  }
  &.theme-warning {
    @include cell-theme($base-btn-warning-bg, $base-btn-warning-border);
  }
  &.theme-error {
    @include cell-theme($base-btn-error-bg, $base-btn-error-border);
  }

  & + & {
    &:before {
      content: '';
      position: absolute;
      left: r(15);
      right: 0;
      top: 0;
      height: 1px;
      border-top: 1px solid #f5f5f5;
      transform-origin: 0 0;
      transform: scaleY(0.5);
    }
  }
}

.ui-cell-inner {
  display: flex;
  align-items: center;
  padding: r(8) r(15);
  background: #fff;
  font-size: r(15);
  min-height: r(45);

  a,
  a:hover {
    text-decoration: none;
  }
}

.ui-cell-normal,
.ui-cell-select {
  .ui-cell-title {
    width: r(100);
  }
}

.ui-cell-select {
  .ui-cell-footer {
    &:after {
      display: inline-block;
      margin-left: r(5);
      content: '';
      border-right: r(1) solid $base-color-eee;
      border-top: r(1) solid $base-color-eee;
      width: r(10);
      height: r(10);
      transform: rotate(45deg);
    }
  }
}

.ui-cell-link {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  
  .ui-cell-inner:active {
    background-color: #fdfdfd;
  }

  .ui-cell-title {
    flex: 1;
  }

  .ui-cell-footer {
    &:after {
      display: inline-block;
      margin-left: r(5);
      content: '';
      border-right: r(2) solid $base-color-eee;
      border-top: r(2) solid $base-color-eee;
      width: r(10);
      height: r(10);
      transform: rotate(45deg);
    }
  }
}

.ui-cell-body {
  flex: 1;
  display: flex;
  align-items: center;
}

.ui-cell-footer {
  text-align: right;
}

.ui-cell-icon {
  margin-right: r(10);

  img {
    max-height: r(29);
  }
}

.ui-cell-title {
  overflow: hidden;
  color: $base-btn-default-color;
}

.ui-cell-content {
  flex: 1;
  align-items: center;
  justify-content: center;
}

.ui-cell-explain {
  display: flex;
  align-items: center;
  position: relative;
  min-height: r(30);
  background: #fff;
  padding: 0 r(15) r(9) r(15);
  font-size: r(13);
}

.ui-cell-explain-text {
  width: 100%;
  background: #fff6e2;
  color: #feaa00;
  border: 1px solid #feeebd;
  padding: r(5) r(8);
}