.content_block.form_appointment {
    z-index: 1;
}

.content_block.form_appointment .form-row-checkbox.is_required:after,
.content_block.form_appointment .form-row-radio.is_required:after {
    content: '(Pflichtfeld)';
    font-size: 0.7em;
}

.content_block.form_appointment .is_required label:after {
    content: '*';
    margin-left: 5px;
}

.content_block.form_appointment .is_required input:first-child:after {
    content: '*';
    margin-left: 5px;
}

.content_block.form_appointment #error_message_block {
    background: var(--error);
    padding: 3rem;
    width: calc(100% - 1.4rem);
    display: block;
    margin: 0 auto;
}

.content_block.form_appointment .error_field p,
.content_block.form_appointment .error_field label {
    color: var(--error);
}

.content_block.form_appointment .error_field input,
.content_block.form_appointment .error_field select,
.content_block.form_appointment .error_field textarea {
    border-color: var(--error);
}

.content_block.form_appointment #success_message_block {
    font-size: 2rem;
}

.content_block.form_appointment {
    background-color: var(--black);
    color: #fff;
    padding: 1rem 3vw;
    overflow: hidden;
    transition: padding .3s ease;
}

.content_block.form_appointment.opened {
    padding-top: 7rem;
    padding-bottom: 7rem;
}

.content_block.form_appointment>.col.lg_12 {
    display: flex;
    align-items: center;
    row-gap: 2rem;
    column-gap: var(--padding);
}

.content_block.form_appointment>.col.lg_12>.col:first-child {
    padding-right: 0;
}

.content_block.form_appointment>.col.lg_12>* {
    flex-grow: 1;
    width: calc(100% - var(--padding) / 2);
}

.content_block.form_appointment .big-font p {
    font-size: var(--headline);
    line-height: 1.2;
    hyphens: auto;
}

.content_block.form_appointment {
    .form-rows {
        display: flex;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .form-rows .form-row {
        margin: 0;
        color: var(--white);
    }

    legend {
        font-weight: 700;
    }

    .form-rows .form-row.lg_12 {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0 0.8rem;
        margin-top: 1em;
    }

    .form-rows .form-row.lg_12 > div {
        min-width: 25%;
    }

    .field_error {
        display: block;
        width: 100%;
    }

    .form-row.anrede {
        width: calc(25%);
    }

    .form-row.titel {
        width: calc(30% - 1em);
        flex-grow: 1;
    }

    .form-row.vorname {
        width: calc(37.5% - 1em);
        flex-grow: 1;
    }

    .form-row.nachname {
        width: calc(37.5% - 1em);
        flex-grow: 1;
    }

    .form-row.strasse-hausnummer {
        width: calc(100% - 1em);
        flex-grow: 1;
    }

    .form-row.plz {
        width: calc(25%);
    }

    .form-row.ort {
        width: calc(76% - 1em);
        flex-grow: 1;
    }

    .form-row.e-mail {
        width: calc(62.5% - 1em);
        flex-grow: 1;
    }

    .form-row.rufnummer {
        width: calc(37.5% - 1em);
        flex-grow: 1;
    }

    .form-row.anzahl-der-wohnungen {
        width: 100%;
    }

    .form-row.groesse-der-wohnung {
        width: 100%;
    }

    .form-row textarea {
        min-height: 10rem;
        resize: vertical;
        display: block;
    }

    .form-row-radio {
        background-color: var(--grey);
        height: 5rem;
        display: flex;
        align-items: center;
        padding: 0 3rem;
        width: 100%;
    }

    .form-row-radio fieldset {
        display: flex;
        margin-top: 0;
        align-items: center;
        margin-left: 3rem;
    }

    .form-row-radio fieldset .val {
        margin-right: 2rem;
        display: flex;
        align-items: center;
    }

    .form-row-radio fieldset .val label {
        margin-left: 1rem;
    }

    .form-row.data_security {
        color: var(--white);
    }

    .form-row.data_security a {
        text-decoration: underline;
    }

    .form-row.data_security label {
        width: calc(100% - 1.2em) !important;
    }

    .last-row {
        display: flex;
        align-items: flex-end;
        margin: 2rem 0 0;
        justify-content: space-between;
    }

    .form-row.form-row-submit {
        margin-left: 3%;
    }

    .form-row.data_security p {
        display: flex;
        align-items: flex-start;
    }

    .form-row.data_security p input {
        margin-right: 1rem;
        margin-top: 0.5rem;
    }

    @media screen and (max-width: 1080px) {

        .form-row.anrede,
        .form-row.plz {
            width: 12.5rem;
        }

        .form-row.ort {
            width: 12.5rem;
            flex-grow: 1;
        }

        &>.col.lg_12 {
            flex-wrap: wrap;
        }

        .form_button {
            max-width: 100%;
            margin-top: 5rem;
            margin-bottom: 2rem;
        }

        .form_button a {
            font-size: (1rem, 4vw, 1.3rem);
        }
    }

    .big-font .font_small p,
    .font_small p,
    .font_small {
        font-size: 1.6rem;
        line-height: 2rem;
    }

    .last-row .notice {
        margin-top: 3%;
        font-size: 1.3rem;
        width: calc(100% - 1.2em - 2.7rem) !important;
        display: flex;
        justify-content: flex-end;
        margin-left: 2.7rem;
    }

    .field_error {
        color: var(--error);
        font-size: 0.8em;
    }

    .form-row .field_error,
    .form-row label {
        /* width: 125px; */
        display: block;
        float: left;
        line-height: normal;
        padding: 1rem 0;
    }

    .link {
        text-decoration: underline;
        cursor: pointer;
    }

    .form_button {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1em;
        justify-content: start;

        width: fit-content;
        ;

        margin-top: 10rem;
    }

    .form_button a {
        font-weight: bold;
        display: flex;
        justify-content: space-between;
        padding: .5em 1em;
        background-color: var(--primary);
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .form_button a:hover {
        background-color: var(--black);
        color: inherit;
    }

    .form_button a {
        font-size: 1.5em;
    }

    .toggle-btn {
        display: flex;
        align-items: center;
        gap: 3vw;
        padding: 1rem 0px;
        font-size: var(--headline);
        cursor: pointer;
        color: #fff;
        background-color: var(--black);
        flex-direction: row;
        text-align: left;
    }

    .toggle-btn img {
        width: clamp(2rem, 3vw, 6rem);
        height: clamp(2rem, 3vw, 6rem);
    }

    .toggle-btn.opened {
        cursor: default;
    }

    .toggle-btn.opened img {
        display: none;
    }

    .form-appointment.form-row.form-row-submit {
        display: flex;
        margin-left: 3%;
        margin-top: 1vh;
        align-self: end;
        justify-content: end;
    }
}

  .content_block.form_appointment:not(.opened):focus-within {
    outline: 2px solid red;
    outline-offset: 2px;
}
 