/* ==========================================================================
   PAGEBUILDER: contact
   shared section styles (.pb-section, .pb-content, .pb-headline, .pb-columns) are in style.css.
   ========================================================================== */

/* live site: 95px above the map (instead of the usual 110px). */
.pb-contact {
    padding-bottom: 95px;
}


/* --------------------------------------------------------------------------
   person: image (2/3) + contact details (1/3)
   -------------------------------------------------------------------------- */

/* 20px more than the usual space below the headline (the margins collapse). */
.pb-contact-person {
    margin-top: 60px;
}

.pb-contact-person-image {
    margin: 0;
    padding: 8px;
    border: 1px solid var(--color-grey-200);
    background: var(--color-white);
}

.pb-contact-person-image img {
    display: block;
    width: 100%;
    height: auto;
}

.pb-contact-person-image figcaption {
    padding-top: 10px;
    font-size: 14.875px;
    line-height: 30px;
    text-align: center;
}

.pb-contact-person-text a {
    text-decoration: none;
}

.pb-contact-person-text a:hover {
    text-decoration: underline;
}

@media (min-width: 768px) {
    .pb-contact-person-image {
        grid-column: span 2;
    }
}


/* --------------------------------------------------------------------------
   form (1/2) + text (1/2)
   -------------------------------------------------------------------------- */

.pb-contact-columns {
    margin-top: 80px;
}

.pb-contact-text h2 {
    margin: 0 0 10px;
    color: var(--color-blue);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.5;
}

.pb-contact-text p {
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .pb-contact-text {
        padding-top: 30px;
    }
}


/* --------------------------------------------------------------------------
   form
   -------------------------------------------------------------------------- */

/* flow-root: keeps the 3px top margin of the inputs inside (no margin collapsing). */
.pb-contact-form-field {
    display: flow-root;
    margin: 0 0 15px;
}

.pb-contact-form :is(input[type="text"], input[type="email"], textarea) {
    display: block;
    width: 100%;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid var(--color-blue);
    border-radius: 0;
    background: var(--color-white);
    color: var(--color-grey-550);
    font: inherit;
    line-height: 1.65;
}

.pb-contact-form :is(input[type="text"], input[type="email"]) {
    max-width: 374px;
    margin-top: 3px;
}

.pb-contact-form textarea {
    resize: vertical;
}

.pb-contact-form ::placeholder {
    color: inherit;
    opacity: .7;
}

/* the border gets 2px thick. */
.pb-contact-form :is(input[type="text"], input[type="email"], textarea):focus {
    outline: 0;
    box-shadow: 0 0 0 1px var(--color-blue);
}

/* privacy checkbox: custom box with a check mark, text next to it. */
.pb-contact-form-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 24px 0 0;
    font-size: 13.6px;
    line-height: 1.7;
}

.pb-contact-form-acceptance input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 2.5px 0 0;
    border: 1px solid var(--color-blue);
    border-radius: 0;
    background: var(--color-white) center / 12px auto no-repeat;
    cursor: pointer;
    appearance: none;
    transition: background-color .15s;
}

.pb-contact-form-acceptance input:hover {
    box-shadow: 0 0 0 1px var(--color-blue);
}

.pb-contact-form-acceptance input:checked {
    background-color: var(--color-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.5l3.5 3.5L11 1.5' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E");
}

.pb-contact-form-acceptance input:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.pb-contact-form-acceptance label {
    cursor: pointer;
}

.pb-contact-form-note {
    margin: 20px 0 0;
    font-size: 13.6px;
    line-height: 1.7;
}

.pb-contact-form-buttons {
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0 0;
}

.pb-contact-form-buttons button {
    padding: 20px 40px;
    border: 0;
    border-radius: 0;
    color: var(--color-white);
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 30px;
    cursor: pointer;
    transition: background-color .3s;
}

.pb-contact-form-buttons button:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.pb-contact-form-reset {
    background: var(--color-teal);
}

.pb-contact-form-reset:hover {
    background: var(--color-teal-light);
}

.pb-contact-form-submit {
    background: var(--color-blue);
}

.pb-contact-form-submit:hover {
    background: var(--color-blue-light);
}

@media (prefers-reduced-motion: reduce) {
    .pb-contact-form-acceptance input,
    .pb-contact-form-buttons button {
        transition: none;
    }
}


/* --------------------------------------------------------------------------
   form: messages, captcha, consent hint
   -------------------------------------------------------------------------- */

.pb-contact-form-errors {
    margin: 0 0 20px;
    padding: 12px 16px;
    border-left: 3px solid var(--color-error);
    color: var(--color-error);
    font-size: 13.6px;
    line-height: 1.7;
}

.pb-contact-form-errors :is(p, ul) {
    margin: 0;
}

.pb-contact-form-errors ul {
    padding-left: 1.2em;
}

.pb-contact-form-success {
    margin: 0;
}

.pb-contact-form-captcha {
    margin: 24px 0 0;
}

.pb-contact-form .iconcaptcha-widget {
    max-width: 374px;
}

/* keeps longer texts of the init/success state vertically centered, when they wrap. */
.pb-contact-form .iconcaptcha-widget:is(.iconcaptcha-init, .iconcaptcha-success) .iconcaptcha-modal__body-title {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    white-space: normal;
}

/* warning box: without consent, the form can't be sent. */
.pb-contact-form-consent-hint {
    margin: 20px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--color-error);
    border-left-width: 3px;
    background: rgba(220, 50, 50, .06); /* --color-error, 6% */
    color: var(--color-error);
    font-size: 13.6px;
    line-height: 1.7;
}

.pb-contact-form-consent-hint a {
    color: inherit;
    font-weight: 500;
    text-decoration: underline;
}

/* disabled until the visitor accepted the captcha (see assets/js/pagebuilder/contact.js). */
.pb-contact-form-submit:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.pb-contact-form-submit:disabled:hover {
    background: var(--color-blue);
}
