﻿/* =========================================================
  ORIGINAL LAYOUT: CENTER AND CONSTRAIN MAIN CONTENT
  ========================================================= */
body #mainContentContainer {
    display: block;
    position: relative;
    float: none;
    clear: both;
    left: auto;
    right: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 0;
    box-sizing: border-box;
}

    body #mainContentContainer > .container.body-content {
        display: block;
        position: static;
        float: none;
        transform: none;
        width: 100%;
        max-width: 1440px;
        min-width: 0;
        margin: 0 auto;
        /* ADJUST: Outer left/right spacing. */

        padding: 0 20px;
        box-sizing: border-box;
    }
/* =========================================================
   PAGE
 ========================================================= */
.inmate-search-page,
.inmate-search-page *,
.inmate-search-page *::before,
.inmate-search-page *::after {
    box-sizing: border-box;
}

body #mainContentContainer .inmate-search-page {
    display: block;
    position: static;
    float: none;
    transform: none;
    width: 100%;
    max-width: 1400px;
    min-width: 0;
    margin: 0 auto;
    padding: 0;
}

.inmate-search-page .inmate-search-title {
    margin: 0 0 24px;
    color: #343a40;
    text-align: center;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 1px;
}
/* =========================================================

   SEARCH FORM

   ========================================================= */
.inmate-search-page .filtering {
    display: block;
    position: static;
    float: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 20px;
    /* ADJUST: Space inside the panel. */

    padding: 24px;
    background: #f8fafc;
    border: 1px solid #d8e0e8;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(30, 50, 70, 0.06);
}

.inmate-search-page #inmateSearchForm {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
}

.inmate-search-page .search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    /* ADJUST: Row gap, then column gap. */

    gap: 18px 22px;
}

.inmate-search-page .search-field {
    min-width: 0;
}

.inmate-search-page .control-label {
    display: block;
    margin: 0 0 7px;
    color: #343a40;
    font-size: 15px;
    font-weight: 600;
}

.inmate-search-page .form-control {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    padding: 10px 12px;
    color: #333;
    background: #fff;
    border: 1px solid #bfc6ce;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.4;
}

    .inmate-search-page .form-control:focus {
        border-color: #337ab7;
        outline: 2px solid #337ab7;
        outline-offset: 2px;
        box-shadow: none;
    }
/* =========================================================
   ACTION BUTTONS
   ========================================================= */
.inmate-search-page .search-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.inmate-search-page .search-button,
.inmate-search-page .reset-button {
    min-width: 120px;
    min-height: 44px;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
}

.inmate-search-page .reset-button {
    color: #344b5e;
    background: #fff;
    border: 1px solid #aebdca;
}

    .inmate-search-page .reset-button:hover {
        background: #edf2f7;
    }

.inmate-search-page .search-actions button:disabled {
    opacity: 0.65;
    cursor: wait;
}
/* =========================================================

   VALIDATION AND CLOSE BUTTON

   ========================================================= */
.inmate-search-page .search-validation {
    margin: 0;
    padding: 0;
    border: 0;
}

    .inmate-search-page .search-validation.has-error {
        position: relative;
        margin-bottom: 22px;
        padding: 16px 52px;
        color: #842029;
        background: #fff1f2;
        border: 1px solid #efb5bb;
        border-left: 5px solid #b42332;
        border-radius: 8px;
        text-align: center;
        overflow-wrap: anywhere;
    }

.inmate-search-page .search-validation-title {
    display: block;
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 700;
}

.inmate-search-page .search-validation-message {
    display: block;
    font-size: 15px;
    line-height: 1.5;
}

.inmate-search-page .search-validation-close {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #842029;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}



    .inmate-search-page .search-validation-close:hover {
        background: #f8d7da;
    }



    .inmate-search-page .search-validation-close:focus-visible {
        outline: 2px solid #842029;
        outline-offset: -3px;
    }

/* =========================================================
   RESULTS: ONLY THIS REGION SCROLLS HORIZONTALLY
   ========================================================= */
.inmate-search-page .results-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .inmate-search-page .results-scroll:focus-visible {
        outline: 2px solid #337ab7;
        outline-offset: 2px;
    }

.inmate-search-page #TableContainer {
    width: 100%;
    /* Keeps columns readable; the wrapper handles scrolling. */

    min-width: 900px;
}

    .inmate-search-page #TableContainer .jtable-main-container {
        width: 100%;
        font-size: 16px;
    }

    .inmate-search-page #TableContainer .jtable-title {
        height: auto;
        min-height: 46px;
        color: #fff;
        background: #344b5e;
    }

    .inmate-search-page #TableContainer .jtable-title-text {
        font-size: 18px;
        font-weight: 700;
        line-height: 46px;
    }

    .inmate-search-page #TableContainer table.jtable {
        width: 100%;
        table-layout: fixed;
    }

        .inmate-search-page #TableContainer table.jtable th,
        .inmate-search-page #TableContainer table.jtable td {
            white-space: normal;
            overflow-wrap: anywhere;
            vertical-align: middle;
        }

        .inmate-search-page #TableContainer table.jtable thead th {
            height: auto;
            padding: 12px 10px;
            color: #263d50;
            background: #edf2f7;
            border-color: #d8e0e8;
            font-size: 16px;
            font-weight: 700;
            line-height: 1.5;
        }

    .inmate-search-page #TableContainer .jtable-column-header-text {
        font-size: inherit;
    }

    .inmate-search-page #TableContainer table.jtable tbody td {
        padding: 12px 10px;
        color: #263238;
        border-color: #e0e6ec;
        /* ADJUST: Grid text size. */

        font-size: 16px;
        line-height: 1.6;
    }

    .inmate-search-page #TableContainer table.jtable tbody tr:nth-child(odd) {
        background: #fff;
    }

    .inmate-search-page #TableContainer table.jtable tbody tr:nth-child(even) {
        background: #f5f8fb;
    }

    .inmate-search-page #TableContainer table.jtable tbody tr:hover {
        background: #eaf2fa;
    }

    .inmate-search-page #TableContainer .jtable-bottom-panel {
        height: auto;
        min-height: 48px;
        font-size: 16px;
    }

        .inmate-search-page #TableContainer .jtable-bottom-panel select,
        .inmate-search-page #TableContainer .jtable-bottom-panel input {
            font-size: 16px;
        }

    /* =========================================================
   DETAILS LINK
 ========================================================= */
    .inmate-search-page #TableContainer .details-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 76px;
        min-height: 44px;
        padding: 8px 10px;
        color: #245580;
        background: #fff;
        border: 1px solid #245580;
        border-radius: 6px;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
        white-space: nowrap;
    }

        .inmate-search-page #TableContainer .details-link:hover {
            color: #fff;
            background: #245580;
            text-decoration: none;
        }

        .inmate-search-page #TableContainer .details-link:focus-visible,
        .inmate-search-page .reset-button:focus-visible {
            outline: 3px solid #245580;
            outline-offset: 3px;
        }

.inmate-search-page .results-hint {
    display: none;
    margin: 0 0 8px;
    color: #555;
    font-size: 14px;
}
/* =========================================================
   PROGRESS BAR
   Retained for the Reset/progress version of your script.
   ========================================================= */

.inmate-search-page .search-progress:empty {
    display: none;
}


.inmate-search-page .search-progress {
    margin-top: 18px;
}


.inmate-search-page .search-progress-label {
    display: block;
    margin-bottom: 8px;
    color: #344b5e;
    font-size: 15px;
    font-weight: 600;
}



.inmate-search-page .search-progress-track {
    height: 8px;
    overflow: hidden;
    background: #e2eaf2;
    border-radius: 20px;
}



.inmate-search-page .search-progress-bar {
    width: 35%;
    height: 100%;
    background: #337ab7;
    border-radius: 20px;
    animation: inmate-search-progress 1.2s ease-in-out infinite;
}



@keyframes inmate-search-progress {

    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(290%);
    }
}



@media (prefers-reduced-motion: reduce) {

    .inmate-search-page .search-progress-bar {
        width: 100%;
        animation: none;
    }
}



/* =========================================================

   RESPONSIVE RULES — KEEP THESE AT THE END

   ========================================================= */



@media (max-width: 1000px) {

    .inmate-search-page .results-hint {
        display: block;
    }
}



@media (max-width: 900px) {

    .inmate-search-page .search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}



@media (max-width: 600px) {

    body #mainContentContainer {
        padding: 16px 0;
    }



        body #mainContentContainer > .container.body-content {
            padding: 0 10px;
        }



    .inmate-search-page .inmate-search-title {
        margin-bottom: 18px;
    }



    .inmate-search-page .filtering {
        padding: 16px;
    }



    .inmate-search-page .search-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }



    .inmate-search-page .search-actions {
        flex-direction: column;
    }



    .inmate-search-page .search-button,
    .inmate-search-page .reset-button {
        width: 100%;
        min-width: 0;
    }



    .inmate-search-page .search-validation.has-error {
        padding: 14px 48px 14px 14px;
    }
}

body #mainContentContainer {
    display: block;
    position: static;
    float: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 20px 0;
    transform: none;
    box-sizing: border-box;
}
    /* New wrapper avoids legacy .container/.body-content rules. */

    body #mainContentContainer > .inmate-content-shell {
        display: block;
        width: 100%;
        max-width: 1440px;
        min-width: 0;
        margin: 0 auto;
        padding: 0 16px;
        box-sizing: border-box;
    }

    body #mainContentContainer .inmate-search-page {
        width: 100%;
        max-width: 1400px;
        min-width: 0;
        margin: 0 auto;
        padding: 0;
        box-sizing: border-box;
    }
        /* Keep all form elements within the panel. */

        body #mainContentContainer .inmate-search-page .filtering,
        body #mainContentContainer .inmate-search-page #inmateSearchForm,
        body #mainContentContainer .inmate-search-page .search-grid,
        body #mainContentContainer .inmate-search-page .search-field {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        body #mainContentContainer .inmate-search-page .form-control {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }
        /* The results may be wide, but their wrapper must fit. */
        body #mainContentContainer .inmate-search-page .results-scroll {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow-x: auto;
        }

@media (max-width: 600px) {
    body #mainContentContainer > .inmate-content-shell {
        padding: 0 12px;
    }

    body #mainContentContainer .inmate-search-page .filtering {
        padding: 16px;
        margin: 0 0 20px;
    }

    body #mainContentContainer .inmate-search-page .search-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body #mainContentContainer .inmate-search-page .search-actions {
        flex-direction: column;
        min-width: 0;
    }

        body #mainContentContainer .inmate-search-page .search-actions button {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }
}

.inmate-search-page .details-instruction {
    margin: 0 0 12px;
    padding: 12px 16px;
    color: #244767;
    background-color: #eef5fc;
    border-left: 4px solid #337ab7;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

    .inmate-search-page .details-instruction strong {
        font-weight: 700;
    }

    .inmate-search-page .details-instruction[hidden] {
        display: none;
    }
/* One shadow around the entire search area */

.inmate-search-card {
    background: #fff;
    border: 1px solid #d7dce2;
    border-radius: 12px;
    /* ADJUST: Inner spacing around form and results. */

    padding: 24px;
    /* Space for the outside shadow. */

    margin: 16px 0 32px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.10), 0 18px 40px rgba(15, 23, 42, 0.14);
}
    /* Remove the separate inner shadows */
    .inmate-search-card #inmateSearchForm,
    .inmate-search-card .jtable-main-container {
        box-shadow: none;
    }

@media (max-width: 600px) {

    .inmate-search-card {
        padding: 14px;
    }
}

@media (max-width: 767px) {



    body #mainContentContainer {
        padding: 16px 0;
    }



        body #mainContentContainer > .inmate-content-shell {
            padding: 0 12px;
        }



    .inmate-search-card {
        padding: 14px;
    }



    .inmate-search-page .inmate-search-title {
        margin-bottom: 18px;
        font-size: 26px;
    }



    body #mainContentContainer .inmate-search-page .filtering {
        padding: 16px;
    }



    body #mainContentContainer .inmate-search-page .search-grid {
        grid-template-columns: minmax(0, 1fr);
        /* ADJUST: Vertical spacing between fields. */

        gap: 22px;
    }



    .inmate-search-page .control-label {
        margin-bottom: 8px;
        font-size: 18px;
        font-weight: 700;
    }



    .inmate-search-page .form-control {
        min-height: 50px;
        padding: 12px;
        font-size: 16px;
    }



    body #mainContentContainer .inmate-search-page .search-actions {
        flex-direction: column;
        gap: 12px;
    }



        body #mainContentContainer .inmate-search-page .search-actions button {
            width: 100%;
            max-width: 100%;
            min-width: 0;
            min-height: 48px;
        }



    .inmate-search-page .search-validation.has-error {
        padding: 14px 48px 14px 14px;
    }
}
/* Keep the In Custody? heading on one line. */
body #mainContentContainer .inmate-search-page
#TableContainer table.jtable thead th:last-child,
body #mainContentContainer .inmate-search-page
#TableContainer table.jtable thead th:last-child
.jtable-column-header-text {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}
/* Allow sufficient height for all column headings. */
body #mainContentContainer .inmate-search-page
#TableContainer table.jtable thead th {
    height: auto;
    vertical-align: middle;
}
    /* Give the In Custody? column enough room. */
    body #mainContentContainer .inmate-search-page
    #TableContainer table.jtable thead th:last-child {
        width: 160px !important;
    }
/* Consistent typography */
body #mainContentContainer .inmate-search-page {
    font-family: "Segoe UI", Arial, sans-serif;
    color: #243447;
}
    /* Simplify the panel around the search fields */
    body #mainContentContainer .inmate-search-page .filtering {
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
/* Refine the desktop card */
@media (min-width: 768px) {
    body #mainContentContainer .inmate-search-card {
        padding: 28px;
        border: 1px solid #dce3e9;
        border-radius: 12px;
        box-shadow: 0 6px 24px rgba(25, 45, 65, 0.08);
    }
}
#searchResultsSection[hidden] {
    display: none !important;
}
/* Search guidance */

body #mainContentContainer

.inmate-search-page .search-instructions {
    margin: 0 0 24px;
    padding: 0 16px;
    color: #465569;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}



    body #mainContentContainer

    .inmate-search-page .search-instructions strong {
        color: #203b4b;
        font-weight: 700;
    }



/* Hide results before searching and after Reset */

#searchResultsSection[hidden] {
    display: none !important;
}
body #mainContentContainer

.inmate-search-page .inmate-search-title {
    color: #203b4b;
}



body #mainContentContainer

.inmate-search-page .search-instructions {
    font-size: 16px;
    line-height: 1.6;
}



body #mainContentContainer

.inmate-search-page .search-instructions-secondary {
    display: block;
    margin-top: 4px;
    color: #526174;
    font-size: 14px;
}



body #mainContentContainer

.inmate-search-page .search-actions {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e1e7ed;
}
body #mainContentContainer .inmate-search-page .filtering {
    padding: 24px;
    background: #eef5fc;
    border: 1px solid #d6e4f0;
    border-radius: 10px;
    box-shadow: none;
}

@media (max-width: 767px) {
    body #mainContentContainer .inmate-search-page .filtering {
        padding: 16px;
    }
}