/* Profile Dropdown Menu Custom Styles */
/* هذا الملف خاص بقائمة البروفايل فقط في الـ navbar */

/* Ensure header and navbar allow overflow */
.profile-header {
    overflow: visible !important;
}

.profile-navbar {
    overflow: visible !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    min-height: auto !important;
}

/* Navbar brand adjustments */
.profile-navbar .navbar-brand {
    font-size: 1.25rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    line-height: 1.2 !important;
}

/* Nav links adjustments */
.profile-navbar .nav-link:not(.profile-dropdown-toggle) {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
}

/* Container fluid adjustments */
.profile-navbar .container-fluid {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
}

.profile-navbar .navbar-collapse {
    overflow: visible !important;
}

.profile-navbar .navbar-nav {
    overflow: visible !important;
}

/* Profile dropdown container - position relative for dropdown positioning */
/* استخدام كلاس محدد جداً لتجنب التعارض مع attendance dropdown */
.profile-navbar .navbar-nav .profile-dropdown {
    position: relative !important;
}

/* Profile dropdown toggle button */
.profile-navbar .navbar-nav .profile-dropdown-toggle {
    cursor: pointer;
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    font-size: 0.95rem !important;
    line-height: 1.2 !important;
}

/* Profile dropdown menu - ensure it floats above navbar */
/* استخدام كلاس محدد جداً لتجنب التعارض مع attendance dropdown */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 9999 !important;
    margin-top: 0.5rem !important;
    min-width: 200px !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    direction: rtl !important;
    text-align: right !important;
}

/* Dropdown items styling */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-item {
    text-align: right !important;
    direction: rtl !important;
    padding: 0.5rem 1rem !important;
}

.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa !important;
}

/* Dropdown divider */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-divider {
    margin: 0.5rem 0 !important;
}

/* Ensure dropdown appears on show */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu.show {
    display: block !important;
}

/* Icon spacing for RTL */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-item i {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* Logout button styling */
.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-item.text-danger {
    color: #dc3545 !important;
}

.profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu .dropdown-item.text-danger:hover {
    background-color: #f8d7da !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .profile-navbar .navbar-nav .profile-dropdown .profile-dropdown-menu {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
    }
}
