/* /public/css/alerts.css */
/* A centralized, non-blocking alert system for Popcorn Tools */

.custom-alert {
    position: fixed;
    top: -100px; /* Start off-screen */
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    background-color: #333; /* Default background */
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Bouncy transition */
    font-size: 0.95rem;
    font-weight: 500;
    max-width: 90%;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Style for success messages (green) */
.custom-alert.success {
    background-color: #28a745; /* A pleasant green */
}

/* Style for error messages (red) */
.custom-alert.error {
    background-color: #dc3545; /* A clear red */
}

/* NEW: Style for loading messages (blue) */
.custom-alert.loading {
    background-color: #007bff; /* A neutral blue */
}

/* The 'show' class brings the alert into view */
.custom-alert.show {
    opacity: 1;
    top: 30px; /* Position it near the top of the viewport */
}

/* NEW: Spinner animation for the loading alert */
.alert-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
