/**
 * Bihar Mausam — Universal Glassmorphic Sidebar Stylesheet (css/sidebar.css)
 * Reusable across all pages: live_air_traffic.html, live_map.html, index.html
 * Inspired by _reference/Nowcast_Warning_SWFC/sidebar.html
 */

.app-sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.app-sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

.app-sidebar.minified {
  width: 80px;
}

.sidebar-header {
  padding: 16px;
  background: rgba(30, 41, 59, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  flex-shrink: 0;
}

.sidebar-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.sidebar-title-main {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
}

.sidebar-title-sub {
  font-size: 10.5px;
  font-weight: 600;
  color: #38bdf8;
}

.sidebar-close-btn,
.sidebar-minify-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s;
}

.sidebar-close-btn:hover,
.sidebar-minify-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 8px 12px 4px 12px;
  white-space: nowrap;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
  position: relative;
  white-space: nowrap;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.35) 0%, rgba(56, 189, 248, 0.15) 100%);
  color: #38bdf8;
  border-left: 3px solid #38bdf8;
  font-weight: 700;
}

.sidebar-link i {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-badge {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sidebar-footer {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.8);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-dev-credit {
  font-size: 11px;
  font-weight: 700;
  color: #fde047;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.sidebar-dev-credit:hover {
  background: rgba(251, 191, 36, 0.2);
  border-color: #fbbf24;
}

/* Header Hamburger Trigger Button */
.header-sidebar-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.header-sidebar-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Minified styles */
.app-sidebar.minified .sidebar-title,
.app-sidebar.minified .sidebar-section-title,
.app-sidebar.minified .sidebar-link span,
.app-sidebar.minified .sidebar-link-badge,
.app-sidebar.minified .sidebar-dev-credit span {
  display: none;
}

.app-sidebar.minified .sidebar-link {
  justify-content: center;
  padding: 10px 0;
}

