/* 
==============================================
    Enhanced Modals & Notifications Styles
    نظام إدارة الجامعة - تحسين النوافذ والإشعارات
==============================================
*/

/* ===== متغيرات النوافذ المنبثقة ===== */
:root {
    /* ألوان النوافذ */
    --modal-overlay-bg: rgba(0, 0, 0, 0.6);
    --modal-bg: #ffffff;
    --modal-header-bg: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --modal-border-color: #e9ecef;
    
    /* ظلال النوافذ */
    --modal-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    --modal-shadow-lg: 0 35px 60px rgba(0, 0, 0, 0.4);
    
    /* ألوان الإشعارات */
    --notification-success: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --notification-error: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --notification-warning: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    --notification-info: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ===== خلفية النافذة المنبثقة ===== */
.modal-overlay-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay-enhanced.show {
    opacity: 1;
    visibility: visible;
}

/* ===== النافذة المنبثقة المحسنة ===== */
.modal-enhanced {
    background: var(--modal-bg);
    border-radius: 20px;
    box-shadow: var(--modal-shadow);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--modal-border-color);
    position: relative;
}

.modal-overlay-enhanced.show .modal-enhanced {
    transform: scale(1) translateY(0);
}

/* ===== رأس النافذة ===== */
.modal-header-enhanced {
    background: var(--modal-header-bg);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

.modal-title-enhanced {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.modal-title-enhanced i {
    font-size: 1.1rem;
    opacity: 0.9;
}

.modal-close-enhanced {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

.modal-close-enhanced:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* ===== محتوى النافذة ===== */
.modal-body-enhanced {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
}

.modal-body-enhanced::-webkit-scrollbar {
    width: 6px;
}

.modal-body-enhanced::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body-enhanced::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

.modal-body-enhanced::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* ===== تذييل النافذة ===== */
.modal-footer-enhanced {
    padding: 1.5rem 2rem;
    background: rgba(102, 126, 234, 0.05);
    border-top: 1px solid var(--modal-border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== أحجام النوافذ ===== */
.modal-enhanced.modal-sm {
    width: 400px;
}

.modal-enhanced.modal-md {
    width: 600px;
}

.modal-enhanced.modal-lg {
    width: 800px;
}

.modal-enhanced.modal-xl {
    width: 1000px;
}

/* ===== نوافذ ملء الشاشة ===== */
.modal-enhanced.modal-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
}

/* ===== الإشعارات المحسنة ===== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification-enhanced {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--modal-border-color);
    position: relative;
}

.notification-enhanced.show {
    transform: translateX(0);
}

.notification-enhanced.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--notification-info);
}

.notification-enhanced.success::before {
    background: var(--notification-success);
}

.notification-enhanced.error::before {
    background: var(--notification-error);
}

.notification-enhanced.warning::before {
    background: var(--notification-warning);
}

.notification-content {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
    background: var(--notification-info);
}

.notification-enhanced.success .notification-icon {
    background: var(--notification-success);
}

.notification-enhanced.error .notification-icon {
    background: var(--notification-error);
}

.notification-enhanced.warning .notification-icon {
    background: var(--notification-warning);
}

.notification-text {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-message {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: #6c757d;
}

/* ===== شريط التقدم للإشعارات ===== */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(102, 126, 234, 0.3);
    transition: width linear;
}

.notification-enhanced.success .notification-progress {
    background: rgba(67, 233, 123, 0.3);
}

.notification-enhanced.error .notification-progress {
    background: rgba(250, 112, 154, 0.3);
}

.notification-enhanced.warning .notification-progress {
    background: rgba(255, 236, 210, 0.5);
}

/* ===== تأثيرات الحركة ===== */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes notificationSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== الاستجابة للأجهزة المحمولة ===== */
@media (max-width: 768px) {
    .modal-enhanced {
        width: 95vw !important;
        margin: 0 auto;
        border-radius: 15px;
    }
    
    .modal-header-enhanced,
    .modal-body-enhanced,
    .modal-footer-enhanced {
        padding: 1.5rem;
    }
    
    .modal-footer-enhanced {
        flex-direction: column;
    }
    
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification-enhanced {
        border-radius: 12px;
    }
    
    .notification-content {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .modal-enhanced.modal-fullscreen {
        border-radius: 0;
    }
    
    .modal-header-enhanced {
        padding: 1rem 1.5rem;
    }
    
    .modal-title-enhanced {
        font-size: 1.1rem;
    }
    
    .notification-content {
        padding: 1rem;
        gap: 10px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
