/* CONTACT FORM 7 - ERGÄNZTE VERSION */

.custom-cf7-form .cf7-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.custom-cf7-form .cf7-col {
    flex: 1;
}

.custom-cf7-form .cf7-full {
    margin-bottom: 15px;
}

/* 1. Alle Felder (inkl. SELECT & FILE) einheitlich stylen */
.custom-cf7-form input[type="text"],
.custom-cf7-form input[type="email"],
.custom-cf7-form input[type="tel"],
.custom-cf7-form input[type="date"],
.custom-cf7-form select,
.custom-cf7-form textarea {
    width: 100%;
    background-color: #fff;
    border: none;
    padding: 10px 15px;
    color: #495f76;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
    min-height: 45px;
    box-sizing: border-box;
    -webkit-appearance: none; /* Entfernt Standard-Styles in Browsern für Selects */
}

/* 2. Spezifisches Styling für Auswahlmenüs (Anrede & Grund) */
.custom-cf7-form select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495f76' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* 3. Styling für den Datei-Upload */
.custom-cf7-form input[type="file"] {
    background-color: #f9f9f9;
    padding: 8px;
    border: 1px dashed #495f76;
    font-size: 14px;
}

.custom-cf7-form .cf7-full label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495f76;
}

/* 4. FIX FÜR ÜBERLAPPENDEN TEXT (Bild-Problem) */
/* Versteckt den nativen Browser-Platzhalter (dd.mm.yyyy), solange kein Wert da ist */
input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit-text,
input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit-month-field,
input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit-day-field,
input[type="date"]:not(:focus):not(:valid)::-webkit-datetime-edit-year-field {
    color: transparent;
}

/* 5. Platzhalter Farben */
.custom-cf7-form ::placeholder {
    color: rgba(73, 95, 118, 0.6);
    opacity: 1;
}

.custom-cf7-form input:focus,
.custom-cf7-form select:focus,
.custom-cf7-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(73, 95, 118, 0.15);
}

/* Korrektur für Kalender-Icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(30%) sepia(10%) saturate(1500%) hue-rotate(170deg) brightness(95%) contrast(90%);
}

/* DSGVO & Button */
.cf7-dsgvo { margin-bottom: 20px; }
.cf7-dsgvo label { font-size: 18px; display: block; font-weight: bold; margin-bottom: 8px; color: #495f76; }
.cf7-dsgvo .wpcf7-list-item-label { font-size: 16px; font-weight: 400; }
.cf7-dsgvo p { margin: 0 !important; display: inline-block; }
.cf7-dsgvo br { display: none !important; }

.custom-cf7-form input[type="submit"] {
    background-color: #495f76;
    color: #fff;
    border: none;
    padding: .7em 2.1em;
    font-weight: 700;
    border-radius: 10px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-cf7-form input[type="submit"]:hover {
    transform: scale(1.02);
    background-color: #3a4d5f;
}

/* Responsive */
@media (max-width: 767px) {
    .custom-cf7-form .cf7-row { flex-direction: column; gap: 15px; }
    .custom-cf7-form input, 
    .custom-cf7-form select { font-size: 14px; }
}