/* ===========================================================
   صفحهٔ ویدیوی تکی — طرح DOLOX
   =========================================================== */

.sv-wrap { max-width: 1290px; margin: 0 auto; padding: 18px 26px 52px; }

/* ---------- مسیر راهنما ---------- */
.sv-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--tx-2);
}
.sv-crumbs a { color: var(--tx-2); }
.sv-crumbs a:hover { color: var(--ac); }
.sv-crumbs .sep { color: var(--tx-3); display: flex; }
.sv-crumbs .cur { color: var(--ac); font-weight: 700; }

/* ---------- چیدمان دوستونه ---------- */
.sv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 26px;
  align-items: start;
  direction: ltr;
}
.sv-main { direction: rtl; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.sv-aside { direction: rtl; display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ---------- پخش‌کننده ---------- */
.sv-player {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  background: #000;
  display: block;
  cursor: pointer;
}
.sv-player .cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sv-player .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 9, 11, .55) 0%, rgba(8, 9, 11, .05) 34%, rgba(8, 9, 11, .15) 100%);
  pointer-events: none;
}
.sv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--ac);
  border: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  box-shadow: 0 10px 30px rgba(242, 102, 31, .45);
  transition: background .18s, transform .18s;
}
.sv-play svg { margin-inline-start: 3px; }
.sv-player:hover .sv-play { background: var(--ac-h); transform: translate(-50%, -50%) scale(1.06); }
.sv-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* بعد از کلیک: پخش‌کننده جای کاور می‌نشیند */
.sv-player.is-playing { cursor: default; }
.sv-player.is-playing .cover,
.sv-player.is-playing .shade,
.sv-player.is-playing .sv-play { display: none; }
.sv-player video,
.sv-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* ---------- نوار کنترل سفارشی (فقط فایل بارگذاری‌شده) ---------- */
.sv-ctrl {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 0 16px 12px;
  direction: ltr;
  background: linear-gradient(to top, rgba(8, 9, 11, .82), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.sv-player.is-playing .sv-ctrl { opacity: 1; }
.sv-player.is-playing:not(:hover) .sv-ctrl.auto-hide { opacity: 0; }

.sv-bar {
  position: relative;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .28);
  margin-bottom: 11px;
  cursor: pointer;
}
.sv-bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 3px;
  background: var(--ac);
}
.sv-bar .knob {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ac);
  box-shadow: 0 0 0 4px rgba(242, 102, 31, .28);
  pointer-events: none;
}
.sv-ctrl-row { display: flex; align-items: center; gap: 16px; color: #F3F4F5; }
.sv-ctrl-row button {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  padding: 0;
}
.sv-ctrl-row button:hover { color: var(--ac); }
.sv-ctrl-row .time { font-size: 12px; direction: ltr; color: #E7E9EB; letter-spacing: .5px; }
.sv-ctrl-row .spacer { flex: 1; }
.sv-ctrl-row .speed { color: var(--ac); font-size: 11.5px; font-weight: 700; }

/* ---------- عنوان و اکشن‌ها ---------- */
.sv-head { display: flex; flex-direction: column; gap: 14px; }
.sv-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.6;
  color: var(--tx);
  text-wrap: balance;
}
.sv-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.sv-meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--tx-2); }
.sv-meta .badge {
  background: var(--ac);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 13px;
  border-radius: 8px;
}
.sv-meta .badge:hover { background: var(--ac-h); color: #fff; }

.sv-acts { display: flex; align-items: center; gap: 10px; }
.sv-vote {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.sv-vote button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: none;
  border: 0;
  color: var(--tx-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.sv-vote button:first-child { border-inline-end: 1px solid var(--line); }
.sv-vote button:hover { color: var(--ac); }

.sv-act {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--tx-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.sv-act:hover { border-color: var(--ac); color: var(--ac); }
.sv-act.icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; justify-content: center; }

/* ---------- کارت کانال و توضیحات ---------- */
.sv-channel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.sv-channel-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.sv-channel-id { display: flex; align-items: center; gap: 12px; }
.sv-channel-ava {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
  direction: ltr;
  letter-spacing: .5px;
  flex-shrink: 0;
  overflow: hidden;
}
.sv-channel-ava img { width: 100%; height: 100%; object-fit: cover; }
.sv-channel-ava .x { color: var(--ac); }
.sv-channel-name { display: flex; flex-direction: column; gap: 3px; }
.sv-channel-name b { font-size: 14px; font-weight: 800; color: var(--tx); }
.sv-channel-name small { font-size: 11.5px; color: var(--tx-3); }
.sv-follow {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--ac);
  border: 0;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(242, 102, 31, .3);
}
.sv-follow:hover { background: var(--ac-h); color: #fff; }

.sv-desc { border-top: 1px solid var(--line); padding-top: 14px; }
.sv-desc p { margin: 0; font-size: 13.5px; line-height: 2.1; color: var(--tx-2); text-align: justify; }
.sv-desc .more { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--ac); cursor: pointer; }
.sv-desc.is-open .full { display: block; }
.sv-desc .full { display: none; }

/* ---------- کارت‌های اطلاعات ---------- */
.sv-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sv-fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sv-fact .k { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--tx-3); }
.sv-fact .k svg { color: var(--ac); flex-shrink: 0; }
.sv-fact .v {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--tx);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sv-fact .v.ltr { direction: ltr; text-align: right; }

/* ---------- ستون کناری: ویدیوهای پیشنهادی ---------- */
.sv-aside-h { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.sv-aside-h .bar { width: 5px; height: 20px; border-radius: 3px; background: var(--ac); }
.sv-aside-h h2 { margin: 0; font-size: 17px; font-weight: 800; color: var(--tx); }

.sv-sg {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.sv-sg:hover { opacity: .92; }
.sv-sg-media {
  display: block;
  position: relative;
  width: 148px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card);
}
.sv-sg-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv-sg-media .dur {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(8, 9, 11, .9);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  direction: ltr;
  pointer-events: none;
}
.sv-sg-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sv-sg-body span { display: block; }
.sv-sg-body .t { font-size: 12.5px; font-weight: 700; line-height: 1.7; color: var(--tx); }
.sv-sg-body .c { font-size: 11px; color: var(--tx-3); }
.sv-sg-body .m { font-size: 10.5px; color: var(--tx-3); }

.sv-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ac);
}
.sv-all:hover { border-color: var(--ac); color: var(--ac); }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 1100px) {
  .sv-layout { grid-template-columns: 1fr; }
  .sv-aside { direction: rtl; }
  .sv-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .sv-wrap { padding: 14px 16px 40px; }
  .sv-head h1 { font-size: 18px; }
  .sv-play { width: 56px; height: 56px; }
  .sv-play svg { width: 22px; height: 22px; }
  .sv-facts { grid-template-columns: 1fr; }
  .sv-head-row { align-items: flex-start; flex-direction: column; }
  .sv-acts { flex-wrap: wrap; }
  .sv-sg-media { width: 120px; height: 68px; }
  .sv-ctrl-row { gap: 11px; }
  .sv-ctrl-row .time { font-size: 11px; }
}

/* نشان مدت‌زمان روی پخش‌کننده */
.sv-player .sv-dur {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 4px 11px;
  border-radius: 20px;
  background: rgba(8, 9, 11, .9);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  direction: ltr;
  pointer-events: none;
}
.sv-player.is-playing .sv-dur { display: none; }

/* single.css باکس دیدگاه را روی 820px محدود می‌کند؛ این‌جا باید هم‌عرض بقیهٔ باکس‌ها باشد */
.sv-main .comments {
  max-width: none;
  margin: 0;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}

/* ---------- رأی و اشتراک‌گذاری ---------- */
.sv-vote button.on { color: var(--ac); background: rgba(249, 115, 22, .1); }
.sv-vote button svg { flex-shrink: 0; }

.sv-share { position: relative; }
.sv-share-pop {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 40;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
}
.sv-share-pop[hidden] { display: none; }
.sv-share-pop .row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--tx-2);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: start;
}
.sv-share-pop .row:hover { background: var(--card-h); color: var(--tx); }
.sv-share-pop .row.is-done { color: #34C578; }
.sv-share-pop .row svg { flex-shrink: 0; }
