/* Global Navigation Styles */

:root {
  --nav-height: 56px;
  --nav-bg: rgba(255, 255, 255, 0.96);
  --nav-border: #dbe7f3;
  --nav-text: #0f172a;
  --nav-active: #2563eb;
  --nav-hover: #0f4fa8;
  --nav-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Main Navigation Bar */
.global-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: var(--nav-shadow);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Navigation Container */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
}

/* Logo Section */
.nav-logo {
  display: flex;
  align-items: center;
  min-width: fit-content;
  height: 100%;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}

.logo-link:hover {
  background-color: rgba(37, 99, 235, 0.1);
}

.logo-link i {
  font-size: 20px;
  color: var(--nav-active);
}

.logo-text {
  display: none;
}

/* Tabs Section */
.nav-tabs {
  display: flex;
  gap: 0;
  flex: 1;
  align-items: center;
  height: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.nav-tabs::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Tab Button/Link */
.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 16px;
  border: none;
  background: none;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
  border-bottom: 3px solid transparent;
}

.nav-tab:hover {
  color: var(--nav-hover);
}

/* Active Tab Indicator */
.nav-tab.active {
  color: var(--nav-active);
  border-bottom-color: var(--nav-active);
}

/* Tab Icon */
.nav-tab i {
  font-size: 16px;
}

/* Tab Label */
.tab-label {
  display: none;
}

/* User Section */
.nav-user {
  display: flex;
  align-items: center;
  min-width: fit-content;
  flex-shrink: 0;
  height: 100%;
}

.nav-user-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--nav-text);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  font-size: 20px;
}

.nav-user-link:hover {
  background-color: rgba(37, 99, 235, 0.1);
}

/* Responsive: Tablet and Up - Show Tab Labels */
@media (min-width: 640px) {
  .tab-label {
    display: inline;
  }

  .logo-text {
    display: inline;
  }

  .nav-tab {
    padding: 0 12px;
    gap: 4px;
  }
}

/* Responsive: Mobile - Hamburger Menu */
@media (max-width: 639px) {
  .nav-container {
    gap: 12px;
    padding: 0 12px;
  }

  .nav-tabs {
    gap: 4px;
  }

  .nav-tab {
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-tab i {
    font-size: 18px;
  }

  .logo-link {
    padding: 6px 8px;
    gap: 4px;
  }

  .nav-user-link {
    width: 36px;
    height: 36px;
  }
}

/* Loading State (for when navigation is happening) */
.global-nav.loading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nav-active), transparent);
  animation: nav-loading 1.5s ease-in-out infinite;
}

@keyframes nav-loading {
  0% {
    width: 0;
    left: 0;
  }
  50% {
    width: 100%;
    left: 0;
  }
  100% {
    width: 0;
    left: 100%;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --nav-bg: rgba(30, 41, 59, 0.96);
    --nav-border: rgba(148, 163, 184, 0.18);
    --nav-text: #e2e8f0;
    --nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

/* Print Styles */
@media print {
  .global-nav {
    position: static;
    display: none;
  }
}
