/**
 * Enhanced message styling
 * Beautiful design for success and error messages that appear for 4 seconds
 */

/* Base alert styling */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    overflow: hidden;
    min-width: 250px;
    max-width: 600px;
    border-left: 5px solid;
    transform-origin: top center;
}

/* Success message styling */
.alert.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left-color: #4caf50;
}

/* Error message styling */
.alert.error {
    background-color: #ffebee;
    color: #c62828;
    border-left-color: #f44336;
}

/* Close button styling */
.alert-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.alert-close:hover {
    opacity: 1;
}

/* Icon styling */
.alert-icon {
    margin-right: 10px;
    font-size: 20px;
    display: flex;
    align-items: center;
}

/* Pulsing effect for icons */
.alert-icon i {
    animation: pulse 2s infinite;
}

/* Fixed position for messages to appear at the top */
.enhanced-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

/* Animations */
@keyframes slideInDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-30px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Progress bar for automatic dismissal */
.enhanced-alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.2);
    width: 100%;
    animation: countdown 4s linear forwards;
}

@keyframes countdown {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    .enhanced-alert {
        max-width: 90%;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
    }
    
    @keyframes slideInDown {
        from {
            transform: translate(-50%, -100px);
            opacity: 0;
        }
        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }
    
    @keyframes fadeOut {
        from {
            opacity: 1;
            transform: translate(-50%, 0);
        }
        to {
            opacity: 0;
            transform: translate(-50%, -30px);
        }
    }
} 