.contactpg--form {
    grid-column: 3 / span 4;
    display: flex;
    flex-direction: column;
    /* margin-bottom: 200px; */
}

@media (max-width: 1024px) {
    .contactpg--form {
        margin-bottom: 140px;
    }
}
@media (max-width: 767px) {
    .contactpg--form {
        margin-bottom: 120px;
    }
}

.contactpg--form .text-input:not(:first-of-type) {
    margin-top: 20px;
}

.checkbox-input {
    display: flex;
}

.contactpg-socials {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    color: var(--teal-20);
}

.contactpg-socials hr {
    width: 20px;
    margin: 0 auto 0 0;
    color: inherit;
}

.contactpg-socials a {
    color: inherit;
    text-decoration: none;
}

.contactpg-socials a:hover {
    text-decoration: underline;
}

.all-fields-required {
    margin-top: 32px;
    color: var(--teal-20);
}

@media (max-width: 1024px) {
    .contactpg-socials {
        gap: 12px;
    }
    .contactpg--form {
        grid-column: 1 / span 6;
        margin-bottom: 100px;
    }

    .contactpg-socials {
        margin-bottom: 200px;
    }
}
@media (max-width: 767px) {
    .contactpg-socials {
        gap: 10px;
    }
    .contactpg--form {
        grid-column: 1 / -1;
        margin-bottom: 60px;
    }
}

.contactpg--form-container {
    position: relative;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: subgrid;
    margin-bottom: 200px;
}

@media (max-width: 1024px) {
    .contactpg--form-container {
        grid-column: 1 / -1;
    }
}

/* The panel is a sibling of the form, so it's positioned against a grid area
   rather than against the form itself: an absolutely positioned grid child
   takes its containing block from the area its grid-row/grid-column name, and
   that row is sized by the in-flow form. */
.contactpg--form,
.contactpg--form-success-message {
    grid-row: 1;
}

.contactpg--form-success-message {
    position: absolute;
    inset: 0;
    grid-column: 3 / -3;
    background-color: var(--teal-80);
    padding: 100px;
    display: none;
    flex-direction: column;
    gap: 80px;
}

/* JS adds the state class on a successful submit (see assets/js/forms.js).
   Hiding the form with visibility rather than display keeps it holding the
   row open — the height the overlay is sized against — while taking the
   controls underneath out of the tab order. */
.contactpg--form-container.is-submitted .contactpg--form {
    visibility: hidden;
}

.contactpg--form-container.is-submitted .contactpg--form-success-message {
    display: flex;
}

.contactpg--form-success-message p {
    margin-top: 32px;
}

@media (max-width: 1024px) {
    .contactpg--form-success-message {
        grid-column: 1 / span 6;
        padding: 60px;
    }
}
@media (max-width: 767px) {
    .contactpg--form-success-message {
        grid-column: 1 / -1;
        padding: 50px;
    }
}


/* Appended by forms.js when the submit fails, so the form stays put with
   everything typed still in it. */
.contactpg--form-error {
    margin-top: 20px;
    color: var(--error, #FF4B2B);
}
