/* GPS SOP Directory Public Styles — GDC Policy Library */

.gps-sop-directory {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    line-height: 1.6;
}

.gps-sop-page,
.gps-sop-series,
.gps-sop-search,
.gps-sop-404 {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    line-height: 1.6;
}

/* =============================================
   HERO SECTION — GPS Dark Theme
   ============================================= */
.gps-sop-hero {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #050508 100%);
    position: relative;
    overflow: hidden;
    padding: 4rem 2rem 3rem;
}

.gps-sop-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

.gps-sop-hero-inner {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

.gps-sop-hero-badge {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 50px;
    color: #dc2626;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.2rem;
}

.gps-sop-hero h1 {
    font-size: 2.4em;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gps-sop-hero .subtitle {
    color: #9ca3af;
    font-size: 1.05em;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

/* Stat Cards in Hero */
.gps-sop-hero .gps-sop-stats {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 1em;
}

.gps-sop-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem 1.8rem;
    min-width: 120px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.gps-sop-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

a.gps-sop-stat-card.stat-link {
    text-decoration: none;
    cursor: pointer;
    border-color: rgba(220, 38, 38, 0.3);
}

a.gps-sop-stat-card.stat-link:hover {
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(220, 38, 38, 0.1);
}

.gps-sop-stat-card .stat-number {
    font-size: 1.8em;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
}

a.gps-sop-stat-card.stat-link .stat-number {
    color: #dc2626;
}

.gps-sop-stat-card .stat-label {
    font-size: 0.8em;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Search hints below stat cards */
.gps-sop-hero-hints {
    margin-top: 2.5rem;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}

.gps-sop-hero-hints p {
    color: #9ca3af;
    font-size: 0.88em;
    line-height: 1.7;
    margin: 0;
}

.gps-sop-hero-hints strong {
    color: #9ca3af;
}

/* =============================================
   BODY SECTION — Clean Light Theme
   ============================================= */
.gps-sop-body {
    max-width: 960px;
    margin: 0 auto;
    padding: 30px 20px 20px;
}

/* Search & Filters */
.gps-sop-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gps-sop-filters form {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 300px;
}

.gps-sop-filters input[type="search"],
.gps-sop-filters input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
}

.gps-sop-filters select {
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    background: #fff;
}

.gps-sop-filters button,
.gps-sop-btn {
    padding: 10px 18px;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.gps-sop-filters button:hover,
.gps-sop-btn:hover {
    opacity: 0.9;
}

/* Division filter pills */
.gps-sop-division-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gps-sop-division-pills a {
    padding: 6px 14px;
    background: #e8ecf1;
    color: #333;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s;
}

.gps-sop-division-pills a:hover {
    background: #1a1a2e;
    color: #fff;
}

.gps-sop-division-pills a.active {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
}

.gps-sop-division-pills .count {
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 3px;
}

/* No Results */
.gps-sop-body .no-results {
    text-align: center;
    color: #777;
    padding: 40px 20px;
    font-size: 1.05em;
}

/* SOP Table */
.gps-sop-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
}

.gps-sop-table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid #1a1a2e;
    font-size: 0.85em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gps-sop-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 0.93em;
    vertical-align: top;
}

.gps-sop-table tr:hover {
    background: #f8f9fa;
}

.gps-sop-table .sop-number {
    font-weight: 600;
    white-space: nowrap;
    color: #1a1a2e;
}

.gps-sop-table .sop-number a {
    color: #1a1a2e;
    text-decoration: none;
}

.gps-sop-table .sop-number a:hover {
    text-decoration: underline;
}

.gps-sop-table .sop-title a {
    color: #333;
    text-decoration: none;
}

.gps-sop-table .sop-title a:hover {
    color: #dc2626;
    text-decoration: underline;
}

.gps-sop-table .division-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    white-space: nowrap;
}

.division-executive { background: #e8f0fe; color: #1a56db; }
.division-admin-finance { background: #fef3c7; color: #92400e; }
.division-facilities { background: #dcfce7; color: #166534; }
.division-health-services { background: #fce7f3; color: #9d174d; }
.division-inmate-services { background: #f3e8ff; color: #7c3aed; }
.division-board-of-corrections { background: #fee2e2; color: #991b1b; }

/* Type labels (SOP vs Rule) */
.type-label {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-right: 4px;
    vertical-align: middle;
}
.type-sop { background: #e8f0fe; color: #1a56db; }
.type-rule { background: #fee2e2; color: #991b1b; }

/* =============================================
   INDIVIDUAL SOP PAGE
   ============================================= */
.gps-sop-page header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1a1a2e;
}

.gps-sop-page header h1 {
    font-size: 1.6em;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.gps-sop-page .sop-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.9em;
    color: #555;
}

.gps-sop-page .sop-meta dt {
    font-weight: 600;
    display: inline;
    color: #333;
}

.gps-sop-page .sop-meta dd {
    display: inline;
    margin: 0;
    margin-right: 16px;
}

.gps-sop-page .sop-meta a {
    color: #1a56db;
}

.gps-sop-breadcrumb {
    font-size: 0.85em;
    margin-bottom: 16px;
    color: #777;
}

.gps-sop-breadcrumb a {
    color: #555;
    text-decoration: none;
}

.gps-sop-breadcrumb a:hover {
    text-decoration: underline;
}

/* SOP Sections */
.gps-sop-section {
    margin-bottom: 28px;
}

.gps-sop-section h2 {
    font-size: 1.1em;
    color: #1a1a2e;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.gps-sop-summary {
    background: #f8f9fa;
    padding: 14px 18px;
    border-radius: 6px;
    border-left: 4px solid #dc2626;
    font-size: 0.95em;
    line-height: 1.7;
}

.gps-sop-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gps-sop-topics li {
    padding: 4px 10px;
    background: #e8ecf1;
    border-radius: 3px;
    font-size: 0.85em;
    color: #444;
}

.gps-sop-cross-refs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gps-sop-cross-refs li {
    padding: 4px 0;
    font-size: 0.9em;
}

/* Full Text Content */
.gps-sop-content {
    padding: 20px 0;
    font-size: 0.93em;
    line-height: 1.8;
    overflow-wrap: break-word;
}

.gps-sop-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 4px;
    font-size: 0.9em;
    overflow-x: auto;
}

.gps-sop-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.gps-sop-content table td,
.gps-sop-content table th {
    padding: 6px 10px;
    border: 1px solid #ddd;
    font-size: 0.9em;
}

/* Attachments */
.gps-sop-attachments {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px 20px;
}

.gps-sop-attachments h2 {
    border: none;
    padding: 0;
    margin-bottom: 12px;
}

.gps-sop-attachments ol {
    margin: 0;
    padding-left: 24px;
}

.gps-sop-attachments li {
    padding: 6px 0;
}

.gps-sop-attachments li a {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 500;
}

.gps-sop-attachments li a:hover {
    text-decoration: underline;
}

.gps-sop-attachments .att-words {
    font-size: 0.8em;
    color: #888;
    margin-left: 6px;
}

/* Format links */
.gps-sop-formats {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 0.85em;
    color: #777;
}

.gps-sop-formats a {
    color: #dc2626;
    text-decoration: none;
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: all 0.2s;
}

.gps-sop-formats a:hover {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.gps-sop-formats .sep {
    color: #ccc;
}

/* Pagination */
.gps-sop-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.gps-sop-pagination a,
.gps-sop-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 0.9em;
    transition: all 0.2s;
}

.gps-sop-pagination span.current {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    color: #fff;
    border-color: #dc2626;
}

.gps-sop-pagination a:hover {
    background: #f0f4f8;
    border-color: #bbb;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
    .gps-sop-hero {
        padding: 3rem 1.5rem 2rem;
    }

    .gps-sop-hero h1 {
        font-size: 1.8em;
    }

    .gps-sop-hero .subtitle {
        font-size: 0.95em;
    }

    .gps-sop-hero .gps-sop-stats {
        gap: 10px;
    }

    .gps-sop-stat-card {
        padding: 0.8rem 1.2rem;
        min-width: 80px;
        flex: 1;
    }

    .gps-sop-stat-card .stat-number {
        font-size: 1.4em;
    }

    .gps-sop-body {
        padding: 20px 15px;
    }

    .gps-sop-filters form {
        flex-direction: column;
        min-width: 100%;
    }

    .gps-sop-table th:nth-child(3),
    .gps-sop-table td:nth-child(3),
    .gps-sop-table th:nth-child(4),
    .gps-sop-table td:nth-child(4) {
        display: none;
    }

    .gps-sop-page .sop-meta {
        flex-direction: column;
        gap: 4px;
    }
}
