/**
 * Estilos para o componente User Header (uh)
 * Usando classes totalmente independentes que funcionam em qualquer contexto
 */

/* Container principal do header */
.uh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #ffffff;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Lado esquerdo (título) */
.uh-header-left {
    display: flex;
    align-items: center;
    width: auto;
    flex: 0 0 auto;
}

/* Título da página */
.uh-header-title {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: #ffffff;
    font-family: 'Baloo Bhai', sans-serif !important;
}

/* Lado direito (controles) */
.uh-header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: auto;
    max-width: 100%;
}

/* Barra de pesquisa */
.uh-search-container {
    position: relative;
    width: 250px;
}

/* Input de pesquisa */
.uh-search-input {
    background-color: var(--background-300);
    border: none !important;
    border-radius: 10px !important;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    padding: 10px 15px 10px 40px !important;
    width: 100%;
}

.uh-search-input::placeholder {
    color: #999;
    opacity: 0.8;
}

.uh-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    background-color: #fff;
}

.uh-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
    pointer-events: none;
}

/* Notificações */
.uh-notification-container {
    position: relative;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uh-notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #f44336;
    color: white;
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
}

.uh-notification-icon {
    font-size: 20px;
    color: #555;
}

/* Dropdown de notificações */
.uh-notifications-dropdown {
    position: absolute;
    top: 45px;
    right: -70px;
    width: 350px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: none;
    overflow: hidden;
    z-index: 1001;
}

.uh-notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.uh-notifications-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.uh-mark-all-read {
    font-size: 12px;
    color: #2980b9;
    text-decoration: none;
    cursor: pointer;
}

.uh-mark-all-read:hover {
    text-decoration: underline;
}

.uh-notifications-body {
    max-height: 350px;
    overflow-y: auto;
}

.uh-notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    transition: background-color 0.2s ease;
}

.uh-notification-item:last-child {
    border-bottom: none;
}

.uh-notification-item:hover {
    background-color: #f9f9f9;
}

.uh-notification-item.read {
    opacity: 0.7;
}

.uh-notification-content {
    font-size: 13px;
    color: #555;
    margin-bottom: 4px;
    line-height: 1.4;
}

.uh-notification-time {
    font-size: 11px;
    color: #888;
}

.uh-no-notifications {
    padding: 30px 15px;
    text-align: center;
    color: #666;
}

.uh-notifications-footer {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #eee;
}

.uh-all-notifications {
    color: #2980b9;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.uh-all-notifications i {
    font-size: 10px;
    margin-left: 3px;
}

.uh-all-notifications:hover {
    text-decoration: underline;
}

/* Perfil do Usuário */
.uh-profile-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.uh-avatar-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.uh-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uh-dropdown-arrow {
    font-size: 14px;
    color: #777;
    transition: transform 0.3s ease;
}

.uh-profile-container:hover .uh-dropdown-arrow {
    transform: rotate(180deg);
    color: #333;
}

/* Dropdown do Usuário */
.uh-dropdown-container {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    overflow: hidden;
}

/* Dropdown visível quando clicado */
.uh-dropdown-container.visible {
    opacity: 1;
    visibility: visible;
    top: 45px;
}

.uh-dropdown-container:before {
    content: '';
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    border-top: 1px solid #e5e5e5;
    border-left: 1px solid #e5e5e5;
}

.uh-dropdown-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.uh-dropdown-item {
    border-bottom: 1px solid #f5f5f5;
}

.uh-dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #555;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.uh-dropdown-link:hover {
    background-color: #f8f8f8;
    color: #333;
}

.uh-dropdown-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #666;
}

/* Efeito de scroll */
.uh-header.scrolled {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: rgba(255,255,255,0.98);
    transition: all 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
    .uh-header {
        padding: 10px 20px;
    }
    
    .uh-search-container {
        width: 180px;
    }
    
    .uh-header-title {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .uh-search-container {
        width: 150px;
    }
    
    .uh-dropdown-container {
        width: 180px;
        right: -70px;
    }
    
    .uh-dropdown-container:before {
        right: 80px;
    }
}
