/* Custom styles for Research Management System */

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Cairo', sans-serif;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        direction: rtl;
        font-family: "Cairo", sans-serif;
    }
    
    table {
        width: 100%;
        border-collapse: collapse;
    }
    
    th, td {
        border: 1px solid #ddd;
        padding: 6px;
    }
}

/* Custom scrollbar for RTL */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #5A2A82;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d1b5c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    main {
        margin-right: 0 !important;
    }
}

/* Sidebar mobile adjustments */
@media (max-width: 768px) {
    #sidebar {
        top: 64px; /* Header height */
        height: calc(100vh - 64px);
    }
}

/* Form styling */
input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
textarea,
select {
    direction: rtl;
}

/* Table responsive wrapper */
.overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* Ensure sidebar doesn't overlap content on mobile */
@media (max-width: 768px) {
    .flex {
        flex-direction: column;
    }
    
    main {
        width: 100%;
        padding: 1rem;
    }
}

/* Print styles enhancement */
@media print {
    @page {
        margin: 1cm;
        size: A4;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    table {
        page-break-inside: auto;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

