.wpcf7 .hidden-fields-container {
    display: none;
}

.contact-form-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #FAFAFA;
    border-radius: 34px;
    max-width: 600px;
    padding: 30px;

    @media (max-width: 1024px) {
        padding: 20px;
    }

    @media (max-width: 768px) {
        max-width: 100%;
    }

    * {
        margin: 0px;
    }

    .row {
        display: flex;
        flex-direction: column;

        p,
        label {
            display: contents;
        }

        span {
            font-size: 16px;
            font-weight: 600;
            color: #343434;

            @media (max-width: 1024px) {
                font-size: 13px;
            }
        }

        input:not([type="checkbox"]),
        textarea {
            background-color: #e9e9e9;
            border-radius: 21px;
            padding: 0px 20px;
            color: #343434;
            border: none;
            outline-color: #BE1029;
            width: 100%;
            font-family: 'Barlow';
            font-size: 16px;

            @media (max-width: 1024px) {
                font-size: 13px;
            }
        }

        input:not([type="checkbox"]) {
            height: 50px;

            @media (max-width: 1024px) {
                height: 44px;
            }
        }

        textarea {
            height: 140px;
            resize: none;
            padding: 20px;
        }

        .wpcf7-acceptance {
            .wpcf7-list-item {
                display: block;
                width: 100%;
                margin: 0;

                > label {
                    display: grid;
                    grid-template-columns: 20px minmax(0, 1fr);
                    column-gap: 12px;
                    align-items: start;
                    width: 100%;
                }

                .wpcf7-list-item-label {
                    display: block;
                    width: auto;
                    min-width: 0;

                    &::before,
                    &::after {
                        content: unset;
                    }
                }

                input {
                    display: block;
                    flex: 0 0 20px;
                    width: 20px;
                    min-width: 20px;
                    height: 20px;
                    padding: 0;
                    border-radius: 5px;
                    border: none;
                    background-color: #e9e9e9;
                    accent-color: #BE1029;
                    margin: 2px 0 0 0;
                }
            }
        }

        .wpcf7-not-valid-tip {
            position: absolute;
            font-size: 10px;
            font-weight: 400;
            color: #BE1029;
            bottom: -15px;
        }

        &.row3 {
            .wpcf7-not-valid-tip {
                bottom: -8px;
            }
        }


        &.row5 {
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;

            .wpcf7-submit {
                width: 300px;
                height: 60px;
                background-color: #BE1029;
                color: #ffffff;
                border-radius: 0px;
                transition: 0.3s;
                font-size: 21px;
                font-weight: 600;
                text-transform: uppercase;
                cursor: pointer;

                @media (max-width: 1024px) {
                    width: 180px;
                    height: 40px;
                    font-size: 13px;
                }

                &:disabled {
                    opacity: 0.7;
                    cursor: not-allowed;
                }

                &:hover {
                    background-color: #67090D;
                }
            }

            .wpcf7-spinner {
                display: none;
            }
        }
    }
}

.wpcf7-response-output {
    display: none;
}

/* iPhone/Safari is unreliable here with label display: contents and CF7 default list-item spacing. */
.contact-form-container .row.row4 p {
    display: block;
}

.contact-form-container .row.row4 .wpcf7-form-control-wrap,
.contact-form-container .row.row4 .wpcf7-acceptance,
.contact-form-container .row.row4 .wpcf7-list-item {
    display: block;
    width: 100%;
}

.contact-form-container .row.row4 .wpcf7-list-item {
    margin: 0;
}

.contact-form-container .row.row4 .wpcf7-list-item > label {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: 12px;
    align-items: start;
    width: 100%;
}

.contact-form-container .row.row4 .wpcf7-list-item-label {
    display: block;
    width: auto;
    min-width: 0;
}

.contact-form-container .row.row4 .wpcf7-list-item-label::before,
.contact-form-container .row.row4 .wpcf7-list-item-label::after {
    content: none;
}

.contact-form-container .row.row4 input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 20px;
    min-width: 20px;
    height: 20px;
    padding: 0;
    margin: 2px 0 0 0;
    border: 2px solid #8f8f8f;
    border-radius: 5px;
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px 10px;
    box-shadow: none;
    cursor: pointer;
}

.contact-form-container .row.row4 input[type="checkbox"]:checked {
    background-color: #BE1029;
    border-color: #BE1029;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 11'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M1 5.5L4.5 9L13 1'/%3E%3C/svg%3E");
}
