/* /lib/css/header.css */

/* ==========================================================================
   1. ESTRUTURA PRINCIPAL DO HEADER
   ========================================================================== */
.main-navbar, .main-navbar * {
    box-sizing: border-box;
}

.main-navbar {
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #ff5000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    font-family: 'Verdana', sans-serif;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* --- MARCA / LOGO --- */
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-icon { 
    width: 40px; height: 40px; 
    background: linear-gradient(135deg, #ff5000, #993300);
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { color: #fff; font-weight: 800; font-size: 18px; line-height: 1; }
.brand-subtitle { color: #ff5000; font-size: 10px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; }

/* --- BARRA DE PESQUISA --- */
.nav-search { flex-grow: 1; max-width: 600px; position: relative; }
.nav-search input {
    width: 100%; background: #1a1a1a; border: 1px solid #333;
    border-radius: 50px; padding: 10px 20px 10px 45px;
    color: #fff; font-family: 'Verdana', sans-serif; font-size: 14px;
    outline: none; transition: 0.3s;
}
.nav-search input:focus {
    border-color: #ff5000; background: #222; box-shadow: 0 0 10px rgba(255, 80, 0, 0.2);
}
.search-icon {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #666;
}

/* --- ÁREA DO PERFIL --- */
.nav-profile { display: flex; align-items: center; gap: 15px; }
.profile-info { text-align: right; display: none; }
@media (min-width: 768px) { .profile-info { display: block; } }

.profile-name { display: block; color: #ff5000; font-weight: bold; font-size: 14px; }
.profile-status { display: block; color: #666; font-size: 11px; }
.profile-avatar { 
    width: 42px; height: 42px; border-radius: 30%; 
    border: 2px solid #ff5000; object-fit: cover;
    cursor: pointer;
}

.btn-login-nav {
    background: #171a21; color: white; padding: 8px 20px; border-radius: 4px;
    text-decoration: none; font-weight: bold; font-size: 13px; display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.btn-login-nav:hover { background: #2a475e; }


/* ==========================================================================
   2. DROPDOWNS E INTERAÇÃO (Lógica Visual)
   ========================================================================== */

/* Wrappers clicáveis (Sino e Usuário) */
.icon-wrapper, .user-wrapper {
    position: relative; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    z-index: 1001; /* Fica acima de overlays */
    -webkit-tap-highlight-color: transparent; /* Remove highlight no mobile */
}
.icon-wrapper i { font-size: 20px; color: #ccc; transition: 0.2s; }
.icon-wrapper:hover i { color: #fff; }

.badge-count {
    position: absolute; top: -5px; right: -5px;
    background: #ff0000; color: white; font-size: 10px;
    padding: 2px 5px; border-radius: 50%; font-weight: bold;
}

/* Container Base do Menu Suspenso */
.custom-dropdown {
    position: absolute; 
    top: 60px; /* Distância do topo */
    right: 0;
    background: #1a1a1a; 
    border: 1px solid #333; 
    border-top: 3px solid #ff5000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    
    /* Estado Inicial: Escondido */
    display: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    
    z-index: 2000; 
    border-radius: 0 0 8px 8px;
}

/* Estado VISÍVEL (Ativado via JS) */
.custom-dropdown.show { 
    display: block !important; 
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Larguras Específicas */
.notif-dd { width: 360px; padding: 0; background: #242526; border: 1px solid #3e4042; } /* Estilo Facebook */
.user-dd { width: 220px; }


/* ==========================================================================
   3. ESTILO DAS NOTIFICAÇÕES (Facebook Style)
   ========================================================================== */

/* Itens Genéricos (Menu Usuário) */
.dd-header {
    padding: 12px 16px; border-bottom: 1px solid #3e4042;
    font-weight: bold; color: #e4e6eb; font-size: 14px; letter-spacing: 1px;
}
.dd-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 15px; color: #ddd; text-decoration: none;
    font-size: 13px; transition: background 0.2s;
}
.dd-item:hover { background: #252525; color: #fff; }
.dd-divider { height: 1px; background: #333; margin: 5px 0; }
.dd-empty { padding: 30px; text-align: center; color: #b0b3b8; font-style: italic; font-size: 13px; }
.dd-loading { padding: 20px; text-align: center; color: #888; font-style: italic; }

.text-red { color: #ff5555; }
.text-red:hover { color: #ff8888; }

/* Item de Notificação Individual */
.notif-item {
    display: flex; gap: 12px; padding: 12px;
    position: relative; cursor: pointer; transition: 0.2s;
    border-bottom: 1px solid #2f3031;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background-color: #3a3b3c; }
.notif-item.unread { background-color: #252f3d; } /* Azul bem escuro para não lidas */

/* Avatar da Notificação + Ícone de Tipo */
.notif-avatar-area { position: relative; align-self: flex-start; }
.notif-avatar { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.notif-type-icon {
    position: absolute; bottom: -2px; right: -5px;
    width: 22px; height: 22px; border-radius: 50%;
    background: #ff5000; color: white; display: flex; align-items: center; justify-content: center;
    font-size: 11px; border: 2px solid #242526;
}

/* Texto da Notificação */
.notif-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; justify-content: center; }
.notif-text { font-size: 13px; color: #e4e6eb; line-height: 1.35; }
.notif-text strong { font-weight: 600; color: #fff; }
.notif-preview { 
    font-size: 12px; color: #b0b3b8; margin-top: 3px; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
}
.notif-date { font-size: 11px; color: #ff5000; font-weight: 500; margin-top: 4px; }

/* Ações (Bolinha azul e Menu 3 pontos) */
.notif-actions { 
    display: flex; flex-direction: column; align-items: center; 
    justify-content: center; gap: 10px; min-width: 30px; 
}

.blue-dot {
    width: 10px; height: 10px; background-color: #2e89ff; border-radius: 50%;
}

/* Botão 3 Pontos */
.notif-menu-trigger {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #b0b3b8; transition: 0.2s; opacity: 0; /* Esconde até passar o mouse */
    background: #3a3b3c; border: 1px solid #444;
}
.notif-item:hover .notif-menu-trigger { opacity: 1; } /* Mostra ao passar mouse na notif */
.notif-menu-trigger:hover { background-color: #4e4f50; color: white; }

/* Sub-Menu da Notificação (Popup) */
.notif-options-menu {
    position: absolute; right: 10px; top: 45px;
    background: #242526; border: 1px solid #3e4042;
    border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    width: 220px; z-index: 3000; display: none;
}
.notif-options-menu.show { display: block !important; }

.n-opt {
    padding: 12px 15px; font-size: 13px; color: #e4e6eb; 
    display: flex; align-items: center; gap: 12px; cursor: pointer;
}
.n-opt:hover { background-color: #3a3b3c; }
.n-opt i { width: 16px; text-align: center; }