/* Mobile Section Menu - Bottom Sheet */
.mobile-section-menu {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panel);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  max-height: 70vh;
  overflow-y: auto;
}

.mobile-section-menu.active {
  transform: translateY(0);
}

:root[data-theme="dark"] .mobile-section-menu {
  background: #1a1d26;
  border: 1px solid #2a2e3a;
  border-bottom: none;
}

:root[data-theme="light"] .mobile-section-menu {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom: none;
}

.mobile-section-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.mobile-section-menu-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.mobile-section-menu-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mobile-section-menu-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-section-menu-items {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
}

.mobile-section-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.mobile-section-item:hover {
  background: rgba(59, 130, 246, 0.1);
}

.mobile-section-item.active {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.mobile-section-item .material-symbols-rounded {
  font-size: 24px;
  color: var(--text-secondary);
}

.mobile-section-item.active .material-symbols-rounded {
  color: #3b82f6;
}

:root[data-theme="dark"] .mobile-section-item.active {
  background: #2a3142;
  color: #60a5fa;
}

:root[data-theme="dark"] .mobile-section-item.active .material-symbols-rounded {
  color: #60a5fa;
}

/* Mobile Section Menu Overlay */
.mobile-section-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

.mobile-section-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Section Toggle Button */
.mobile-section-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 24px;
}

.mobile-section-toggle:hover {
  background: rgba(59, 130, 246, 0.05);
}

.mobile-section-toggle .material-symbols-rounded {
  font-size: 20px;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.mobile-section-toggle.active .material-symbols-rounded {
  transform: rotate(180deg);
}

:root[data-theme="dark"] .mobile-section-toggle {
  background: #171a21;
  border-color: #333952;
}

:root[data-theme="light"] .mobile-section-toggle {
  background: #fff;
  border-color: var(--border);
}

@media (max-width: 768px) {
  .mobile-section-toggle {
    display: flex;
  }
}

/* ========================================
   BOTTOM TAB BAR (Mobile)
   ======================================== */
.bottom-tab-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9990;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

:root[data-theme="dark"] .bottom-tab-bar {
  background: rgba(10, 10, 17, 0.92);
}

:root[data-theme="light"] .bottom-tab-bar {
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
  .bottom-tab-bar {
    display: flex;
  }

  /* Add padding at bottom of page so content isn't hidden behind tab bar */
  body {
    padding-bottom: 64px !important;
  }
}

.bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s ease;
}

.bottom-tab .material-symbols-rounded {
  font-size: 22px;
  color: #666;
  transition: color 0.2s ease;
}

.bottom-tab-label {
  font-size: 10px;
  font-weight: 500;
  color: #666;
  transition: color 0.2s ease;
  white-space: nowrap;
}

/* Active state */
:root[data-theme="dark"] .bottom-tab.active .material-symbols-rounded {
  color: #5b9aff;
}

:root[data-theme="dark"] .bottom-tab.active .bottom-tab-label {
  color: #5b9aff;
  font-weight: 600;
}

:root[data-theme="light"] .bottom-tab.active .material-symbols-rounded {
  color: #2563eb;
}

:root[data-theme="light"] .bottom-tab.active .bottom-tab-label {
  color: #2563eb;
  font-weight: 600;
}

/* Hover/press */
.bottom-tab:active {
  transform: scale(0.92);
}

/* Hide on desktop */
@media (min-width: 769px) {
  .bottom-tab-bar {
    display: none !important;
  }
}
