/* Niriv Toast Notification System */
.niriv-toast-container {
    position: fixed;
    top: 80px; /* Below header */
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.niriv-toast {
    background: #1847ea;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(24, 71, 234, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    pointer-events: auto;
    
    /* Initial state - hidden off-screen */
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.niriv-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.niriv-toast.hide {
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.niriv-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
    animation: celebrateIcon 0.6s ease-out;
}

.niriv-toast-content {
    flex: 1;
}

.niriv-toast-message {
    margin: 0;
    color: white;
}

/* Success variant */
.niriv-toast.success {
    background: linear-gradient(135deg, #102cb9 0%, #3d17c7 100%);
    box-shadow: 0 10px 25px rgba(19, 0, 223, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Error variant */
.niriv-toast.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Warning variant */
.niriv-toast.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Info variant (default Niriv brand) */
.niriv-toast.info {
    background: linear-gradient(135deg, #1847ea 0%, #1e40af 100%);
    box-shadow: 0 10px 25px rgba(24, 71, 234, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Celebration animations */
@keyframes celebrateIcon {
    0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Progress bar for auto-dismiss */
.niriv-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 12px 12px;
    animation: progressBar 2s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Hover effects */
.niriv-toast:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(24, 71, 234, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.niriv-toast.success:hover {
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.niriv-toast.error:hover {
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.niriv-toast.warning:hover {
    box-shadow: 0 15px 35px rgba(245, 158, 11, 0.4), 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .niriv-toast-container {
        right: 0px;
        left: auto;
        top: 70px;
        width: auto;
    }
    
    .niriv-toast {
        min-width: 280px;
        max-width: 320px;
        width: auto;
        padding: 10px 14px;
        font-size: 13px;
        margin-right: 10px;
        
        /* Enhanced slide animation for mobile - starts completely off-screen */
        transform: translateX(100%);
    }
    
    .niriv-toast.show {
        transform: translateX(0);
    }
    
    .niriv-toast.hide {
        transform: translateX(100%);
    }
    
    .niriv-toast-icon {
        font-size: 18px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .niriv-toast {
        box-shadow: 0 10px 25px rgba(24, 71, 234, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .niriv-toast.success {
        box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .niriv-toast.error {
        box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .niriv-toast.warning {
        box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    }
}

/* Accessibility */
.niriv-toast:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .niriv-toast {
        transition: opacity 0.2s ease;
    }
    
    .niriv-toast-icon {
        animation: none;
    }
    
    @keyframes progressBar {
        from { width: 100%; }
        to { width: 0%; }
    }
}