/* ═══════════════════════════════════════════════════════════
   Navbar Interactive Components (deferred — not needed for first paint)
   ═══════════════════════════════════════════════════════════ */

/* --- Project Dropdown (desktop, hidden until click) --- */
.rgt-project-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  min-width: 280px; max-height: 420px; overflow-y: auto;
  background: #fff; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 1070; padding: 6px 0;
}
.rgt-project-dropdown-header {
  padding: 12px 16px 8px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; color: #999;
}
.rgt-project-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; text-decoration: none; color: #333;
  font-size: 14px; transition: background 0.15s;
}
.rgt-project-item:hover { background: #f5f6fa; color: #333; }
.rgt-project-item.active { background: #eef1fb; font-weight: 600; color: #333; }
.rgt-project-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--rgt-navbar-color, #3F529F);
}

/* --- Project Bottom-Sheet (mobile, hidden until click) --- */
.rgt-project-mobile-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 1062;
  display: flex; align-items: flex-end; justify-content: center;
}
.rgt-project-mobile-panel {
  width: 100%; max-height: 80vh; background: #fff;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
  display: flex; flex-direction: column;
  animation: rgt-sheet-up 0.25s ease-out;
}
@keyframes rgt-sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.rgt-project-mobile-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #eee;
  font-size: 16px; font-weight: 600;
}
.rgt-project-mobile-header button {
  background: none; border: none; font-size: 20px; color: #999; cursor: pointer; padding: 0; line-height: 1;
}
.rgt-project-mobile-list {
  overflow-y: auto; padding: 8px 0;
}
.rgt-project-mobile-list .rgt-project-item {
  padding: 14px 20px; font-size: 15px;
}

/* --- Notification Badge --- */
.rgt-notif-badge {
  position: absolute; top: 0px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: #ef4444; color: #fff;
  font-size: 10px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 1px 4px rgba(239,68,68,0.4);
}

/* --- Notification Panel (hidden until click) --- */
.rgt-notif-panel {
  position: absolute; top: calc(100% + 8px); right: -8px;
  width: 360px; max-height: 440px; background: #fff;
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 1070; overflow: hidden;
  display: flex; flex-direction: column;
}
.rgt-notif-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid #f0f0f0;
  font-size: 14px; font-weight: 600; color: #333;
}
.rgt-notif-body { overflow-y: auto; max-height: 380px; }
.rgt-notif-item {
  display: block; padding: 12px 18px;
  border-bottom: 1px solid #f8f8f8;
  text-decoration: none; color: #333;
  transition: background 0.15s;
}
.rgt-notif-item:hover { background: #f8f9fa; color: #333; }
.rgt-notif-unread { background: #f0f4ff; }
.rgt-notif-empty {
  text-align: center; color: #aaa; padding: 32px 16px; font-size: 13px;
}

/* --- Sidebar Backdrop & Panel (hidden until click) --- */
.rgt-sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45); z-index: 1064;
}
.rgt-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 100%;
  background: #fff; z-index: 1065;
  overflow-y: auto;
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  border-radius: 16px 0 0 16px;
  display: flex; flex-direction: column;
}
.rgt-slide-enter { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.rgt-slide-start { transform: translateX(100%); }
.rgt-slide-end { transform: translateX(0); }

/* Sidebar: close button */
.rgt-sidebar-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 18px; color: #999;
  cursor: pointer; padding: 4px; line-height: 1; border-radius: 6px;
  transition: background 0.15s;
}
.rgt-sidebar-close:hover { background: #f0f0f0; color: #333; }

/* Sidebar: user card */
.rgt-sidebar-user {
  text-align: center; padding: 32px 20px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.rgt-sidebar-avatar {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--rgt-navbar-color, #3F529F);
  margin-bottom: 12px;
}
.rgt-sidebar-name {
  font-size: 16px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px;
}
.rgt-sidebar-role {
  font-size: 12px; color: #888;
}

/* Sidebar: navigation links */
.rgt-sidebar-nav {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}
.rgt-sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 24px; text-decoration: none;
  color: #444; font-size: 14px;
  transition: background 0.15s;
}
.rgt-sidebar-link:hover { background: #f8f9fa; color: #333; }
.rgt-sidebar-link.active {
  color: var(--rgt-navbar-color, #3F529F); font-weight: 600;
  background: #f0f3ff;
}
.rgt-sidebar-link i { font-size: 18px; width: 20px; text-align: center; opacity: 0.7; }

/* Sidebar: footer (settings, logout) */
.rgt-sidebar-footer {
  padding: 8px 0; margin-top: auto;
}
.rgt-sidebar-footer .rgt-sidebar-link { color: #666; }
.rgt-sidebar-footer .rgt-sidebar-link:last-child { color: #dc3545; }
.rgt-sidebar-footer .rgt-sidebar-link:last-child:hover { background: #fff5f5; }

/* --- Responsive overrides for deferred components --- */
@media (max-width: 799px) {
  .rgt-project-dropdown { display: none; }
  .rgt-notif-panel {
    position: fixed; top: 48px; left: 0; right: 0;
    width: 100%; max-height: calc(100vh - 48px); border-radius: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
  .rgt-sidebar { border-radius: 0; }
}
@media (min-width: 800px) {
  .rgt-project-mobile-overlay { display: none; }
}
