/* ============================================================
   CASE SEARCH
   Project Blue Book / Government Records aesthetic
   ============================================================ */

.case-search-page {
    width: 100%;
    box-sizing: border-box;
    background: #d9d5c8;
    color: #34332e;
    padding: 50px 20px 80px;
}

.case-search-container {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
}


/* ============================================================
   HEADER
   ============================================================ */

.case-search-header {
    margin-bottom: 35px;
}

.case-search-topline {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    font-family: "Courier New", monospace;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.case-search-rule {
    height: 1px;
    background: #69665d;
    margin: 12px 0;
}

.case-search-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.case-search-label {
    font-family: "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.case-search-title h1 {
    margin: 0;

    font-family: "Courier New", monospace;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1;
    letter-spacing: 2px;
    font-weight: 700;
}

.case-search-classification {
    font-family: "Courier New", monospace;
    font-size: 10px;
    letter-spacing: 1px;
    border: 1px solid #77736a;
    padding: 7px 10px;
    white-space: nowrap;
}

.case-search-description {
    max-width: 700px;
    margin: 18px 0 0;

    font-family: Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
}


/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.case-search-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;

    font-family: "Courier New", monospace;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.case-search-section-heading span {
    font-size: 11px;
    color: #7d1919;
}


/* ============================================================
   SEARCH FORM
   ============================================================ */

.case-search-form-section {
    background: rgba(245, 242, 231, .55);

    border: 1px solid #aaa59a;

    padding: 25px;

    margin-bottom: 45px;

    box-shadow:
        0 2px 8px rgba(40,35,25,.08);
}

.case-search-form-section >
.case-search-section-heading {
    margin-bottom: 25px;
}

.case-search-form {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.case-search-field-wide {
    grid-column: 1 / -1;
}

.case-search-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.case-search-field label {
    font-family: "Courier New", monospace;

    font-size: 10px;
    font-weight: bold;

    letter-spacing: 1.3px;
}

.case-search-field input,
.case-search-field select {
    width: 100%;
    box-sizing: border-box;

    min-height: 46px;

    border: 1px solid #8c887e;

    border-radius: 0;

    background: #eeebdf;

    color: #33322e;

    padding: 10px 12px;

    font-family: "Courier New", monospace;
    font-size: 13px;

    outline: none;
}

.case-search-field input:focus,
.case-search-field select:focus {
    border-color: #7d1919;

    box-shadow:
        0 0 0 2px rgba(125,25,25,.1);
}

.case-search-field input::placeholder {
    color: #858177;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.case-search-actions {
    grid-column: 1 / -1;

    display: flex;
    gap: 12px;

    margin-top: 5px;
}

.case-search-button,
.case-clear-button,
.case-view-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border: 1px solid #5e5b54;

    border-radius: 0;

    background: #403f3a;

    color: #f0ede2;

    font-family: "Courier New", monospace;

    font-size: 10px;
    font-weight: bold;

    letter-spacing: 1.2px;

    text-decoration: none;

    cursor: pointer;

    box-sizing: border-box;
}

.case-search-button:hover,
.case-view-button:hover {
    background: #292824;
    color: #fff;
}

.case-clear-button {
    background: transparent;
    color: #4b4943;
}

.case-clear-button:hover {
    background: #c9c5b9;
    color: #292824;
}


/* ============================================================
   RESULTS HEADER
   ============================================================ */

.case-search-results-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.case-search-result-count {
    font-family: "Courier New", monospace;

    font-size: 10px;
    font-weight: bold;

    letter-spacing: 1px;
}


/* ============================================================
   CASE GRID
   ============================================================ */

.case-search-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* ============================================================
   CASE CARD
   ============================================================ */

.case-search-card {
    display: flex;
    flex-direction: column;

    min-height: 340px;

    background: #eeebdf;

    border: 1px solid #8d897e;

    box-shadow:
        0 3px 8px rgba(45,40,30,.08);
}

.case-card-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    padding: 12px 15px;

    font-family: "Courier New", monospace;

    font-size: 9px;
    font-weight: bold;

    letter-spacing: 1px;
}

.case-card-label {
    color: #5a574f;
}

.case-card-number {
    color: #7d1919;
}

.case-card-rule {
    height: 1px;

    background: #9b968a;
}

.case-card-body {
    flex: 1;

    padding: 20px 18px;
}

.case-card-body h2 {
    margin: 0 0 25px;

    font-family: Georgia, serif;

    font-size: 21px;

    line-height: 1.25;
}

.case-card-body h2 a {
    color: #292824;
    text-decoration: none;
}

.case-card-body h2 a:hover {
    color: #7d1919;
}

.case-card-field {
    display: grid;

    grid-template-columns: 100px 1fr;

    gap: 10px;

    padding: 9px 0;

    border-top: 1px dotted #aaa59a;
}

.case-card-field span {
    font-family: "Courier New", monospace;

    font-size: 8px;
    font-weight: bold;

    letter-spacing: 1px;

    color: #68645b;
}

.case-card-field strong {
    font-family: "Courier New", monospace;

    font-size: 10px;
    font-weight: normal;

    line-height: 1.4;

    overflow-wrap: anywhere;
}

.case-card-footer {
    border-top: 1px solid #aaa59a;

    padding: 12px 15px;

    display: flex;
    justify-content: flex-end;
}

.case-view-button {
    min-height: 34px;
    padding: 0 12px;

    font-size: 9px;
}


/* ============================================================
   NO RESULTS
   ============================================================ */

.case-search-no-results {
    text-align: center;

    padding: 70px 20px;

    border: 1px solid #aaa59a;

    background: rgba(245,242,231,.5);
}

.no-results-stamp {
    display: inline-block;

    margin-bottom: 20px;

    padding: 8px 14px;

    border: 2px solid #7d1919;

    color: #7d1919;

    font-family: "Courier New", monospace;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 2px;

    transform: rotate(-2deg);
}

.case-search-no-results h2 {
    margin: 0 0 10px;

    font-family: "Courier New", monospace;

    font-size: 22px;

    letter-spacing: 1px;
}

.case-search-no-results p {
    margin: 0 0 25px;

    font-family: Georgia, serif;

    color: #666158;
}


/* ============================================================
   PAGINATION
   ============================================================ */

.case-search-pagination {
    margin-top: 35px;

    text-align: center;
}

.case-search-pagination ul {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 6px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.case-search-pagination a,
.case-search-pagination span {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 36px;
    min-height: 36px;

    padding: 0 8px;

    border: 1px solid #8d897e;

    background: #eeebdf;

    color: #403e38;

    font-family: "Courier New", monospace;

    font-size: 9px;

    text-decoration: none;
}

.case-search-pagination .current {
    background: #403f3a;

    color: #f0ede2;

    border-color: #403f3a;
}


/* ============================================================
   FOOTER
   ============================================================ */

.case-search-footer {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-top: 50px;

    padding-top: 15px;

    border-top: 1px solid #77736a;

    font-family: "Courier New", monospace;

    font-size: 8px;

    letter-spacing: 1px;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {

    .case-search-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 650px) {

    .case-search-page {
        padding: 30px 12px 60px;
    }

    .case-search-topline,
    .case-search-title,
    .case-search-results-header,
    .case-search-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-search-form {
        grid-template-columns: 1fr;
    }

    .case-search-field-wide {
        grid-column: auto;
    }

    .case-search-actions {
        grid-column: auto;

        flex-direction: column;
    }

    .case-search-button,
    .case-clear-button {
        width: 100%;
    }

    .case-search-grid {
        grid-template-columns: 1fr;
    }

    .case-search-card {
        min-height: 0;
    }

}