@import '../../style/themes/index';
@import '../../style/mixins/index';

@descriptions-bordered: #ebedf0;
.@{ant-prefix}-iep-descriptions {
  &-bordered {
    border: 1px solid @descriptions-bordered;
  }
  &-horizontal {
    .@{ant-prefix}-iep-descriptions {
      &-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        &-item {
          background: #f8f8f8;
          display: flex;
          justify-content: var(--align);
          align-items: center;
          flex: var(--flex);
          padding: 12px 24px;
          border-bottom: 1px solid @descriptions-bordered;
          border-left: 1px solid @descriptions-bordered;
          &:first-child {
            border-left: none;
          }
          span {
            font-size: 14px;
          }
        }
      }
      &-footer {
        &-cell {
          display: flex;
          justify-content: space-between;
          border-bottom: 1px solid @descriptions-bordered;
          &:last-child {
            border-bottom: 0;
          }
          &-item {
            display: flex;
            justify-content: var(--align);
            align-items: center;
            flex: var(--flex);
            padding: 12px 24px;
            width: 100%;
            border-left: 1px solid @descriptions-bordered;
            span {
              display: inline-block;
            }
            &:first-child {
              border-left: none;
            }
          }
        }
      }
    }
  }
  &-vertical {
    display: flex;
    justify-content: space-between;
    .@{ant-prefix}-iep-descriptions {
      &-split {
        border-left: 1px solid @descriptions-bordered;
        flex: 1;
        &:first-child {
          border-left: none;
        }
        &-item {
          border-top: 1px solid @descriptions-bordered;
          display: flex;
          justify-content: space-between;
          &:first-child {
            border-top:none;
          }
          &-label {
            padding: 12px 24px;
            background: #f8f8f8;
            border-right: 1px solid @descriptions-bordered;
            width: var(--width);
            font-size: 14px;
          }
          &-value {
            flex: 1;
            padding: 12px 24px;
          }
        }
      }
    }
  }
  &-timetable {
    display: flex;
    justify-content: space-between;
    &-sider {
      border-right: 1px solid @descriptions-bordered;
      background: #f8f8f8;
      &-item {
        height: var(--height);
        border-bottom: 1px solid @descriptions-bordered;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        padding: 8px 12px;
        font-size: 14px;
        &:last-child {
          border: none;
        }
      }
    }
    &-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid @descriptions-bordered;
      background: #f8f8f8;
      font-weight: 400;
      font-size: 14px;
      color: #000;
      &-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        border-left: 1px solid @descriptions-bordered;
        &:first-child {
          border-left: none;
        }
        &-head {
          border-bottom: 1px solid @descriptions-bordered;
          display: flex;
          justify-content: center;
          align-items: center;
          padding: 8px 12px;
        }
        &-body {
          display: flex;
          justify-content: space-between;
          align-items: center;
        }
        &-cell {
          flex: 1;
          display: flex;
          justify-content: center;
          align-items: center;
          border-left: 1px solid @descriptions-bordered;
          height: 40px;
          padding: 8px 12px;
          &:first-child {
            border-left: none;
          }
        }
      }
    }
    &-layout {
      display: flex;
      flex-direction: column;
      flex: 1;
    }
    &-body {
      &-row {
        border-bottom: 1px solid @descriptions-bordered;
        display: flex;
        justify-content: space-between;
        align-items: center;
        &:last-child {
          border-bottom: none;
        }
      }
      &-cell {
        height: 40px;
        border-left: 1px solid @descriptions-bordered;
        flex: 1;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        &:first-child {
          border-left: none;
        }
        span {
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }
}
