.um-video-layout {
  display: grid;
  grid-template-columns: 300px minmax(360px, 720px) 300px;
  gap: 18px;
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px;
}

.um-video-sidebar,
.um-video-right {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
}

.um-video-sidebar {
  background: var(--um-surface-strong);
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  padding: 14px;
}

.um-video-feed {
  display: grid;
  gap: 18px;
}

.um-video-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  padding: 12px 14px;
  background: var(--um-surface-strong);
}

.um-video-section-head h2 {
  margin: 0;
  font-size: 15px;
}

.um-video-section-head span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--um-chip-bg-strong, #fff1f2);
  color: var(--um-primary);
  font-size: 12px;
  font-weight: 800;
}

.um-video-card {
  display: block;
  background: var(--um-surface-strong);
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  padding: 0;
  box-shadow: 0 12px 32px rgba(32, 35, 31, 0.08);
}

.um-video-author {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.um-video-author span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.um-video-author small,
.um-video-card p {
  color: var(--um-muted);
}

.um-video-card p {
  margin: 0;
  line-height: 1.45;
}

.um-video-player {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  border-radius: 0;
  background: #241316;
}

.um-video-player video {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  background: #111512;
}

.um-video-placeholder {
  color: #fff1f2;
  font-weight: 900;
}

.um-video-layout-single {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  max-width: 1600px;
  height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 18px;
  overflow: hidden;
  transition: grid-template-columns 200ms ease;
}

.um-video-layout-single.is-related-collapsed {
  grid-template-columns: minmax(0, 1fr) 64px;
}

.um-video-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.um-video-stage .um-video-card-active {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  scrollbar-width: none;
}

.um-video-stage .um-video-card-active::-webkit-scrollbar {
  display: none;
}

.um-video-stage .um-video-player {
  min-height: 0;
  max-height: min(68vh, 620px);
}

.um-video-enter-down .um-video-card-active {
  animation: umReelEnterDown 220ms ease-out;
}

.um-video-enter-up .um-video-card-active {
  animation: umReelEnterUp 220ms ease-out;
}

.um-video-nav-rail {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  z-index: 4;
}

.um-video-nav-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--um-line);
  border-radius: 999px;
  background: var(--um-surface-strong);
  color: var(--um-text);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(32, 35, 31, 0.14);
}

.um-video-nav-btn:hover:not(:disabled) {
  border-color: var(--um-primary);
  color: var(--um-primary);
}

.um-video-nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.um-video-related {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  min-width: 0;
  border: 1px solid var(--um-line);
  border-radius: var(--um-radius);
  background: var(--um-surface-strong);
  padding: 12px;
  overflow: hidden;
}

.um-video-related-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.um-video-related-head h3 {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
}

.um-video-related-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--um-line);
  border-radius: 999px;
  background: var(--um-surface-strong);
  color: var(--um-text);
  cursor: pointer;
}

.um-video-related-list {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
}

.um-video-related-list::-webkit-scrollbar {
  display: none;
}

.um-video-related-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
  text-align: left;
  border: 0;
  border-radius: var(--um-radius);
  padding: 6px;
  background: transparent;
  color: var(--um-text);
  cursor: pointer;
}

.um-video-related-item:hover {
  background: var(--um-chip-bg-strong, #fff1f2);
}

.um-video-related-item.is-current {
  cursor: default;
  background: var(--um-chip-active-bg, #ffe4e6);
  outline: 1px solid var(--um-primary);
  outline-offset: -1px;
}

.um-video-related-current-label {
  color: var(--um-primary) !important;
  font-weight: 800;
}

.um-video-related-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #241316;
}

.um-video-related-thumb img,
.um-video-related-thumb video,
.um-video-related-thumb .um-media,
.um-video-related-thumb .um-video-placeholder,
.um-video-related-thumb .um-media-image-shell,
.um-video-related-thumb .um-link-embed-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: grid;
  place-items: center;
}

.um-video-related-copy {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
}

.um-video-related-copy strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.um-video-related-copy small {
  color: var(--um-muted);
  font-size: 12px;
}

.um-video-related-empty {
  margin: 0;
  color: var(--um-muted);
  font-size: 13px;
}

.is-related-collapsed .um-video-related-head h3,
.is-related-collapsed .um-video-related-list {
  display: none;
}

.is-related-collapsed .um-video-related-head {
  justify-content: center;
}

/* Three rows once the panel is present: details, the list heading, then the list itself. The
   two scrollable regions split the column proportionally so neither pushes the other out of
   view -- an auto-sized details row grows with its comments and shoves the list off-screen. */
.um-video-related.is-details-open {
  grid-template-rows: minmax(0, 3fr) auto minmax(0, 2fr);
}

.um-video-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.um-video-actions button {
  border: 0;
  border-radius: var(--um-radius);
  padding: 11px;
  background: var(--um-chip-bg, #fff7f8);
  color: var(--um-text);
  font-weight: 850;
  cursor: pointer;
}

.um-video-actions button:hover {
  background: var(--um-chip-active-bg, #ffe4e6);
}
