.wg-form-shield-actions {
    display: flex !important;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    width: 100%;
    margin: 0 0 3% !important;
}

.wg-form-shield-actions > .et_contact_bottom_container {
    display: flex !important;
    align-items: flex-end;
    justify-content: flex-start;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

.wg-form-shield.et_pb_contact_field {
    /* Compact two-column row: question at left, small answer field at right. */
    display: grid !important;
    grid-template-columns: minmax(0, auto) minmax(88px, 124px);
    align-items: center;
    justify-content: start;
    column-gap: 10px;
    row-gap: 6px;
    float: none !important;
    clear: both !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: min(100%, 320px);
}

.wg-form-shield-heading {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: .35em;
    margin: 0 !important;
    min-width: 0;
    line-height: 1.35;
    color: var(--wg-form-shield-label-color, #ffffff) !important;
    font-size: 1em;
}

.wg-form-shield-title,
.wg-form-shield-question {
    color: inherit !important;
    font-weight: 600;
    white-space: nowrap;
    font-weight: 600;
}

/* The .input class is Divi's own contact-form class. JavaScript additionally
   mirrors the computed visual styles of a real field from the same form so
   custom Divi modules also match exactly. */
.wg-form-shield .wg-form-shield-answer.input {
    display: block;
    float: none;
    width: 100% !important;
    min-width: 88px;
    max-width: 124px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.wg-form-shield .wg-form-shield-answer.input::placeholder {
    color: var(--wg-form-shield-placeholder-color, currentColor);
    opacity: var(--wg-form-shield-placeholder-opacity, .7);
}

.wg-form-shield-message {
    display: block;
    grid-column: 1 / -1;
    min-height: 0;
    margin-top: 0;
    font-size: .9em;
    line-height: 1.35;
    color: var(--wg-form-shield-label-color, #ffffff) !important;
    font-size: 1em;
}

.wg-form-shield-message:empty {
    display: none;
}

.wg-form-shield-error .wg-form-shield-message {
    display: block;
    font-weight: 600;
}

.wg-form-shield-error .wg-form-shield-answer {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

.wg-form-shield-sr-label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.wg-form-shield-hp {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 767px) {
    .wg-form-shield-actions {
        gap: 12px;
    }

    .wg-form-shield.et_pb_contact_field {
        grid-template-columns: minmax(0, auto) minmax(86px, 116px);
        column-gap: 8px;
    }

    .wg-form-shield .wg-form-shield-answer.input {
        max-width: 116px !important;
    }
}

@media (max-width: 560px) {
    .wg-form-shield-actions {
        align-items: stretch;
    }

    .wg-form-shield-actions > .et_contact_bottom_container {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .wg-form-shield.et_pb_contact_field {
        grid-template-columns: 1fr;
        align-items: stretch;
        width: 100% !important;
    }

    .wg-form-shield-heading {
        white-space: normal;
    }

    .wg-form-shield .wg-form-shield-answer.input {
        width: 100% !important;
        max-width: 160px !important;
    }
}
