/**
 * Villa Zina - Simple Form Messages CSS
 * Styling für Erfolgs- und Fehlermeldungen des SimpleFormHandler
 */

.form-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.5;
    border: 1px solid;
    animation: slideIn 0.3s ease-out;
}

.form-message-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.form-message-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.form-message-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Animation für das Einblenden */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icons für bessere UX */
.form-message-success::before {
    content: "✅ ";
    margin-right: 8px;
}

.form-message-error::before {
    content: "❌ ";
    margin-right: 8px;
}

.form-message-warning::before {
    content: "⚠️ ";
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-message {
        padding: 12px 15px;
        font-size: 14px;
        margin: 15px 0;
    }
}

/* Zentrierte Positionierung über dem Formular */
.form-message-centered {
    max-width: 600px;
    margin: 20px auto 30px auto !important;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 100;
}

/* Positionierung oberhalb des Submit-Buttons */
.form-message-above-button {
    margin: 0 0 20px 0 !important;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: slideInAboveButton 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animation für Meldungen oberhalb des Buttons */
@keyframes slideInAboveButton {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Container für relative Positionierung */
.form-container {
    position: relative;
}

/* Mobile Optimierung */
@media (max-width: 768px) {
    .form-message-centered {
        max-width: calc(100% - 20px);
        margin: 15px 10px 25px 10px !important;
        font-size: 16px;
        padding: 20px !important;
        border-radius: 8px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    .form-message-centered.form-message-success {
        border-left: 6px solid #28a745;
    }
    
    .form-message-centered.form-message-error {
        border-left: 6px solid #dc3545;
    }
    
    .form-message-above-button {
        margin: 0 0 15px 0 !important;
        font-size: 14px;
        padding: 15px !important;
        border-radius: 6px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .form-message-success {
        background-color: #155724;
        border-color: #1e7e34;
        color: #d4edda;
    }

    .form-message-error {
        background-color: #721c24;
        border-color: #a94442;
        color: #f8d7da;
    }

    .form-message-warning {
        background-color: #856404;
        border-color: #d39e00;
        color: #fff3cd;
    }
} 