/* ==========================================================================
   Shared Header Component (BEM Naming Convention)
   ========================================================================== */

/* Block */
.app-header {
  background-color: var(--color-card);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

/* Elements */
.app-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.app-header__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-accent-blue);
  text-decoration: none;
}

.app-header__brand:hover {
  text-decoration: none;
}

.app-header__logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.app-header__brand:hover .app-header__logo {
  transform: rotate(18deg) scale(1.05);
}

.app-header__brand-text h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text);
  line-height: 1.1;
  text-align: left;
}

.app-header__brand-text span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-text-muted);
  display: block;
  text-align: left;
}

.app-header__stats {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.app-header__stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}


.app-header__stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

.app-header__stat-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
}

.app-header__actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  gap: 12px;
}

.app-header__action-btn {
  margin-right: 8px;
}

/* Theme Icon Toggling */
body.light-theme .app-header .sun-icon { display: none; }
body.light-theme .app-header .moon-icon { display: block; }
body.dark-theme .app-header .sun-icon { display: block; }
body.dark-theme .app-header .moon-icon { display: none; }

/* Responsive break points (min-width mobile-first overrides) */


/* Desktop Header Layout Override (min-width: 993px) */
@media (min-width: 993px) {
  .app-header__container {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 24px;
    text-align: left;
  }

  .app-header__brand {
    justify-content: flex-start;
  }

  .app-header__stats {
    width: auto;
    flex-direction: row;
    justify-content: flex-end;
    gap: 24px;
  }

  .app-header__stat-item {
    align-items: flex-end;
  }

  .app-header__actions {
    width: auto;
    justify-content: flex-end;
    gap: 0;
  }
}
