/**
 * Modern Notification System for NAFCO Gems
 */

/* Notification Container Base Styles */
#success,
#error,
#notice {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 320px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    z-index: 10000;
    display: none;
    animation: slideInRight 0.3s ease-out;
}

/* Success Notification */
#success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    border-left: 4px solid #2e7d32;
}

/* Error Notification */
#error {
    background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
    color: white;
    border-left: 4px solid #c62828;
}

/* Notice/Info Notification */
#notice {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
    color: white;
    border-left: 4px solid #1565c0;
}

/* Icon Styles */
.notification-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    vertical-align: middle;
    font-size: 20px;
    font-weight: bold;
}

/* Content Wrapper */
.notification-content {
    display: inline-block;
    vertical-align: middle;
    max-width: calc(100% - 40px);
}

.notification-content h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

/* Close Button */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
    transition: background 0.2s ease;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Progress Bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 0 8px;
    animation-fill-mode: forwards;
}

.notification-progress.success {
    animation: progressBar 3s linear;
}

.notification-progress.error {
    animation: progressBar 6s linear;
}

.notification-progress.notice {
    animation: progressBar 5s linear;
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* Fade out animation class */
.notification-fade-out {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #success,
    #error,
    #notice {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        border-radius: 6px;
    }

    @keyframes slideInRight {
        from {
            transform: translateY(-100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes slideOutRight {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100px);
            opacity: 0;
        }
    }
}

/* Stacking multiple notifications */
.notification-stack {
    top: auto;
    margin-top: 10px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    #success,
    #error,
    #notice {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }
}
