/* صفحه پخش ویدیو — ساختار مطابق طراحی watch */

.gp-watch {
  position: relative;
  isolation: isolate;
  background: #f7fbff;
}

.gp-watch__stage {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--gp-header-h) + 12px + 1.75rem) clamp(2.5rem, 5vw, 4rem);
}

.gp-watch__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: #f7fbff;
  background-image:
    linear-gradient(180deg, rgba(247, 251, 255, 0.55) 0%, rgba(247, 251, 255, 0.88) 72%, #f7fbff 100%),
    var(--gp-lazy-bg, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  pointer-events: none;
}

.gp-watch__hexes {
  z-index: 0;
  opacity: 0.35;
}

.gp-watch__inner {
  position: relative;
  z-index: 1;
}

.gp-watch__inner.gp-container {
  width: min(100% - 2rem, 1240px);
}

.gp-watch__layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: clamp(1.1rem, 2.4vw, 1.75rem);
  align-items: start;
}

/* ── Sidebar playlist ─────────────────────────────────── */
.gp-watch-side {
  padding: 1.05rem 0.85rem 0.7rem;
  border-radius: 1.35rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.gp-watch-side__title {
  margin: 0 0.45rem 0.7rem;
  color: #0b1f3f;
  font-size: 1.02rem;
  font-weight: 800;
  text-align: start;
}

.gp-watch-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.gp-watch-lesson {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem 0.4rem;
  border-radius: 0.85rem;
  color: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.2s ease;
}

.gp-watch-lesson:hover {
  background: #f8fbff;
}

.gp-watch-lesson.gp-is-active {
  background: #eef5ff;
}

.gp-watch-lesson__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 0.65rem;
  aspect-ratio: 16 / 10;
  background: #e8eef6;
}

.gp-watch-lesson__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-watch-lesson__time {
  position: absolute;
  right: 0.28rem;
  bottom: 0.28rem;
  padding: 0.08rem 0.32rem;
  border-radius: 0.3rem;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.gp-watch-lesson__body {
  display: grid;
  gap: 0.15rem;
  min-inline-size: 0;
  text-align: right;
}

.gp-watch-lesson__name {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-watch-lesson__summary {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gp-watch-lesson.gp-is-active .gp-watch-lesson__name {
  color: #1d4ed8;
}

/* ── Main column ──────────────────────────────────────── */
.gp-watch-main {
  min-inline-size: 0;
  display: grid;
  gap: 1rem;
}

.gp-watch-player {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  background: #0b1220;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
  aspect-ratio: 16 / 9;
}

.gp-watch-player__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #0b1220;
}

.gp-watch-player__poster--empty {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: default;
}

.gp-watch-player__missing {
  position: absolute;
  inset-inline: 1rem;
  inset-block-end: 1rem;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border-radius: 0.7rem;
  background: rgba(7, 14, 28, 0.72);
  color: #fff;
  font-size: 0.82rem;
  text-align: center;
}

.gp-watch-player__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gp-watch-head {
  display: grid;
  gap: 0.75rem;
  padding: 0.15rem 0.15rem 0;
}

.gp-watch-head__title {
  margin: 0;
  color: #10284d;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-align: right;
}

.gp-watch-head__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.gp-watch-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  color: #64748b;
  font-size: 0.84rem;
}

.gp-watch-meta li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gp-watch-meta .gp-ico,
.gp-watch-meta svg {
  color: #3b82f6;
  flex: 0 0 auto;
}

.gp-watch-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.gp-watch-actions__btn {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.gp-watch-actions__btn:hover,
.gp-watch-actions__btn.gp-is-on {
  color: #2563eb;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.gp-watch-actions__btn:active {
  transform: scale(0.96);
}

/* ── Tabs ─────────────────────────────────────────────── */
.gp-watch-tabs {
  padding: 0.25rem 0.1rem 0;
}

.gp-watch-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.95rem;
}

.gp-watch-tabs__btn {
  position: relative;
  padding: 0.55rem 0.1rem 0.7rem;
  border: 0;
  background: transparent;
  color: #64748b;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.gp-watch-tabs__btn::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: -1px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
}

.gp-watch-tabs__btn.gp-is-active {
  color: #2563eb;
}

.gp-watch-tabs__btn.gp-is-active::after {
  background: #2563eb;
}

.gp-watch-tabs__panel {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.9;
}

.gp-watch-tabs__panel p {
  margin: 0;
  max-inline-size: 62ch;
}

.gp-watch-tabs__empty {
  margin: 0;
  color: #94a3b8;
}

.gp-watch-files,
.gp-watch-courses {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.gp-watch-files__item,
.gp-watch-courses__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.gp-watch-files__item:hover,
.gp-watch-courses__item:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.gp-watch-files__name,
.gp-watch-courses__title {
  flex: 1 1 auto;
  font-weight: 700;
  color: #0f172a;
}

.gp-watch-files__size,
.gp-watch-courses__meta {
  color: #64748b;
  font-size: 0.82rem;
}

.gp-watch-courses__item {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

/* ── Related videos ───────────────────────────────────── */
.gp-watch-related {
  margin-block-start: clamp(1.75rem, 3.5vw, 2.75rem);
}

.gp-watch-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gp-watch-related__title {
  margin: 0;
  color: #0b1f3f;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 800;
}

.gp-watch-related__nav {
  display: inline-flex;
  gap: 0.4rem;
}

.gp-watch-related__btn {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.gp-watch-related__btn:hover {
  background: #2563eb;
  color: #fff;
}

.gp-watch-related__btn:disabled {
  opacity: 0.4;
  cursor: default;
  background: #fff;
  color: #2563eb;
}

.gp-watch-related__viewport {
  overflow: hidden;
}

.gp-watch-related__track {
  display: flex;
  gap: 1rem;
  transition: transform 0.35s ease;
  will-change: transform;
}

.gp-watch-card {
  flex: 0 0 calc((100% - 3rem) / 4);
  min-inline-size: 0;
}

.gp-watch-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  aspect-ratio: 16 / 9;
  background: #dbeafe;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.gp-watch-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.gp-watch-card__media:hover img {
  transform: scale(1.03);
}

.gp-watch-card__play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  translate: -50% -50%;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.gp-watch-card__time {
  position: absolute;
  inset-block-end: 0.45rem;
  inset-inline-end: 0.45rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.gp-watch-card__title {
  margin: 0.7rem 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

.gp-watch-card__title a {
  color: #0f172a;
  text-decoration: none;
}

.gp-watch-card__title a:hover {
  color: #2563eb;
}

.gp-watch-card__summary {
  margin: 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1100px) {
  .gp-watch-card {
    flex-basis: calc((100% - 2rem) / 3);
  }
}

@media (max-width: 900px) {
  .gp-watch__layout {
    grid-template-columns: 1fr;
  }

  .gp-watch-side {
    position: static;
    max-block-size: none;
    order: 2;
  }

  .gp-watch-main {
    order: 1;
  }

  .gp-watch-card {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media (max-width: 767px) {
  .gp-watch__stage {
    padding-block-start: calc(var(--gp-header-h) + 8px + 1.25rem);
  }
}

@media (max-width: 640px) {
  .gp-watch-lesson {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .gp-watch-head__row {
    flex-direction: column;
    align-items: stretch;
  }

  .gp-watch-actions {
    justify-content: flex-start;
  }

  .gp-watch-card {
    flex-basis: 85%;
  }
}

