/* public/css/notifications.css */

.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 340px;
    pointer-events: none;
}

.notification-container .notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: rgba(16, 16, 16, 0.97);
    backdrop-filter: blur(10px);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    pointer-events: all;
    animation: notif-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Left accent bar */
.notification::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
}

/* ── Types ── */
.notification--success {
    border-color: rgba(46, 204, 113, 0.25);
}
.notification--success::before  { background: #2ecc71; }
.notification--success .notification__icon { color: #2ecc71; background: rgba(46,204,113,0.12); }

.notification--error {
    border-color: rgba(231, 76, 60, 0.25);
}
.notification--error::before    { background: #e74c3c; }
.notification--error .notification__icon { color: #e74c3c; background: rgba(231,76,60,0.12); }

.notification--warning {
    border-color: rgba(243, 156, 18, 0.25);
}
.notification--warning::before  { background: #f39c12; }
.notification--warning .notification__icon { color: #f39c12; background: rgba(243,156,18,0.12); }

.notification--info {
    border-color: rgba(52, 152, 219, 0.25);
}
.notification--info::before     { background: #3498db; }
.notification--info .notification__icon { color: #3498db; background: rgba(52,152,219,0.12); }

/* ── Parts ── */
.notification__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.notification__message {
    flex: 1;
    color: #e0e0e0;
    line-height: 1.5;
}

.notification__close {
    background: none;
    border: none;
    color: #555;
    font-size: 18px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}
.notification__close:hover { color: #aaa; }

/* Progress bar (auto-dismiss timer) */
.notification__progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 100%;
    transform-origin: left;
    animation: progress-shrink var(--duration, 4s) linear forwards;
}
.notification--success .notification__progress { background: #2ecc71; }
.notification--error   .notification__progress { background: #e74c3c; }
.notification--warning .notification__progress { background: #f39c12; }
.notification--info    .notification__progress { background: #3498db; }

/* ── Animations ── */
@keyframes notif-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes notif-out {
    from { opacity: 1; transform: translateX(0);    max-height: 80px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(30px); max-height: 0;    margin-bottom: -10px; }
}

@keyframes progress-shrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.notification.removing {
    animation: notif-out 0.3s ease forwards;
    pointer-events: none;
}