/* ═══════════════════════════════════════════════════════════
   header-shared.css
   Estilo único do header usado em TODAS as páginas internas
   (login, cadastro, confirmaemail, codigo, redefinirsenha,
   guia-de-postura, guia-de-vocabulario).

   Estrutura sempre igual: duas seções dentro de .top-header-container
     1) .top-header-logo        → logo + nome (sempre no mesmo lugar)
     2) .header-actions         → botões específicos da página

   .header-actions substitui o antigo .back-button-container
   (mantido como alias abaixo por compatibilidade).
   ═══════════════════════════════════════════════════════════ */

.top-header {
    background: linear-gradient(270deg, #6a3ea7, #4B2E83, #6640d1);
    background-size: 400% 400%;
    animation: headerGlow 8s ease infinite;
    color: white;
    padding: 1rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@keyframes headerGlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.top-header-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ── Logo (sempre idêntico em todas as páginas) ── */
.top-header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.top-header-logo .logo-icon {
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-header-logo .logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.top-header-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

/* ── Ações específicas de cada página ──
   Todos os botões dentro desta área usam o MESMO gap entre si,
   independentemente de quantos forem (1, 2 ou 3 botões). */
.header-actions,
.back-button-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
}

/* Os botões (voltar, histórico, login, cadastro, etc.) ocupam
   somente o espaço necessário ao próprio conteúdo — nunca esticam. */
.header-actions > *,
.back-button-container > * {
    flex: 0 0 auto;
}

/* ── Responsivo ── */
@media (max-width: 640px) {
    .header-actions,
    .back-button-container {
        gap: 0.5rem;
    }
}
