.page-main:has(.gpf-lookup) { padding-top: clamp(16px, 2vw, 24px); }
.page-main:has(.gpf-lookup) > h1 { display: none; }
.gpf-lookup > .gpf-lookup-form:first-child { margin-top: 0; }
.gpf-lookup .gpf-payment {
    --order-line: #dce5ee;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    grid-template-areas: "header header" "tools tools" "facts delivery" "total delivery" "status status" "payment payment";
    max-width: none;
    padding: 0;
    background: #fff;
    border: 1px solid var(--order-line);
    border-radius: 12px;
    overflow: hidden;
    color: #223449;
}
.gpf-lookup-heading {
    grid-area: header;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--order-line);
}
.gpf-lookup .gpf-lookup-heading h2, .gpf-lookup .gpf-delivery-actions h3 { margin: 0; color: #20354a; }
.gpf-lookup-heading span { padding: 4px 12px; border-radius: 5px; background: #eef2f6; font-weight: 600; }
.gpf-paid .gpf-lookup-heading span { color: #167454; background: #e9f6ef; }
.gpf-order-tools {
    grid-area: tools;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 18px 4px;
    padding: 12px;
    border: 1px solid #c8dcfc;
    border-radius: 10px;
    background: #eff6ff;
}
.gpf-order-tools a, .gpf-lookup .gpf-delivery-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 7px 12px;
    border: 1px solid #9bbff3;
    border-radius: 7px;
    background: white;
    color: #1254a9;
    font: inherit;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
}
.gpf-order-tools a:nth-child(2) { background: #dfecff; }
.gpf-order-tools a:last-child { background: #9c470a; border-color: #9c470a; color: white; }
.gpf-order-tools a:hover, .gpf-lookup .gpf-delivery-actions button:hover { filter: brightness(.95); }
.gpf-lookup .gpf-payment .gpf-receipt-facts { grid-area: facts; align-self: start; margin: 0; padding: 24px; }
.gpf-lookup .gpf-receipt-total { grid-area: total; margin: 0 24px 20px; }
.gpf-lookup [data-gpf-pay] { grid-area: payment; padding: 0 24px 18px; }
.gpf-lookup .gpf-payment .gpf-receipt-status { grid-area: status; margin: 0 24px 16px; }
.gpf-lookup .gpf-delivery-panel {
    grid-area: delivery;
    min-width: 0;
    align-self: stretch;
    margin: 20px 0;
    padding: 0 24px;
    background: transparent;
    border: 0;
    border-left: 1px solid var(--order-line);
    border-radius: 0;
}
.gpf-delivery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gpf-delivery-actions h3 { flex: 1; font-size: 18px; white-space: nowrap; }
.gpf-lookup .gpf-delivery-actions button { font-size: 14px; min-height: 40px; cursor: pointer; }
.gpf-lookup .gpf-delivery-format { margin: 12px 0 8px; color: #526477; font-size: 14px; }
.gpf-lookup [data-gpf-lines] { margin: 0; padding-inline-start: 25px; }
.gpf-lookup [data-gpf-lines] li { padding: 10px 0; font: 15px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; white-space: pre-wrap; border-bottom: 1px solid var(--order-line); }
.gpf-lookup .gpf-payment:not(:has(.gpf-order-tools:not([hidden]))) { grid-template-areas: "header header" "facts facts" "total total" "status status" "payment payment"; }
.gpf-lookup .gpf-lookup-form { max-width: 670px; margin-top: 20px; }
@media (max-width: 760px) {
    .gpf-lookup .gpf-payment,
    .gpf-lookup .gpf-payment:not(:has(.gpf-order-tools:not([hidden]))) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "header" "tools" "facts" "total" "delivery" "status" "payment";
    }
    .gpf-lookup-heading { padding: 14px 16px; }
    .gpf-order-tools { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 12px 12px 0; padding: 8px; gap: 8px; }
    .gpf-lookup .gpf-payment .gpf-receipt-facts { padding: 16px; }
    .gpf-lookup .gpf-receipt-total { margin: 0 16px 14px; }
    .gpf-lookup .gpf-delivery-panel { margin: 0; padding: 16px; border: 0; border-top: 1px solid var(--order-line); }
    .gpf-lookup [data-gpf-pay] { padding: 0 16px 16px; }
    .gpf-lookup .gpf-delivery-actions button { min-height: 44px; }
}
