/* ==============================
   Sidebar extras: Glow, icons, profile dropdown, submenu improvements
============================== */
.brand-title {
  font-size: 1.15rem;
  background: linear-gradient(90deg, #ff69b4, #bf5fff);
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 900;
  text-shadow: 0 6px 24px rgba(191,95,255,0.08);
}
.brand-title .beta-badge {
  display:inline-block;
  margin-left:8px;
  font-size:0.6rem;
  padding:4px 8px;
  background: linear-gradient(90deg,#ffd9f7,#ff69b4);
  color:#000;
  border-radius:999px;
  font-weight:800;
  box-shadow: 0 6px 30px rgba(255,20,147,0.12);
}

/* Quick icons at top of sidebar with small labels */
.sidebar-icons { display:flex; flex-direction:column; gap:12px; margin-top:12px; align-items:center; }
.sidebar-icon {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; flex-direction:column;
  color: #ffd9f7; background: transparent; border-radius:12px; padding:6px 10px; text-decoration:none; width:100%;
}
.sidebar-icon i { font-size:20px; }
.sidebar-icon .icon-label { font-size:0.85rem; margin-top:6px; color:#ffd9f7; display:block; }
.sidebar-icon:hover { background: rgba(255,20,147,0.06); box-shadow: var(--glow-pink); color:#fff; }

.notify-badge {
  min-width:18px; height:18px; display:inline-flex; align-items:center; justify-content:center;
  background: linear-gradient(90deg,#ff69b4,#bf5fff); color:#000; font-weight:800; border-radius:999px; padding:0 6px; font-size:0.75rem; margin-left:6px;
}

/* active nav link highlighting */
.sidebar-links a.active {
  background: rgba(255,20,147,0.08);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255,105,180,0.12) inset, var(--glow-pink);
}
.sidebar-links a.active i {
  color: #ff69b4;
  text-shadow: 0 0 8px #ff69b4;
}

.sidebar-footer { position: relative; }
.sidebar-footer .sidebar-profile { position:relative; padding:8px; border-radius:8px; }
.sidebar-footer .profile-dropdown {
  position:fixed; width:220px;
  background: var(--color-surface); border:1px solid rgba(255,105,180,0.18); padding:10px; border-radius:10px; z-index:1200;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  opacity:0; pointer-events:none;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
}
.sidebar-footer .profile-dropdown.open {
  opacity:1; pointer-events:auto;
  transform: translateY(0);
}
.sidebar-footer .profile-dropdown a,
.sidebar-footer .profile-dropdown button {
  display:flex; align-items:center; gap:10px;
  width:100%; text-align:left; padding:8px 12px; border-radius:7px;
  background:transparent; color:rgba(255,255,255,0.75); text-decoration:none; border:none;
  font-family:'Poppins', sans-serif; font-size:0.82rem; font-weight:500;
  letter-spacing:0.03em; cursor:pointer;
  transition: background 130ms ease, color 130ms ease;
}
.sidebar-footer .profile-dropdown a i,
.sidebar-footer .profile-dropdown button i {
  font-size:0.8rem; width:14px; text-align:center;
  color: rgba(255,255,255,0.3);
  transition: color 130ms ease;
}
.sidebar-footer .profile-dropdown a:hover,
.sidebar-footer .profile-dropdown button:hover {
  background: rgba(255,105,180,0.07);
  color:#fff;
}
.sidebar-footer .profile-dropdown a:hover i,
.sidebar-footer .profile-dropdown button:hover i {
  color: rgba(255,255,255,0.55);
}

.profile-dropdown-divider {
  height:1px; background: rgba(255,105,180,0.1); margin:6px 4px;
}

/* small form styling inside dropdown */
.profile-logout-form { margin:0; }
.profile-logout-form button { width:100%; display:flex; align-items:center; gap:10px; padding:8px 12px; border-radius:7px; background:transparent; border:none; cursor:pointer; font-family:'Poppins', sans-serif; font-size:0.82rem; font-weight:500; letter-spacing:0.03em; color:rgba(255,255,255,0.5); transition: background 130ms ease, color 130ms ease; }
.profile-logout-form button i { font-size:0.8rem; width:14px; text-align:center; color:rgba(255,100,100,0.5); transition: color 130ms ease; }
.profile-logout-form button:hover { background: rgba(255,80,80,0.07); color:#ff8080; }
.profile-logout-form button:hover i { color:#ff6b6b; }

/* Submenu — inline expansion inside the left sidebar (not a popover) */
.has-submenu { position: relative; display:block; }
.has-submenu > .submenu-label:hover { background: rgba(255,20,147,0.06); color: #fff; box-shadow: var(--glow-pink); }
.has-submenu > .submenu-label .submenu-arrow { font-size: 0.6rem; margin-left: auto; opacity: 0.5; }

/* compact chevron toggle */
.submenu-toggle { width:22px;height:22px;border-radius:6px;border:0;background:transparent;display:inline-flex;align-items:center;justify-content:center;color:rgba(255,255,255,0.45);cursor:pointer;margin-left:auto; }
.submenu-toggle::before { content:'\25BC'; font-size:12px; transform:rotate(0deg); transition: transform 160ms ease, color 160ms ease; }
.has-submenu.open > .submenu-toggle::before { transform: rotate(-180deg); color:#ff69b4; }

/* Popover submenu (hover) */
.has-submenu .submenu {
  position: absolute;
  left: calc(100% + 12px);
  top: auto;
  bottom: 100%;
  min-width: 220px;
  background: #0d0d0d;
  border: 1px solid rgba(255,105,180,0.2);
  border-radius: 8px;
  padding: 8px;
  z-index: 1300;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.9);
  transform: translateY(6px) translateX(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 200ms ease;
  will-change: transform, opacity;
}
.has-submenu .submenu a { display:block; padding:8px 12px; color:#ffd9f7; text-decoration:none; border-radius:6px; }
.has-submenu .submenu a:hover { background: rgba(255,20,147,0.06); color:#fff; }

/* Show popover only when open via JS (click toggle, like Reddit) */
.has-submenu.open > .submenu {
  transform: translateY(0) translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* responsive: ensure submenu remains accessible on small screens */
@media (max-width: 900px) {
  .has-submenu .submenu { max-height: none; opacity:1; padding-left:6px; border-left:none; }
  .submenu-toggle { display:none; }
}

/* Divider / section label for grouped submenu areas (Reddit-like) */
.sidebar-links * + .has-submenu::after {
  content: '';
  display: block;
  height: 1px;
  background: rgba(255,255,255,0.03);
  margin: 12px 8px;
  border-radius: 2px;
}

/* Optional section title when a submenu element has data-section="TITLE" */
.has-submenu[data-section]::before {
  content: attr(data-section);
  display: block;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 8px 10px 6px;
}

/* Notifications menu in sidebar: show on hover of container */
.notif-container { position: relative; }
.notif-container .notif-menu { display: none; }
/* Do NOT open notifications on hover. Allow focus or explicit open state (JS toggle). */
.notif-container:focus-within .notif-menu,
.notif-container.open .notif-menu,
.notif-container[aria-expanded="true"] .notif-menu { display: block; }

/* Remove hover, active, and focus effects for notifications link */
.sidebar-links .notif-container a {
  transition: none;
}
.sidebar-links .notif-container a:hover,
.sidebar-links .notif-container a:active,
.sidebar-links .notif-container a:focus {
  background: transparent;
  box-shadow: none;
  color: #ffd9f7;
}

/* Ensure sidebar background matches page background in all themes */
body.theme-light .sidebar {
  background: #ffffff !important;
}
body.theme-dark .sidebar {
  background: #000000 !important;
}
body.theme-neon .sidebar {
  background: #000000 !important;
}
