.stellar-trening-program-single-list {
  @media (max-width: 680px) {
    padding: 21px 8px;
  }
  @media (max-width: 1024px) {
    padding: 21px 8px;
  }
  @media (max-width: 1366px) {
    padding: 21px 8px;
  }
  @media (max-width: 1320px) {
    padding: 21px 8px;
  }
}

.stellar-program-plan {
  display: grid;
  gap: 55px;
  margin: 12px 0;

  @media (max-width: 1024px) {
    padding: 8px;
  }

  .spp-detail {
    border-radius: 55px;
    padding: 21px;
    background: #303030;
    @media (max-width: 1024px) {
      background: transparent;
      padding: 0;
    }

    .spp-detail-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    .spp-detail-body {
      .spp-preview {
        display: flex;
        flex-direction: column;
        gap: 60px;

        @media (max-width: 1024px) {
          gap: 0;
        }

        .spp-preview-col--media {
          position: relative;
          height: 250px;
          width: 100%;
          background-size: cover;
          background-position: center;
          border-radius: 34px;
          overflow: hidden;

          @media (max-width: 1024px) {
            height: auto;
            width: 100%;
            aspect-ratio: 1/1;
          }

          @media (max-width: 680px) {
            -webkit-box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
            -moz-box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
            box-shadow: inset 0px -100px 100px 34px rgba(0, 0, 0, 1);
          }

          .spp-preview-overlay {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 34px;
            color: #fff;
            background: linear-gradient(
              180deg,
              rgba(0, 0, 0, 0) 40%,
              rgba(0, 0, 0, 0.55) 100%
            );

            @media (max-width: 1024px) {
              padding: 21px;
            }

            .spp-preview-week {
              font-weight: 400;
              font-size: 89px;
              text-shadow: 4px 4px 8px #00000059;
              margin: 0;
              @media (max-width: 1024px) {
                font-size: 34px;
              }
            }
            .spp-preview-meta {
              font-weight: 500;
              font-size: 20px;
              @media (max-width: 1024px) {
                font-size: 13px;
              }
            }
          }
        }
        .spp-preview-col--body {
          display: flex;
          flex-direction: column;
          max-width: 1200px;
          width: 100%;
          margin: 0 auto;
          padding: 21px;
          @media (max-width: 1024px) {
            max-width: 100%;
            padding: 10px 0 10px 10px;
          }

          .spp-preview-title {
            font-weight: 600;
            font-size: 34px;
            padding-bottom: 29px;
            border-bottom: 1px solid #fff;
            @media (max-width: 1024px) {
              display: none;
            }
          }
          .spp-accordion {
            display: grid;
            gap: 10px;

            /* Mobile: horizontal scroll / carousel-like */
            @media (max-width: 680px) {
              overflow-x: visible;
            }

            .spp-accordion-item {
              overflow: hidden;
              border-bottom: 1px solid #fff;

              /* Mobile: one shared horizontal scroller
                 so header (summary) and table move together */
              @media (max-width: 680px) {
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
              }

              &[open] {
                .spp-accordion-summary {
                  .spp-day-header-row {
                    .spp-day-header-col:not(.spp-day-header-col--day) {
                      .spp-day-header-label {
                        color: #fff;
                      }
                    }
                  }
                }
              }
              .spp-accordion-summary {
                cursor: pointer;
                list-style: none;
                font-weight: 400;
                font-size: 21px;
                display: block;

                @media (max-width: 680px) {
                  overflow-x: visible;
                }

                .spp-day-header-row {
                  display: flex;
                  flex-direction: row;
                  align-items: center;
                  gap: 12px;
                  padding: 10px 0;
                  @media (max-width: 680px) {
                    width: 140vw; /* 60vw + 4 * 20vw */
                    gap: 0;
                  }
                }

                .spp-day-header-col {
                  flex: 1 1 0;
                  display: flex;
                  align-items: center;
                  justify-content: flex-end;
                  gap: 6px;
                  font-size: 14px;
                  color: #bcbcbc;
                  text-align: right;
                  padding: 13px 13px 0px 0;
                  &:last-child {
                    border-right: none;
                  }
                  @media (max-width: 1024px) {
                    flex: 0 0 20vw;
                    max-width: 20vw;
                    padding: 13px;
                  }
                }

                .spp-day-header-col--day {
                  flex: 0 0 35%;
                  display: flex;
                  align-items: center;
                  justify-content: flex-start;
                  gap: 8px;
                  color: #ffffff;
                  font-size: 16px;
                  font-weight: 300;
                  border-right: none;
                  margin-right: -1px;
                  @media (max-width: 680px) {
                    flex: 0 0 60vw;
                    max-width: 60vw;
                  }
                }

                .spp-day-header-icon {
                  width: 24px;
                  height: 24px;
                  flex: 0 0 auto;
                  display: none;
                  @media (max-width: 1024px) {
                    display: block;
                  }
                }

                .spp-day-header-label {
                  font-weight: 400;
                  color: #797979;
                }

                @media (max-width: 1024px) {
                  .spp-day-header-col:not(.spp-day-header-col--day) .spp-day-header-label {
                    display: none;
                  }
                  .spp-day-header-col:not(.spp-day-header-col--day) {
                    justify-content: center;
                  }
                }

                &::-webkit-details-marker {
                  display: none;
                }
              }
              .spp-accordion-panel {
                margin: 0;
                padding-bottom: 40px;

                @media (max-width: 680px) {
                  overflow-x: visible;
                }

                .spp-empty {
                  opacity: 0.7;
                  font-style: italic;
                }

                .spp-day-table {
                  width: 100%;
                  border-spacing: 0;
                  border-collapse: collapse;
                  table-layout: fixed;
                  @media (max-width: 680px) {
                    width: 140vw; /* 60vw + 4 * 20vw */
                    min-width: 140vw;
                    table-layout: fixed;
                  }
                }

                .spp-day-table td {
                  text-align: right;
                  font-size: 14px;
                  vertical-align: middle;
                  border-right: 1px solid rgba(255, 255, 255, 0.3);
                  padding: 13px 13px 13px 0;
                  &:last-child {
                    border-right: none;
                  }
                  @media (max-width: 1024px) {
                    padding: 5px;
                    text-align: center;
                  }
                }

                .spp-day-table tbody tr {
                  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
                }

                .spp-day-table tbody tr:last-child {
                  border-bottom: none;
                }

                .spp-day-table__cell--exercise {
                  display: flex;
                  flex-direction: row;
                  align-items: center;
                  justify-content: space-between;
                  gap: 10px;
                  width: 35%;
                  text-align: left;
                  border-right: none !important;
                  @media (max-width: 680px) {
                    width: 60vw;
                  }
                }

                .spp-day-table__cell--exercise .spp-ex-left {
                  display: flex;
                  flex-direction: row;
                  align-items: center;
                  gap: 8px;
                  text-align: left;
                }

                @media (max-width: 1024px) {
                  .spp-day-table__cell--exercise .spp-ex-left .spp-ex-check {
                    display: none !important;
                  }
                }

                .spp-day-table__cell--exercise a {
                  font-weight: 300;
                  font-size: 17px !important;
                  line-height: 21px;
                  text-decoration: none;
                  color: #ffffff;
                  transition: 0.3s;
                  max-width: 100%;
                  white-space: nowrap;

                  @media (max-width: 1024px) {
                    white-space: normal;
                    font-size: 14px !important;
                  }
                }

                .spp-day-table__cell--exercise a.is-completed {
                  @media (max-width: 1024px) {
                    color: #00b9f2;
                  }
                }

                .spp-day-table__cell--exercise .spp-ex-play {
                  flex: 0 0 auto;
                }

                .spp-day-table__cell--circuits,
                .spp-day-table__cell--circuits-rest,
                .spp-day-table__cell--reps,
                .spp-day-table__cell--pause {
                  width: calc(65% / 4);
                  text-align: right;
                  @media (max-width: 680px) {
                    width: 20vw;
                  }
                }

                .spp-day-table__meta {
                  display: inline-flex;
                  align-items: center;
                  gap: 6px;
                  font-size: 14px;
                }

                .spp-day-table__meta-icon {
                  width: 24px;
                  height: 24px;
                  flex: 0 0 auto;
                  @media (max-width: 1024px) {
                    display: none;
                  }
                }

                .spp-day-table__meta-value {
                  font-weight: 600;
                  font-size: 17px;
                  @media (max-width: 1024px) {
                    font-size: 14px !important;
                  }
                }
              }
            }
          }
          .spp-actions {
            margin-top: auto;
            padding-top: 50px;
            text-align: center;
            .spp-add-to-calendar {
              height: 65px;
              width: 350px;
              font-weight: 700;
              font-size: 19px;
              text-align: center;
              background: #00b9f2;
              border-radius: 50px;
              padding: 10px 20px;
              transition: 0.3s;
              border: none;
              color: #fff;
              cursor: pointer;
              @media (max-width: 1024px) {
                height: 46px;
                width: 100%;
                font-size: 13px;
                border-radius: 22px;
                margin-top: 13px;
              }
              &:hover {
                background: #005a87;
                transition: 0.3s;
              }
              &:disabled {
                opacity: 0.5;
                cursor: not-allowed;
                transition: 0.3s;
              }
            }
          }
        }
      }
    }
  }
  .spp-weeks {
    display: flex;
    flex-direction: column;
    gap: 13px;
    scroll-behavior: smooth;
    @media (max-width: 680px) {
      /* Mobile carousel */
      --spp-peek: 48px; /* how much next slide peeks */
      flex-direction: row;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior-x: contain;
      scroll-snap-type: x mandatory;
      scroll-padding: 8px;
      padding-right: 8px;
    }
    .spp-week {
      display: flex;
      flex-direction: row;
      gap: 8px;
      align-items: stretch;
      @media (max-width: 680px) {
        /* show next item peeking on the right */
        flex: 0 0 calc(100% - var(--spp-peek, 48px));
        min-width: calc(100% - var(--spp-peek, 48px));
        scroll-snap-align: start;
        scroll-snap-stop: always;
      }
      .spp-days {
        display: flex;
        flex-direction: column;
        background: #303030;
        border-radius: 34px;
        padding: 10px;
        gap: 13px;
        .spp-day {
          background: #202020;
          border-radius: 17px;
          padding: 10px;
          border: none;
          color: #fff;
          display: flex;
          flex-direction: row;
          justify-content: space-between;
          align-items: center;
          gap: 10px;
          transition: 0.3s;
          &:not([disabled]):hover {
            background: #00b9f2;
            transition: 0.3s;
            cursor: pointer;
          }
          &:active {
            background: #fff;
            transition: 0.3s;
            color: #303030;
            cursor: pointer;
          }
          &:focus {
            background: #fff;
            transition: 0.3s;
            color: #303030;
            cursor: pointer;
          }
          &:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transition: 0.3s;
          }
        }
        &[disabled] {
          opacity: 0.5;
          cursor: not-allowed;
        }
      }
      .spp-week-card {
        background: #303030;
        border-radius: 34px;
        padding: 13px;
        color: #fff;
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 20px;
        width: 100%;
        position: relative;
        /* Numbering overlay to match .stellar-program-list__index */
        .stellar-program-list__index {
          position: absolute;
          font-weight: 600;
          font-size: 165px;
          line-height: 267px;
          color: #7e7e7e;
          left: -70px;
          top: 50%;
          transform: translateY(-50%);
          z-index: -1;
          pointer-events: none;

          @media (max-width: 1024px) {
            z-index: 1;
            right: -18px;
            bottom: 0;
            left: auto;
            top: auto;
            line-height: 236px;
            transform: none;
            font-family: "Anton", sans-serif;
            font-size: 340px;
            color: #191919;
            display: none;
          }
        }
        .stellar-program-list__index.is-2digits {
          left: -150px;
        }
        @media (max-width: 1024px) {
          flex-direction: column;
        }
      }

      .spp-week-col {
        display: flex;
        flex-direction: column;
        &.spp-week-col--media {
          flex: 0 0 auto;

          .spp-week-thumb {
            width: 400px;
            height: 200px;
            object-fit: cover;
            border-radius: 16px;
            display: block !important;
            @media (max-width: 1024px) {
              width: 100%;
              height: auto;
              aspect-ratio: 1/1;
            }
          }
        }
        &.spp-week-col--content {
          flex: 1 1 auto;
          height: 100%;
          justify-content: space-between;
        }
        &.spp-week-col--cta {
          width: 60px;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          background: #00b9f2;
          border-radius: 21px;
          @media (max-width: 1024px) {
            width: 100%;
          }
          .spp-week-select {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            padding: 0;
            border: none;
            cursor: pointer;
            .spp-week-cta__label {
              display: none;
            }
            @media (max-width: 1024px) {
              width: 100%;
              height: 40px;
            }
            @media (max-width: 680px) {
              img {
                display: none;
              }
              .spp-week-cta__label {
                display: inline;
                font-weight: 700;
                font-size: 16px;
                color: #fff;
              }
            }
          }
          &:hover {
            background: #005a87;
            transition: 0.3s;
          }
          &:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transition: 0.3s;
          }
          &:active {
            background: #fff;
            transition: 0.3s;
            color: #303030;
            cursor: pointer;
          }
          &:focus {
            background: #fff;
            transition: 0.3s;
            color: #303030;
            cursor: pointer;
          }
          &:disabled {
            opacity: 0.3;
            cursor: not-allowed;
            transition: 0.3s;
          }
        }
        .spp-week-title {
          font-weight: 500;
          font-size: 55px;
          margin: 0;
          @media (max-width: 1024px) {
            font-size: 27px;
          }
          @media (max-width: 680px) {
            font-size: 21px;
          }
        }
        .spp-week-title.is-completed {
          color: #00b9f2;
        }
        .spp-week-meta {
          margin: 0;
          font-weight: 500;
          font-size: 20px;
          @media (max-width: 1024px) {
            font-size: 13px;
            text-align: center;
            margin-top: 10px;
          }
        }
      }
    }
  }
}
