.cart-container {
  min-height: 680px;
  padding-bottom: 40px;
  background: #f5f7fa;

  .top-bgimg {
    height: 120px;
    background: url('/static/images/homePage/cart_bg.png') center/cover no-repeat;
  }

  .cart-content {
    position: relative;
    margin-top: -65px;
    .cart-title {
      display: flex;
      align-items: center;
      height: 56px;
      color: #fff;
      span:first-child { margin-right: 16px; font-size: 24px; font-weight: 600; }
      span:not(:first-child) { margin-right: 5px; font-size: 14px; }
    }
  }

  .project-tabs {
    display: flex;
    align-items: center;
    padding: 0 20px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #edf0f5;
    .project-label { flex-shrink: 0; color: #333; font-size: 14px; font-weight: 500; }
    > span {
      position: relative;
      flex: 0 0 auto;
      padding: 16px 24px;
      color: #666;
      cursor: pointer;
      &.active {
        color: @primaryColor;
        font-weight: 600;
        &::after {
          position: absolute; right: 24px; bottom: 0; left: 24px;
          height: 3px; background: @primaryColor; content: '';
        }
      }
      &.cart-note {
        margin-left: auto; padding-right: 0;
        color: #888; cursor: default; font-size: 12px;
      }
    }
  }

  .cart-info { padding: 0 20px 16px; background: #fff; }
  .major-group {
    margin-top: 12px;
    border: 1px solid #e6edf5;
    border-radius: 5px;
    overflow: hidden;
    .major-title {
      display: flex;
      align-items: center;
      gap: 14px;
      min-height: 46px;
      padding: 10px 16px;
      color: #fff;
      background: @primaryColor;
      box-sizing: border-box;
      > strong { flex: 1; min-width: 150px; font-size: 15px; }
    }
    &.optional .major-title { color: #344b64; background: #d9ebfc; }
    .module-hours {
      display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px;
      font-size: 12px; line-height: 1.6;
    }
    .module-toggle {
      flex: 0 0 58px; padding: 5px 0; border: 0; color: inherit;
      background: transparent; cursor: pointer; font-size: 13px;
    }
    .module-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
    .module-empty {
      padding: 22px 18px; color: #888; background: #f9fbfe; font-size: 13px;
      a { margin-left: 12px; color: @primaryColor; }
    }
  }

  .all-goods {
    display: flex; align-items: center; min-height: 62px; gap: 14px;
    padding: 12px 16px; border-top: 1px solid #edf0f5; box-sizing: border-box;
    &.active { background: #f8fbff; }
    .course-checkbox {
      flex: 0 0 auto; margin-right: 0;
      .el-checkbox__label { display: none; }
    }
    .goods-list {
      display: flex; align-items: center; flex: 1; min-width: 0; cursor: pointer;
    }
    .goods-img {
      position: relative; flex: 0 0 56px; width: 56px; height: 34px;
      border-radius: 3px; overflow: hidden;
      img { width: 100%; height: 100%; object-fit: cover; }
      > span {
        position: absolute; right: 0; bottom: 0; padding: 1px 3px; font-size: 10px;
        color: #fff; background: rgba(0, 0, 0, .55);
      }
    }
    .goods-info {
      flex: 1; min-width: 0; margin-left: 12px;
      .one {
        display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
        color: #333; font-size: 14px; font-weight: 500;
      }
    }
    .goods-hour { flex: 0 0 78px; color: #e46d28; font-size: 14px; text-align: right; }
    .goods-price { flex: 0 0 88px; color: #ed515b; text-align: center; font-size: 14px; }
    .del-goods {
      flex: 0 0 78px; padding: 5px 7px; border: 1px solid #eb8c55; border-radius: 4px;
      color: #c65d1f; background: #fff; cursor: pointer; font-size: 12px;
      &:hover { background: #fff6ee; }
    }
  }

  .cart-plan-bar {
    display: flex; align-items: center; gap: 20px; padding: 14px 36px;
    border-top: 1px solid #edf0f5; background: #fff;
  }
  .cart-selection {
    display: flex; align-items: center; flex: 0 0 auto; gap: 16px;
    .el-checkbox { margin-right: 0; }
    button { padding: 4px 0; border: 0; color: @primaryColor; background: transparent; cursor: pointer; font-size: 13px; }
  }
  .hour-summary {
    flex: 1; min-width: 0; color: #4d6480; text-align: right; line-height: 1.8; font-size: 13px;
    p { margin: 0; }
    strong { margin: 0 2px; color: @primaryColor; font-weight: 600; }
    strong.remaining { color: #d36b24; }
    small { display: block; color: #888; font-size: 11px; }
  }
  button:disabled { opacity: .5; cursor: not-allowed; }
  .cart-foot-info {
    display: flex; align-items: center; min-height: 66px; padding: 0 36px;
    border-top: 1px solid #edf0f5; background: #fff;
    .right {
      display: flex; flex: 1; align-items: center; justify-content: flex-end;
      .selected-num {
        margin-right: 24px; color: #777;
        span { color: @primaryColor; }
      }
      .all-price {
        margin-right: 30px; color: #777;
        span { color: #ed515b; font-size: 20px; font-weight: 600; }
      }
      .settlement {
        width: 108px; height: 36px; padding: 0; border: 0;
        color: #fff; background: @primaryColor; border-radius: 18px;
        cursor: pointer; font-size: 14px; line-height: 36px; text-align: center;
        &:disabled { cursor: not-allowed; opacity: .5; }
      }
    }
  }
  .empty-layer { padding: 70px 0; background: #fff; }
}

.confirmButtonClass { color: #fff !important; }
.empty-content { margin-top: 200px; background: #fff; }
#tail-container { position: static !important; }

.cart-embed {
  height: 100vh;
  overflow: hidden;
  #content { height: 100%; min-height: 0; }
  .cart-container {
    display: flex; height: 100%; flex-direction: column; min-height: 0; padding-bottom: 0;
    > .top-bgimg { display: none; }
    > .cart-content {
      display: flex; height: 100%; min-height: 0; width: 100%;
      margin-top: 0; padding: 0; flex-direction: column;
      > .cart-title {
        flex: 0 0 56px; height: 56px; padding: 0 56px 0 20px;
        color: #333; background: #f5f7fa; box-sizing: border-box;
        span:first-child { font-size: 22px; }
      }
      > .project-tabs { flex: 0 0 auto; }
      > .cart-info {
        display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden;
        .cart-course-list { min-height: 0; flex: 1 1 auto; overflow-y: auto; }
      }
      > .cart-plan-bar, > .cart-foot-info { flex: 0 0 auto; }
    }
  }
  .empty-content { margin-top: 0; }
}

@media screen and (max-width: 1000px) {
  .cart-container {
    .major-group .major-title {
      flex-wrap: wrap; gap: 6px 12px;
      > strong { min-width: 0; }
      .module-hours { order: 1; flex-basis: 100%; justify-content: flex-start; }
    }
    .cart-plan-bar { flex-wrap: wrap; gap: 8px; padding: 12px 26px; }
    .hour-summary { flex-basis: 100%; text-align: left; }
  }
}
@media screen and (max-width: 768px) {
  .cart-container {
    .project-tabs { padding: 0 12px; .cart-note { display: none; } }
    .cart-info { padding: 0 12px 12px; }
    .all-goods {
      gap: 8px; padding: 10px;
      .goods-img { display: none; }
      .goods-info { margin-left: 0; .one { font-size: 12px; } }
      .goods-hour { flex-basis: 52px; font-size: 12px; }
      .goods-price { flex-basis: 64px; font-size: 12px; }
      .del-goods { flex-basis: 60px; font-size: 11px; }
    }
    .cart-plan-bar { padding: 10px 22px; }
    .cart-foot-info {
      padding: 0 18px; min-height: 58px;
      .right {
        .selected-num { margin-right: 12px; font-size: 12px; }
        .all-price { margin-right: 12px; font-size: 12px; span { font-size: 17px; } }
        .settlement { width: 86px; height: 32px; line-height: 32px; }
      }
    }
  }
}
