/* --- Profile Icon Button --- */
.profile-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px; /* Increase icon size */
    color: #ffffff;
    background-color: #007bff; /* Bootstrap primary blue */
    border-radius: 50%;
    width: 42px;
    height: 42px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}


.profile-icon-btn:hover {
    background-color: #007bff;
    transform: scale(1.1);
    color: #ffffff;
}

/* --- Profile Pop-up Card --- */
.profile-popup {
    display: none;
    position: absolute;
    top: 60px;
    right: 10px;
    width: 280px;
    max-width: 90vw;
    background-color: #060606;
    color: #e4dbdb;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    padding: 0;
    border: 1px solid #e9ecef;
    overflow: hidden;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Class to show the pop-up */
.profile-popup.show {
    display: block;
}

/* Profile Header Section */
.profile-popup-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.profile-popup-avatar {
    font-size: 48px;
    color: #edf1f4;
    margin-bottom: 8px;
    background-color: #090909;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-popup-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #f9fcff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.profile-popup-email {
    font-size: 0.875rem;
    color: #f6f8fa;
    line-height: 1.3;
}

/* View Profile Button */
.profile-popup-view-btn {
    display: block;
    width: calc(100% - 40px);
    margin: 16px 20px;
    text-align: center;
    background-color: #007bff;
    color: #ffffff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.profile-popup-view-btn:hover {
    background-color: #0056b3;
    color: #ffffff;
    text-decoration: none;
}

/* Divider */
.profile-popup-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0;
}

/* Menu Section */
.profile-popup-menu {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.profile-popup-menu li {
    margin: 0;
}

.profile-popup-menu li a,
.profile-popup-menu li button {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: #495057;
    padding: 12px 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
    cursor: pointer;
    font-family: inherit;
}

.profile-popup-menu li a:hover,
.profile-popup-menu li button:hover {
    background-color: #f8f9fa;
    color: #212529;
    text-decoration: none;
}

/* Add icons spacing if you're using icons */
.profile-popup-menu li a i,
.profile-popup-menu li button i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
}

/* Logout button styling */
.profile-popup-menu li:last-child a,
.profile-popup-menu li:last-child button {
    color: #dc3545;
    border-top: 1px solid #e9ecef;
    margin-top: 4px;
    padding-top: 16px;
}

.profile-popup-menu li:last-child a:hover,
.profile-popup-menu li:last-child button:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Design */
@media (max-width: 480px) {
    .profile-popup {
        right: 5px;
        width: calc(100vw - 20px);
        max-width: 320px;
    }
    
    .profile-popup-header {
        padding: 20px 16px 16px;
    }
    
    .profile-popup-avatar {
        font-size: 40px;
        width: 56px;
        height: 56px;
    }
    
    .profile-popup-name {
        font-size: 1rem;
    }
    
    .profile-popup-email {
        font-size: 0.8rem;
    }
    
    .profile-popup-view-btn {
        width: calc(100% - 32px);
        margin: 12px 16px;
        padding: 8px 12px;
    }
    
    .profile-popup-menu li a,
    .profile-popup-menu li button {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .profile-popup {
        background-color: #2d3748;
        color: #e2e8f0;
        border-color: #4a5568;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .profile-popup-header {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-bottom-color: #4a5568;
    }
    
    .profile-popup-avatar {
        background-color: #4a5568;
        color: #e2e8f0;
    }
    
    .profile-popup-name {
        color: #f7fafc;
    }
    
    .profile-popup-email {
        color: #a0aec0;
    }
    
    .profile-popup-divider {
        background-color: #4a5568;
    }
    
    .profile-popup-menu li a,
    .profile-popup-menu li button {
        color: #e2e8f0;
    }
    
    .profile-popup-menu li a:hover,
    .profile-popup-menu li button:hover {
        background-color: #4a5568;
        color: #f7fafc;
    }
}
