/**
 * HEADER LIMPO E FUNCIONAL
 * Solução única e simples - SEM conflitos
 * 
 * @package Apathany
 * @version 4.0 CLEAN
 */

/* ═══════════════════════════════════════════════════════════
   OCULTAR BARRA DE ADMIN DO WORDPRESS
   ═══════════════════════════════════════════════════════════ */

#wpadminbar {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

body.admin-bar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

html {
    margin-top: 0 !important;
}

body.admin-bar .modern-header {
    top: 0 !important;
}

/* ═══════════════════════════════════════════════════════════
   RESET - Remover tudo que está causando problemas
   ═══════════════════════════════════════════════════════════ */

/* Remover qualquer overlay/gradiente sobre o logo */
.modern-header-brand::before,
.modern-header-brand::after,
.navbar-brand::before,
.navbar-brand::after {
    display: none !important;
    content: none !important;
}

/* ═══════════════════════════════════════════════════════════
   HEADER - Estilo Limpo e Simples
   ═══════════════════════════════════════════════════════════ */

.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

/* Container */
.modern-header-container {
    max-width: 1600px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* ═══════════════════════════════════════════════════════════
   LOGO - Limpo e Visível
   ═══════════════════════════════════════════════════════════ */

.modern-header-brand {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
    padding: 8px 0;
}

.navbar-brand .inline {
    color: #ffffff;
}

/* Esconder apenas o segundo elemento se houver duplicação */
.navbar-brand > *:nth-child(2) {
    display: none;
}

/* ═══════════════════════════════════════════════════════════
   MENU - Sem Cortar Links
   ═══════════════════════════════════════════════════════════ */

.modern-header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 600px;
}

.modern-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.modern-menu-link {
    display: block;
    padding: 8px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.modern-menu-link:hover {
    color: #ffffff;
    background: rgba(102, 126, 234, 0.15);
}

.modern-menu-item.current-menu-item .modern-menu-link {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   PESQUISA - Simples
   ═══════════════════════════════════════════════════════════ */

.modern-header-search {
    flex: 0 0 auto;
    width: 240px;
}

.modern-search-form {
    position: relative;
}

.modern-search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #ffffff;
    font-size: 14px;
}

.modern-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modern-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.12);
}

.modern-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   AÇÕES DO USUÁRIO - Limpo
   ═══════════════════════════════════════════════════════════ */

.modern-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Botão do usuário */
.modern-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px 0 4px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 22px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modern-user-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

/* Avatar */
.modern-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.modern-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nome do usuário */
.modern-user-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Chevron */
.modern-user-arrow {
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
}

/* Botão hamburger - ESCONDER NO DESKTOP */
.modern-mobile-toggle {
    display: none !important;
}

/* DESKTOP: Esconder botão hamburger */
.mobile-menu-toggle {
    display: none !important;
}

/* MOBILE/TABLET: Mostrar botão hamburger */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
        z-index: 1100 !important;
        width: 44px !important;
        height: 44px !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 10px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(102, 126, 234, 0.2) !important;
        border-color: #667eea !important;
    }
    
    .mobile-menu-toggle .hamburger {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }
    
    .mobile-menu-toggle .hamburger span {
        display: block !important;
        width: 20px !important;
        height: 2px !important;
        background: #ffffff !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Animação quando menu está aberto */
    body.mobile-menu-open .mobile-menu-toggle .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px) !important;
    }
    
    body.mobile-menu-open .mobile-menu-toggle .hamburger span:nth-child(2) {
        opacity: 0 !important;
    }
    
    body.mobile-menu-open .mobile-menu-toggle .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px) !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   DROPDOWN - Simples
   ═══════════════════════════════════════════════════════════ */

.modern-dropdown-container {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: rgba(26, 26, 26, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1001;
}

.modern-user-menu:hover .modern-dropdown-container,
.modern-user-menu.open .modern-dropdown-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modern-user-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
}

.modern-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.modern-user-dropdown a:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #ffffff;
}

/* ═══════════════════════════════════════════════════════════
   ESPAÇADOR
   ═══════════════════════════════════════════════════════════ */

.modern-header-spacer {
    height: 70px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVO - TABLET
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 991px) {
    .modern-header-nav {
        display: none !important;
    }
    
    .modern-header-search {
        width: 180px;
    }
    
    .modern-user-name {
        display: none !important;
    }
    
    .modern-user-btn {
        width: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        justify-content: center !important;
    }
    
    .modern-user-arrow {
        display: none !important;
    }
    
    /* Separar botões no mobile */
    .modern-header-actions {
        gap: 16px !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVO - MOBILE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .modern-header {
        height: 60px !important;
    }
    
    .modern-header-container {
        padding: 0 16px 0 16px !important;
        gap: 12px !important;
    }
    
    .navbar-brand {
        font-size: 18px !important;
    }
    
    .modern-header-search {
        display: none !important;
    }
    
    .modern-header-spacer {
        height: 60px !important;
    }
    
    /* IMPORTANTE: Espaçamento entre elementos */
    .modern-header-actions {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin-left: auto !important;
        padding-right: 0 !important;
    }
    
    /* OCULTAR perfil/avatar no mobile */
    .modern-user-menu {
        display: none !important;
    }
    
    .modern-user-btn {
        display: none !important;
    }
    
    /* Notificações - esconder no mobile */
    .modern-notifications {
        display: none !important;
    }
    
    /* Header actions apenas com espaço para hamburger */
    .modern-header-actions {
        width: auto !important;
        padding: 0 !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   ESCONDER HEADERS ANTIGOS
   ═══════════════════════════════════════════════════════════ */

.app-header:not(.modern-header) {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICAÇÕES
   ═══════════════════════════════════════════════════════════ */

.modern-notifications {
    position: relative;
}

.modern-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.modern-action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #ffffff;
}

.modern-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ff5252;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════════════
   BARRA DE PROGRESSO
   ═══════════════════════════════════════════════════════════ */

.modern-header-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #667eea, #00FF8C);
    transition: width 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════
   AUTH BUTTONS
   ═══════════════════════════════════════════════════════════ */

.modern-auth-menu {
    display: flex;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.modern-auth-link {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.modern-auth-item:first-child .modern-auth-link {
    color: #667eea;
    border: 2px solid #667eea;
}

.modern-auth-item:first-child .modern-auth-link:hover {
    background: #667eea;
    color: white;
}

.modern-auth-item:last-child .modern-auth-link {
    background: linear-gradient(135deg, #667eea, #00FF8C);
    color: white;
    border: none;
}

.modern-auth-item:last-child .modern-auth-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

