/* ── Anmeldung Form ─────────────────────────────────────────────────── */

/* Outer card */
.wpcf7 {
    background: #fff;
    border: 1.5px solid #ddd;
    border-radius: 14px;
    padding: 2rem 2.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 0.95rem;
    max-width: 800px;
}

.wpcf7-form-after {
    border: 1.5px solid #ddd;
    border-radius: 14px;
    padding: 1rem;
    margin-top: 5px;
}
f
@media screen and (max-width: 780px) {
    .wpcf7-form-after .wp-block-column {
        text-align: center;
    }
    .wpcf7-form-after .wp-block-image figure {
        float: none;
        margin: 0 auto;
    }
}

/* ── Sections ────────────────────────────────────────────────────────── */

.anmeldung-block {
    margin-bottom: 2.25rem;
}

.anmeldung-block:last-of-type {
    margin-bottom: 0;
}

.anmeldung-block h3 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 1.1rem;
    color: #1a171b;
}

.anmeldung-block h3 .subtext {
    font-weight: 400;
    font-size: 1rem;
}

/* ── Two-column rows ─────────────────────────────────────────────────── */

.form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Remove wpautop paragraph margins inside columns */
.form-col p {
    margin: 0;
    padding: 0;
}

.form-col br {
    display: none;
}

.form-col label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
    color: #1a171b;
}

.form-col p > label {
    margin-bottom: 0.45rem;
}

.form-row .form-col input[type="text"],
.form-row .form-col input[type="email"],
.form-row .form-col input[type="tel"],
.form-row .form-col input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1a171b;
    background: #fff;
}

.form-row .form-col input[type="text"]:focus,
.form-row .form-col input[type="email"]:focus,
.form-row .form-col input[type="tel"]:focus,
.form-row .form-col input[type="date"]:focus {
    outline: none;
    border-color: #d91a2c;
}

/* ── Anmeldung-Typ cards ─────────────────────────────────────────────── */

.anmeldung-typ-wrapper .wpcf7-form-control.wpcf7-radio {
    display: flex;
    gap: 1rem;
}

.anmeldung-typ-wrapper .wpcf7-list-item {
    flex: 1;
    margin: 0;
}

.anmeldung-typ-wrapper .wpcf7-list-item label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1.5px solid #ccc;
    border-radius: 10px;
    padding: 1.25rem 1rem 1rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s;
    position: relative;
    min-height: 110px;
}

/* Hide the native radio */
.anmeldung-typ-wrapper .wpcf7-list-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Icon via ::before – child (first item) */
.anmeldung-typ-wrapper .wpcf7-list-item:first-child label::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url('img/svg/child.svg');
    filter: brightness(0);
    transition: filter 0.2s;
}

/* Icon via ::before – adult (last item) */
.anmeldung-typ-wrapper .wpcf7-list-item:last-child label::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url('img/svg/adult.svg');
    filter: brightness(0);
    transition: filter 0.2s;
}

/* Label text */
.anmeldung-typ-wrapper .wpcf7-list-item-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.3;
    transition: color 0.2s;
}

/* Subtitles via ::after */
.anmeldung-typ-wrapper .wpcf7-list-item:first-child .wpcf7-list-item-label::after {
    content: 'bis 18 Jahre';
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: #999;
}

.anmeldung-typ-wrapper .wpcf7-list-item:last-child .wpcf7-list-item-label::after {
    content: 'ab 18 Jahre';
    display: block;
    font-weight: 400;
    font-size: 0.8rem;
    color: #999;
}

/* Selected state (driven by .is-checked class via JS) */
.anmeldung-typ-wrapper .wpcf7-list-item.is-checked label {
    border-color: #d91a2c;
}

.anmeldung-typ-wrapper .wpcf7-list-item.is-checked .wpcf7-list-item-label {
    color: #d91a2c;
}

.anmeldung-typ-wrapper .wpcf7-list-item.is-checked label::before {
    filter: none;
}

/* ── Geschlecht radio inline ─────────────────────────────────────────── */

.radio-inline .wpcf7-form-control.wpcf7-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.25rem;
    align-items: center;
    padding-top: 0.45rem;
}

.radio-inline .wpcf7-list-item {
    margin: 0;
}

/* ── File / photo upload area ────────────────────────────────────────── */

.foto-upload-area {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 1.25rem 3.5rem;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, background 0.2s;
    overflow: visible;
}

.foto-upload-area.drag-over {
    border-color: #d91a2c;
    background: #fff5f5;
}

/* Cloud icon */
.foto-upload-area::before {
    content: '';
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    margin-left: -10px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('img/svg/cloud.svg');
}

.foto-upload-inner {
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    color: #333;
    font-size: 0.9rem;
}

.foto-upload-title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: -3px;
}

.foto-selected-name {
    display: none;
    font-size: 0.82rem;
    color: #555;
    margin-top: 0.25rem;
    word-break: break-all;
}

.foto-selected-name.has-file {
    display: block;
}

.foto-hint {
    display: block;
    font-size: 0.78rem;
    color: #aaa;
    margin-top: 0.25rem;
}

/* Stretch the hidden file input over the whole drop zone */
.foto-upload-area .wpcf7-form-control-wrap {
    position: absolute;
    inset: 0;
    overflow: visible;
}

.foto-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

/* Error tip below the drop zone */
.foto-upload-area .wpcf7-not-valid-tip {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    font-size: 0.82rem;
}

/* Foto upload row: constrain left col, center description vertically */
.form-row:has(.foto-upload-area) {
    align-items: center;
}

.form-col:has(.foto-upload-area) {
    flex: 0 0 auto;
    max-width: 420px;
}

.form-col.foto-description {
    max-width: 300px;
    flex: 0 0 auto;
}

/* ── Acceptance checkboxes ───────────────────────────────────────────── */

.anmeldung-block .wpcf7-acceptance {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.anmeldung-block .wpcf7-acceptance .wpcf7-list-item {
    margin-left: 0;
}

/* Flex label so wrapped text aligns under first line, not under checkbox */
.anmeldung-block .wpcf7-acceptance label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.anmeldung-block .wpcf7-acceptance input[type="checkbox"] {
    flex-shrink: 0;
    margin-top: 1px;
}

input[type="checkbox"] {
    position: relative;
    background: none;
    border: none;
    display: inline-block;
    width: 16px;
    height: 16px;
    transform: translateY(2px);
}

input[type="checkbox"]:before {
    content: '';
    display: block;
    border: 1px solid #636363;
    background: #fff;
    transition: background 0.2s;
    box-sizing: border-box;
    width: 18px;
    height: 18px;
    border-radius: 3px;
}

input[type="checkbox"]:after {
    content: '';
    display: block;
    width: 10px;
    height: 3px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    position: absolute;
    top: 5px;
    left: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

input[type="checkbox"]:checked:before {
    background: #d91a2c;
    border: none;
}

input[type="checkbox"]:checked:after {
    opacity: 1;
}

/* ── Submit button ───────────────────────────────────────────────────── */

.wpcf7 button[type="submit"] {
    background: #d91a2c;
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    margin-top: 0.75rem;
    transition: background 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    box-sizing: border-box;
}

.wpcf7 button[type="submit"]:hover {
    background: #b81525;
}

.wpcf7 button[type="submit"]::before {
    content: '';
    display: block;
    width: 18px;
    height: 18px;
    background: url('img/svg/send-white.png') no-repeat center / contain;
    flex-shrink: 0;
    transform: scale(1.5) translateX(-10px);
}

.signup-form-below {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1.5px solid #ddd;
    border-radius: 14px;
    padding: 2rem 2.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 0.95rem;
    max-width: 800px;
    margin-top: 10px;

    .item {
        display: flex;
        margin: 20px 0;

        .icon {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .headline {
            font-weight: bold;
        }

        p {
            margin: 0;
        }
    }

    img {
        width: 50px;
        padding: 0 20px;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 880px) {
    .signup-form-below {
        grid-template-columns: 1fr;

        .item {
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        img {
            margin-bottom: 20px;
        }
    }
}

@media (max-width: 640px) {
    .wpcf7 {
        padding: 1.25rem 1rem;
    }

    .form-row {
        flex-direction: column;
    }

    .anmeldung-typ-wrapper .wpcf7-form-control.wpcf7-radio {
        flex-direction: column;
    }

    .radio-inline .wpcf7-form-control.wpcf7-radio {
        flex-direction: column;
        align-items: flex-start;
    }
}