/* ================================================================
   Ohio Court Records Search Plugin — crs-style.css
   All selectors scoped under #crs-app to avoid theme conflicts
   ================================================================ */

/* ----- Reset inside plugin container ----- */
#crs-app,
#crs-app * {
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}
#crs-app h2,
#crs-app h3,
#crs-app h4,
#crs-app p,
#crs-app ul,
#crs-app li {
    margin: 0;
    padding: 0;
}

/* ================================================================
   STEP 1 — HERO / SEARCH FORM
   ================================================================ */
#crs-app .crs-hero-banner {
    position: relative;
    background: url('https://cuyahogacountycourt.org/wp-content/uploads/2023/10/Courtroom.jpg') center / cover no-repeat;
    padding: 30px 16px 40px;
    overflow: hidden;
}
#crs-app .crs-hero-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 30, 60, .62);
}
#crs-app .crs-hero-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

/* Title row */
#crs-app .crs-hero-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}
#crs-app .crs-hero-flag { display: none; }
#crs-app .crs-hero-title-text h2 {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    text-shadow: 1px 1px 4px rgba(0,0,0,.6);
}
#crs-app .crs-hero-title-text p {
    font-size: 12px;
    font-weight: 600;
    color: #c8d8f0;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 3px;
}

/* Two-column layout */
#crs-app .crs-panel-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

/* ----- Search card ----- */
#crs-app .crs-search-card {
    background: #fff;
    border-radius: 6px;
    padding: 22px 20px;
    flex: 1;
    min-width: 0;
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
#crs-app .crs-step-section {
    margin-bottom: 16px;
}
#crs-app .crs-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333;
    letter-spacing: .5px;
    margin-bottom: 7px;
}
#crs-app .crs-req { color: #c00; }
#crs-app .crs-opt { color: #888; font-weight: 400; }

#crs-app .crs-county-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
}
#crs-app .crs-type-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
#crs-app .crs-type-btn {
    flex: 1;
    min-width: 110px;
    padding: 9px 10px;
    border: 1.5px solid #bbb;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .2s, color .2s, border-color .2s;
}
#crs-app .crs-type-btn:hover,
#crs-app .crs-type-btn.crs-active {
    background: #1a3a6b;
    color: #fff;
    border-color: #1a3a6b;
}
#crs-app .crs-name-fields {
    display: flex;
    gap: 10px;
}
#crs-app .crs-name-field {
    flex: 1;
}
#crs-app .crs-name-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #444;
    margin-bottom: 5px;
    letter-spacing: .4px;
}
#crs-app .crs-name-field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
#crs-app .crs-name-field input:focus {
    border-color: #1a3a6b;
    box-shadow: 0 0 0 2px rgba(26,58,107,.15);
}
#crs-app .crs-search-btn {
    width: 100%;
    padding: 13px;
    background: #1a3a6b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    transition: background .2s;
}
#crs-app .crs-search-btn:hover { background: #0f2548; }

/* ----- Roster card ----- */
#crs-app .crs-roster-card {
    background: #fff;
    border-radius: 6px;
    width: 290px;
    flex-shrink: 0;
    box-shadow: 0 4px 18px rgba(0,0,0,.25);
    overflow: hidden;
}
#crs-app .crs-roster-header {
    background: #1a3a6b;
    color: #fff;
    padding: 12px 16px;
    border-left: 4px solid #c8a800;
}
#crs-app .crs-roster-header h3 {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
}
#crs-app .crs-roster-header p {
    font-size: 11px;
    color: #b8cce8;
    margin-top: 2px !important;
}
#crs-app .crs-roster-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
#crs-app .crs-roster-table thead tr { background: #eef2f8; }
#crs-app .crs-roster-table thead th {
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #ddd;
}
#crs-app .crs-roster-table tbody tr { border-bottom: 1px solid #eee; }
#crs-app .crs-roster-table tbody tr:hover { background: #f7f9fc; }
#crs-app .crs-roster-table td {
    padding: 7px 10px;
    color: #444;
    font-size: 12px;
}
#crs-app .crs-name-col {
    font-weight: 600;
    color: #1a3a6b;
    filter: blur(5px);
    user-select: none;
}
#crs-app .crs-date-col { color: #777; font-size: 11px; }
#crs-app .crs-view-btn {
    padding: 4px 10px;
    background: #1a3a6b;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
#crs-app .crs-view-btn:hover { background: #0f2548; }

/* ================================================================
   STEP 2 — LOADING PAGE
   ================================================================ */
#crs-page-loading {
    background: #fff;
    min-height: 60vh;
    padding: 40px 16px;
}
#crs-app .crs-loading-wrap {
    max-width: 780px;
    margin: 0 auto;
}
#crs-app .crs-loading-title {
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #222;
    margin-bottom: 10px;
}
#crs-app .crs-prog-outer {
    background: #e8e8e8;
    border-radius: 20px;
    height: 22px;
    width: 100%;
    overflow: hidden;
    position: relative;
    margin-bottom: 6px;
    border: 1px solid #ccc;
}
#crs-app .crs-prog-inner {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #3a7bd5, #1a3a6b);
    width: 0%;
    position: relative;
}
#crs-app .crs-prog-inner2 {
    background: linear-gradient(90deg, #27ae60, #1abc9c);
}
#crs-app .crs-prog-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
#crs-app .crs-prog-pct {
    text-align: right;
    font-size: 11px;
    color: #555;
    margin-bottom: 18px;
}

/* Scanning panel */
#crs-app .crs-scanning-panel {
    background: #deeaf8;
    border-radius: 8px;
    padding: 18px 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    overflow: hidden;
    flex-wrap: nowrap;
}

/* Circular mugshot carousel */
#crs-app .crs-mug-carousel-wrap {
    flex-shrink: 0;
    width: 210px;
    height: 210px;
    position: relative;
}
#crs-app .crs-mug-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    animation: crsSpin 12s linear infinite;
}
@keyframes crsSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
#crs-app .crs-mug-item {
    position: absolute;
    width: 52px;
    height: 63px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
#crs-app .crs-mug-item img,
#crs-app .crs-mug-item svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    animation: crsSpin 12s linear infinite reverse;
}

/* County scroll */
#crs-app .crs-county-scroll-wrap {
    flex: 1;
    height: 180px;
    overflow: hidden;
    position: relative;
    min-width: 0;
}
#crs-app .crs-county-scroll {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}
#crs-app .crs-county-scroll p {
    font-size: 13px;
    color: #333;
    padding: 4px 0;
    line-height: 1.6;
}
#crs-app .crs-ohio-map { display: none; }

/* ================================================================
   MODAL OVERLAY
   ================================================================ */
#crs-app .crs-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
#crs-app .crs-modal-overlay.crs-show { display: flex; }
#crs-app .crs-modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 28px 22px;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 8px 40px rgba(0,0,0,.3);
    position: relative;
}
#crs-app .crs-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 18px;
    cursor: pointer;
    color: #888;
    background: none;
    border: none;
    line-height: 1;
}
#crs-app .crs-modal-box h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #222;
    margin-bottom: 14px !important;
}
#crs-app .crs-modal-prog-outer {
    background: #e0e0e0;
    border-radius: 20px;
    height: 10px;
    width: 100%;
    overflow: hidden;
    margin-bottom: 18px;
}
#crs-app .crs-modal-prog-inner {
    height: 100%;
    border-radius: 20px;
    background: #27ae60;
    width: 0%;
}
#crs-app .crs-modal-items { list-style: none; }
#crs-app .crs-modal-items li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
#crs-app .crs-modal-items li:last-child { border-bottom: none; }
#crs-app .crs-spin-icon {
    width: 18px;
    height: 18px;
    border: 2.5px solid #ccc;
    border-top-color: #1a3a6b;
    border-radius: 50%;
    animation: crsSpin 1s linear infinite;
    flex-shrink: 0;
}
#crs-app .crs-spin-done {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #27ae60;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 10px;
}

/* ================================================================
   STEP 3 — RESULTS PAGE
   ================================================================ */
#crs-page-results {
    background: #f0f0f0;
    min-height: 60vh;
    padding: 30px 16px;
}
#crs-app .crs-results-wrap {
    max-width: 860px;
    margin: 0 auto;
}
#crs-app .crs-scan-success {
    text-align: center;
    margin-bottom: 24px;
}
#crs-app .crs-check-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    vertical-align: middle;
}
#crs-app .crs-scan-success span {
    font-size: 18px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #222;
    vertical-align: middle;
}
#crs-app .crs-scan-success span b { color: #27ae60; }

/* Report layout */
#crs-app .crs-report-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
#crs-app .crs-report-card {
    background: #fff;
    border: 2px solid #1a9fd4;
    border-radius: 6px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
#crs-app .crs-report-card-header {
    background: #1a9fd4;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
#crs-app .crs-report-card-header i { color: #fff; font-size: 14px; }
#crs-app .crs-report-card-header span {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#crs-app .crs-report-id-bar {
    background: #1a3a6b;
    color: #fff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .5px;
}
#crs-app .crs-report-body {
    display: flex;
    align-items: stretch;
}
#crs-app .crs-report-silhouette {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaf4fa;
    border-right: 1px solid #d0e8f0;
    flex-shrink: 0;
}
#crs-app .crs-report-silhouette svg {
    width: 80px;
    height: 100px;
    opacity: .6;
}
#crs-app .crs-report-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}
#crs-app .crs-report-section {
    padding: 10px 14px;
    border-bottom: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
}
#crs-app .crs-report-section:nth-child(even) { border-right: none; }
#crs-app .crs-report-section h4 {
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    color: #444;
    letter-spacing: .5px;
    margin-bottom: 6px !important;
}
#crs-app .crs-blur-lines .crs-bl {
    height: 7px;
    background: #ccc;
    border-radius: 3px;
    margin-bottom: 4px;
    filter: blur(2px);
}
#crs-app .crs-blur-lines .crs-bl:nth-child(1) { width: 80%; }
#crs-app .crs-blur-lines .crs-bl:nth-child(2) { width: 60%; }
#crs-app .crs-blur-lines .crs-bl:nth-child(3) { width: 70%; }
#crs-app .crs-dl-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #27ae60;
    color: #fff;
    padding: 14px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
    line-height: 1.4;
    border: none;
    min-width: 72px;
    flex-shrink: 0;
    transition: background .2s;
}
#crs-app .crs-dl-btn:hover { background: #1e8449; }
#crs-app .crs-dl-btn i { font-size: 20px; margin-bottom: 6px; }
#crs-app .crs-report-footer {
    font-size: 10px;
    color: #888;
    text-align: center;
    padding: 8px;
    border-top: 1px solid #eee;
}

/* Stats panel */
#crs-app .crs-stats-panel { width: 260px; flex-shrink: 0; }
#crs-app .crs-stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
#crs-app .crs-stat-icon {
    font-size: 20px;
    color: #888;
    flex-shrink: 0;
    width: 26px;
    text-align: center;
}
#crs-app .crs-stat-text { font-size: 13px; color: #333; }
#crs-app .crs-stat-text b { color: #1a3a6b; }
#crs-app .crs-green { color: #27ae60 !important; }
#crs-app .crs-link { color: #1a9fd4; font-weight: 700; text-decoration: none; }
#crs-app .crs-inline-btn {
    background: #1a9fd4;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    transition: background .2s;
}
#crs-app .crs-inline-btn:hover { background: #0e87b8; }
#crs-app .crs-cont-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: #1a9fd4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    cursor: pointer;
    margin-top: 20px;
    transition: background .2s;
}
#crs-app .crs-cont-btn:hover { background: #0e87b8; }

/* ================================================================
   RESPONSIVE — Mobile-first breakpoints
   ================================================================ */

/* Tablet: ≤ 900px */
@media (max-width: 900px) {
    #crs-app .crs-roster-card { width: 100%; }
    #crs-app .crs-panel-row { gap: 14px; }
}

/* Mobile: ≤ 768px */
@media (max-width: 768px) {
    #crs-app .crs-hero-banner { padding: 20px 12px 28px; }

    /* Stack search + roster vertically */
    #crs-app .crs-panel-row { flex-direction: column; }
    #crs-app .crs-roster-card { width: 100%; }

    /* Title */
    #crs-app .crs-hero-title-text h2 { font-size: 17px !important; }
    #crs-app .crs-hero-flag { width: 40px; }

    /* Name fields stack */
    #crs-app .crs-name-fields { flex-direction: column; }

    /* Type buttons stack */
    #crs-app .crs-type-buttons { flex-direction: column; }
    #crs-app .crs-type-btn { min-width: unset; }

    /* Loading: scanning panel */
    #crs-app .crs-scanning-panel {
        flex-wrap: wrap;
        justify-content: center;
    }
    #crs-app .crs-ohio-map { display: none; }
    #crs-app .crs-county-scroll-wrap { width: 100%; flex: unset; height: 120px; }

    /* Results: stack vertically */
    #crs-app .crs-report-layout { flex-direction: column; }
    #crs-app .crs-stats-panel { width: 100%; }
    #crs-app .crs-report-body { flex-wrap: wrap; }
    #crs-app .crs-report-silhouette { border-right: none; border-bottom: 1px solid #d0e8f0; width: 100%; justify-content: center; }
    #crs-app .crs-dl-btn { width: 100%; flex-direction: row; gap: 10px; padding: 12px 16px; }
    #crs-app .crs-report-grid { grid-template-columns: 1fr; }
    #crs-app .crs-report-section { border-right: none; }
}

/* Small mobile: ≤ 420px */
@media (max-width: 420px) {
    #crs-app .crs-search-card { padding: 16px 12px; }
    #crs-app .crs-mug-carousel-wrap { width: 160px; height: 160px; }
    #crs-app .crs-loading-title { font-size: 12px; }
    #crs-app .crs-hero-title-text h2 { font-size: 15px !important; }
}
