/* ============================================
   Notification Styles - إشعارات احترافية
   ============================================ */

   .custom-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.custom-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* أنواع الإشعارات */
.custom-notification.success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.custom-notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.custom-notification.info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.custom-notification.warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

/* محتوى الإشعار */
.notification-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: iconPop 0.3s ease;
}

@keyframes iconPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.notification-message {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* شريط تقدم الإخفاء التلقائي */
.custom-notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from { width: 100%; }
    to { width: 0%; }
}

/* Spinner للتحميل */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-inline-end: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* تأثير للزر أثناء التحميل */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .custom-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
        top: 10px;
    }
    
    .notification-content {
        padding: 14px 16px;
    }
    
    .notification-message {
        font-size: 14px;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .notification-icon {
        font-size: 20px;
    }
    
    .notification-close {
        width: 26px;
        height: 26px;
        font-size: 20px;
    }
}

/* تأثير عند إغلاق الإشعار */
.custom-notification.hide {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
}

/* في حالة RTL للعربية */
html[dir="rtl"] .custom-notification {
    right: auto;
    left: 20px;
}

html[dir="rtl"] .spinner {
    margin-inline-end: 0;
    margin-inline-start: 8px;
}

@media (max-width: 768px) {
    html[dir="rtl"] .custom-notification {
        left: 10px;
        right: 10px;
    }
}