/* Flash Messages Styles */

.flash-message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.flash-messages-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flash-message {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

.flash-message-success {
    border-left-color: #28a745;
}

.flash-message-error {
    border-left-color: #dc3545;
}

.flash-message-warning {
    border-left-color: #ffc107;
}

.flash-message-info {
    border-left-color: #17a2b8;
}

.flash-message-content {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
}

.flash-message-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: 2px;
}

.flash-message-success .flash-message-icon {
    background-color: #d4edda;
    color: #28a745;
}

.flash-message-error .flash-message-icon {
    background-color: #f8d7da;
    color: #dc3545;
}

.flash-message-warning .flash-message-icon {
    background-color: #fff3cd;
    color: #ffc107;
}

.flash-message-info .flash-message-icon {
    background-color: #d1ecf1;
    color: #17a2b8;
}

.flash-message-text {
    flex: 1;
    min-width: 0;
}

.flash-message-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.3;
}

.flash-message-body {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    word-wrap: break-word;
}

.flash-message-close {
    background: none;
    border: none;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flash-message-close:hover {
    background-color: #f8f9fa;
    color: #6c757d;
}

.flash-message-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.1);
    animation: progressBar linear;
}

.flash-message-success .flash-message-progress {
    background-color: #28a745;
}

.flash-message-error .flash-message-progress {
    background-color: #dc3545;
}

.flash-message-warning .flash-message-progress {
    background-color: #ffc107;
}

.flash-message-info .flash-message-progress {
    background-color: #17a2b8;
}

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

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

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

.flash-message.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .flash-message-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .flash-message-content {
        padding: 12px;
    }
    
    .flash-message-title {
        font-size: 13px;
    }
    
    .flash-message-body {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .flash-message-container {
        top: 5px;
        right: 5px;
        left: 5px;
    }
    
    .flash-message-content {
        padding: 10px;
        gap: 8px;
    }
    
    .flash-message-icon {
        width: 20px;
        height: 20px;
    }
    
    .flash-message-close {
        width: 20px;
        height: 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .flash-message {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .flash-message-title {
        color: #ecf0f1;
    }
    
    .flash-message-body {
        color: #bdc3c7;
    }
    
    .flash-message-close {
        color: #95a5a6;
    }
    
    .flash-message-close:hover {
        background-color: #34495e;
        color: #bdc3c7;
    }
}
