.widget-custom-form {
    max-width: 640px;
    margin: 0 auto;
    padding: var(--wl-section-spacing, 4rem) 1.5rem;
}

/* Die eigentliche Formular-Karte bekommt einen dezenten Farbverlaufs-Rahmen
   (per Gradient-Border-Trick: Karte selbst transparent, ein Pseudo-Element
   dahinter traegt den Verlauf) statt einer schlichten weissen Flaeche --
   macht das Formular optisch "wertiger", ohne dass Text/Felder selbst
   farbig werden muessten. */
.custom-form__form {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem;
    border-radius: calc(var(--wl-radius, 1rem) + 0.5rem);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 48px rgba(27, 29, 45, 0.08);
}

.custom-form__form::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(120deg, #76e7d2, #a77df5, #76e7d2);
    background-size: 200% auto;
    animation: custom-form-border-pan 8s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

@keyframes custom-form-border-pan {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .custom-form__form::before { animation: none; }
}

.custom-form__head {
    text-align: center;
    margin-bottom: 2rem;
}

.custom-form__eyebrow {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
    opacity: 0.45;
    margin-bottom: 0.9rem;
}

.widget-custom-form__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0;
}

.custom-form__subtitle {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.6;
}

.custom-form__form input[type="text"],
.custom-form__form input[type="email"],
.custom-form__form input[type="tel"],
.custom-form__form select,
.custom-form__form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(27, 29, 45, 0.15);
    border-radius: var(--wl-radius, 1rem);
    font: inherit;
    background: #fff;
    color: inherit;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.custom-form__form input:focus,
.custom-form__form select:focus,
.custom-form__form textarea:focus {
    outline: none;
    border-color: #a77df5;
    box-shadow: 0 0 0 3px rgba(167, 125, 245, 0.18);
}

.custom-form__checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.custom-form__checkbox input { width: auto; }

.custom-form__radio-group label:first-child {
    display: block;
    margin-bottom: 0.5rem;
}

.custom-form__radio-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.custom-form__radio {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(27, 29, 45, 0.15);
    border-radius: 999px;
    font-size: 0.88rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.custom-form__radio:has(input:checked) {
    border-color: #a77df5;
    background: rgba(167, 125, 245, 0.1);
}

.custom-form__radio input { width: auto; }

.custom-form__submit {
    align-self: flex-start;
    padding: 0.9rem 2.3rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(118, 231, 210, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(118, 231, 210, 0.4);
}

.custom-form__success {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--wl-radius, 1rem);
    background: rgba(118, 231, 210, 0.15);
    font-weight: 600;
}

.custom-form__error {
    padding: 0.85rem 1rem;
    border-radius: var(--wl-radius, 1rem);
    background: rgba(220, 60, 60, 0.1);
    color: #b0362f;
    font-size: 0.9rem;
    margin: 0;
}

.custom-form__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
