/* Header Component Styles
 * 
 * Main header container and all component styles including header base structure
 * and layout sections, live clock capsule widget, app title and center section,
 * theme toggle button, and calendar popup (legacy).
 */

/* Header base structure */

.appHeader {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 80px;
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(180deg,
      rgba(13, 17, 23, 0.75) 0%,
      rgba(10, 14, 20, 0.8) 50%,
      rgba(13, 17, 23, 0.75) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 240, 255, 0.15),
    0 4px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 240, 255, 0.05);
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  transition: all var(--transition-base);
}

.appHeader::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(0, 240, 255, 0.4) 20%,
      rgba(204, 255, 0, 0.3) 50%,
      rgba(157, 0, 255, 0.4) 80%,
      transparent 100%);
  animation: energyFlow 8s ease-in-out infinite;
}

@keyframes energyFlow {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.6;
  }
}

.appHeaderLeft {
  position: relative;
  flex-shrink: 0;
  flex-basis: 260px;
  min-width: 260px;
}

.appHeaderCenter {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.appHeaderCenter > * {
  pointer-events: auto;
}

.appHeaderRight {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
  flex-basis: 260px;
  min-width: 260px;
  justify-content: flex-end;
}

.calendarPopup {
  position: absolute;
  top: calc(100% + var(--space-sm));
  left: 0;
  transform: translateY(-10px);
  width: 320px;
  background: var(--bg-surface);
  border: 2px solid rgba(0, 240, 255, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 240, 255, 0.2);
  padding: var(--space-md);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-base);
}

.calendarPopup.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Live clock widget */

.liveClock {
  position: relative;
  padding: var(--space-md) var(--space-xl);
  background: linear-gradient(135deg,
      rgba(0, 240, 255, 0.08) 0%,
      rgba(157, 0, 255, 0.08) 100%);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(0, 240, 255, 0.3);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(0, 240, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 240, 255, 0.1);
  transition: all var(--transition-base);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.liveClock:hover {
  border-color: var(--accent-neon-cyan);
  background: linear-gradient(135deg,
      rgba(0, 240, 255, 0.18) 0%,
      rgba(157, 0, 255, 0.18) 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(0, 240, 255, 0.2),
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 240, 255, 0.3);
  transform: translateY(-2px);
}

.clockTime {
  font-family: var(--font-mono);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--accent-neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
  letter-spacing: 2px;
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.clockDate {
  font-size: 10px;
  font-weight: var(--font-weight-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}

.clockHint {
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
}

.liveClock:hover .clockHint {
  opacity: 0.8;
}

/* App title section */

.appTitle {
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1;
  margin-bottom: 4px;
  animation: titleGlow 4s ease-in-out infinite;
}

.appTitle .wordKanban {
  background: linear-gradient(135deg, var(--accent-neon-cyan), var(--accent-neon-lime));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.appTitle .wordSticky {
  background: linear-gradient(135deg, var(--accent-neon-lime), var(--accent-neon-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(204, 255, 0, 0.2);
}

.appTitle .wordNotes {
  background: linear-gradient(135deg, var(--accent-neon-violet), var(--accent-neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 20px rgba(157, 0, 255, 0.2);
}

@keyframes titleGlow {

  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.15);
  }
}

.titleUnderline {
  width: 180px;
  height: 2px;
  margin-top: 4px;
  background: linear-gradient(90deg,
      transparent 0%,
      var(--accent-neon-cyan) 50%,
      transparent 100%);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

.appSubtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.5px;
  opacity: 0.7;
}

/* Theme toggle button */

.themeToggle {
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  border: 2px solid rgba(0, 240, 255, 0.3);
  background: linear-gradient(135deg,
      rgba(0, 240, 255, 0.08) 0%,
      rgba(157, 0, 255, 0.08) 100%);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all var(--transition-base);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(0, 240, 255, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 240, 255, 0.1);
  white-space: nowrap;
  flex-shrink: 0;
  height: 81px;
}

.themeToggle:hover {
  border-color: var(--accent-neon-cyan);
  background: linear-gradient(135deg,
      rgba(0, 240, 255, 0.12) 0%,
      rgba(157, 0, 255, 0.12) 100%);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 -1px 0 rgba(0, 240, 255, 0.2),
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 240, 255, 0.2);
  transform: translateY(-2px);
}

.themeToggle i {
  font-size: var(--font-size-xl);
}

.themeToggleLabel {
  font-size: 16px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}