/*
 * Design System - Navigation
 *
 * Navigation components including week navigator, smart input, and hamburger menu
 */

/* ============================================
   Logo - Gold Star Holographic Effect
   ============================================ */

.logo-gold-star a {
  background: linear-gradient(135deg,
    #ffd700 0%,
    #ffed4e 16%,
    #ff6ec7 33%,
    #ba55d3 50%,
    #7873f5 66%,
    #4facfe 83%,
    #ffd700 100%);
  background-size: 400% 400%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holographic-shift 15s ease infinite;
}

@keyframes holographic-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ============================================
   General Navigation
   ============================================ */

.nav {
  display: flex;
  gap: var(--space-base);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  text-decoration: none;
  padding: var(--space-sm) var(--space-base);
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  color: var(--ink-dark);
  transition: background var(--transition-base);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.nav-link.active {
  border-color: var(--parchment);
  background: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Week Navigator
   ============================================ */

.week-navigator {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-base);
  border-bottom: 2px solid var(--parchment);
}

.week-navigator-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-base);
  margin-bottom: var(--space-base);
}

.week-navigator-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-3xl);
  color: var(--ink-medium);
  letter-spacing: 1px;
  margin: 0;
}

/* Base navigator button styles (consolidates repeated patterns) */
.navigator-button-base {
  display: inline-block;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  color: var(--ink-dark);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    2px 2px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-base);
}

.navigator-button-base:hover {
  background: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

/* Primary navigation buttons (prev/next) */
.week-navigator-button,
.day-navigator-button {
  display: inline-block;
  padding: var(--space-sm) var(--space-base);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: var(--border-radius-lg);
  color: var(--ink-dark);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    2px 2px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-base);
}

.week-navigator-button:hover,
.day-navigator-button:hover {
  background: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

/* Today buttons (smaller) */
.week-navigator-today-button,
.day-navigator-today-button {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  border-radius: var(--border-radius-md);
  color: var(--ink-dark);
  text-decoration: none;
  font-size: var(--font-size-sm);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    2px 2px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-base);
}

.week-navigator-today-button:hover,
.day-navigator-today-button:hover {
  background: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

.week-navigator-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* Plan button (has border, bold text) */
.week-navigator-plan-button {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--parchment-dark);
  border-radius: var(--border-radius-md);
  color: var(--ink-dark);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-base);
}

.week-navigator-plan-button:hover {
  background: rgba(255, 255, 255, 0.8);
  opacity: 1;
}

/* ============================================
   Day Navigator
   ============================================ */

.day-navigator {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-base);
  border-bottom: 2px solid var(--parchment);
}

.day-navigator-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-base);
  margin-bottom: var(--space-base);
}

.day-navigator-title {
  font-family: var(--font-accent);
  font-size: var(--font-size-3xl);
  color: var(--ink-medium);
  letter-spacing: 1px;
  margin: 0;
}

/* Note: .day-navigator-button and .day-navigator-today-button styles
 * are consolidated with week navigator styles above to reduce duplication */

/* ============================================
   Task Navigation Tabs
   ============================================ */

.tasks-nav {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  border-bottom: 2px solid var(--parchment);
}

.tasks-nav .tab {
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  margin-bottom: -2px;
  transition: background-color 0.15s ease-in-out;
  color: var(--ink-dark);
}

.tasks-nav .tab:hover {
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.tasks-nav .tab.active {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--parchment);
  border-bottom-color: transparent;
  font-weight: var(--font-weight-bold);
}

/* ============================================
   Smart Input
   ============================================ */

.smart-input-wrapper {
  position: relative;
  width: 100%;
}

.smart-input {
  width: 100%;
  padding: var(--space-sm) var(--space-base);
  border: 2px solid var(--parchment);
  border-radius: var(--border-radius-md);
  font-size: var(--font-size-base);
  font-family: var(--font-body);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-dark);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.08);
}

.smart-input:focus {
  outline: none;
  border-color: var(--parchment-dark);
  background: rgba(255, 255, 255, 0.95);
}

.smart-input-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: var(--space-xs);
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.smart-input-section {
  padding: var(--space-xs);
}

.smart-input-hint {
  padding: var(--space-base);
  text-align: center;
  color: var(--ink-medium);
  font-size: var(--font-size-sm);
  font-style: italic;
}

.smart-input-option {
  width: 100%;
  padding: var(--space-sm) var(--space-base);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--ink-dark);
}

.smart-input-option:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--parchment-dark);
}

.smart-input-option-icon {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
}

.smart-input-pools {
  margin-top: var(--space-sm);
  padding: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.smart-input-pool-option {
  width: 100%;
  padding: var(--space-sm) var(--space-base);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  text-align: left;
  cursor: pointer;
  color: var(--ink-dark);
}

.smart-input-pool-option:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--parchment-dark);
}

.smart-input-pool-option-details {
  border-style: dashed;
  color: var(--ink-medium);
}

.smart-input-pool-option-details:hover {
  color: var(--ink-dark);
}

/* Search results */
.smart-input-section-header {
  padding: var(--space-xs) var(--space-base);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  color: var(--ink-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.smart-input-search-result {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-base);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-xs);
  cursor: pointer;
  transition: background var(--transition-base);
}

.smart-input-search-result:hover {
  background: rgba(255, 255, 255, 1);
  border-color: var(--parchment-dark);
}

.smart-input-result-icon {
  font-size: var(--font-size-lg);
  flex-shrink: 0;
}

.smart-input-result-content {
  flex: 1;
  min-width: 0;
}

.smart-input-result-title {
  font-weight: var(--font-weight-medium);
  color: var(--ink-dark);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-input-result-snippet {
  font-size: var(--font-size-sm);
  color: var(--ink-medium);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.smart-input-result-snippet mark {
  background: var(--parchment-light);
  color: var(--ink-dark);
  font-weight: var(--font-weight-medium);
  padding: 0 2px;
  border-radius: 2px;
}

/* Keyboard navigation selection state */
.smart-input-option.smart-input-item-selected,
.smart-input-search-result.smart-input-item-selected,
.smart-input-pool-option.smart-input-item-selected {
  background: var(--parchment-light);
  border-color: var(--parchment-dark);
}

/* ============================================
   Navigation Actions & Hamburger Menu
   ============================================ */

.nav-actions {
  flex-shrink: 0;
  white-space: nowrap;
}

.hamburger-menu {
  position: relative;
}

.hamburger-button {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-base);
  cursor: pointer;
  font-size: var(--font-size-lg);
  line-height: 1;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    2px 2px 0 rgba(0, 0, 0, 0.08);
  transition: background var(--transition-base);
}

.hamburger-button:hover {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--parchment-dark);
}

.hamburger-icon {
  display: block;
}

.hamburger-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-xs);
  min-width: 200px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--parchment);
  border-radius: var(--border-radius);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.hamburger-menu-item {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-base);
  background: none;
  border: none;
  text-align: left;
  text-decoration: none;
  color: var(--ink-dark);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: background var(--transition-base);
}

.hamburger-menu-item:hover {
  background: rgba(255, 255, 255, 1);
}

.hamburger-menu-item-disabled {
  color: var(--ink-light);
  cursor: not-allowed;
}

.hamburger-menu-item-disabled:hover {
  background: none;
}

.hamburger-menu-item-logout {
  font-weight: var(--font-weight-bold);
}

.hamburger-menu-divider {
  height: 2px;
  background: var(--parchment-light);
  margin: var(--space-xs) var(--space-base);
}

/* ============================================
   Mobile Responsive Styles
   ============================================ */

@media (max-width: 768px) {
  /* Header container - allow input to expand */
  header .content-container {
    transition: all var(--transition-base);
  }

  /* Logo - smaller on mobile */
  .logo-gold-star {
    font-size: 32px !important;
    transition: all var(--transition-base);
  }

  /* Smart input wrapper - grows when focused */
  .smart-input-wrapper {
    flex: 1;
    transition: flex var(--transition-base);
  }

  /* Smart input - compact by default */
  .smart-input {
    font-size: var(--font-size-sm);
    padding: var(--space-xs) var(--space-sm);
    transition: all var(--transition-base);
  }

  /* When input is focused, make it larger */
  .smart-input:focus {
    font-size: var(--font-size-base);
    padding: var(--space-sm) var(--space-base);
  }

  /* When input is focused, shrink the logo significantly */
  header .content-container:has(.smart-input:focus) .logo-gold-star {
    font-size: 20px !important;
    opacity: 0.7;
  }

  /* When input is focused, give it more space */
  header .content-container:has(.smart-input:focus) {
    gap: var(--space-xs) !important;
  }

  /* Navigation actions - hide Start the Week and Check In buttons */
  .nav-actions .btn:not(.hamburger-button) {
    display: none;
  }

  /* Hamburger button - ensure it stays visible */
  .hamburger-button {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-base);
    flex-shrink: 0;
  }

  /* Smart input dropdown - full width on mobile */
  .smart-input-dropdown {
    left: calc(var(--space-base) * -1);
    right: calc(var(--space-base) * -1);
    width: calc(100vw - var(--space-base) * 2);
  }
}
