/* ============================================================
   CDCR DOM Search — Corrections Operations Manual Reference
   Dark theme matching jail411.com
   ============================================================ */

.dom-page {
  background: #0B1222;
  color: #E2E8F0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  min-height: 100vh;
}

/* Hero */
.dom-hero {
  background: linear-gradient(135deg, #0B1222 0%, #131D30 50%, #0F172A 100%);
  padding: 80px 24px 48px;
  text-align: center;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
  position: relative;
  overflow: hidden;
}
.dom-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 100%, rgba(37, 99, 235, 0.04) 0%, transparent 50%);
  pointer-events: none;
}
.dom-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.dom-hero-badge {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #3B82F6;
  margin-bottom: 16px;
}
.dom-hero h1 {
  font-family: "Outfit", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.dom-hero-desc {
  font-size: 1rem;
  color: #8896AB;
  line-height: 1.65;
  margin: 0 0 28px;
}

/* Search form */
.dom-search-form {
  margin-bottom: 16px;
}
.dom-search-row {
  display: flex;
  gap: 0;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: #0F1A2E;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.dom-search-row input[type="text"] {
  flex: 1;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}
.dom-search-row input::placeholder {
  color: #4B6080;
}
.dom-search-row select {
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #94A3B8;
  font-family: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  outline: none;
  max-width: 200px;
}
.dom-search-row select option {
  background: #1A2540;
  color: #E2E8F0;
}
.dom-search-row button {
  padding: 14px 24px;
  background: #2563EB;
  color: #fff;
  border: none;
  font-family: "Outfit", sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.dom-search-row button:hover {
  background: #1D4ED8;
}

.dom-source {
  font-size: 0.75rem;
  color: #4B6080;
  margin-top: 8px;
}
.dom-source a {
  color: #3B82F6;
  text-decoration: none;
}
.dom-source a:hover {
  text-decoration: underline;
}

/* Quick Topics */
.dom-topics {
  padding: 48px 24px;
}
.dom-topics-inner {
  max-width: 900px;
  margin: 0 auto;
}
.dom-topics h2 {
  font-family: "Outfit", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.dom-topics-desc {
  font-size: 0.875rem;
  color: #5A6A80;
  margin: 0 0 24px;
}
.dom-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 48px;
}
.dom-topic-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #0F1A2E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.dom-topic-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: #131F36;
  transform: translateY(-1px);
}
.dom-topic-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #CBD5E1;
}
.dom-topic-arrow {
  color: #3B82F6;
  font-size: 1rem;
}

/* Chapter browser */
.dom-chapters-heading {
  margin-top: 0;
}
.dom-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.dom-chapter-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #0F1A2E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}
.dom-chapter-card:hover {
  border-color: rgba(59, 130, 246, 0.3);
  background: #131F36;
}
.dom-chapter-num {
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #3B82F6;
  min-width: 36px;
  text-align: center;
}
.dom-chapter-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #94A3B8;
}

/* Results */
.dom-results {
  padding: 32px 24px 80px;
}
.dom-results-inner {
  max-width: 900px;
  margin: 0 auto;
}
.dom-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dom-results-count {
  font-size: 0.9rem;
  color: #8896AB;
}
.dom-results-count strong {
  color: #3B82F6;
}
.dom-clear-search {
  font-size: 0.8rem;
  color: #5A6A80;
  text-decoration: none;
}
.dom-clear-search:hover {
  color: #3B82F6;
}

/* Result cards */
.dom-result-card {
  background: #0F1A2E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}
.dom-result-card:hover {
  border-color: rgba(59, 130, 246, 0.2);
}
.dom-result-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.dom-result-secnum {
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.1);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.dom-result-chapter {
  font-size: 0.72rem;
  color: #5A6A80;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dom-result-page {
  font-size: 0.7rem;
  color: #3E4E64;
  margin-left: auto;
}
.dom-result-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.35;
}
.dom-result-body {
  font-size: 0.875rem;
  color: #8896AB;
  line-height: 1.65;
}
.dom-result-body mark {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  padding: 1px 3px;
  border-radius: 2px;
}
.dom-result-title mark {
  background: rgba(59, 130, 246, 0.25);
  color: #fff;
  padding: 1px 3px;
  border-radius: 2px;
}

/* Expand/collapse */
.dom-expand-btn {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  color: #5A6A80;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.dom-expand-btn:hover {
  border-color: rgba(59, 130, 246, 0.3);
  color: #3B82F6;
}
.dom-result-full {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.75;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.dom-result-card.expanded .dom-result-body {
  display: none;
}
.dom-result-card.expanded .dom-result-full {
  display: block;
}

/* No results */
.dom-no-results {
  text-align: center;
  padding: 60px 0;
  color: #5A6A80;
}

/* Pagination */
.dom-pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 32px;
  flex-wrap: wrap;
}
.dom-pagination a,
.dom-pagination .dom-page-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.dom-pagination a {
  background: #0F1A2E;
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #8896AB;
}
.dom-pagination a:hover {
  border-color: rgba(59, 130, 246, 0.3);
  color: #3B82F6;
}
.dom-pagination .dom-page-current {
  background: #2563EB;
  color: #fff;
}

/* Responsive */
@media (max-width: 640px) {
  .dom-hero { padding: 60px 16px 36px; }
  .dom-hero h1 { font-size: 1.7rem; }
  .dom-search-row { flex-direction: column; border-radius: 8px; }
  .dom-search-row select { border-left: none; border-top: 1px solid rgba(255,255,255,0.08); max-width: none; }
  .dom-topic-grid { grid-template-columns: 1fr; }
  .dom-chapter-grid { grid-template-columns: 1fr; }
  .dom-result-card { padding: 16px; }
  .dom-result-meta { gap: 8px; }
}
