/* أنماط الرسائل المؤقتة */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-left: 4px solid;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

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

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

/* أنواع الرسائل */
.notification.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
}

.notification.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fef2f2 100%);
}

.notification.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.notification.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

/* محتوى الرسالة */
.notification-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.notification-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

.notification.success .notification-text {
    color: #065f46;
}

.notification.error .notification-text {
    color: #991b1b;
}

.notification.warning .notification-text {
    color: #92400e;
}

.notification.info .notification-text {
    color: #1e40af;
}

/* زر الإغلاق */
.notification-close {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #374151;
}

/* أيقونات الرسائل */
.notification-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.notification.success .notification-icon {
    color: #10b981;
}

.notification.error .notification-icon {
    color: #ef4444;
}

.notification.warning .notification-icon {
    color: #f59e0b;
}

.notification.info .notification-icon {
    color: #3b82f6;
}

/* شريط التقدم */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    overflow: hidden;
}

.notification-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    animation: progress-shrink 5s linear forwards;
}

@keyframes progress-shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* تأثيرات إضافية */
.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.notification:hover::before {
    transform: translateX(100%);
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 640px) {
    .notification-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 0.25rem;
        padding: 0.75rem;
    }
}

/* تأثيرات الوضع المظلم */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .notification.success {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    }
    
    .notification.error {
        background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    }
    
    .notification.warning {
        background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
    }
    
    .notification.info {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    }
}
