/* PaymentProcessor.com matching-tool finishing fixes. */

/* WordPress applies block spacing between top-level site blocks. Because this
   template outputs stylesheet <link> elements between the Header template part
   and the matcher <main>, the generic first-sibling reset does not catch this
   page reliably. Remove the page-level block gap explicitly. */
body .wp-site-blocks > .pp-match-page {
    margin-top: 0 !important;
    margin-block-start: 0 !important;
}

/* Keep the two final controls on the same baseline. */
.pp-tool-final-grid {
    align-items: start !important;
    grid-auto-rows: max-content;
}

.pp-tool-final-grid > .pp-form-field {
    min-width: 0;
    margin: 0 !important;
    display: grid;
    grid-template-rows: minmax(18px, auto) 50px;
    align-content: start;
    align-self: start;
}

/* WordPress can insert a <br> between an existing field label and control.
   It becomes an extra grid row, which was pushing the market select down. */
.pp-tool-final-grid > .pp-form-field > br {
    display: none !important;
}

.pp-tool-final-grid > .pp-form-field > label {
    min-height: 18px;
    margin: 0 0 8px !important;
    line-height: 18px;
}

.pp-tool-final-grid > .pp-form-field > .pp-input {
    width: 100%;
    height: 50px;
    min-height: 50px;
    margin: 0 !important;
}

/* Use a dark native select palette so the open menu matches the site. */
.pp-matching-tool select.pp-input {
    color-scheme: dark;
    background-color: #05080b !important;
    color: #f5f6f5;
}

.pp-matching-tool select.pp-input option {
    background-color: #090d11;
    color: #f5f6f5;
}

.pp-matching-tool select.pp-input option:checked {
    background-color: #18212a;
    color: #ffffff;
}

@media (max-width: 700px) {
    .pp-tool-final-grid > .pp-form-field {
        grid-template-rows: auto 50px;
    }
}