.displaydex-form-wrapper {
    width: 100%;
}

.displaydex-form .gform_fields,
.displaydex-form .gfield_checkbox {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.displaydex-form input[type="text"],
.displaydex-form input[type="email"],
.displaydex-form input[type="tel"],
.displaydex-form input[type="number"],
.displaydex-form select,
.displaydex-form textarea {
    background: #fff;
    border: 1px solid #686e77;
    border-radius: 2px;
    box-sizing: border-box;
    color: #152137;
    font: inherit;
}

.displaydex-form input:focus,
.displaydex-form select:focus,
.displaydex-form textarea:focus {
    border-color: #e98b2a;
    box-shadow: 0 0 0 2px rgba(233, 139, 42, .22);
    outline: 0;
}

.displaydex-form .gfield_required {
    color: #c6281c;
}

.displaydex-form .gform_button {
    background: #e98b2a;
    border: 0;
    border-radius: 2px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    min-height: 40px;
    padding: 8px 24px;
}

.displaydex-form .gform_button:hover,
.displaydex-form .gform_button:focus-visible {
    background: #c96e12;
}

.displaydex-form-message {
    border-left: 4px solid #e98b2a;
    margin: 0 0 20px;
    padding: 12px 15px;
}

.displaydex-form-message.gform_confirmation_message {
    border-left-color: #218838;
}

.displaydex-form-honeypot {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

/* Clean fallback for the single legacy Elementor Pro gallery on /gallery/. */
.displaydex-gallery-compat {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.displaydex-gallery-compat .e-gallery-item {
    aspect-ratio: 3 / 2;
    display: block;
    overflow: hidden;
    position: relative;
}

.displaydex-gallery-compat .e-gallery-image,
.displaydex-gallery-compat .elementor-gallery-item__overlay,
.displaydex-gallery-compat .elementor-gallery-item__content {
    inset: 0;
    position: absolute;
}

.displaydex-gallery-compat .e-gallery-image {
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-size: cover;
}

.displaydex-gallery-compat .elementor-gallery-item__overlay {
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    transition: opacity 350ms ease;
}

.displaydex-gallery-compat .elementor-gallery-item__content {
    align-items: center;
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.displaydex-gallery-compat .e-gallery-item:hover .elementor-gallery-item__overlay,
.displaydex-gallery-compat .e-gallery-item:focus-visible .elementor-gallery-item__overlay {
    opacity: 1;
}

/* Wholesale: reproduce the original Gravity Forms legacy geometry. */
#gform_wrapper_1 {
    margin: 16px 0;
}

#gform_1 .gform_fields {
    display: block;
}

#gform_1 .gfield {
    display: block;
    margin: 16px 0 0;
}

#gform_1 .gfield:first-child {
    margin-top: 0;
}

#gform_1 .gfield_label {
    color: #000;
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

#gform_1 .gfield_required {
    font-size: 14px;
    margin-left: 5px;
}

#gform_1 input[type="text"],
#gform_1 input[type="email"],
#gform_1 input[type="tel"],
#gform_1 select {
    display: block;
    height: 40px;
    margin-top: 8px;
    min-height: 40px;
    width: 100%;
}

#gform_1 input[type="text"],
#gform_1 input[type="email"],
#gform_1 input[type="tel"] {
    padding: 5px 4px;
}

#gform_1 select {
    border-color: #767676;
    margin-left: 1px;
    padding: 2px 0 2px 3px;
}

#gform_1 .gfield_checkbox {
    display: block;
    margin: 16px 0 6px;
}

#gform_1 .gfield_checkbox label {
    align-items: flex-start;
    display: flex;
    font-size: 12.25px;
    font-weight: 400;
    gap: 6px;
    line-height: 18.375px;
    margin: 0 0 8px;
    min-height: 24px;
}

#gform_1 .gfield_checkbox input {
    flex: 0 0 15px;
    height: 15px;
    margin: 6px 0 3px 1px;
    width: 15px;
}

#gform_1 .ginput_container_address {
    column-gap: 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 8px;
    row-gap: 0;
}

#gform_1 .ginput_container_address > span:nth-child(1),
#gform_1 .ginput_container_address > span:nth-child(2) {
    grid-column: 1 / -1;
}

#gform_1 .ginput_container_address label {
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

#gform_1 .ginput_container_address input,
#gform_1 .ginput_container_address select {
    margin-bottom: 12px;
    margin-top: 0;
}

#gform_1 .gform_footer {
    margin-top: 16px;
    padding: 16px 0 10px;
}

#gform_1 .gform_button {
    background: #e98b3a;
    border: 1px solid #fff;
    border-radius: 0;
    font: 14px Arial, sans-serif;
    font-weight: 400;
    height: 38px;
    min-height: 38px;
    padding: 10px 20px;
    width: 100px;
}

/* Contact: reproduce the original stacked name fields and compact controls. */
#gform_wrapper_3 {
    margin: 0;
}

#gform_3 .gform_fields {
    display: grid;
    gap: 20px;
}

#gform_3 .gfield {
    display: block;
    margin: 0;
}

#gform_3 .gfield_label {
    align-items: baseline;
    color: #112337;
    display: flex;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
    height: 20.02px;
    line-height: 20.02px;
    margin: 0 0 8px;
}

#field_3_1 > .gfield_label {
    width: max-content;
}

#gform_3 .gfield_required {
    font-size: 12px;
    margin: 0;
}

#gform_3 .gfield_description {
    color: #585e6a;
    font-size: 13px;
    line-height: 18.59px;
    margin: 0 0 8px;
}

#gform_3 input[type="text"],
#gform_3 input[type="email"],
#gform_3 input[type="tel"],
#gform_3 input[type="number"] {
    display: block;
    height: 37px;
    line-height: 37px;
    padding: 0 12px;
    width: 350px;
}

#gform_3 textarea {
    display: block;
    height: 168px;
    line-height: 37px;
    min-height: 168px;
    padding: 12px;
    resize: vertical;
    width: 350px;
}

#gform_3 .ginput_complex {
    display: grid;
    gap: 10px;
}

#gform_3 .ginput_complex > span {
    display: block;
}

#gform_3 .ginput_complex label {
    color: #585e6a;
    display: block;
    font-size: 13px;
    font-weight: 400;
    line-height: 18.59px;
    margin: 0 0 8px;
}

#gform_3 .ginput_counter {
    margin: 8px 0 0;
}

#gform_3 .displaydex-security-check {
    align-items: center;
    background: #fafafa;
    border: 1px solid #d8d8d8;
    box-sizing: border-box;
    display: flex;
    gap: 12px;
    height: 78px;
    padding: 10px 16px;
    width: 304px;
}

#gform_3 .displaydex-security-check label {
    color: #112337;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    margin: 0;
}

#gform_3 .displaydex-security-check input {
    flex: 0 0 60px;
    width: 60px;
}

#gform_3 .gform_footer {
    display: flex;
    margin-top: 24px;
}

#gform_3 .gform_button {
    align-items: center;
    background: #204ce5;
    border: 1px solid transparent;
    border-radius: 3px;
    display: flex;
    font-size: 14px;
    font-weight: 500;
    height: 38px;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
}

@media (max-width: 640px) {
    .displaydex-gallery-compat {
        grid-template-columns: 1fr;
    }

    /* Gravity Forms' legacy renderer shrinks the EAEL wrapper and uses
     * list-item spacing at phone widths. Match that public geometry while
     * keeping the clean-room renderer and secure submission handler. */
    #gform_wrapper_1 {
        max-width: 100%;
        width: 307.75px;
    }

    #gform_1 .gfield_checkbox label {
        display: block;
        margin: 0 0 16px;
        min-height: 24px;
    }

    #gform_1 .gfield_checkbox label:last-child {
        margin-bottom: 0;
    }

    #gform_1 .gfield_checkbox input {
        display: inline-block;
        margin: 6px 3px 3px 1px;
        vertical-align: middle;
    }

    #gform_1 .gfield_checkbox span {
        display: inline-block;
        max-width: 85%;
        vertical-align: middle;
    }

    #gform_1 .ginput_container_address {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 8px;
    }

    #gform_1 .ginput_container_address > span {
        grid-column: 1;
        margin: 0;
    }

    #gform_1 .ginput_container_address > span:last-child {
        margin-top: -2px;
    }

    #gform_1 .ginput_container_address > span:last-child select {
        margin-bottom: 5px;
        margin-top: 2px;
    }

    #gform_1 .gform_button {
        height: 50px;
        line-height: 28px;
        min-height: 50px;
    }

    #gform_3 input[type="text"],
    #gform_3 input[type="email"],
    #gform_3 input[type="tel"],
    #gform_3 input[type="number"],
    #gform_3 textarea {
        max-width: 100%;
    }
}
