/* Shared auth chrome — guest vs logged-in top nav / sidebar */
.vh-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #3ea6ff;
  border-radius: 18px;
  color: #3ea6ff;
  background: transparent;
  font: 500 14px/1 Roboto, Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.vh-signin-btn:hover {
  background: rgba(62, 166, 255, 0.12);
}

body:not(.vh-authed) .create-wrapper,
body:not(.vh-authed) .notifications-wrapper,
body:not(.vh-authed) .profile-wrapper {
  display: none !important;
}

body.vh-authed .vh-signin-btn {
  display: none !important;
}

body:not(.vh-authed) .vh-sidebar-authed-only {
  display: none !important;
}

/* The divider after each hidden section is a separate sibling element (not a child of
   the section), so hiding "Subscriptions" and "You" alone left their trailing divider
   lines behind — three stacked separator lines for a guest instead of the one that's
   actually needed between "Home & Shorts" and "Explore" once both sections collapse. */
body:not(.vh-authed) .vh-sidebar-authed-only + .sidebar-divider {
  display: none !important;
}

body.vh-authed .vh-sidebar-guest-only {
  display: none !important;
}

.vh-sidebar-guest-only .sidebar-item {
  color: #3ea6ff;
  font-weight: 500;
}

#profileBtn .profile-avatar,
.profile-btn .profile-avatar {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.profile-dropdown .dropdown-item[data-vh-action],
.create-dropdown .dropdown-item[data-vh-action] {
  cursor: pointer;
}
.profile-dropdown .dropdown-item[data-vh-action]:hover,
.create-dropdown .dropdown-item[data-vh-action]:hover {
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-item.vh-active,
.sidebar .sidebar-item.active {
  background: rgba(255, 255, 255, 0.1);
  font-weight: 500;
}

.vh-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.vh-user-chip .vh-chip-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3ea6ff center/cover no-repeat;
  color: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.vh-user-chip .vh-chip-meta {
  min-width: 0;
}
.vh-user-chip .vh-chip-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vh-user-chip .vh-chip-email {
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body:not(.vh-staff) .vh-staff-only {
  display: none !important;
}

/* Top-nav dropdown anchors */
.create-wrapper,
.notifications-wrapper,
.profile-wrapper,
.search-container {
  position: relative;
}

.top-nav .dropdown {
  z-index: 1200;
}

/* Global search autosuggest dropdown (wired by shared/page-init.js, appears on every page's nav search box) */
.search-suggest-dropdown {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1300;
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #303030;
  border-radius: 12px;
  background: #212121;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.search-suggest-dropdown[hidden] {
  display: none;
}

.search-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #f1f1f1;
  text-align: left;
  font: 400 14px/1.3 Roboto, Arial, sans-serif;
  cursor: pointer;
}

.search-suggest-item:hover,
.search-suggest-item.active {
  background: rgba(255, 255, 255, .08);
}

.search-suggest-item .suggest-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 32px;
  border-radius: 6px;
  background-color: #303030;
  background-size: cover;
  background-position: center;
}

.search-suggest-item .suggest-avatar {
  display: flex;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  overflow: hidden;
  border-radius: 50%;
  background: #3ea6ff;
  color: #0f0f0f;
  font-size: 13px;
  font-weight: 700;
}

.search-suggest-item .suggest-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-suggest-item .suggest-icon {
  display: flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 14px;
}

.search-suggest-item .suggest-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.search-suggest-item .suggest-text strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest-item .suggest-text small {
  overflow: hidden;
  color: #999;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggest-item .suggest-verified {
  color: #3ea6ff;
  font-style: normal;
}

.search-suggest-item.suggest-correction .suggest-text {
  color: #ccc;
}

.search-suggest-item.suggest-correction strong {
  color: #3ea6ff;
}

/* Studio / floating menus shared across Studio tables */
#vhFloatingMenus .vh-floating-menu,
.vh-floating-menu {
  position: fixed;
  z-index: 3000;
  display: none;
  min-width: 220px;
  padding: 6px;
  border: 1px solid #414141;
  border-radius: 10px;
  background: rgba(35, 35, 35, 0.98);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(14px);
}

#vhFloatingMenus .vh-floating-menu.open,
.vh-floating-menu.open {
  display: block;
}

.vh-floating-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #f1f1f1;
  font: 500 13px/1.2 Roboto, Arial, sans-serif;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.vh-floating-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.vh-floating-menu button.danger {
  color: #ff6b6b;
}

.vh-floating-menu button span:first-child {
  width: 1.25em;
  text-align: center;
  opacity: 0.9;
}

.vh-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: #3a3a3a;
}

.vh-menu-label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8f8f8f;
}

.dropdown-item.vh-staff-only .item-text {
  font-weight: 500;
}

.vh-studio-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  background: #323232;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font: 500 13px/1.3 Roboto, Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  z-index: 4000;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.vh-studio-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.vh-studio-modal {
  position: fixed;
  inset: 0;
  z-index: 3500;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  padding: 20px;
}
.vh-studio-modal[hidden] {
  display: none !important;
}
.vh-studio-modal-card {
  width: min(520px, 100%);
  background: #212121;
  border: 1px solid #3a3a3a;
  border-radius: 14px;
  padding: 18px 18px 14px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  color: #f1f1f1;
}
.vh-studio-modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.vh-studio-modal-card h3 {
  font-size: 18px;
  font-weight: 600;
}
.vh-modal-close {
  border: 0;
  background: transparent;
  color: #bbb;
  font-size: 22px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
.vh-modal-close:hover { background: #333; color: #fff; }
.vh-studio-modal-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #aaa;
}
.vh-studio-modal-card input,
.vh-studio-modal-card textarea,
.vh-studio-modal-card select {
  border: 1px solid #3f3f3f;
  background: #121212;
  color: #f1f1f1;
  border-radius: 8px;
  padding: 10px 12px;
  font: 400 14px/1.4 Roboto, Arial, sans-serif;
}
.vh-studio-modal-card footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
  flex-wrap: wrap;
}
.vh-modal-primary,
.vh-modal-secondary,
.vh-modal-danger {
  border: 0;
  border-radius: 18px;
  padding: 9px 14px;
  font: 500 13px/1 Roboto, Arial, sans-serif;
  cursor: pointer;
}
.vh-modal-primary { background: #3ea6ff; color: #0f0f0f; }
.vh-modal-secondary { background: #2f2f2f; color: #f1f1f1; }
.vh-modal-danger { background: transparent; color: #ff6b6b; border: 1px solid #5a3030; }
.video-batch-bar button.danger { color: #ff8e8e; }

/* Notifications dropdown — modern redesign, shared across every page (page-specific
   stylesheets load first, so these rules win the cascade tie and stay consistent site-wide). */
.notification-dropdown {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
}

.notification-badge {
  width: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1;
}

#notificationList {
  max-height: 420px;
  overflow-y: auto;
}
#notificationList::-webkit-scrollbar { width: 6px; }
#notificationList::-webkit-scrollbar-track { background: transparent; }
#notificationList::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .15); border-radius: 3px; }

.dropdown-header { gap: 8px; }
.vh-notif-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.vh-notif-clear {
  border: 0;
  background: transparent;
  color: #3ea6ff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 12px;
  white-space: nowrap;
}
.vh-notif-clear:hover { background: rgba(62, 166, 255, .14); }

.vh-notif-item {
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.vh-notif-item.is-unread { background: rgba(62, 166, 255, .07); }
.vh-notif-item.is-unread:hover { background: rgba(62, 166, 255, .14); }

.vh-notif-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.vh-notif-avatar-img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #3a3a3a;
}

.vh-notif-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3ea6ff, #7c4dff);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

.vh-notif-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 45px;
  border-radius: 8px;
  object-fit: cover;
  background: #3a3a3a;
}

.vh-notif-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.vh-notif-channel {
  color: #ddd;
  font-size: 12px;
  font-weight: 600;
}

.vh-notif-title {
  display: -webkit-box;
  overflow: hidden;
  color: #f1f1f1;
  font-size: 13px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.vh-notif-item.is-unread .vh-notif-title { font-weight: 600; }

.vh-notif-time {
  color: #999;
  font-size: 11.5px;
}

.vh-notif-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border: 2px solid #272727;
  border-radius: 50%;
  background: #3ea6ff;
}

.vh-notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 36px 24px;
  text-align: center;
}
.vh-notif-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  font-size: 24px;
}
.vh-notif-empty strong { font-size: 14px; }
.vh-notif-empty p {
  max-width: 240px;
  margin: 0;
  color: #999;
  font-size: 12.5px;
  line-height: 1.4;
}

/* Author display rules must never override the native hidden state. This is
   especially important for verification badges toggled from API data. */
[hidden] { display: none !important; }

