/* Google uses layout tables, not the theme's stacked mobile data tables.
   Keep these overrides scoped to the search page, including its suggestions. */
body:has(.paine-search-page) :is(.gsc-control-cse, .gssb_c) table {
    display: table;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0;
}
body:has(.paine-search-page) :is(.gsc-control-cse, .gssb_c) tbody { display: table-row-group; }
body:has(.paine-search-page) :is(.gsc-control-cse, .gssb_c) thead { display: table-header-group; }
body:has(.paine-search-page) :is(.gsc-control-cse, .gssb_c) tr {
    display: table-row;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    color: inherit;
}
body:has(.paine-search-page) :is(.gsc-control-cse, .gssb_c) :is(td, th) {
    display: table-cell;
    width: auto !important;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-align: left;
    vertical-align: middle;
}
.paine-search-page .gsc-control-cse { padding: 0; }
.paine-search-page .gsc-search-box { width: 100%; }
.paine-search-page .gsc-search-box td.gsc-input { width: 100% !important; }
.paine-search-page .gsc-input-box {
    box-sizing: border-box;
    min-height: 48px;
}
body:has(.paine-search-page) .gsc-input-box td.gsib_a {
    width: 100% !important;
    /* Preserve room for Google's built-in magnifying glass. */
    padding: 10px 8px 10px 48px;
}
body:has(.paine-search-page) .gsc-input-box td.gsib_b { padding: 0 8px 0 0; }
.paine-search-page input.gsc-input {
    box-sizing: border-box;
    min-width: 0;
    width: 100% !important;
    height: 28px !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 28px !important;
    box-shadow: none;
}
.paine-search-page .gsc-input-box:focus-within {
    outline: 2px solid #4e008e;
    outline-offset: 2px;
}
.paine-search-page .gsst_a {
    min-width: 44px;
    min-height: 44px;
    box-sizing: border-box;
    padding: 8px;
    text-align: center;
}
/* Keep the redundant clear-results cell hidden; the field has its own clear icon. */
.paine-search-page .gsc-search-box td.gsc-clear-button { display: none; }

.paine-search-page .gsc-input-box { position: relative; background: #fff; }
.paine-search-page .gsc-input-box::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234e008e' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.paine-search-page input.gsc-input { background: transparent !important; }
.paine-search-page input.gsc-input::placeholder { color: #62626b; font-size: 16px; opacity: 1; }
body:has(.paine-search-page) .gsc-search-box td.gsc-search-button {
    display: table-cell;
    width: 58px !important;
    padding-left: 8px;
}
.paine-search-page button.gsc-search-button-v2 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    min-width: 50px;
    margin: 0;
    padding: 0;
    border: 1px solid #4e008e;
    border-radius: 8px;
    background: #4e008e;
    cursor: pointer;
}
.paine-search-page button.gsc-search-button-v2 svg { width: 20px; height: 20px; fill: #fff; }
.paine-search-page button.gsc-search-button-v2:hover { background: #6500a7; }
.paine-search-page button.gsc-search-button-v2:focus-visible,
.paine-search-page .gsst_a:focus-visible { outline: 2px solid #4e008e; outline-offset: 3px; }
