/* ANCHOR: imports */
/* CRITICAL: Import universal button styles - must be at top */
@import url('../button/button.css');

/* ANCHOR: navigation_header */
/* REUSED: Navigation header component with modular architecture */
/* SCALED FOR: Responsive design and performance optimization */
/* UPDATED COMMENTS: Clean navigation without shadows, backdrop blur effects */

/* ANCHOR: navigation_wrapper */
/* UPDATED COMMENTS: Full width navigation container with padding */
/* CRITICAL: Hidden during loading, shown after content is ready */
/* SCALED FOR: Always above fullscreen modals with z-navigation */
.navigation-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 20px;
  height: 80px;
  box-sizing: border-box;
  z-index: var(--z-navigation, 1000);
  display: flex;
  justify-content: center;
  /* REUSED: Hidden during loading state */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in, visibility 0.5s ease-in;
}

/* SCALED FOR: Show navigation after loading is complete */
body.loaded .navigation-wrapper {
  opacity: 1;
  visibility: visible;
}

.user-profile-link,
.action-buttons {
  transition:
    opacity 0.28s ease,
    transform 0.28s ease;
  will-change: opacity, transform;
}

.navigation-wrapper--collapsed .navigation-header {
  transform: none;
}

.navigation-wrapper--collapsed .user-profile-link,
.navigation-wrapper--collapsed .action-buttons {
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
}

/* ANCHOR: main_container */
.navigation-header {
  /* REUSED: Flexbox layout from Figma auto-layout */
  /* UPDATED COMMENTS: Full width navigation with proper space-between distribution */
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  height: 40px;
  width: 100%;
  min-width: 0;
  
  /* SCALED FOR: Hardware acceleration for smooth performance */
  will-change: transform;
  contain: layout style;
}

/* ANCHOR: nav_section */
.nav-section {
  /* REUSED: Auto layout from Figma */
  /* UPDATED COMMENTS: Flexible width with proper gap spacing */
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 14px;
  height: 40px;
  flex: 1 1 auto;
  min-width: 0;
  order: 0;
  flex-grow: 1;
}

/* ANCHOR: breadcrumb_separators */
/* UPDATED COMMENTS: Dynamic breadcrumb separator elements without fixed order */
.breadcrumb-separator {
  width: 12px;
  height: 22px;
  
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #FFFFFF;
  opacity: 0.3;
  
  flex: none;
  flex-grow: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* UPDATED COMMENTS: Removed fixed order for dynamic positioning */
}

/* ANCHOR: user_photo */
.user-photo {
  width: 48px;
  height: 40px;
  background: #FFFFFF;
  border-radius: 0;
  flex: none;
  flex-grow: 0;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* UPDATED COMMENTS: Shared 40x40 avatar container */
  image-rendering: crisp-edges;
}

.user-photo--eyes {
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
  cursor: default;
}

.eyes-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transform-origin: center;
  transform: translateY(0.5px) scale(1.5);
}

.eyes-avatar__eye {
  --pupil-x: 0px;
  --pupil-y: 0px;
  --highlight-x: 0px;
  --highlight-y: 0px;

  position: relative;
  width: 15px;
  height: 23px;
  overflow: hidden;
  border-radius: 50% / 48%;
  background: radial-gradient(circle at 50% 42%, #fefefe 0%, #ececec 58%, #cfcfcf 100%);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.46),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  flex: none;
  transition: transform 0.18s ease, box-shadow 3s ease-out, opacity 0.2s ease;
}

.eyes-avatar__eye--left {
  transform: rotate(-2deg);
}

.eyes-avatar__eye--right {
  transform: rotate(2deg);
}

.eyes-avatar__pupil {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #9a73ff 0%, #3a16ff 42%, #090013 100%);
  box-shadow:
    inset -1px -1px 2px rgba(0, 0, 0, 0.4),
    0 0 8px rgba(110, 0, 255, 0.5);
  transform: translate(calc(-50% + var(--pupil-x)), calc(-50% + var(--pupil-y)));
  transition: transform 0.14s ease-out;
  will-change: transform;
}

.eyes-avatar__highlight {
  position: absolute;
  top: 19%;
  left: 34%;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  filter: blur(0.25px);
  opacity: 0.9;
  transform: translate(var(--highlight-x), var(--highlight-y));
  transition: transform 0.14s ease-out;
}

.eyes-avatar__lid {
  position: absolute;
  left: -3px;
  right: -3px;
  height: 50%;
  background: #05070c;
  z-index: 2;
  pointer-events: none;
  transition: transform 0.07s ease-out;
}

.eyes-avatar__lid--top {
  top: 0;
  transform: translateY(-102%);
  border-radius: 60% 60% 0 0 / 100% 100% 0 0;
  transform-origin: top center;
}

.eyes-avatar__lid--bottom {
  bottom: 0;
  transform: translateY(102%);
  border-radius: 0 0 60% 60% / 0 0 100% 100%;
}

.eyes-avatar__eye--blink .eyes-avatar__lid--top,
.eyes-avatar__eye--blink .eyes-avatar__lid--bottom {
  transform: translateY(0);
}

.user-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.user-profile-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border-radius: 4px;
}

.user-profile-link:hover {
  opacity: 1;
}

.user-profile-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

/* ANCHOR: user_name_section */
.user-name-section {
  /* UPDATED COMMENTS: User name and status grouped together with 10px gap */
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 6px;
  height: 22px;
  flex: none;
  flex-grow: 0;
  /* UPDATED COMMENTS: Removed fixed order for dynamic positioning */
}

.user-name {
  height: 22px;
  white-space: nowrap;
  
  /* REUSED: Geist Mono font from Figma specs */
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #FFFFFF;
  
  flex: none;
  order: 0;
  flex-grow: 0;
}

/* ANCHOR: status_badge */
.status-badge {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 3px 10px;
  gap: 6px;
  height: 22px;
  white-space: nowrap;
  
  /* UPDATED COMMENTS: Green status background with transparency */
  background: rgba(15, 108, 49, 0.3);
  border: 1px solid rgba(15, 108, 49, 0.4);
  border-radius: 99px;
  
  flex: none;
  order: 1;
  flex-grow: 0;
}

.status-indicator {
  width: 6px;
  height: 6px;
  background: #53F38E;
  border-radius: 50%;
  flex: none;
  order: 0;
  flex-grow: 0;
}

.status-text {
  height: 16px;
  white-space: nowrap;
  
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #53F38E;
  
  flex: none;
  flex-grow: 0;
}

/* ANCHOR: page_section */
.page-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 8px;
  height: 22px;
  flex: 1 1 auto;
  min-width: 0;
  flex-grow: 1;
  /* UPDATED COMMENTS: Removed fixed order for dynamic positioning */
}

.page-title {
  height: 22px;
  white-space: nowrap;
  
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #FFFFFF;
  
  flex: none;
  flex-grow: 0;
  cursor: pointer;
}

.page-section .nav-button--dropdown {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  align-self: flex-start;
  text-align: left;
}

.page-section .nav-button__text {
  display: inline-block;
  flex: none;
  width: auto;
  max-width: min(24ch, 100%);
  min-width: 0;
  font-size: 18px;
  line-height: 22px;
}

.page-title:hover {
  opacity: 0.7;
}

/* ANCHOR: dropdown_button */
/* UPDATED COMMENTS: Clickable dropdown button for page navigation */
/* CRITICAL: Minimal button styling with hover state */
.nav-button--dropdown {
  /* REUSED: Reset button styles */
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  
  /* UPDATED COMMENTS: Flexbox layout for text alignment */
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  height: 22px;
  
  /* REUSED: Geist Mono font matching navigation style */
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #FFFFFF;
  
  /* SCALED FOR: Smooth hover transitions */
  transition: opacity 0.2s ease;
}

.nav-button--dropdown:hover {
  opacity: 1;
}

.nav-button--dropdown:focus {
  outline: none;
}

.nav-button--dropdown:focus-visible {
  outline: none;
}

.nav-button--dropdown:active {
  outline: none;
}

.navigation-wrapper .nav-button:hover {
  opacity: 1;
}

.navigation-wrapper .nav-button--icon:hover,
.navigation-wrapper .nav-button--text:hover,
.navigation-wrapper .nav-button--dropdown:hover {
  opacity: 1;
}

.navigation-wrapper .nav-button--dropdown:hover .nav-button__text,
.navigation-wrapper .nav-button--dropdown:hover .nav-button__flag,
.navigation-wrapper .nav-button--text:hover .nav-button__text,
.navigation-wrapper .nav-button--text:hover .nav-button__icon,
.navigation-wrapper .nav-button--icon:hover svg,
.navigation-wrapper .nav-button--icon:hover iconify-icon {
  opacity: 1;
}

/* UPDATED COMMENTS: Flag variant with icon */
.nav-button--dropdown--flag {
  gap: 8px;
}

.nav-button__flag {
  width: 20px;
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-button__text {
  white-space: nowrap;
  flex: none;
}

/* CRITICAL: Header action labels should keep their natural casing instead of inheriting the uppercase nav style. */
.nav-button--cv .nav-button__text,
.nav-button--share .nav-button__text {
  text-transform: none;
}

.dropdown-arrow {
  width: 20px;
  height: 20px;
  flex: none;
  order: 1;
  flex-grow: 0;
  cursor: pointer;
  
  /* UPDATED COMMENTS: SVG arrow styling - ensure visibility */
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-arrow svg {
  width: 100%;
  height: 100%;
  stroke: #FFFFFF;
  stroke-width: 1.67px;
  fill: none;
  /* UPDATED COMMENTS: Ensure SVG is visible */
  opacity: 1;
}

/* ANCHOR: language_section */
.language-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 8px;
  height: 22px;
  flex: none;
  flex-grow: 0;
  /* UPDATED COMMENTS: Removed fixed order for dynamic positioning */
}

.flag-container {
  width: 20px;
  height: 20px;
  flex: none;
  order: 0;
  flex-grow: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-text {
  height: 22px;
  white-space: nowrap;
  
  font-family: 'Geist Mono', var(--font-family-mono);
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 22px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #FFFFFF;
  
  flex: none;
  flex-grow: 0;
  cursor: pointer;
}

.language-text:hover {
  opacity: 1;
}

.user-name:hover,
.status-text:hover {
  opacity: 1;
}

.user-name-section:hover .user-name,
.user-name-section:hover .status-text {
  opacity: 1;
}

/* ANCHOR: action_buttons */
.action-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 8px;
  height: 40px;
  flex: none;
  order: 1;
  flex-grow: 0;
}

/* ============================================
   BURGER MENU BUTTON
   ============================================ */

.burger-button {
  /* CRITICAL: Hidden on desktop, shown on mobile */
  display: none;
  width: 40px;
  height: 40px;
  
  /* REUSED: Button reset */
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  
  /* SCALED FOR: Flexbox centering */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  
  /* REUSED: Smooth transitions */
  transition: opacity 0.2s ease;
}

.burger-button:hover {
  opacity: 0.7;
}

.burger-button__line {
  /* CRITICAL: Burger menu lines */
  display: block;
  width: 24px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 1px;
  transform-origin: center;
  will-change: transform, opacity;
  backface-visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* CRITICAL: Animated burger to X transformation */
.burger-button--open .burger-button__line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger-button--open .burger-button__line:nth-child(2) {
  opacity: 0;
}

.burger-button--open .burger-button__line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* ANCHOR: tablet_breakpoint */
@media (max-width: 1024px) {
  .navigation-wrapper {
    padding: 20px;
  }
  
  .navigation-header {
    /* UPDATED COMMENTS: Responsive gap adjustment */
    gap: 20px;
  }
  
  .nav-section {
    gap: 12px;
  }
  
  .action-buttons {
    gap: 8px;
  }
}

/* ANCHOR: mobile_breakpoint */
@media (max-width: 768px) {
  .navigation-wrapper {
    padding: 16px 16px 16px;
    /* Ensure header is visible on iOS even if body.loaded is missing */
    opacity: 1;
    visibility: visible;
  }
  
  .navigation-header {
    /* CRITICAL: Mobile layout - avatar left, burger right */
    height: 40px;
    gap: 0;
  }
  
  .nav-section {
    /* CRITICAL: Show only user photo and name on mobile */
    gap: 12px;
  }
  
  /* CRITICAL: Hide secondary desktop-only elements on mobile */
  .user-name-section .status-badge,
  .action-buttons {
    display: none !important;
  }
  
  /* CRITICAL: Show burger button on mobile */
  .burger-button {
    display: flex;
    /* CRITICAL: Fixed position to stay above menu */
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    z-index: 100003 !important;
  }
  
  /* UPDATED COMMENTS: Keep original sizes on mobile */
  .user-photo {
    width: 40px;
    height: 40px;
  }

  .eyes-avatar {
    transform: translateY(0.5px) scale(1.2);
  }
  
  /* CRITICAL: Fix alignment - remove fixed height to center with avatar */
  .user-name-section {
    height: auto;
  }
  
  .user-name {
    height: auto;
  }
  
  /* CRITICAL: Keep original text size - don't change on mobile */
  /* .user-name font-size and line-height remain 22px/29px from desktop */
}
