/**
 * ATKV Mobile App - Navigation Components
 *
 * Navigation styles for desktop, tablet, and mobile views.
 * Includes top navigation, bottom navigation, and secondary navigation.
 *
 * Last updated: 2025-11-21
 */

/* ========================================
   BASE NAVIGATION STYLES
   ======================================== */

.navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-xl);
  background-color: var(--color-primary-blue);
  position: relative;
  z-index: var(--z-sticky);
}

/* ========================================
   TOP NAVIGATION - DESKTOP
   ======================================== */

.navigation--top-desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 102px;
  z-index: var(--z-fixed);
}

.navigation__logo {
  height: 53px;
  width: 40px;
  flex-shrink: 0;
}

.navigation__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.navigation__menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navigation__menu-item {
  font-family: var(--font-family-primary);
  font-size: var(--menu-text-size);
  font-weight: var(--menu-text-weight);
  color: var(--color-white);
  text-decoration: none;
  transition: opacity var(--transition-base);
  cursor: pointer;
}

.navigation__menu-item:hover {
  opacity: var(--opacity-hover);
}

.navigation__menu-item--active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.navigation__user {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.navigation__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navigation__user-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity var(--transition-base);
}

.navigation__user-button:hover {
  opacity: var(--opacity-hover);
}

.navigation__user-icon {
  width: 40px;
  height: 40px;
}

/* Language Selector styling is owned by the scoped LanguageSelector component
   (src/ATKV.Mobile.App/Components/LanguageSelector.razor.css). Duplicate global
   rules were removed to avoid overriding the scoped colour and breaking
   visibility on the auth Landing page. */

/* ========================================
   TOP NAVIGATION - MOBILE
   ======================================== */

.navigation--top-mobile {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 101px;
  padding: var(--spacing-lg);
  z-index: var(--z-fixed);
}

.navigation__left-section {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navigation__hamburger {
  width: 32px;
  height: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.navigation__hamburger-line {
  width: 100%;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.navigation__hamburger--open .navigation__hamburger-line:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.navigation__hamburger--open .navigation__hamburger-line:nth-child(2) {
  opacity: 0;
}

.navigation__hamburger--open .navigation__hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* ========================================
   BOTTOM NAVIGATION - MOBILE
   ======================================== */

.navigation--bottom-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 108px;
  background-color: var(--color-primary-blue);
  z-index: var(--z-fixed);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--spacing-xl);
}

.navigation--bottom-mobile .navigation__menu {
  width: 100%;
  justify-content: space-around;
  gap: 0;
}

.navigation--bottom-mobile .navigation__menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
  padding: var(--spacing-sm);
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-base);
}

.navigation--bottom-mobile .navigation__menu-item:hover {
  opacity: var(--opacity-hover);
}

.navigation--bottom-mobile .navigation__menu-item--active {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.navigation--bottom-mobile .navigation__menu-icon {
  width: 28px;
  height: 28px;
  color: var(--color-white);
}

.navigation--bottom-mobile .navigation__menu-label {
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-white);
}

/* ========================================
   SECONDARY NAVIGATION
   ======================================== */

.navigation-secondary {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding: var(--spacing-lg) var(--spacing-xl);
  background-color: var(--color-white);
  border-radius: var(--radius-navigation);
  box-shadow: var(--shadow-sm);
}

.navigation-secondary__item {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
}

.navigation-secondary__item:hover {
  background-color: var(--color-background-secondary);
  color: var(--color-text-primary);
}

.navigation-secondary__item--active {
  background-color: var(--color-primary-blue);
  color: var(--color-white);
}

/* ========================================
   MOBILE MENU OVERLAY
   ======================================== */

.navigation__overlay {
  position: fixed;
  top: 101px;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.navigation__overlay--open {
  opacity: 1;
  pointer-events: all;
}

.navigation__mobile-menu {
  position: fixed;
  top: 101px;
  left: 0;
  width: 80%;
  max-width: 393px;
  height: calc(100vh - 101px);
  background-color: var(--color-white);
  z-index: var(--z-modal);
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  overflow-y: auto;
  padding: var(--spacing-2xl);
}

.navigation__mobile-menu--open {
  transform: translateX(0);
}

.navigation__mobile-menu-item {
  display: block;
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  text-decoration: none;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--card-border);
  transition: background-color var(--transition-base);
}

.navigation__mobile-menu-item:hover {
  background-color: var(--color-background-secondary);
}

.navigation__mobile-menu-item--active {
  color: var(--color-primary-blue);
  background-color: var(--color-background-secondary);
}

/* ========================================
   DROPDOWN MENU
   ======================================== */

.navigation__dropdown {
  position: relative;
}

.navigation__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.navigation__dropdown-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-base);
}

.navigation__dropdown--open .navigation__dropdown-icon {
  transform: rotate(180deg);
}

.navigation__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background-color: var(--color-white);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-top: var(--spacing-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: var(--z-dropdown);
}

.navigation__dropdown--open .navigation__dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.navigation__dropdown-item {
  display: block;
  padding: var(--spacing-md) var(--spacing-lg);
  color: var(--color-text-primary);
  text-decoration: none;
  transition: background-color var(--transition-base);
}

.navigation__dropdown-item:hover {
  background-color: var(--color-background-secondary);
}

.navigation__dropdown-item:first-child {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.navigation__dropdown-item:last-child {
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
}

/* ========================================
   BREADCRUMBS
   ======================================== */

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-lg) 0;
  font-size: var(--font-size-sm);
}

.breadcrumbs__item {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.breadcrumbs__item:hover {
  color: var(--color-text-primary);
}

.breadcrumbs__item--active {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.breadcrumbs__separator {
  color: var(--color-text-secondary);
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
  .navigation--top-desktop {
    display: none;
  }

  .navigation__menu {
    gap: var(--spacing-xl);
  }

  .navigation-secondary {
    flex-direction: column;
    align-items: stretch;
    border-radius: var(--radius-lg);
  }

  .navigation-secondary__item {
    text-align: center;
  }
}

@media (min-width: 769px) {
  .navigation--top-mobile,
  .navigation--bottom-mobile {
    display: none;
  }

  .navigation__hamburger,
  .navigation__mobile-menu,
  .navigation__overlay {
    display: none;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .navigation__menu-item,
  .navigation__user,
  .navigation__hamburger-line,
  .navigation-secondary__item,
  .navigation__overlay,
  .navigation__mobile-menu,
  .navigation__dropdown-menu,
  .breadcrumbs__item {
    transition: none;
  }
}

/* Focus styles */
.navigation__menu-item:focus-visible,
.navigation__user:focus-visible,
.navigation-secondary__item:focus-visible,
.breadcrumbs__item:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* Changelog button */
.navigation__changelog-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  transition: color 0.15s, opacity 0.15s;
}
.navigation__changelog-button:hover {
  color: #fff;
  opacity: 0.9;
}

/* Changelog modal */
.changelog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
}
.changelog-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  width: calc(100% - 32px);
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 9999;
}
.changelog-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e2e6ea;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}
.changelog-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.changelog-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  display: flex;
  align-items: center;
  gap: 8px;
}
.changelog-title i {
  color: #2a63af;
  font-size: 20px;
}
.changelog-current-version {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2a63af;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  width: fit-content;
  margin-top: 4px;
}
.changelog-version-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
}
.changelog-close {
  background: #f0f2f5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  font-size: 16px;
  flex-shrink: 0;
  transition: background 0.15s;
}
.changelog-close:hover {
  background: #e2e6ea;
}
.changelog-body {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
}
.changelog-entry {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f2f5;
}
.changelog-entry:last-child {
  border-bottom: none;
}
.changelog-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.changelog-version-tag {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
}
.changelog-latest-badge {
  display: inline-block;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.changelog-date {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
}
.changelog-summary {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 10px;
  line-height: 1.4;
}
.changelog-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.changelog-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  line-height: 1.45;
}
.changelog-tag {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}
.tag-feat { background: #dbeafe; color: #1d4ed8; }
.tag-fix  { background: #fce7f3; color: #be185d; }
.tag-perf { background: #d1fae5; color: #065f46; }
.tag-ui   { background: #fef3c7; color: #92400e; }
.tag-sec  { background: #fde2e2; color: #991b1b; }
.changelog-footer {
  padding: 12px 24px;
  border-top: 1px solid #e2e6ea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: #f8f9fa;
}
.changelog-footer-info {
  font-size: 11px;
  color: #9ca3af;
}
.changelog-footer-btn {
  background: #2a63af;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.changelog-footer-btn:hover {
  background: #1e4d8a;
}
