/* NovaCMS – Kontaktformular
   ------------------------------------------------------------------
   Farben kommen aus dem Theme (Radio-Themes: --rs-…, Standard: --…),
   sonst neutrale Werte. Felder werden bewusst einheitlich gestaltet,
   damit das Formular in jedem Theme gleich ordentlich aussieht.
   ------------------------------------------------------------------ */

.nova-contact {
    --kf-accent:  var(--rs-accent, var(--accent, #3b6fff));
    --kf-text:    var(--rs-text, var(--text, inherit));
    --kf-soft:    var(--rs-text-soft, var(--text-soft, rgba(128, 128, 128, .95)));
    --kf-line:    var(--rs-line, var(--line, rgba(128, 128, 128, .35)));
    --kf-field:   var(--rs-surface-2, var(--surface-2, rgba(128, 128, 128, .08)));
    --kf-panel:   var(--rs-surface, var(--surface, transparent));
    --kf-radius:  var(--rs-radius, var(--radius-sm, 10px));
    --kf-error:   #e5484d;
    --kf-ok:      #2fbf71;

    max-width: 760px;
    color: var(--kf-text);
}

.nova-contact-intro { margin: 0 0 20px; font-size: 1.02rem; line-height: 1.6; }

.nova-contact-alert {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid color-mix(in srgb, var(--kf-error) 45%, transparent);
    border-radius: var(--kf-radius);
    background: color-mix(in srgb, var(--kf-error) 10%, transparent);
    font-weight: 600;
}

.nova-contact-note {
    padding: 18px 20px;
    border: 1px dashed var(--kf-line);
    border-radius: var(--kf-radius);
    text-align: center;
}

.nova-contact-form { display: flex; flex-direction: column; gap: 16px; }

.nova-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nova-contact-field { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.nova-contact-grid > .nova-contact-field.is-full { grid-column: 1 / -1; }

.nova-contact-hint { color: var(--kf-soft); font-size: .8rem; line-height: 1.45; }
.nova-contact-label { margin: 0; color: var(--kf-text); font-size: .88rem; font-weight: 700; }

/* Auswahl mit Knöpfen (eine oder mehrere Antworten) */
.nova-contact-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.nova-contact-choice { position: relative; margin: 0; cursor: pointer; }
.nova-contact-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nova-contact-choice span {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--kf-line);
    border-radius: var(--kf-radius);
    background: var(--kf-field);
    font-size: .92rem;
    font-weight: 600;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.nova-contact-choice:hover span { border-color: var(--kf-accent); }
.nova-contact-choice input:checked + span { border-color: var(--kf-accent); background: var(--kf-accent); color: #fff; }
.nova-contact-choice input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--kf-accent) 30%, transparent); }

/* Datei-Upload */
.nova-contact-file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px;
    border: 1px dashed var(--kf-line);
    border-radius: var(--kf-radius);
    background: var(--kf-field);
    cursor: pointer;
}
.nova-contact-file:hover { border-color: var(--kf-accent); }
.nova-contact-file input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.nova-contact-file-btn {
    flex: 0 0 auto;
    padding: 9px 16px;
    border-radius: calc(var(--kf-radius) - 2px);
    background: var(--kf-accent);
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
}
.nova-contact-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--kf-soft); font-size: .9rem; }
.nova-contact-field.has-error .nova-contact-file { border-color: var(--kf-error); }

.nova-contact-field > label {
    margin: 0;
    color: var(--kf-text);
    font-size: .88rem;
    font-weight: 700;
}

.nova-contact-req { color: var(--kf-accent); font-weight: 800; }
.nova-contact-opt { color: var(--kf-soft); font-size: .8rem; font-weight: 500; }

.nova-contact .nova-contact-field input[type="text"],
.nova-contact .nova-contact-field input[type="email"],
.nova-contact .nova-contact-field input[type="tel"],
.nova-contact .nova-contact-field input[type="number"],
.nova-contact .nova-contact-field input[type="date"],
.nova-contact .nova-contact-field select,
.nova-contact .nova-contact-field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 14px;
    border: 1px solid var(--kf-line) !important;
    border-radius: var(--kf-radius) !important;
    background: var(--kf-field) !important;
    color: var(--kf-text) !important;
    font: inherit;
    font-size: .98rem;
    line-height: 1.4;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
}

.nova-contact .nova-contact-field select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    cursor: pointer;
}

.nova-contact .nova-contact-field select option { color: #1c2331; background: #fff; }

.nova-contact .nova-contact-field textarea { min-height: 170px; resize: vertical; }

.nova-contact .nova-contact-field input:focus,
.nova-contact .nova-contact-field select:focus,
.nova-contact .nova-contact-field textarea:focus {
    outline: none;
    border-color: var(--kf-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--kf-accent) 22%, transparent) !important;
}

.nova-contact-field.has-error input,
.nova-contact-field.has-error select,
.nova-contact-field.has-error textarea { border-color: var(--kf-error) !important; }

.nova-contact-error { color: var(--kf-error); font-size: .82rem; font-weight: 600; }

.nova-contact-captcha input { max-width: 140px; }

.nova-contact-check > label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: .9rem;
    line-height: 1.5;
    cursor: pointer;
}

.nova-contact-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    accent-color: var(--kf-accent);
}

.nova-contact-check a { color: var(--kf-accent); text-decoration: underline; }

.nova-contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}

.nova-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 11px 24px;
    border: 0;
    border-radius: var(--kf-radius);
    background: var(--kf-accent);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--kf-accent) 70%, transparent);
    transition: filter .15s ease, transform .15s ease;
}

.nova-contact-btn:hover { filter: brightness(1.08); }
.nova-contact-btn:active { transform: translateY(1px); }

.nova-contact-legend { color: var(--kf-soft); font-size: .8rem; }

/* Falle für Formularroboter */
.nova-contact-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Nach dem Absenden */
.nova-contact-done {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 22px;
    border: 1px solid color-mix(in srgb, var(--kf-ok) 45%, transparent);
    border-radius: var(--kf-radius);
    background: color-mix(in srgb, var(--kf-ok) 9%, transparent);
}

.nova-contact-done-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 50%;
    background: var(--kf-ok);
    color: #fff;
}

.nova-contact-done strong { display: block; font-size: 1.1rem; }
.nova-contact-done p { margin: 4px 0 10px; line-height: 1.55; }
.nova-contact-again { color: var(--kf-accent); font-weight: 700; }

@media (max-width: 640px) {
    .nova-contact-grid { grid-template-columns: 1fr; }
    .nova-contact-btn { width: 100%; justify-content: center; }
}
