/* Basis-Styling für das Modal */
.mcf-modal {
    display: none; /* Standardmäßig versteckt */
    position: fixed; /* Bleibt an Ort und Stelle */
    z-index: 1000; /* Über anderen Elementen */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Scrollen ermöglichen, falls Inhalt zu groß */
    background-color: rgba(0,0,0,0.6); /* Halbtransparenter Hintergrund */
    font-family: Arial, sans-serif;
}

.mcf-modal.mcf-modal-active {
    display: flex; /* Flexbox für Zentrierung */
    align-items: center;
    justify-content: center;
}

.mcf-modal-content {
    background-color: #fefefe;
    margin: auto; /* Zentrierung */
    padding: 25px 30px 30px 30px;
    border: 1px solid #888;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    position: relative;
    width: 90%; /* Responsive Breite */
    max-width: 600px; /* Maximale Breite für Desktops */
    max-height: 90vh; /* Maximale Höhe, um Scrollen zu ermöglichen */
    overflow-y: auto; /* Scrollen innerhalb des Inhalts, falls nötig */
}

.mcf-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 15px;
}

.mcf-modal-close:hover,
.mcf-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.mcf-modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    color: #333;
}

/* Formular-Styling */
.mcf-form-group {
    margin-bottom: 18px;
}

.mcf-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    font-size: 14px;
    color: #555;
}

.mcf-form-group input[type="text"],
.mcf-form-group input[type="email"],
.mcf-form-group input[type="url"],
.mcf-form-group input[type="file"],
.mcf-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Wichtig für Padding und Border innerhalb der Breite */
    font-size: 14px;
}

.mcf-form-group input[type="file"] {
    padding: 5px;
}

.mcf-form-group textarea {
    resize: vertical; /* Nur vertikales Resizing erlauben */
    min-height: 80px;
}

/* Anpassungen für die DSGVO-Checkbox-Gruppe */
.mcf-consent-group {
    display: flex; /* Flexbox für die Ausrichtung */
    align-items: flex-start; /* Checkbox und Label oben ausrichten */
    gap: 8px; /* Abstand zwischen Checkbox und Label */
}

.mcf-consent-group input[type="checkbox"] {
    margin-top: 3px; /* Feinanpassung der vertikalen Position der Checkbox */
    flex-shrink: 0; /* Verhindert, dass die Checkbox schrumpft */
}

.mcf-consent-group label {
    font-weight: normal;
    font-size: 13px;
    margin-bottom: 0; /* Standard-Margin für Label in dieser Gruppe entfernen */
    line-height: 1.4; /* Verbessert Lesbarkeit bei Umbruch */
}


.mcf-form-group button[type="submit"] {
    background-color: #0073aa; /* WordPress Blau */
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    transition: background-color 0.2s ease-in-out;
}

.mcf-form-group button[type="submit"]:hover {
    background-color: #005a87;
}

.mcf-required {
    color: red;
    margin-left: 2px;
}

.mcf-form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #777;
}

/* Nachrichten-Styling */
.mcf-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}
.mcf-success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.mcf-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Invalid-Styling für JS-Validierung */
.mcf-invalid {
    border-color: red !important;
    box-shadow: 0 0 3px rgba(255, 0, 0, 0.5);
}


/* Button zum Öffnen des Modals (Beispiel) */
.mcf-open-modal-button {
    background-color: #0073aa;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.mcf-open-modal-button:hover {
    background-color: #005a87;
}


/* Mobile Anpassungen */
@media screen and (max-width: 767px) {
    .mcf-modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 20px;
        border: none;
        overflow-y: auto; 
    }
    .mcf-modal-close {
        top: 15px;
        right: 20px;
    }
     .mcf-modal-content h2 {
        font-size: 20px;
    }
    /* Anpassung für Checkbox auf Mobilgeräten, falls nötig */
    .mcf-consent-group input[type="checkbox"] {
        margin-top: 2px; /* Ggf. leicht anpassen für mobile Ansicht */
    }
}

/* Honeypot-Feld verstecken */
.mcf-honeypot-field {
    display: none !important;
    position: absolute;
    left: -9999px;
}
