/* Flash Messages Styles */
.flash-messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.flash-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 500px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease-out;
}

.flash-message.flash-hiding {
    animation: slideOutRight 0.3s ease-in;
    opacity: 0;
    transform: translateX(100%);
}

.flash-content {
    display: flex;
    align-items: center;
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.flash-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Success Messages */
.flash-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.flash-success .flash-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Error Messages */
.flash-error {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    color: white;
}

.flash-error .flash-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Warning Messages */
.flash-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
}

.flash-warning .flash-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Info Messages */
.flash-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
}

.flash-info .flash-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Progress Bar */
.flash-message::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.7);
    animation: progressBar var(--duration, 5s) linear;
    border-radius: 0 0 8px 8px;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .flash-messages-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .flash-message {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 12px 15px;
    }
    
    .flash-content {
        font-size: 0.9rem;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .flash-message {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Hover effects */
.flash-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Multiple messages stacking */
.flash-message:nth-child(2) {
    animation-delay: 0.1s;
}

.flash-message:nth-child(3) {
    animation-delay: 0.2s;
}

.flash-message:nth-child(4) {
    animation-delay: 0.3s;
} 