/**
 * نظام الإشعارات الموحد - امجاد الفلاح
 * يدعم 3 أنماط: pill (سريع), stack (تفصيلي), bar (عاجل)
 */

/* ===== Container ===== */
.notify-container {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
}

.notify-container.top-right {
    top: 20px;
    right: 20px;
}

.notify-container.bottom-center {
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.notify-container.top-full {
    top: 0;
    left: 0;
    right: 0;
}

/* ===== نمط 1: Pill (للرسائل القصيرة) ===== */
.notify-pill {
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.notify-pill.show {
    transform: translateY(0);
    opacity: 1;
}

.notify-pill i { font-size: 16px; }
.notify-pill.success { background: #222222; }
.notify-pill.error { background: #ef4444; }
.notify-pill.warning { background: #f59e0b; }
.notify-pill.info { background: #3b82f6; }

/* ===== نمط 2: Stack (للرسائل التفصيلية) ===== */
.notify-stack {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 25px rgba(0,0,0,0.12);
    max-width: 380px;
    width: 100%;
    border-right: 4px solid;
    margin-bottom: 10px;
}

.notify-stack.show { transform: translateX(0); }
.notify-stack.success { border-color: #222222; }
.notify-stack.error { border-color: #ef4444; }
.notify-stack.warning { border-color: #f59e0b; }
.notify-stack.info { border-color: #3b82f6; }

.notify-stack .notify-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.notify-stack.success .notify-icon { background: #eeeeee; color: #222222; }
.notify-stack.error .notify-icon { background: #fef2f2; color: #ef4444; }
.notify-stack.warning .notify-icon { background: #fef3c7; color: #f59e0b; }
.notify-stack.info .notify-icon { background: #dbeafe; color: #3b82f6; }

.notify-stack .notify-content { 
    flex: 1; 
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.notify-stack .notify-title { 
    font-size: 14px; 
    font-weight: 700; 
    color: #1f2937; 
    margin-bottom: 2px;
    white-space: nowrap;
}
.notify-stack .notify-message { 
    font-size: 13px; 
    color: #6b7280; 
    line-height: 1.4;
    white-space: nowrap;
}

.notify-stack .notify-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    transition: color 0.2s;
}
.notify-stack .notify-close:hover { color: #4b5563; }

.notify-stack .notify-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 0 12px;
    animation: notifyProgress 4s linear forwards;
}

.notify-stack.success .notify-progress { background: #222222; }
.notify-stack.error .notify-progress { background: #ef4444; }
.notify-stack.warning .notify-progress { background: #f59e0b; }
.notify-stack.info .notify-progress { background: #3b82f6; }

@keyframes notifyProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ===== نمط 3: Bar (للرسائل العاجلة) ===== */
.notify-bar {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: auto;
    transform: translateY(-100%);
    transition: all 0.3s ease;
    position: relative;
}

.notify-bar.show { transform: translateY(0); }
.notify-bar.success { background: #222222; color: white; }
.notify-bar.error { background: #ef4444; color: white; }
.notify-bar.warning { background: #f59e0b; color: white; }
.notify-bar.info { background: #3b82f6; color: white; }

.notify-bar i { font-size: 18px; }

.notify-bar .notify-close {
    position: absolute;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.notify-bar .notify-close:hover { opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .notify-container.top-right {
        top: auto;
        bottom: 80px;
        right: 15px;
        left: 15px;
    }
    
    .notify-container.bottom-center {
        bottom: 80px;
        left: 15px;
        right: 15px;
        transform: none;
    }
    
    .notify-pill {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .notify-stack {
        max-width: none;
        transform: translateY(100px);
    }
    
    .notify-stack.show {
        transform: translateY(0);
    }
}

/* ===== RTL Support ===== */
[dir="rtl"] .notify-stack,
.notify-stack {
    border-right: 4px solid;
    border-left: none;
}

[dir="rtl"] .notify-stack .notify-progress,
.notify-stack .notify-progress {
    right: 0;
    left: auto;
    border-radius: 0 0 12px 0;
}
