/* ==========================================================================
   Pixel Academy V2 — Learning / Lesson Player Layout
   Depends on pixel-v2.css tokens. Mobile-first, Arabic-first, true RTL.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Page shell & grid
   -------------------------------------------------------------------------- */
body.pixel-lesson {
  background: var(--pa-bg);
  padding-bottom: var(--pa-space-8);
}

/* Room for the fixed mobile action bar so nothing hides behind it. */
body.pixel-lesson.has-lp-actions {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.lp-shell {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--pa-space-3) var(--pa-space-3) 0;
}

.lp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "player"
    "side"
    "materials";
  gap: var(--pa-space-4);
}

.lp-block--player {
  grid-area: player;
  min-width: 0;
}

.lp-side {
  grid-area: side;
  min-width: 0;
}

.lp-materials {
  grid-area: materials;
  min-width: 0;
}

/* --------------------------------------------------------------------------
   2. Compact learning top bar
   The internal header is shared with the course flow and lives in
   pixel-app-theme.css (.pa-appbar).
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   3. Video player — deep indigo learning environment
   The player, its bar, the fullscreen environment and the student watermark
   stay permanently dark in BOTH themes: they are the media anchor, never a
   themed surface. They only use the fixed --pa-indigo-* / *-invert tokens,
   which pixel-app-theme.css deliberately never flips.
   -------------------------------------------------------------------------- */
.lp-player-card {
  overflow: hidden;
  background: var(--pa-indigo-800);
  border: 1px solid var(--pa-indigo-700);
  border-radius: var(--pa-radius-lg);
  box-shadow: var(--pa-shadow);
}

/* The container owns the sizing; the iframe simply fills it. */
#course-video-container {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pa-indigo-900);
}

#course-video-container > iframe,
#course-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

#default-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

/* Floating student-name watermark */
#floating-username {
  position: absolute;
  z-index: 999;
  font-family: var(--pa-font);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  animation: moveAround 10s infinite;
}

@keyframes moveAround {
  0% {
    top: 6%;
    left: 6%;
  }
  25% {
    top: 6%;
    left: 76%;
  }
  50% {
    top: 78%;
    left: 76%;
  }
  75% {
    top: 78%;
    left: 6%;
  }
  100% {
    top: 6%;
    left: 6%;
  }
}

/* Fullscreen */
#course-video-container:fullscreen,
#course-video-container:-webkit-full-screen,
#course-video-container:-moz-full-screen,
#course-video-container:-ms-fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  background: #000;
}

#course-video-container:fullscreen #course-video,
#course-video-container:-webkit-full-screen #course-video {
  width: 100%;
  height: 100%;
}

/* Player bar — shows the currently selected video name (API value only) */
.lp-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pa-space-3);
  padding: var(--pa-space-3) var(--pa-space-4);
  background: var(--pa-indigo-800);
  border-top: 1px solid var(--pa-indigo-700);
}

body.pixel-v2 .lp-player-bar__title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: var(--pa-fs-md);
  font-weight: 700;
  color: var(--pa-text-invert);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Player bar — ±10 second controls
   -------------------------------------------------------------------------- */
.lp-seek {
  display: flex;
  align-items: center;
  gap: var(--pa-space-2);
  flex: 0 0 auto;
}

.lp-seek[hidden] {
  display: none;
}

body.pixel-v2 .lp-seek__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Comfortable on a phone without making the bar taller than the title. */
  width: 44px;
  height: 44px;
  padding: 0;
  font-family: var(--pa-font);
  font-size: 1.05rem;
  color: var(--pa-text-invert);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--pa-radius);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--pa-t) var(--pa-ease),
    border-color var(--pa-t) var(--pa-ease), opacity var(--pa-t) var(--pa-ease);
}

body.pixel-v2 .lp-seek__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

body.pixel-v2 .lp-seek__btn:focus-visible {
  outline: none;
  box-shadow: var(--pa-focus);
}

body.pixel-v2 .lp-seek__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* The step sits inside the circular arrow, the way every player draws it. */
body.pixel-v2 .lp-seek__num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-size: 0.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  pointer-events: none;
}

/* Fullscreen: pixel-learning.js moves the group into the video container, so
   it floats over the picture instead of disappearing with the player bar. */
.lp-seek.is-overlay {
  position: absolute;
  z-index: 3;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding: 6px;
  background: rgba(6, 29, 25, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: var(--pa-radius-pill);
}

body.pixel-v2 .lp-player-bar__title.is-placeholder {
  font-size: var(--pa-fs-sm);
  font-weight: 500;
  color: var(--pa-text-invert-muted);
}

body.pixel-v2 #fullscreen-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px var(--pa-space-4);
  font-size: var(--pa-fs-sm);
  color: var(--pa-text-invert);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--pa-border-invert);
  border-radius: var(--pa-radius-sm);
  box-shadow: none;
}

body.pixel-v2 #fullscreen-btn:hover {
  color: var(--pa-text-invert);
  background: rgba(255, 255, 255, 0.18);
}

/* --------------------------------------------------------------------------
   4. Lesson heading, metadata & facts
   -------------------------------------------------------------------------- */
.lp-lesson-head {
  margin-top: var(--pa-space-4);
  padding: var(--pa-space-5);
  background: var(--pa-surface);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius-lg);
  box-shadow: var(--pa-shadow-sm);
}

body.pixel-v2 .lp-lesson-title {
  margin: 0 0 var(--pa-space-3);
  font-size: var(--pa-fs-xl);
  font-weight: 800;
  color: var(--pa-text);
}

.lp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pa-space-2);
  margin-bottom: var(--pa-space-4);
}

.lp-chips .pa-chip {
  max-width: 100%;
  overflow: hidden;
}

.lp-chips .pa-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
}

body.pixel-v2 .lp-description {
  margin: 0;
  font-size: var(--pa-fs-md);
  color: var(--pa-text-2);
}

body.pixel-v2 .lp-description:empty {
  display: none;
}

.lp-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--pa-space-3);
  margin-top: var(--pa-space-4);
}

/* Remaining views — must read instantly on a phone */
.lp-views {
  display: flex;
  align-items: center;
  gap: var(--pa-space-3);
  flex: 1 1 220px;
  padding: var(--pa-space-3) var(--pa-space-4);
  background: var(--pa-accent-050);
  border: 1px solid rgba(217, 145, 63, 0.32);
  border-radius: var(--pa-radius);
}

.lp-views__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 1.125rem;
  color: var(--pa-info);
  background: var(--pa-surface);
  border-radius: var(--pa-radius-pill);
}

.lp-views__text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.lp-views__label {
  font-size: var(--pa-fs-sm);
  font-weight: 600;
  color: var(--pa-text-2);
}

.lp-views__value {
  font-size: var(--pa-fs-lg);
  font-weight: 800;
  color: var(--pa-info);
}

.lp-views__sep {
  font-size: var(--pa-fs-sm);
  font-weight: 600;
  color: var(--pa-text-muted);
}

/* Live-meeting row — hidden entirely when the API returns no link */
.lp-zoom {
  display: flex;
  align-items: center;
  gap: var(--pa-space-3);
  flex: 1 1 220px;
  padding: var(--pa-space-3) var(--pa-space-4);
  background: var(--pa-primary-050);
  border: 1px solid var(--pa-primary-100);
  border-radius: var(--pa-radius);
}

.lp-zoom[hidden] {
  display: none;
}

.lp-zoom__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 1.125rem;
  color: var(--pa-primary-ink);
  background: var(--pa-surface);
  border-radius: var(--pa-radius-pill);
}

.lp-zoom__label {
  font-size: var(--pa-fs-sm);
  font-weight: 600;
  color: var(--pa-text-2);
}

body.pixel-v2 .lp-zoom__link {
  margin-inline-start: auto;
  font-size: var(--pa-fs-md);
  font-weight: 800;
  color: var(--pa-primary-ink);
}

/* Loading skeleton for the lesson head — shapes only, no fake content */
.lp-lesson-head.is-loading .lp-lesson-title,
.lp-lesson-head.is-loading .lp-description,
.lp-lesson-head.is-loading .pa-chip,
.lp-lesson-head.is-loading .lp-views {
  color: transparent !important;
  background: linear-gradient(
      90deg,
      var(--pa-skel-1) 25%,
      var(--pa-skel-2) 37%,
      var(--pa-skel-1) 63%
    )
    var(--pa-skel-1);
  background-size: 400% 100%;
  border-color: transparent !important;
  animation: pa-shimmer 1.4s ease infinite;
}

.lp-lesson-head.is-loading .lp-lesson-title {
  min-height: 26px;
  max-width: 70%;
  border-radius: var(--pa-radius-sm);
}

.lp-lesson-head.is-loading .lp-description {
  display: block;
  min-height: 44px;
  border-radius: var(--pa-radius-sm);
}

.lp-lesson-head.is-loading .pa-chip {
  min-width: 120px;
  min-height: 30px;
}

.lp-lesson-head.is-loading .lp-views {
  min-height: 64px;
}

.lp-lesson-head.is-loading .pa-chip *,
.lp-lesson-head.is-loading .lp-views * {
  visibility: hidden;
}

.lp-lesson-head.has-error .lp-description {
  display: block;
  color: var(--pa-danger);
}

/* --------------------------------------------------------------------------
   5. Primary action area (fixed bar on small screens)
   -------------------------------------------------------------------------- */
.lp-actions {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  gap: var(--pa-space-3);
  padding: var(--pa-space-3) var(--pa-space-4)
    calc(var(--pa-space-3) + env(safe-area-inset-bottom, 0px));
  background: var(--pa-surface);
  border-top: 1px solid var(--pa-border);
  box-shadow: var(--pa-shadow-up);
}

.lp-actions.is-empty {
  display: none;
}

body.pixel-v2 .lp-actions .course-price {
  flex: 0 0 auto;
  margin: 0;
  font-size: var(--pa-fs-lg);
  font-weight: 800;
  line-height: 1.2;
  color: var(--pa-primary-ink);
  white-space: nowrap;
}

body.pixel-v2 .lp-actions .course-price:empty {
  display: none;
}

body.pixel-v2 .lp-actions__main {
  flex: 1 1 auto;
  min-height: 48px;
  font-size: var(--pa-fs-lg);
}

/* --------------------------------------------------------------------------
   6. Playlist panel
   -------------------------------------------------------------------------- */
.lp-panel {
  background: var(--pa-surface);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius-lg);
  box-shadow: var(--pa-shadow-sm);
  overflow: hidden;
}

.lp-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pa-space-2);
  padding: var(--pa-space-4) var(--pa-space-5);
  background: var(--pa-surface-2);
  border-bottom: 1px solid var(--pa-border);
}

body.pixel-v2 .lp-panel__title {
  display: flex;
  align-items: center;
  gap: var(--pa-space-2);
  margin: 0;
  font-size: var(--pa-fs-lg);
  font-weight: 800;
}

.lp-panel__title i {
  color: var(--pa-primary-ink);
}

.lp-panel__count {
  font-size: var(--pa-fs-sm);
  font-weight: 800;
  color: var(--pa-primary-ink);
  background: var(--pa-primary-050);
  border: 1px solid var(--pa-primary-100);
  border-radius: var(--pa-radius-pill);
  padding: 1px var(--pa-space-3);
}

.lp-panel__count[hidden] {
  display: none;
}

.lp-panel__body {
  padding: var(--pa-space-4);
}

#lp-playlist-state[hidden] {
  display: none;
}

/* Playlist rows — play indicator + API video name, nothing else */
body.pixel-v2 #video-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--pa-space-2);
  max-height: 60vh;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

body.pixel-v2 #video-buttons:empty {
  display: none;
}

body.pixel-v2 #video-buttons::-webkit-scrollbar {
  width: 6px;
}

body.pixel-v2 #video-buttons::-webkit-scrollbar-thumb {
  background: var(--pa-border-strong);
  border-radius: var(--pa-radius-pill);
}

body.pixel-v2 #video-buttons li {
  list-style: none;
  width: 100%;
}

body.pixel-v2 #video-buttons .videos {
  display: flex;
  align-items: center;
  gap: var(--pa-space-3);
  width: 100%;
  min-height: var(--pa-touch);
  margin: 0;
  padding: var(--pa-space-3);
  font-family: var(--pa-font);
  font-size: var(--pa-fs-md);
  font-weight: 700;
  text-align: start;
  color: var(--pa-text);
  background: var(--pa-surface-2);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius);
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--pa-t) var(--pa-ease),
    border-color var(--pa-t) var(--pa-ease), color var(--pa-t) var(--pa-ease);
}

.lp-video__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  font-size: 0.7rem;
  color: var(--pa-primary-ink);
  background: var(--pa-primary-050);
  border-radius: var(--pa-radius-pill);
  transition: background-color var(--pa-t) var(--pa-ease),
    color var(--pa-t) var(--pa-ease);
}

.lp-video__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.pixel-v2 #video-buttons .videos:hover {
  color: var(--pa-primary-700);
  background: var(--pa-primary-050);
  border-color: var(--pa-primary-100);
}

body.pixel-v2 #video-buttons .videos:focus-visible {
  border-color: var(--pa-primary);
}

body.pixel-v2 #video-buttons .videos.is-active {
  color: var(--pa-primary-700);
  background: var(--pa-primary-050);
  border-color: var(--pa-primary);
  box-shadow: inset 0 0 0 1px var(--pa-primary);
}

body.pixel-v2 #video-buttons .videos.is-active .lp-video__icon {
  color: var(--pa-text-invert);
  background: var(--pa-primary);
}

/* --------------------------------------------------------------------------
   7. Learning materials
   -------------------------------------------------------------------------- */
.lp-materials {
  background: var(--pa-surface);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius-lg);
  box-shadow: var(--pa-shadow-sm);
  overflow: hidden;
}

body.pixel-v2 .lp-materials .course-tab {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--pa-space-2);
  margin: 0;
  padding: var(--pa-space-3);
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--pa-surface-2);
  border-bottom: 1px solid var(--pa-border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

body.pixel-v2 .lp-materials .course-tab::-webkit-scrollbar {
  height: 4px;
}

body.pixel-v2 .lp-materials .course-tab::-webkit-scrollbar-thumb {
  background: var(--pa-border-strong);
  border-radius: var(--pa-radius-pill);
}

body.pixel-v2 .lp-materials .course-tab .nav-item {
  flex: 0 0 auto;
  list-style: none;
}

body.pixel-v2 .lp-materials .course-tab .nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--pa-space-2);
  min-height: var(--pa-touch);
  padding: var(--pa-space-2) var(--pa-space-4);
  font-family: var(--pa-font);
  font-size: var(--pa-fs-md);
  font-weight: 700;
  white-space: nowrap;
  color: var(--pa-text-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--pa-radius-pill);
  transition: color var(--pa-t) var(--pa-ease),
    background-color var(--pa-t) var(--pa-ease),
    border-color var(--pa-t) var(--pa-ease);
}

body.pixel-v2 .lp-materials .course-tab .nav-link::before,
body.pixel-v2 .lp-materials .course-tab .nav-link::after {
  content: none;
}

body.pixel-v2 .lp-materials .course-tab .nav-link:hover {
  color: var(--pa-primary-ink);
  background: var(--pa-primary-050);
}

body.pixel-v2 .lp-materials .course-tab .nav-link.active {
  color: var(--pa-text-invert);
  background: var(--pa-primary);
  border-color: var(--pa-primary);
}

body.pixel-v2 .lp-materials .tab-content {
  padding: var(--pa-space-4);
}

.lp-list {
  display: flex;
  flex-direction: column;
  gap: var(--pa-space-3);
}

/* Material rows — icon + exact API name + static action label */
body.pixel-v2 .lp-item {
  display: flex;
  align-items: center;
  gap: var(--pa-space-3);
  width: 100%;
  min-height: 60px;
  margin: 0;
  padding: var(--pa-space-3) var(--pa-space-4);
  font-family: var(--pa-font);
  font-size: var(--pa-fs-md);
  font-weight: 700;
  text-align: start;
  color: var(--pa-text);
  background: var(--pa-surface-2);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius);
  cursor: pointer;
  transition: background-color var(--pa-t) var(--pa-ease),
    border-color var(--pa-t) var(--pa-ease),
    transform var(--pa-t) var(--pa-ease);
}

body.pixel-v2 .lp-item:hover {
  background: var(--pa-primary-050);
  border-color: var(--pa-primary-100);
}

body.pixel-v2 .lp-item:active {
  transform: translateY(1px);
}

.lp-item__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-size: 0.95rem;
  border-radius: var(--pa-radius-sm);
}

.lp-item__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-item__action {
  flex: 0 0 auto;
  font-size: var(--pa-fs-sm);
  font-weight: 700;
  color: var(--pa-primary-ink);
  white-space: nowrap;
}

/* One colour identity per content type */
body.pixel-v2 .start-exam .lp-item__icon {
  color: var(--pa-warning);
  background: var(--pa-warning-bg);
}

body.pixel-v2 .open-link .lp-item__icon {
  color: var(--pa-info);
  background: var(--pa-accent-050);
}

body.pixel-v2 .download-pdf .lp-item__icon {
  color: var(--pa-danger);
  background: var(--pa-danger-bg);
}

/* --------------------------------------------------------------------------
   8. Modal details specific to this page
   -------------------------------------------------------------------------- */
body.pixel-v2 #confirm-video-modal .pa-alert {
  align-items: center;
  margin-bottom: var(--pa-space-4);
  font-size: var(--pa-fs-sm);
}

body.pixel-v2 #confirm-view-videos,
body.pixel-v2 #confirmPurchaseBtn {
  width: 100%;
}

.lp-modal-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--pa-space-3);
  margin-bottom: var(--pa-space-4) !important;
  padding: var(--pa-space-3) var(--pa-space-4);
  background: var(--pa-surface-2);
  border: 1px solid var(--pa-border);
  border-radius: var(--pa-radius);
}

.lp-modal-price__label {
  font-size: var(--pa-fs-sm);
  font-weight: 600;
  color: var(--pa-text-muted);
}

body.pixel-v2 #lessonPrice {
  font-size: var(--pa-fs-xl);
  font-weight: 800;
  color: var(--pa-primary-ink);
}

#purchaseMessage {
  margin-top: var(--pa-space-3);
  font-size: var(--pa-fs-md);
  font-weight: 700;
  text-align: center;
}

#purchaseMessage:empty {
  display: none;
}

#purchaseMessage.is-success {
  color: var(--pa-success);
}

#purchaseMessage.is-error {
  color: var(--pa-danger);
}

#video-message {
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. Tablet and up
   -------------------------------------------------------------------------- */
@media (min-width: 576px) {
  .lp-shell {
    padding: var(--pa-space-4) var(--pa-space-4) 0;
  }
}

@media (min-width: 768px) {
  .lp-shell {
    padding: var(--pa-space-5) var(--pa-space-5) 0;
  }

  body.pixel-v2 .lp-lesson-title {
    font-size: var(--pa-fs-2xl);
  }

  body.pixel-v2 .lp-materials .tab-content {
    padding: var(--pa-space-5);
  }

  .lp-panel__body {
    padding: var(--pa-space-4) var(--pa-space-5);
  }
}

/* --------------------------------------------------------------------------
   10. Desktop — player dominant, playlist beside it, materials below
   -------------------------------------------------------------------------- */
@media (min-width: 992px) {
  body.pixel-lesson.has-lp-actions {
    padding-bottom: var(--pa-space-8);
  }

  .lp-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "player    side"
      "materials materials";
    gap: var(--pa-space-5);
    align-items: start;
  }

  .lp-side {
    position: sticky;
    top: 84px;
    align-self: start;
  }

  /* Back to an inline action row on desktop */
  .lp-actions {
    position: static;
    margin-top: var(--pa-space-4);
    padding: var(--pa-space-4) var(--pa-space-5);
    border: 1px solid var(--pa-border);
    border-radius: var(--pa-radius-lg);
    box-shadow: var(--pa-shadow-sm);
  }

  body.pixel-v2 .lp-actions__main {
    flex: 0 0 auto;
    min-width: 240px;
  }

  body.pixel-v2 .lp-actions .course-price {
    margin-inline-end: auto;
    font-size: var(--pa-fs-xl);
  }

  body.pixel-v2 #video-buttons {
    max-height: calc(100vh - 260px);
  }

  body.pixel-v2 #confirm-view-videos,
  body.pixel-v2 #confirmPurchaseBtn {
    width: auto;
    min-width: 200px;
  }
}

@media (min-width: 1200px) {
  .lp-grid {
    grid-template-columns: minmax(0, 1fr) 380px;
  }

  .lp-player-bar {
    padding: var(--pa-space-4) var(--pa-space-5);
  }
}

/* --------------------------------------------------------------------------
   11. Small-phone safeguards (360px / 390px)
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .lp-shell {
    padding: var(--pa-space-3) var(--pa-space-2) 0;
  }

  .lp-lesson-head {
    padding: var(--pa-space-4);
  }

  .lp-panel__head {
    padding: var(--pa-space-3) var(--pa-space-4);
  }

  .lp-panel__body,
  body.pixel-v2 .lp-materials .tab-content {
    padding: var(--pa-space-3);
  }


  .lp-item__action {
    display: none;
  }

  .lp-actions {
    padding-inline: var(--pa-space-3);
  }
}
