/* Navigation Component Styles */

.main-navigation {
  background: #2f2d2d;
  color: #333;
  padding: 0.6rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  flex-shrink: 0;
}

.nav-brand h1 {
  margin: 0;
  font-size: 2.8rem;
  font-weight: 400;
  font-family: 'Permanent Marker', cursive;
  letter-spacing: 1px;
  display: flex;
  align-items: baseline;
}

.nav-brand h1::first-letter {
  font-size: 4.2rem;
  margin-right: 8px;
  position: relative;
  top: 4px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 600;
  font-family: 'Crimson Text', 'Georgia', serif;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.nav-link:hover {
  background: transparent;
  transform: translateY(-1px);
  box-shadow: 0 0 40px rgba(255, 255, 255, 1);
}

.nav-link.active {
  background: transparent;
  box-shadow: 0 0 40px rgba(255, 255, 255, 1);
}

.nav-icon {
  font-size: 1.1rem;
}

.nav-user {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  font-family: 'Crimson Text', 'Georgia', serif;
}

/* Navigation Layout */
.nav-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Navigation Styles */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  align-items: center;
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: white;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile menu states */
.nav-links.mobile-closed {
  display: none;
}

.nav-links.mobile-open {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #2f2d2d;
  flex-direction: column;
  padding: 1rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-user.hidden-mobile {
  display: none;
}

/* Mobile Sidebar Toggle (for toolbar) */
.mobile-sidebar-toggle {
  display: none;
  background: transparent;
  border: 2px solid #343a40;
  cursor: pointer;
  padding: 12px;
  border-radius: 8px;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  transition: all 0.2s ease;
}

.mobile-sidebar-toggle:hover {
  box-shadow: 0 6px 20px rgba(220, 53, 69, 0.8);
  transform: translateY(-1px);
}

.mobile-sidebar-toggle .hamburger-line {
  width: 18px;
  height: 2px;
  background: #343a40;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.mobile-sidebar-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.mobile-sidebar-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-sidebar-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Tablet Portrait Mode Navigation - Same as mobile */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
  .mobile-nav-toggle {
    display: flex;
  }
  
  .nav-links {
    display: flex;
  }
  
  .nav-links.mobile-closed {
    display: none;
  }
  
  .nav-links.mobile-open {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    background: #2f2d2d !important;
    flex-direction: column !important;
    padding: 1rem !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .nav-user.hidden-mobile {
    display: none;
  }
  
  /* Position hamburger on left, keep Ivoria centered */
  .nav-left {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .mobile-account-icon {
    position: absolute;
    right: 0;
    z-index: 10;
  }
  
  .mobile-nav-toggle {
    position: absolute;
    left: 0;
    z-index: 10;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none !important;
  }
  
  .mobile-nav-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .mobile-nav-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .mobile-nav-toggle:hover {
    background: transparent !important;
  }
  
  .mobile-nav-toggle:visited {
    background: transparent !important;
  }
  
  .mobile-nav-toggle .hamburger-line {
    background: white;
  }
  
  .mobile-nav-toggle.active {
    background: transparent !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
    border-radius: 4px;
  }
  
  .mobile-nav-toggle:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  
  .nav-brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* Tablet Landscape Mode Navigation - Same as tablet portrait */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
  .mobile-nav-toggle {
    display: flex;
  }
  
  .nav-links {
    display: flex;
  }
  
  .nav-links.mobile-closed {
    display: none;
  }
  
  .nav-links.mobile-open {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    background: #2f2d2d !important;
    flex-direction: column !important;
    padding: 1rem !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .nav-user.hidden-mobile {
    display: none;
  }
  
  /* Position hamburger on left, keep Ivoria centered */
  .nav-left {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .mobile-account-icon {
    position: absolute;
    right: 0;
    z-index: 10;
  }
  
  .mobile-nav-toggle {
    position: absolute;
    left: 0;
    z-index: 10;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
    box-shadow: none !important;
  }
  
  .mobile-nav-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .mobile-nav-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .mobile-nav-toggle:hover {
    background: transparent !important;
  }
  
  .mobile-nav-toggle:visited {
    background: transparent !important;
  }
  
  .mobile-nav-toggle .hamburger-line {
    background: white;
  }
  
  .mobile-nav-toggle.active {
    background: transparent !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
    border-radius: 4px;
  }
  
  .mobile-nav-toggle:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-nav-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .nav-brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* Utilities Sidebar Fix for Tablet Landscape */
  .utilities-sidebar {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 100vh !important;
    overscroll-behavior: contain !important;
  }
  
  .utilities-sidebar .controls {
    padding-bottom: 100px !important;
  }
}

/* More Dropdown Styles */
.more-dropdown {
  position: relative;
}

.more-button {
  background: none !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
  cursor: pointer;
}

.more-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: #2f2d2d;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  min-width: 150px;
  padding: 8px 0;
  margin-top: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.more-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.more-link {
  display: block;
  padding: 10px 20px;
  color: white;
  text-decoration: none;
  font-family: 'Crimson Text', 'Georgia', serif;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s ease;
}

.more-link:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
}

.more-link.active {
  background: rgba(255, 255, 255, 0.15);
}

/* Remove hover effects when menu is closed */
.more-menu:not(.open) .more-link:hover {
  background: transparent;
}

/* Mobile Phone Specific Styles */
@media (max-width: 767px) {
  .mobile-nav-toggle {
    display: flex;
  }
  
  .nav-links {
    display: flex;
  }
  
  .nav-links.mobile-closed {
    display: none;
  }
  
  .nav-links.mobile-open {
    display: flex !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    background: #2f2d2d !important;
    flex-direction: column !important;
    padding: 1rem !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    z-index: 9999 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .nav-user.hidden-mobile {
    display: none;
  }
  
  .nav-left {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
  }

  .mobile-account-icon {
    position: absolute;
    right: 0;
    z-index: 10;
  }
  
  .mobile-nav-toggle {
    position: absolute;
    left: 0;
    z-index: 10;
    background: transparent !important;
    border: none !important;
    outline: none !important;
  }
  
  .mobile-nav-toggle .hamburger-line {
    background: white;
  }
  
  .mobile-nav-toggle.active {
    background: transparent !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6) !important;
    border-radius: 4px;
  }
  
  .nav-brand {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  /* Ensure navigation items have proper spacing on mobile */
  .nav-links.mobile-open .nav-link,
  .nav-links.mobile-open .auth-trigger {
    margin-bottom: 8px;
    padding: 12px 16px !important;
    border-radius: 8px;
  }
  
  .nav-links.mobile-open .nav-link:last-child,
  .nav-links.mobile-open .auth-trigger:last-child {
    margin-bottom: 0;
  }
}


