/* עמוד צפייה – full width, סגנון YouTube */

body.page-videos-watch .watch-page-wrap {
  background: #fff !important;
  min-height: 60vh;
  padding-bottom: 2rem;
  width: 100%;
}

body.page-videos-watch .watch-page-container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

/* סרטון בפרטיות «קישור» – רוחב מלא */
body.page-videos-watch .watch-page-wrap.watch-page-link-privacy .watch-page-container {
  max-width: none;
  padding-left: 1rem;
  padding-right: 1rem;
}

body.page-videos-watch #video-page {
  margin: 0 !important;
  align-items: flex-start;
  width: 100%;
}

@media (min-width: 992px) {
  body.page-videos-watch #video-page {
    gap: 1.5rem;
    display: flex !important;
    flex-wrap: nowrap !important;
  }
  /* מומלצים בצד שמאל, סרטון מימין (LTR) */
  body.page-videos-watch #video-page .watch-page-sidebar {
    order: 1;
  }
  body.page-videos-watch #video-page .watch-page-main {
    order: 2;
  }
  /* RTL: אותו סדר ויזואלי – מומלצים בשמאל, סרטון בימין */
  body.page-videos-watch[dir="rtl"] #video-page .watch-page-sidebar,
  body[dir="rtl"].page-videos-watch #video-page .watch-page-sidebar {
    order: 2;
  }
  body.page-videos-watch[dir="rtl"] #video-page .watch-page-main,
  body[dir="rtl"].page-videos-watch #video-page .watch-page-main {
    order: 1;
  }
  body.page-videos-watch .watch-page-container {
    padding: 1rem 2rem;
  }
}

/* ---- עמודה ראשית (וידאו + כותרת + פעולות + תיאור) ---- */
body.page-videos-watch #video-page .watch-page-main {
  display: flex !important;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

/* וידאו – רוחב מלא, יחס 16:9, פינות עדינות */
body.page-videos-watch #video-page #video-screen {
  margin: 0 !important;
}

body.page-videos-watch #video-page #video-screen .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page .video-frame {
  position: relative;
  width: 100%;
  border-radius: 12px !important;
  overflow: hidden;
  background: #000 !important;
  box-shadow: none !important;
  border: none !important;
}

body.page-videos-watch #video-page .video-frame.horizontal {
  aspect-ratio: 16 / 9;
  min-height: 200px;
}

body.page-videos-watch #video-page .video-frame iframe,
body.page-videos-watch #video-page .video-frame video,
body.page-videos-watch #video-page .video-frame img {
  border-radius: 12px !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: block;
}

/* כותרת – מתחת לווידאו, כמו YouTube */
body.page-videos-watch #video-page #video-title {
  margin: 0 !important;
  padding: 0 !important;
}

body.page-videos-watch #video-page #video-title .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page #video-title h4 {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #0f0f0f !important;
  line-height: 1.4;
}

/* שורת פעולות – ערוץ משמאל, כפתורים מימין (בלי כרטיס) */
body.page-videos-watch #video-page #video-menu {
  margin: 0 !important;
  padding: 0.75rem 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.page-videos-watch #video-page #video-menu .row {
  margin: 0 !important;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

body.page-videos-watch #video-page #video-menu .row > [class*="col-"] {
  flex: 0 1 auto;
}

body.page-videos-watch #video-page #video-menu #upper {
  margin-bottom: 0 !important;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

body.page-videos-watch #video-page #video-menu .avatar {
  display: flex !important;
  align-items: center;
  gap: 0.75rem;
}

body.page-videos-watch #video-page #video-menu .avatar img {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

body.page-videos-watch #video-page #video-menu .avatar .user-stats {
  display: flex !important;
  flex-direction: column;
  gap: 0.1rem;
}

body.page-videos-watch #video-page #video-menu .avatar .user-stats .user-profile {
  font-weight: 600 !important;
  font-size: 1rem !important;
  color: #0f0f0f !important;
  text-decoration: none !important;
}

body.page-videos-watch #video-page #video-menu .avatar .user-stats .user-profile:hover {
  color: var(--primary) !important;
}

body.page-videos-watch #video-page #video-menu .avatar .user-stats span {
  font-size: 0.8rem !important;
  color: #606060 !important;
}

body.page-videos-watch #video-page #video-menu #video-more {
  flex-wrap: wrap;
  gap: 0.25rem;
}

body.page-videos-watch #video-page #video-menu #video-more .btn {
  margin: 0 !important;
}

/* כפתורים עדינים – מינימליסטיים */
body.page-videos-watch #video-page #video-menu .btn,
body.page-videos-watch #video-page #video-menu a[class*="btn"] {
  height: auto !important;
  min-height: 36px !important;
  border-radius: 18px !important;
  font-weight: 400 !important;
  font-size: 0.8125rem !important;
  padding: 0.35rem 0.65rem !important;
  background: transparent !important;
  border: none !important;
  color: #606060 !important;
  box-shadow: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

body.page-videos-watch #video-page #video-menu .btn:hover,
body.page-videos-watch #video-page #video-menu a[class*="btn"]:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: #0f0f0f !important;
}

body.page-videos-watch #video-page #video-menu .btn-primary-s,
body.page-videos-watch #video-page #video-menu a.btn-primary-s {
  background: rgba(204, 0, 0, 0.9) !important;
  color: #fff !important;
}

/* Overlay triggers on video: note/topics - identical white style */
body.page-videos-watch .add-note-trigger,
body.page-videos-watch #openTopicsOverlayTrigger {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  height: 30px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #1f2937 !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 10px !important;
  min-height: 30px !important;
  padding: 6px 10px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 400 !important;
  gap: 6px !important;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08) !important;
}

body.page-videos-watch #openTopicsOverlayTrigger {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  z-index: 11 !important;
}

/* If both triggers exist, keep topics first and move viewer comments below it */
body.page-videos-watch #openTopicsOverlayTrigger ~ .add-note-trigger {
  top: 50px !important;
}

body.page-videos-watch .add-note-trigger .add-note-trigger__label {
  font-size: 12px !important;
  line-height: 1 !important;
}

body.page-videos-watch .add-note-trigger .material-symbols-outlined,
body.page-videos-watch #openTopicsOverlayTrigger .material-symbols-outlined {
  font-size: 17px !important;
  color: #1f2937 !important;
}

body.page-videos-watch .add-note-trigger:hover,
body.page-videos-watch #openTopicsOverlayTrigger:hover {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.2) !important;
  color: #111827 !important;
}

body.page-videos-watch #video-page #video-menu .btn-primary-s:hover,
body.page-videos-watch #video-page #video-menu a.btn-primary-s:hover {
  background: rgba(180, 0, 0, 0.95) !important;
  color: #fff !important;
}

body.page-videos-watch #video-page #video-menu .btn .material-symbols-outlined,
body.page-videos-watch #video-page #video-menu a[class*="btn"] .material-symbols-outlined {
  font-size: 1.15rem !important;
  margin-left: 2px !important;
  opacity: 0.9;
}

/* שורת מדדים – מתחת לפעולות, בעמודה הראשית */
body.page-videos-watch #video-page .watch-page-metrics-row {
  margin: 0 !important;
  padding: 0.6rem 0 0.75rem !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

body.page-videos-watch #video-page .watch-page-metrics-row .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page .watch-page-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

body.page-videos-watch #video-page .watch-page-metrics-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s, opacity 0.15s;
}

body.page-videos-watch #video-page .watch-page-metrics-link:hover {
  color: var(--primary);
  opacity: 0.85;
}

body.page-videos-watch #video-page .watch-page-metrics-link .material-symbols-outlined {
  font-size: 1.2rem;
}

body.page-videos-watch #video-page .watch-page-metrics-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}

body.page-videos-watch #video-page .watch-page-metrics-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #606060;
  cursor: help;
}

body.page-videos-watch #video-page .watch-page-metrics-label {
  font-weight: 500;
}

body.page-videos-watch #video-page .watch-page-metrics-value {
  font-weight: 600;
  color: #0f0f0f;
}

/* בלוק תיאור – רקע אפור עדין כמו YouTube */
body.page-videos-watch #video-page #video-description {
  margin: 0 !important;
}

body.page-videos-watch #video-page #video-description .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page #video-description .wrapper.border-box-shadow {
  background: #f9f9f9 !important;
  border-radius: 12px !important;
  border: none !important;
  box-shadow: none !important;
  padding: 1rem 1rem !important;
}

body.page-videos-watch #video-page #video-description .wrapper .stats {
  display: flex !important;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1.25rem;
  color: #606060 !important;
  font-size: 0.875rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.5;
}

body.page-videos-watch #video-page #video-description .wrapper .stats span {
  display: inline-flex !important;
  align-items: baseline;
  margin: 0 !important;
  gap: 0.25em;
}

body.page-videos-watch #video-page #video-description .wrapper .stats span:not(:last-child)::after {
  content: "•";
  margin-inline-start: 1.25rem;
  margin-inline-end: 0;
  color: #909090;
}

body.page-videos-watch #video-page #video-description .wrapper .stats b {
  color: #0f0f0f !important;
  font-weight: 600 !important;
  margin-inline-end: 0.35em;
  margin-inline-start: 0.35em;
}

body.page-videos-watch #video-page #video-description .wrapper p,
body.page-videos-watch #video-page #video-description .wrapper .ellipsis {
  color: #0f0f0f !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

body.page-videos-watch #video-page #video-description .wrapper .b-toggle {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  color: #606060 !important;
  cursor: pointer;
  margin-top: 0.25rem !important;
}

body.page-videos-watch #video-page #video-description .wrapper .b-toggle:hover {
  color: #0f0f0f !important;
}

/* הערות על הסרטון – מתחת לתיאור, מעל תגובות */
body.page-videos-watch #video-page .watch-page-questions-section {
  margin: 0 !important;
}

body.page-videos-watch #video-page .watch-page-questions-section .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page .watch-page-questions-block {
  background: #f9f9f9 !important;
  border-radius: 12px;
  padding: 1.25rem 1rem;
}

body.page-videos-watch #video-page .watch-page-questions-title {
  margin: 0 0 1rem 0 !important;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0f0f0f;
  display: flex;
  align-items: center;
}

body.page-videos-watch #video-page .watch-page-questions-title .material-symbols-outlined {
  color: #606060;
  font-size: 1.35rem;
}

body.page-videos-watch #video-page .watch-page-questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.page-videos-watch #video-page .watch-page-questions-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

body.page-videos-watch #video-page .watch-page-questions-item:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

body.page-videos-watch #video-page .watch-page-questions-time {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #606060;
  min-width: 2.5rem;
}

body.page-videos-watch #video-page .watch-page-questions-content {
  font-size: 0.9rem;
  color: #0f0f0f;
  line-height: 1.4;
}

/* תגובות */
body.page-videos-watch #video-page #video-comments {
  margin: 0 !important;
}

body.page-videos-watch #video-page #video-comments .col {
  padding: 0 !important;
}

body.page-videos-watch #video-page #video-comments .comments {
  margin-top: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ---- סרגל צד (מומלצים) בסגנון YouTube ---- */
body.page-videos-watch #video-page .watch-page-sidebar {
  position: sticky;
  top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block.block-shadow {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block .container-fluid {
  padding: 0 !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block .row:first-child {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: none;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block h6 {
  margin: 0 !important;
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  color: #0f0f0f !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block small {
  font-size: 0.75rem !important;
  color: #606060 !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .stream-block .row {
  margin-bottom: 0;
}

/* רשימת סרטונים מומלצים – שורה לכל סרטון (תמונה + כותרת) */
body.page-videos-watch #video-page .watch-page-sidebar [data-container] {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  transition: opacity 0.15s;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card:hover {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  opacity: 0.85;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-img {
  position: relative;
  flex-shrink: 0;
  width: 168px !important;
  min-width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: 8px !important;
  overflow: hidden;
  background: #f0f0f0;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* משך הסרטון על התמונה הממוזערת – רקע וטקסט ברורים */
body.page-videos-watch #video-page .watch-page-sidebar .video-visual a .card-duration,
body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-img small[data-type="duration"],
body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-img .body-12 {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.92) !important;
  color: #fff !important;
  font-size: 0.75rem !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
  border-radius: 4px !important;
  line-height: 1.2;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-info {
  flex: 1;
  min-width: 0;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-info a.title {
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-info a.user,
body.page-videos-watch #video-page .watch-page-sidebar .video-card .card-info small {
  font-size: 0.75rem !important;
  color: #606060 !important;
}

body.page-videos-watch #video-page .watch-page-sidebar .order-list-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.page-videos-watch #video-page .watch-page-sidebar .order-list-item:last-child {
  border-bottom: none;
}

body.page-videos-watch #video-page .watch-page-sidebar .order-list-item:hover {
  background: transparent;
}

@media (max-width: 991.98px) {
  body.page-videos-watch #video-page .watch-page-sidebar {
    position: static;
  }

  body.page-videos-watch .watch-page-container {
    padding: 1rem !important;
  }
}
