/* ===== نظام التنبيهات ===== */

/* حاوية التنبيهات */
.alerts-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    pointer-events: none;
}

/* بطاقة التنبيه */
.alert {
    background: var(--card-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    pointer-events: all;
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s ease;
}

.alert:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* أنواع التنبيهات */
.alert.success {
    border-left-color: var(--success-color);
}

.alert.error {
    border-left-color: var(--error-color);
}

.alert.warning {
    border-left-color: var(--warning-color);
}

.alert.info {
    border-left-color: var(--info-color);
}

/* أيقونة التنبيه */
.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert.success .alert-icon {
    color: var(--success-color);
}

.alert.error .alert-icon {
    color: var(--error-color);
}

.alert.warning .alert-icon {
    color: var(--warning-color);
}

.alert.info .alert-icon {
    color: var(--info-color);
}

/* محتوى التنبيه */
.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.alert-message {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* زر الإغلاق */
.alert-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* شريط التقدم */
.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    border-radius: 0 0 0 12px;
    animation: progress 5s linear;
    opacity: 0.3;
}

.alert.success .alert-progress {
    color: var(--success-color);
}

.alert.error .alert-progress {
    color: var(--error-color);
}

.alert.warning .alert-progress {
    color: var(--warning-color);
}

.alert.info .alert-progress {
    color: var(--info-color);
}

/* الوضع الداكن */
.dark-mode .alert {
    background: rgba(30, 41, 59, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dark-mode .alert-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* الأنيميشن */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.alert.removing {
    animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* للجوال */
@media (max-width: 768px) {
    .alerts-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .alert {
        min-width: auto;
    }
}