/* ═══════════════════════════════════════════════════
   CareerCraft AI — Mobile Navigation
   Bottom Tab Bar (authenticated) + Hamburger (public)
   ═══════════════════════════════════════════════════ */

/* ══════════ BOTTOM TAB BAR ══════════ */
.mobile-bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 999;
  background: rgba(5,5,10,0.95);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 24px rgba(0,0,0,0.3);
}
[data-theme="light"] .mobile-bottom-nav {
  background: rgba(248,248,252,0.95);
  border-top-color: rgba(0,0,0,0.06);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.06);
}

.mobile-bottom-nav .tab-list {
  display: flex; align-items: center; justify-content: space-around;
  max-width: 500px; margin: 0 auto;
}

.mobile-bottom-nav .tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; min-width: 56px;
  text-decoration: none; color: var(--text-muted);
  font-size: 10px; font-weight: 500; letter-spacing: 0.3px;
  transition: color 0.2s; cursor: pointer;
  background: none; border: none; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.mobile-bottom-nav .tab-item i { font-size: 22px; transition: 0.2s; }
.mobile-bottom-nav .tab-item.active { color: var(--accent); }
.mobile-bottom-nav .tab-item.active i {
  filter: drop-shadow(0 0 6px rgba(124,106,255,0.4));
}

/* ══════════ HAMBURGER BUTTON ══════════ */
.hamburger-btn {
  display: none;
  width: 40px; height: 40px; border-radius: 8px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(124,106,255,0.30); cursor: pointer;
  align-items: center; justify-content: center;
  color: #E8E8F0; font-size: 20px;
  transition: var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.hamburger-btn:hover { background: rgba(124,106,255,0.08); border-color: rgba(124,106,255,0.3); }
[data-theme="light"] .hamburger-btn { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.15); color: #1a1a2e; }
[data-theme="light"] .hamburger-btn:hover { background: rgba(98,72,255,0.08); border-color: rgba(98,72,255,0.3); }


/* Light theme nav buttons */
[data-theme="light"] .nav-avatar { box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }

/* ══════════ SLIDE DRAWER ══════════ */
.mobile-drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 9998;
  background: rgba(5,5,10,0.60); backdrop-filter: blur(4px);
}
.mobile-drawer-overlay.open { display: block; }

.mobile-drawer {
  position: fixed; top: 0; right: -300px; bottom: 0; z-index: 9999;
  width: 280px; background: rgba(18,18,25,0.98);
  border-left: 1px solid rgba(124,106,255,0.10);
  backdrop-filter: blur(24px);
  padding: 24px 20px;
  transition: right 0.3s cubic-bezier(0.22,1,0.36,1);
  overflow-y: auto;
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
}
.mobile-drawer.open { right: 0; }
[data-theme="light"] .mobile-drawer {
  background: rgba(255,255,255,0.98);
  border-left-color: rgba(0,0,0,0.08);
  box-shadow: -8px 0 40px rgba(0,0,0,0.1);
}

.mobile-drawer .drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-drawer .drawer-close {
  width: 36px; height: 36px; border-radius: 8px;
  background: none; border: 1px solid var(--border);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition);
}
.mobile-drawer .drawer-close:hover { background: rgba(255,77,87,0.1); border-color: rgba(255,77,87,0.3); color: var(--red); }

.mobile-drawer .drawer-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-weight: 500;
  text-decoration: none; transition: var(--transition);
  margin-bottom: 2px;
}
.mobile-drawer .drawer-link i { font-size: 20px; width: 24px; text-align: center; color: var(--accent); }
.mobile-drawer .drawer-link:hover, .mobile-drawer .drawer-link.active {
  color: var(--text); background: rgba(124,106,255,0.08);
}

.mobile-drawer .drawer-divider {
  height: 1px; background: var(--border); margin: 12px 0;
}

/* ══════════ SHOW ON MOBILE ONLY ══════════ */
@media (max-width: 767px) {
  .mobile-bottom-nav { display: block; }
  .hamburger-btn { display: flex; }
  
  /* Add bottom padding for content above the tab bar */
  body.has-bottom-nav { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none !important; }
  .hamburger-btn { display: none !important; }
  .mobile-drawer, .mobile-drawer-overlay { display: none !important; }
}
