/**
 * Mobile Menu Styles
 * يتم تضمين هذا الملف في جميع الصفحات للحصول على تصميم موحد للقائمة المنسدلة
 */

/* Desktop: ensure nav is always visible as flex row */
.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none;
    background: linear-gradient(135deg, var(--primary, #0f766e) 0%, var(--primary-2, #14b8a6) 100%);
    color: #fff;
    border: none;
    padding: 11px 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 20px;
    transition: all .25s ease;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(15, 118, 110, .2);
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(15, 118, 110, .3);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.menu-toggle i {
    display: block;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, .65);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity .3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Close Button in Menu */
.menu-close {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--danger, #dc2626) 0%, #ef4444 100%);
    color: #fff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all .25s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, .3);
    z-index: 1;
}

.menu-close:hover {
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(220, 38, 38, .4);
}

.menu-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Mobile Responsive - Show menu toggle on mobile */
@media (max-width: 1100px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .menu-close {
        display: flex;
    }

    /* Mobile Navigation Drawer */
    .top-actions {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .98));
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 80px 20px 20px;
        gap: 10px;
        z-index: 1000;
        box-shadow: -10px 0 50px rgba(15, 23, 42, .2);
        transition: right .35s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .top-actions.active {
        right: 0;
    }

    /* Smooth scrollbar for menu */
    .top-actions::-webkit-scrollbar {
        width: 6px;
    }

    .top-actions::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, .05);
        border-radius: 10px;
    }

    .top-actions::-webkit-scrollbar-thumb {
        background: rgba(15, 118, 110, .3);
        border-radius: 10px;
    }

    .top-actions::-webkit-scrollbar-thumb:hover {
        background: rgba(15, 118, 110, .5);
    }

    /* Menu Items Styling */
    .top-actions .btn {
        width: 100%;
        justify-content: flex-start;
        padding: 15px 20px;
        font-size: 15px;
        border-radius: 12px;
        transition: all .2s ease;
        text-align: right;
    }

    .top-actions .btn i {
        font-size: 18px;
        width: 24px;
        text-align: center;
    }

    .top-actions .btn:hover {
        transform: translateX(-4px);
    }

    /* Add animation to menu items */
    .top-actions.active .btn {
        animation: slideInRight .3s ease forwards;
        opacity: 0;
    }

    .top-actions.active .btn:nth-child(1) { animation-delay: .05s; }
    .top-actions.active .btn:nth-child(2) { animation-delay: .1s; }
    .top-actions.active .btn:nth-child(3) { animation-delay: .15s; }
    .top-actions.active .btn:nth-child(4) { animation-delay: .2s; }
    .top-actions.active .btn:nth-child(5) { animation-delay: .25s; }
    .top-actions.active .btn:nth-child(6) { animation-delay: .3s; }
    .top-actions.active .btn:nth-child(7) { animation-delay: .35s; }
    .top-actions.active .btn:nth-child(8) { animation-delay: .4s; }

    @keyframes slideInRight {
        from {
            opacity: 0;
            transform: translateX(30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

@media (max-width: 600px) {
    .menu-toggle {
        padding: 10px 13px;
        font-size: 18px;
    }

    .menu-close {
        width: 38px;
        height: 38px;
        font-size: 18px;
        top: 16px;
        right: 16px;
    }

    .top-actions {
        width: 280px;
        padding: 70px 16px 16px;
    }

    .top-actions .btn {
        padding: 13px 18px;
        font-size: 14px;
    }

    .top-actions .btn i {
        font-size: 16px;
        width: 22px;
    }
}
