/* ==========================================================================
   Contact Form 7 shim
   --------------------------------------------------------------------------
   CF7 wraps every control in <span class="wpcf7-form-control-wrap">, which
   would otherwise become the grid item instead of the input itself. Collapsing
   those wrappers with display:contents lets the original career / contact /
   dealer grid rules keep working untouched.
   ========================================================================== */

.apply-grid .wpcf7-form-control-wrap,
.cu-grid .wpcf7-form-control-wrap,
.bd-grid .wpcf7-form-control-wrap {
    display: contents;
}

/* The original CSS used input:nth-child(2n) to drop the right border on the
   second column. With the wrappers collapsed, target the wrappers instead. */
.apply-grid > .wpcf7-form-control-wrap:nth-child(2n) input,
.cu-grid > .wpcf7-form-control-wrap:nth-child(2n) input,
.bd-grid > .wpcf7-form-control-wrap:nth-child(2n) input {
    border-right: 0;
}

/* Full-width controls span the whole row and never carry a right border. */
.apply-grid .full,
.cu-grid .full,
.bd-grid .full {
    grid-column: 1 / -1;
    border-right: 0;
}

/* CF7 injects <p> wrappers when a form has blank lines; neutralise them. */
.apply-form p,
.cu-form p,
.bd-form p {
    margin: 0;
}

/* File upload keeps the original label chrome. */
.file-field .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* ---------- Validation + response messages ---------- */

.wpcf7-not-valid-tip {
    display: block;
    color: #ffb3b8;
    font-size: .82rem;
    letter-spacing: .3px;
    padding: .4rem 1.5rem .6rem;
    background: rgba(220, 53, 69, .12);
}

.apply-grid input.wpcf7-not-valid,
.apply-grid textarea.wpcf7-not-valid,
.cu-grid input.wpcf7-not-valid,
.cu-grid textarea.wpcf7-not-valid,
.bd-grid input.wpcf7-not-valid,
.bd-grid textarea.wpcf7-not-valid {
    background: rgba(220, 53, 69, .14);
    box-shadow: inset 0 0 0 1px rgba(220, 53, 69, .8);
}

.wpcf7 form .wpcf7-response-output {
    margin: 1.5rem 0 0;
    padding: .9rem 1.2rem;
    border: 1px solid currentColor;
    color: #fff;
    font-size: .95rem;
    letter-spacing: .4px;
    background: rgba(0, 0, 0, .28);
}

.wpcf7 form.sent .wpcf7-response-output {
    border-color: #35b06a;
    color: #b6f2cf;
}

.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output {
    border-color: #e0a800;
    color: #ffe6a3;
}

.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.aborted .wpcf7-response-output {
    border-color: #dc3545;
    color: #ffc2c7;
}

.wpcf7-spinner {
    display: inline-block;
    vertical-align: middle;
    margin: 0 0 0 .75rem;
}

/* Editor-only hint when no form has been selected yet. */
.naveena-form-notice {
    padding: 1rem 1.2rem;
    border: 1px dashed rgba(255, 255, 255, .5);
    color: #fff;
    background: rgba(0, 0, 0, .3);
}
