.lesson-parts-panel {
  margin-bottom: 24px;
}

.lesson-parts-panel__head {
  margin-bottom: 18px;
}

.lesson-parts-panel__eyebrow {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}

.lesson-parts-panel__head h3 {
  margin: 0 0 8px;
}

.lesson-parts-panel__head p {
  margin: 0;
  opacity: 0.78;
}

.lesson-parts-panel__count {
  display: inline-flex;
  margin-top: 12px;
  min-width: 28px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
}

.lesson-parts-status {
  margin: 16px 0;
}

.lesson-parts-status:empty {
  display: none;
}

.lesson-parts-status.is-error {
  color: #ffb4b4;
}

.lesson-parts-list {
  display: grid;
  gap: 18px;
}

.lesson-part-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(8, 29, 51, 0.72);
}

.lesson-part-card.is-open {
  border-color: rgba(91, 205, 152, 0.38);
}

.lesson-part-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.lesson-part-card__content {
  min-width: 0;
}

.lesson-part-card__type {
  display: inline-block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  opacity: 0.68;
}

.lesson-part-card__title {
  margin: 0 0 8px;
  font-size: 20px;
}

.lesson-part-card__description {
  margin: 0;
  line-height: 1.55;
  opacity: 0.78;
}

.lesson-part-card__meta {
  flex: 0 0 auto;
  text-align: right;
}

.lesson-part-card__price {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 700;
}

.lesson-part-card__access {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.09);
}

.lesson-part-card.is-open .lesson-part-card__access {
  background: rgba(91, 205, 152, 0.16);
}

.lesson-part-card__body {
  padding: 0 20px 20px;
}

.lesson-part-card__locked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.lesson-part-card__locked p {
  margin: 0;
  line-height: 1.5;
  opacity: 0.78;
}

.lesson-part-card__video {
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}

.lesson-part-card__video-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.lesson-part-card__video-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.lesson-part-card__empty {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  opacity: 0.78;
}

.lesson-part-card__preparing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  border: 1px solid rgba(255, 179, 71, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 179, 71, 0.075),
      rgba(27, 119, 255, 0.075)
    ),
    rgba(8, 29, 51, 0.78);
}

.lesson-part-card__preparing-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 179, 71, 0.42);
  border-radius: 999px;
  color: #ffb347;
  background: rgba(255, 179, 71, 0.09);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lesson-part-card__preparing-title {
  display: block;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.lesson-part-card__preparing-text {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.lesson-part-card__preparing-soon {
  display: inline-flex;
  margin-top: 4px;
  color: #59d9ff;
  font-size: 13px;
  font-weight: 700;
}

/*
 * Multi-part lessons use their own video cards.
 * Old single-video UI remains untouched for lessons
 * with zero active lesson_parts.
 */
body.has-lesson-parts #locked-block,
body.has-lesson-parts #video-block {
  display: none !important;
}

@media (max-width: 760px) {
  .lesson-part-card__head {
    flex-direction: column;
  }

  .lesson-part-card__meta {
    text-align: left;
  }

  .lesson-part-card__locked {
    flex-direction: column;
    align-items: stretch;
  }

  .lesson-part-card__locked .btn {
    width: 100%;
  }
}


/* =========================================================
   FULL LESSON BUNDLE
   ========================================================= */

.lesson-full-bundle {
  margin-top: 22px;
}

.lesson-bundle-card {
  overflow: hidden;
  border: 1px solid rgba(255, 179, 71, 0.34);
  border-radius: 16px;
  padding: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(255, 179, 71, 0.08),
      rgba(27, 119, 255, 0.07)
    ),
    rgba(8, 29, 51, 0.82);
}

.lesson-bundle-card.is-open {
  border-color: rgba(91, 205, 152, 0.45);
}

.lesson-bundle-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.lesson-bundle-card__content {
  min-width: 0;
}

.lesson-bundle-card__eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ffba58;
}

.lesson-bundle-card.is-open
.lesson-bundle-card__eyebrow {
  color: #7ed9ad;
}

.lesson-bundle-card__title {
  margin: 0 0 8px;
  font-size: 22px;
}

.lesson-bundle-card__description {
  max-width: 720px;
  margin: 0;
  line-height: 1.55;
  opacity: 0.82;
}

.lesson-bundle-card__price-box {
  flex: 0 0 auto;
  text-align: right;
}

.lesson-bundle-card__price {
  display: block;
  font-size: 23px;
  white-space: nowrap;
}

.lesson-bundle-card__badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(91, 205, 152, 0.16);
}

.lesson-bundle-card__compare {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.lesson-bundle-card__compare > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.055);
}

.lesson-bundle-card__compare span {
  opacity: 0.75;
}

.lesson-bundle-card__compare strong {
  white-space: nowrap;
}

.lesson-bundle-card__saving {
  border: 1px solid rgba(91, 205, 152, 0.18);
}

.lesson-bundle-card__saving strong {
  color: #7ed9ad;
}

.lesson-bundle-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.lesson-bundle-card__button {
  min-width: 280px;
}

.lesson-part-card__title[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .lesson-bundle-card__top {
    flex-direction: column;
  }

  .lesson-bundle-card__price-box {
    text-align: left;
  }

  .lesson-bundle-card__compare {
    grid-template-columns: 1fr;
  }

  .lesson-bundle-card__actions {
    display: block;
  }

  .lesson-bundle-card__button {
    width: 100%;
    min-width: 0;
  }
}


/* =========================================================
   PAID PART -> FULL LESSON UPGRADE
   ========================================================= */

.lesson-bundle-card__price-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.65;
}

.lesson-bundle-card__upgrade {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.lesson-bundle-card__upgrade > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.lesson-bundle-card__upgrade span {
  opacity: 0.75;
}

.lesson-bundle-card__upgrade strong {
  white-space: nowrap;
}

.lesson-bundle-card__upgrade-total {
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.lesson-bundle-card__upgrade-total strong {
  color: #7ed9ad;
  font-size: 18px;
}


/* =========================================================
   LESSON PART LOCKED VIDEO PREVIEW V1
   ========================================================= */

.lesson-part-card__locked--video {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 0;
  background: transparent;
}

.lesson-part-card__locked-video {
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(55, 196, 255, 0.28);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 50% 45%,
      rgba(0, 182, 255, 0.16),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      rgba(7, 31, 55, 0.98),
      rgba(3, 16, 31, 0.99)
    );
  box-shadow:
    inset 0 0 60px rgba(0, 113, 190, 0.08);
}

.lesson-part-card__locked-video::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(
      rgba(58, 180, 255, 0.18) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(58, 180, 255, 0.18) 1px,
      transparent 1px
    );
  background-size: 34px 34px;
}

.lesson-part-card__locked-video-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.lesson-part-card__locked-video-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 28px;
  text-align: center;
}

.lesson-part-card__locked-video-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(62, 205, 255, 0.34);
  border-radius: 999px;
  color: #59d9ff;
  background: rgba(25, 162, 220, 0.08);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.lesson-part-card__locked-video-play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding-left: 4px;
  border: 1px solid rgba(89, 217, 255, 0.55);
  border-radius: 50%;
  color: #ffffff;
  background:
    radial-gradient(
      circle,
      rgba(41, 158, 255, 0.45),
      rgba(14, 77, 135, 0.32)
    );
  box-shadow:
    0 0 30px rgba(0, 174, 255, 0.18);
  font-size: 25px;
  line-height: 1;
}

.lesson-part-card__locked-video-title {
  margin-top: 2px;
  color: #ffffff;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.25;
}

.lesson-part-card__locked-video-description {
  max-width: 480px;
  color: rgba(255, 255, 255, 0.69);
  font-size: 13px;
  line-height: 1.45;
}

.lesson-part-card__locked-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.lesson-part-card__locked-actions p {
  margin: 0;
  line-height: 1.5;
  opacity: 0.82;
}

@media (max-width: 760px) {
  .lesson-part-card__locked-video-content {
    gap: 8px;
    padding: 16px;
  }

  .lesson-part-card__locked-video-play {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .lesson-part-card__locked-video-description {
    font-size: 12px;
  }

  .lesson-part-card__locked-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lesson-part-card__locked-actions .btn {
    width: 100%;
  }
}
