/* sidebar.css — TikTok-style left sidebar navigation + app shell layout.
   Owns: sidebar, app-shell two-column layout, dark theme globals.
   Does NOT own: individual page content styles. */

/* ── Dark theme globals ────────────────────────────────────────────── */
html, body {
  background: #000 !important;
  color: #fff;
  margin: 0;
  padding: 0;
}

/* ── App shell: sidebar + main content ──────────────────────────────── */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: #000;
}

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #121212;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.sidebar::-webkit-scrollbar { width: 0; }

/* Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px 16px;
  text-decoration: none;
  flex-shrink: 0;
}

.sidebar-logo-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #00F2EA, #FF4D6D);
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

/* Nav items */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 8px;
  gap: 2px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e1e1e1;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  line-height: 1.4;
  position: relative;
}

.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: #fff;
}

.sidebar-nav-item.active {
  color: #FF4D6D;
  font-weight: 600;
}

.sidebar-nav-item.active .sidebar-icon svg {
  stroke: #FF4D6D;
}

.sidebar-nav-item.active .sidebar-icon--filled svg {
  fill: #FF4D6D;
  stroke: #FF4D6D;
}

/* Icon container */
.sidebar-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-icon--filled svg {
  fill: currentColor;
  stroke: currentColor;
}

/* Nav label */
.sidebar-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge (for messages/notifications) */
.sidebar-badge {
  min-width: 18px;
  height: 18px;
  background: #FF4D6D;
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.sidebar-badge.visible { display: flex; }

/* Divider */
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 12px;
}

/* Upload button (special CTA) */
.sidebar-nav-item.sidebar-upload {
  margin-top: 4px;
  background: rgba(255,77,109,0.08);
  border: 1px solid rgba(255,77,109,0.15);
}

.sidebar-nav-item.sidebar-upload:hover {
  background: rgba(255,77,109,0.15);
}

/* More dropdown */
.sidebar-more-menu {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  width: 200px;
  background: #1a1a1f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  z-index: 200;
}

.sidebar-more-menu.open { display: flex; }

.sidebar-more-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #e1e1e1;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s;
}

.sidebar-more-menu a:hover {
  background: rgba(255,255,255,0.05);
}

/* Sidebar footer */
.sidebar-footer {
  padding: 12px 8px;
  flex-shrink: 0;
}

/* ── Main content area ──────────────────────────────────────────────── */
.app-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  background: #000;
  position: relative;
}

/* ── Mobile overlay ─────────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99;
}

.sidebar-overlay.open { display: block; }

/* Mobile hamburger (visible < 768px) */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: #121212;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 98;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-hamburger {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-hamburger svg {
  width: 24px;
  height: 24px;
}

.mobile-logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

/* ── Responsive: collapse sidebar on mobile ─────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: 260px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .app-main {
    margin-left: 0;
    padding-top: 52px;
  }

  .mobile-header {
    display: flex;
  }
}

/* ── Tablet: narrow sidebar with icons only ─────────────────────────── */
@media (min-width: 769px) and (max-width: 1080px) {
  .sidebar {
    width: 72px;
  }

  .sidebar-logo-text,
  .sidebar-label,
  .sidebar-badge {
    display: none;
  }

  .sidebar-logo {
    justify-content: center;
    padding: 16px 0;
  }

  .sidebar-nav-item {
    justify-content: center;
    padding: 12px;
  }

  .sidebar-more-menu {
    left: 72px;
    bottom: 0;
  }

  .app-main {
    margin-left: 72px;
  }
}

/* ── Placeholder page style ──────────────────────────────────────────── */
.placeholder-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: #8A8B91;
  text-align: center;
  padding: 40px 20px;
}

.placeholder-page-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.placeholder-page-icon svg {
  width: 40px;
  height: 40px;
  stroke: #8A8B91;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.placeholder-page h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

.placeholder-page p {
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 400px;
  color: #8A8B91;
}

.placeholder-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px;
  background: rgba(0,242,234,0.08);
  border: 1px solid rgba(0,242,234,0.15);
  border-radius: 20px;
  color: #00F2EA;
  font-size: 0.8rem;
  font-weight: 600;
}
