/* Layer 6: Navbar Layer */
/* Top-aligned edge-to-edge navigation bar */

[data-layer="navbar"] {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 11.851vh;  /* 8.889vh + 1.481vh * 2 = 128px at 1080p */
  z-index: var(--z-navbar);
  background: rgba(26, 28, 30, 0.65);
  display: flex;
  align-items: center;
  padding: var(--navbar-top-offset) var(--gutter);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.navbar-logo {
  height: 5.926vh; /* 64px at 1080p */
  width: auto;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

/* Glow indicator behind logo - disabled, using SVG glow instead */
/* .navbar-logo::before - removed in favor of SVG-based glow */

.navbar-logo-img {
  height: 100%;
  width: auto;
  display: block;
}

/* Hide glow version by default */
.navbar-logo-img-glow {
  display: none;
}

/* On focus: hide default, show glow */
.navbar-logo.focused .navbar-logo-img-default {
  display: none;
}

.navbar-logo.focused .navbar-logo-img-glow {
  display: block;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4.444vh;  /* 48px at 1080p - significantly increased for better spacing */
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Pill is now a pseudo-element on each nav item - no JS calculations needed */
.navbar-focus-pill {
  display: none; /* Hide the old JS-controlled pill element */
}

/* Pill background on each nav item, hidden by default */
.navbar-item::before,
.navbar-icon::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 5.741vh; /* 62px at 1080p (reduced 30% from 4.5vw) */
  border-radius: 4px;
  background: #E3E2E6;
  opacity: 0;
  transition: opacity var(--transition-fast);
  z-index: -1;
  pointer-events: none;
}

/* Show pill on the focused item */
.navbar-item.focused::before {
  opacity: 1;
}

/* Glow ring behind icons - matches icon perimeter with outer glow only */
.navbar-icon::before {
  left: 50%;
  right: auto;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3.556vh;
  height: 3.556vh;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 1vw 0.3vw rgba(255, 255, 255, 1),
              0 0 2vw 0.5vw rgba(255, 255, 255, 0.6);
}

/* Show glow ring on focused icons */
.navbar-icon.focused::before {
  opacity: 1;
}

.navbar-item {
  color: #FFFFFF;
  font-size: 1.666vw; /* 32px at 1920px (2x) */
  font-weight: 500;
  text-decoration: none;
  padding: var(--spacing-sm) 1.667vw;  /* 32px horizontal at 1920px - significantly wider pill */
  border-radius: 4px;
  transition: color var(--transition-fast);
  position: relative;
  z-index: 1;
}

.navbar-item:hover {
  color: var(--color-text-primary);
}

.navbar-item:focus,
.navbar-item:focus-visible,
.navbar-icon:focus,
.navbar-icon:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.navbar-item.focused {
  color: #1A1C1E;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.navbar-icon {
  width: 2vw;      /* 38px at 1920px */
  height: 2vw;     /* 38px at 1920px */
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  position: relative;
  z-index: 1;
  text-decoration: none;
}

.navbar-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Search icon: smaller within circle and bolder */
.navbar-icon[href="#/search"] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar-icon[href="#/search"] svg {
  width: 65%;
  height: 65%;
  fill: none !important;
}

.navbar-icon:hover {
  color: var(--color-text-primary);
}

.navbar-icon.focused {
  color: #FFFFFF;
}

.navbar-icon.focused svg {
  fill: #FFFFFF !important;
}

.navbar-icon.focused svg path {
  fill: #FFFFFF !important;
}

/* Search icon inverted colors when focused - light circle with dark icon and thin ring */
.navbar-icon[href="#/search"].focused::before {
  background: #E3E2E6;
  border: 0.104vw solid #FFFFFF;        /* Thin ring to match account icon */
  box-shadow: 0 0 1vw 0.3vw rgba(255, 255, 255, 1),
              0 0 2vw 0.5vw rgba(255, 255, 255, 0.6);
}

.navbar-icon[href="#/search"].focused svg {
  stroke: #1A1C1E !important;
}

.navbar-icon[href="#/search"].focused svg circle,
.navbar-icon[href="#/search"].focused svg line {
  stroke: #1A1C1E !important;
}

/* Avatar initial circle for logged-in users */
.navbar-avatar-initial {
  width: 2vw;      /* 38px at 1920px */
  height: 2vw;     /* 38px at 1920px */
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
  color: #FFFFFF;
  font-size: 1vw;  /* 19px at 1920px */
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}

.navbar-icon.has-avatar {
  width: 2vw;      /* 38px at 1920px */
  height: 2vw;     /* 38px at 1920px */
}

.navbar-icon.has-avatar.focused .navbar-avatar-initial {
  box-shadow: 0 0 0 0.104vw #FFFFFF; /* 2px at 1920px */
}

/* Account icon: 30% larger than search icon */
.navbar-icon[href="#/account"] {
  width: 2.6vw;      /* 50px at 1920px (30% larger than 2vw) */
  height: 2.6vw;     /* 50px at 1920px (30% larger than 2vw) */
}

.navbar-icon[href="#/account"]::before {
  width: 4.623vh;    /* 30% larger than 3.556vh */
  height: 4.623vh;   /* 30% larger than 3.556vh */
}

.navbar-icon[href="#/account"].has-avatar,
.navbar-icon[href="#/account"] .navbar-avatar-initial {
  width: 2.6vw;      /* 50px at 1920px (30% larger) */
  height: 2.6vw;     /* 50px at 1920px (30% larger) */
}

.navbar-icon[href="#/account"] .navbar-avatar-initial {
  font-size: 1.3vw;  /* 25px at 1920px (30% larger than 1vw) */
}
