/* Enhanced header styling for E-Habou */

/* Base header styles */
.dashboard-header {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.navbar {
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.navbar-brand {
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-height: 45px;
    transition: all 0.3s ease;
}

/* Improved search bar */
.top-search-bar {
    position: relative;
    margin-right: 10px;
}

.search-bar {
    border-radius: 25px;
    padding: 0.6rem 2.5rem 0.6rem 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #e6e6e6;
    background-color: #f8f9fa;
    width: 240px;
    font-size: 14px;
    color: #495057;
}

.search-bar:focus {
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.2);
    border-color: #80bdff;
    background-color: #fff;
    outline: none;
}

.search-submit-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-submit-btn:hover .search-icon {
    color: #3d4ef7;
}

.search-icon {
    color: #5969ff;
    transition: all 0.2s ease;
}

/* Notification styles */
.notification .nav-link {
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}

.notification .nav-link:hover {
    background-color: rgba(89, 105, 255, 0.1);
}

.notification .indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff407b;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    line-height: 18px;
    box-shadow: 0 2px 5px rgba(255, 64, 123, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 64, 123, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 64, 123, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 64, 123, 0);
    }
}

.notification-dropdown {
    min-width: 320px;
    max-height: 450px;
    overflow-y: auto;
    padding: 0;
    margin-top: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
}

.notification-title {
    padding: 15px;
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 1px solid #eef0f9;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.list-group-item {
    border-left: none;
    border-right: none;
    padding: 12px 15px;
    transition: all 0.2s ease;
}

.list-group-item:hover {
    background-color: rgba(89, 105, 255, 0.05);
}

.list-group-item.active {
    background-color: rgba(89, 105, 255, 0.08);
    border-color: #e9ecef;
    color: inherit;
}

.notification-info {
    display: flex;
    align-items: flex-start;
}

.notification-list-user-img {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 15px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.notification-list-user-block {
    flex-grow: 1;
}

.notification-list-user-name {
    font-weight: 600;
    color: #3d4ef7;
    display: inline-block;
    margin-right: 5px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border-radius: 50%;
    vertical-align: middle;
}

.list-footer {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #eef0f9;
    background-color: #f8f9fa;
}

.list-footer a {
    color: #5969ff;
    font-weight: 500;
    transition: all 0.2s ease;
}

.list-footer a:hover {
    color: #3d4ef7;
    text-decoration: none;
}

/* Connection dropdown */
.connection .nav-link {
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.connection .nav-link:hover {
    background-color: rgba(89, 105, 255, 0.1);
}

.connection-dropdown {
    min-width: 300px;
    padding: 0;
    margin-top: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
}

.connection-list {
    padding: 15px;
}

.connection-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
}

.connection-item:hover {
    background-color: rgba(89, 105, 255, 0.08);
    text-decoration: none;
}

.connection-item img {
    width: 35px;
    height: 35px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.connection-item:hover img {
    transform: scale(1.1);
}

.connection-item span {
    color: #495057;
    font-size: 13px;
    font-weight: 500;
}

.conntection-footer {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #eef0f9;
    background-color: #f8f9fa;
}

.conntection-footer a {
    color: #5969ff;
    font-weight: 500;
    transition: all 0.2s ease;
}

.conntection-footer a:hover {
    color: #3d4ef7;
    text-decoration: none;
}

/* User dropdown */
.nav-user .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.nav-user .nav-link:hover {
    background-color: rgba(89, 105, 255, 0.1);
    border-radius: 50%;
}

.user-avatar-md {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.nav-user-dropdown {
    padding: 0;
    min-width: 250px;
    margin-top: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.nav-user-info {
    background: linear-gradient(to right, #5969ff, #3d4ef7);
    line-height: 1.4;
    padding: 18px 15px;
    color: #fff;
}

.nav-user-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4bea0b;
    box-shadow: 0 0 0 2px #fff;
    vertical-align: middle;
}

.dropdown-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.dropdown-item i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dropdown-item:active, 
.dropdown-item:focus, 
.dropdown-item:hover {
    background-color: rgba(89, 105, 255, 0.05);
    color: #5969ff;
}

.dropdown-item.text-danger:hover {
    background-color: rgba(255, 64, 123, 0.05);
    color: #ff407b;
}

.dropdown-divider {
    margin: 0;
}

/* Responsive improvements */
@media (max-width: 992px) {
    .navbar-collapse {
        background: #fff;
        padding: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        z-index: 1000;
        border-radius: 0 0 8px 8px;
    }
    
    .navbar-nav {
        padding-top: 10px;
    }
    
    .nav-item {
        margin-bottom: 5px;
    }
    
    .search-bar {
        width: 100%;
        max-width: none;
    }
    
    .nav-user-dropdown {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
    }
    
    .notification-dropdown,
    .connection-dropdown {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        max-height: 300px;
    }
}

/* Animation for navbar elements */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav > li {
    animation: fadeIn 0.4s ease forwards;
}

.navbar-nav > li:nth-child(1) { animation-delay: 0.1s; }
.navbar-nav > li:nth-child(2) { animation-delay: 0.2s; }
.navbar-nav > li:nth-child(3) { animation-delay: 0.3s; }
.navbar-nav > li:nth-child(4) { animation-delay: 0.4s; }

/* Sticky header effect */
.navbar.sticky {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.navbar.sticky .navbar-brand img {
    max-height: 40px;
}
