/*
 * ============================================================
 * NOTIFICATION / TOAST SYSTEM - Vijgjes en Olijfjes
 * ============================================================
 *
 * Professional notification toasts with animations.
 * Works on BOTH public site and admin panel.
 *
 * Location: public/css/notifications.css
 *
 * Usage (via JS):
 *   showNotification('Opgeslagen!', 'success');
 *   showNotification('Er ging iets mis', 'error');
 *   showNotification('Let op!', 'warning');
 *   showNotification('Informatie', 'info');
 *
 * The notification container is auto-created by notifications.js
 * ============================================================
 */

/* ========== NOTIFICATION CONTAINER ========== */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: calc(100% - 40px);
    pointer-events: none;
}

/* ========== SINGLE NOTIFICATION ========== */
.notification-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.notification-toast.dismissing {
    animation: slideOutRight 0.3s cubic-bezier(0.55, 0.06, 0.68, 0.19) both;
}

/* ========== ICON ========== */
.notification-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ========== BODY ========== */
.notification-body {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: #1f2937;
}

.notification-message {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    word-wrap: break-word;
}

/* ========== CLOSE BUTTON ========== */
.notification-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #9ca3af;
    padding: 2px;
    line-height: 1;
    flex-shrink: 0;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
    border-radius: 4px;
}

.notification-close:hover {
    color: #374151;
    transform: scale(1.2);
}

/* ========== PROGRESS BAR ========== */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    border-radius: 0 0 12px 12px;
    transform-origin: left center;
    animation: progressBar var(--toast-duration, 5s) linear both;
}

[dir="rtl"] .notification-progress {
    transform-origin: right center;
}

/* ========== TYPE: SUCCESS ========== */
.notification-toast.success {
    border-left: 4px solid #10b981;
}

.notification-toast.success .notification-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notification-toast.success .notification-progress {
    background: #10b981;
}

/* ========== TYPE: ERROR ========== */
.notification-toast.error {
    border-left: 4px solid #ef4444;
}

.notification-toast.error .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notification-toast.error .notification-progress {
    background: #ef4444;
}

/* ========== TYPE: WARNING ========== */
.notification-toast.warning {
    border-left: 4px solid #f59e0b;
}

.notification-toast.warning .notification-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notification-toast.warning .notification-progress {
    background: #f59e0b;
}

/* ========== TYPE: INFO ========== */
.notification-toast.info {
    border-left: 4px solid #3b82f6;
}

.notification-toast.info .notification-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notification-toast.info .notification-progress {
    background: #3b82f6;
}

/* ========== HOVER PAUSE ========== */
.notification-toast:hover .notification-progress {
    animation-play-state: paused;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .notification-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
        width: auto;
    }

    .notification-toast {
        padding: 12px 14px;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .notification-toast {
        animation: none !important;
    }

    .notification-toast.dismissing {
        animation: none !important;
        opacity: 0;
    }
}
