/*
 * NOVVIA Theme - Contact Form 7 Styling
 * Bindet WPCF7-Formulare an die Design-Tokens des Themes an.
 */

.wpcf7 {
    max-width: 680px;
    margin: 0 auto;
}

.wpcf7 form {
    display: grid;
    gap: 16px;
}

.wpcf7 p {
    margin: 0;
}

.wpcf7 label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--nv-text, #1e293b);
    margin-bottom: 6px;
}

/* Eingabefelder */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 select,
.wpcf7 textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--nv-text, #1e293b);
    background: var(--nv-surface, #ffffff);
    border: 1px solid var(--nv-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}

.wpcf7 textarea {
    min-height: 140px;
    resize: vertical;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: var(--nv-accent, #2bbcc4);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nv-accent, #2bbcc4) 20%, transparent);
}

.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
    color: var(--nv-text-muted, #94a3b8);
    opacity: 1;
}

/* Submit-Button */
.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--nv-accent, #2bbcc4);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
    font-family: inherit;
    line-height: 1.2;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover {
    background: var(--nv-accent-hover, #249ea5);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--nv-accent, #2bbcc4) 30%, transparent);
}

.wpcf7 input[type="submit"]:active,
.wpcf7 button[type="submit"]:active {
    transform: translateY(0);
}

.wpcf7 input[type="submit"]:disabled,
.wpcf7 button[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

/* Checkbox/Radio */
.wpcf7 .wpcf7-list-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 14px 6px 0;
}

.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--nv-accent, #2bbcc4);
}

/* Validation / Response-Zeilen */
.wpcf7 .wpcf7-not-valid {
    border-color: var(--nv-danger, #dc2626) !important;
    background: color-mix(in srgb, var(--nv-danger, #dc2626) 5%, var(--nv-surface, #fff));
}

.wpcf7 .wpcf7-not-valid-tip {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    color: var(--nv-danger, #dc2626);
}

.wpcf7-response-output {
    margin: 18px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--nv-border, #e2e8f0);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    border-color: var(--nv-danger, #dc2626);
    background: color-mix(in srgb, var(--nv-danger, #dc2626) 6%, var(--nv-surface, #fff));
    color: var(--nv-danger, #dc2626);
}

.wpcf7 form.sent .wpcf7-response-output {
    border-color: var(--nv-success, #16a34a);
    background: color-mix(in srgb, var(--nv-success, #16a34a) 8%, var(--nv-surface, #fff));
    color: var(--nv-success, #16a34a);
}

/* Spinner */
.wpcf7 .wpcf7-spinner {
    background-color: var(--nv-text-muted, #94a3b8);
}

/* Responsive: 2-Spalten-Grid für Name+Email ab Tablet wenn 2 <label>s mit .half vorhanden */
@media (min-width: 640px) {
    .wpcf7 form.nv-cf7-cols-2 {
        grid-template-columns: 1fr 1fr;
    }
    .wpcf7 form.nv-cf7-cols-2 > .nv-cf7-full {
        grid-column: 1 / -1;
    }
}
