/* Базовые стили для flash-сообщений */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
    width: 100%;
}

.flash-message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: white;
    font-family: 'Segoe UI', Arial, sans-serif;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    opacity: 0;
    animation: slideIn 0.3s forwards, fadeOut 0.5s 4s forwards;
}

/* Цвета для разных типов сообщений */
.flash-warning {
    background: #ff9800;
    border-left: 4px solid #e68a00;
}

.flash-success {
    background: #4caf50;
    border-left: 4px solid #3d8b40;
}

.flash-error {
    background: #f44336;
    border-left: 4px solid #d32f2f;
}

.flash-info {
    background: #2196f3;
    border-left: 4px solid #0b7dda;
}

/* Иконки (опционально) */
.flash-message::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
    background-size: contain;
    background-repeat: no-repeat;
}

.flash-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2L1 21h22L12 2zm0 3.5L18.5 19h-13L12 5.5z'/%3E%3Ccircle cx='12' cy='16' r='1'/%3E%3Cpath d='M12 10v4' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
}

.flash-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

/* Анимации */
@keyframes slideIn {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Кнопка закрытия */
.flash-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
}

.flash-close:hover {
    opacity: 1;
}