/* header.css
   todo lo del header: la barra de arriba con el logo, titulo, subtitulo,
   el boton de "nuevo chat" y el toggle de tema claro/oscuro.
   en pantallas chicas el boton de nuevo chat se achica y queda solo el icono.
   necesita base.css para las variables. */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 10;
  transition: background var(--transition), border-color var(--transition);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.header__icon {
  width: 40px;
  height: 40px;
  color: var(--accent);
  flex-shrink: 0;
}

.header__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.header__subtitle {
  font-size: .78rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* acciones del header (nuevo chat + toggle tema) */
.header__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* boton "nuevo chat" */
.new-chat-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: .4rem .85rem .4rem .6rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.new-chat-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-bg);
}
.new-chat-btn svg {
  width: 18px;
  height: 18px;
}
/* en movil: solo el icono, sin texto */
@media (max-width: 480px) {
  .new-chat-btn span { display: none; }
  .new-chat-btn {
    padding: .4rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

/* toggle tema oscuro / claro */
.theme-toggle {
  background: none;
  border: 2px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: rotate(15deg);
}
.theme-toggle svg {
  width: 20px;
  height: 20px;
}
/* mostrar solo el icono que va segun el tema */
.theme-toggle__moon   { display: none; }
[data-theme="dark"] .theme-toggle__sun  { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: block; }
