/* Tighten Contact Form 7 spacing on the Become a Customer page. */
.customer-form-wrap .cf7-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    row-gap:10px;
    column-gap:20px;
}

.customer-form-wrap .cf7-grid p,
.customer-form-wrap .cf7-field,
.customer-form-wrap .cf7-field > p,
.customer-form-wrap .cf7-field label{
    margin:0!important;
}

/* Two-column pairs by default. */
.customer-form-wrap .cf7-field{
    grid-column:span 3;
}

/* Full-width rows. */
.customer-form-wrap .cf7-field--full{
    grid-column:1 / -1;
}

/* City / State / ZIP Code in one row. */
.customer-form-wrap .cf7-grid > .cf7-field:nth-child(6),
.customer-form-wrap .cf7-grid > .cf7-field:nth-child(7),
.customer-form-wrap .cf7-grid > .cf7-field:nth-child(8){
    grid-column:span 2;
}

.customer-form-wrap .wpcf7-form-control-wrap{
    margin-top:4px;
}

.customer-form-wrap .wpcf7-form input[type="text"],
.customer-form-wrap .wpcf7-form input[type="email"],
.customer-form-wrap .wpcf7-form input[type="tel"],
.customer-form-wrap .wpcf7-form select{
    min-height:40px;
    padding:8px 12px;
}

/* Compact message field, matching the reference proportions. */
.customer-form-wrap .wpcf7-form textarea{
    height:92px;
    min-height:92px;
    max-height:140px;
    padding:8px 12px;
    resize:vertical;
}

/* Submit + privacy note match the designer reference. */
.customer-form-wrap .cf7-submit-row{
    position:relative;
    margin-top:12px;
    display:grid!important;
    grid-template-columns:auto minmax(0,360px);
    align-items:center;
    justify-content:start;
    column-gap:22px;
    row-gap:0;
}

/* CF7 can inject paragraph wrappers; remove them from layout. */
.customer-form-wrap .cf7-submit-row > p{
    display:contents!important;
    margin:0!important;
}

.customer-form-wrap .cf7-submit-row br{
    display:none!important;
}

.customer-form-wrap .cf7-submit-row .wpcf7-submit{
    grid-column:1;
    grid-row:1;
    margin:0!important;
}

/* Keep CF7's loading spinner from occupying its own layout column. */
.customer-form-wrap .cf7-submit-row .wpcf7-spinner{
    position:absolute;
    left:calc(100% + 8px);
    top:50%;
    margin:0!important;
    transform:translateY(-50%);
}

.customer-form-wrap .cf7-privacy{
    grid-column:2;
    grid-row:1;
    position:relative;
    display:flex;
    align-items:center;
    width:100%;
    min-height:20px;
    max-width:360px;
    padding-left:24px;
    color:#6a7588;
    font-size:11px;
    line-height:1.45;
}

.customer-form-wrap .cf7-privacy:before{
    content:"";
    position:absolute;
    left:0;
    top:50%;
    width:16px;
    height:16px;
    transform:translateY(-50%);
    background-repeat:no-repeat;
    background-position:center;
    background-size:16px 16px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2399A3B2' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='10' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

@media(max-width:620px){
    .customer-form-wrap .cf7-grid{
        grid-template-columns:1fr;
        row-gap:10px;
    }
    .customer-form-wrap .cf7-field,
    .customer-form-wrap .cf7-field--full,
    .customer-form-wrap .cf7-grid > .cf7-field:nth-child(6),
    .customer-form-wrap .cf7-grid > .cf7-field:nth-child(7),
    .customer-form-wrap .cf7-grid > .cf7-field:nth-child(8){
        grid-column:auto;
    }
    .customer-form-wrap .cf7-submit-row{
        grid-template-columns:1fr;
        row-gap:10px;
    }
    .customer-form-wrap .cf7-submit-row .wpcf7-submit,
    .customer-form-wrap .cf7-privacy{
        grid-column:1;
        grid-row:auto;
    }
    .customer-form-wrap .cf7-privacy{
        max-width:none;
    }
}
