/* =========================================================================
   Eigenes Kontaktformular (seit 3.46.0)
   -------------------------------------------------------------------------
   Wird nur geladen, wenn der Shortcode [aiow_contact_form] auf der Seite
   steht. Alle Selektoren beginnen mit .aiow-cf — keine globalen Regeln.

   Die Akzentfarbe kommt aus --aiow-primary, das die erzeugten Seiten ohnehin
   setzen; der Rueckfallwert entspricht dem Standardschema "blue". Dadurch
   passt sich das Formular dem gewaehlten Farbschema an und funktioniert
   trotzdem in jedem Theme.
   ========================================================================= */

.aiow-cf {
    max-width: 640px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
}

.aiow-cf *,
.aiow-cf *::before,
.aiow-cf *::after { box-sizing: border-box; }

/* ── Meldungen ────────────────────────────────────────────────────────── */

.aiow-cf__notice {
    margin: 0 0 20px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 1rem;
    line-height: 1.55;
}

.aiow-cf__notice--ok {
    background: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.aiow-cf__notice--err {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.aiow-cf__errors {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.aiow-cf__errors li + li { margin-top: 4px; }

/* ── Felder ───────────────────────────────────────────────────────────── */

.aiow-cf__form { margin: 0; }

.aiow-cf__row {
    display: block;
    margin: 0 0 18px;
}

.aiow-cf__label {
    display: block;
    margin-bottom: 7px;
    font-size: .94rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
}

.aiow-cf__req { color: var(--aiow-primary, #2563eb); }

/* Die Eigenschaften werden ausdruecklich gesetzt, weil Themes
   Formularfelder sehr unterschiedlich gestalten. */
.aiow-cf__input {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 13px 15px;
    border: 1px solid #d1d5db;
    border-radius: 9px;
    background: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.45;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.aiow-cf__input::placeholder { color: #9ca3af; }

.aiow-cf__input:hover { border-color: #9ca3af; }

.aiow-cf__input:focus,
.aiow-cf__input:focus-visible {
    outline: none;
    border-color: var(--aiow-primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}

.aiow-cf__textarea {
    min-height: 160px;
    resize: vertical;
}

/* Browserseitige Fehlermarkierung erst nach einem Absendeversuch. */
.aiow-cf__input:user-invalid {
    border-color: #dc2626;
}

.aiow-cf__hint {
    margin: -4px 0 20px;
    font-size: .86rem;
    color: #6b7280;
}

/* ── Honigtopf: fuer Menschen unsichtbar, aber nicht display:none, damit
      einfache Roboter ihn finden und ausfuellen ───────────────────────── */

.aiow-cf__hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ── Schaltflaeche ────────────────────────────────────────────────────── */

.aiow-cf__actions { margin: 0; }

.aiow-cf__btn {
    display: inline-block;
    min-height: 48px;
    padding: 14px 34px;
    border: 2px solid var(--aiow-primary-surface, var(--aiow-primary, #2563eb));
    border-radius: 10px;
    background: var(--aiow-primary-surface, var(--aiow-primary, #2563eb));
    color: var(--aiow-on-primary, #ffffff);
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .2s ease, filter .16s ease;
}

.aiow-cf__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .18);
    filter: brightness(1.05);
}

.aiow-cf__btn:focus-visible {
    outline: 3px solid #111827;
    outline-offset: 2px;
}

/* ── Smartphone ───────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .aiow-cf { max-width: 100%; }
    .aiow-cf__input { padding: 13px 14px; font-size: 16px; }  /* 16px verhindert das Hineinzoomen in iOS */
    .aiow-cf__btn { display: block; width: 100%; text-align: center; padding: 14px 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .aiow-cf__input,
    .aiow-cf__btn { transition: none; }
    .aiow-cf__btn:hover { transform: none; }
}
