/* Party Screening - CCA data-service styles layered on NYC Core.
   Conventions intentionally match cca-schools and cca-geocode. */

.wrap-header {
  border-bottom: 1px solid #dee2e6;
  color: #212529;
  background: #fff;
}

.field-label {
  color: #666;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.field-value {
  color: #2C3E50;
  font-size: 1.05rem;
}

.stat-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
}

.stat-badge.primary { background: #E3F2FD; color: #1976D2; }
.stat-badge.success { background: #C8E6C9; color: #2E7D32; }
.stat-badge.warning { background: #FFF9C4; color: #F57F17; }
.stat-badge.danger { background: #FFCDD2; color: #C62828; }
.stat-badge.secondary { background: #ECEFF1; color: #546E7A; }

.header-status {
  border: 1px solid #CFD8DC;
}

.header-status.success {
  background: #C8E6C9;
  color: #1B5E20;
}

.header-status.danger {
  background: #FFCDD2;
  color: #B71C1C;
}

.nav-toggle {
  display: none;
  padding: .25rem .6rem;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: .25rem;
  color: #fff;
  background: none;
  font-size: 1.05rem;
}

#primary-nav a.nav-active {
  font-weight: 700;
  box-shadow: inset 0 -2px 0 currentColor;
}

.footer-head {
  margin-bottom: .5rem;
  color: #9aa7b5;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li { margin-bottom: .35rem; }
.footer-links a { color: #cfd8e3; font-size: .9rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.footer-legal {
  margin-top: 1.1rem;
  padding-top: .8rem;
  border-top: 1px solid rgba(255,255,255,.12);
  color: #9aa7b5;
  font-size: .82rem;
}

.limitation-alert {
  display: flex;
  align-items: flex-start;
  border-left: 5px solid #F57C00;
}

.screening-card {
  border-top: 4px solid #181A7B;
  box-shadow: 0 2px 8px rgba(10,20,56,.08);
}

.screening-name {
  border: 2px solid #181A7B;
}

.screening-name:focus {
  border-color: #3B6CF6;
  box-shadow: 0 0 0 .2rem rgba(59,108,246,.25);
}

.form-message { min-height: 1.25rem; }

.profile-fieldset {
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: .3rem;
  background: #f8fafc;
}

.profile-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem 1rem;
}

.result-area[hidden] { display: none !important; }

.decision-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-left: 5px solid #546E7A;
  background: #F4F7FB;
}

.decision-banner[data-decision="POTENTIAL_MATCH"] {
  border-left-color: #F57C00;
  background: #FFF3E0;
}

.decision-banner[data-decision="NO_MATCH"] {
  border-left-color: #2E7D32;
  background: #E8F5E9;
}

.decision-banner[data-decision="INCOMPLETE"] {
  border-left-color: #C62828;
  background: #FFEBEE;
}

.match-list {
  display: grid;
  gap: 1rem;
}

.match-card {
  border-top: 3px solid #F57C00;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.match-top,
.source-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.match-index,
.evidence-label {
  color: #666;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.match-list-name,
.source-publisher {
  color: #6c757d;
  font-size: .875rem;
}

.score {
  min-width: 100px;
  padding: .65rem 1rem;
  border-radius: 8px;
  color: #fff;
  background: #181A7B;
  text-align: center;
}

.score strong,
.score span { display: block; }
.score strong { font-size: 1.45rem; }
.score span { font-size: .7rem; text-transform: uppercase; }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: .75rem;
  margin: 1rem 0;
}

.evidence {
  padding: .75rem;
  border: 1px solid #dee2e6;
  border-radius: .3rem;
  background: #F8FAFC;
}

.evidence span,
.evidence strong,
.evidence small { display: block; }
.evidence strong { overflow-wrap: anywhere; font-size: .9rem; }
.evidence small { margin-top: .3rem; color: #6c757d; }
.evidence-positive { color: #2E7D32 !important; }
.evidence-negative { color: #C62828 !important; }

.match-facts,
.source-facts {
  display: grid;
  grid-template-columns: minmax(105px,auto) 1fr;
  gap: .5rem 1rem;
  margin: 0;
}

.match-facts dt,
.source-facts dt {
  color: #666;
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.match-facts dd,
.source-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.record-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1rem;
}

.record-link { font-weight: 600; }

.source-record {
  border: 1px solid #dee2e6;
  background: #F8FAFC;
}

.source-record > summary {
  padding: .75rem 1rem;
  color: #004CBE;
  font-weight: 600;
}

.source-record[open] > summary {
  border-bottom: 1px solid #dee2e6;
}

.source-record-table th {
  width: 220px;
  color: #A513B6;
}

.source-record-table td {
  overflow-wrap: anywhere;
}

.source-record-code {
  max-height: 30rem;
  margin: 0;
  white-space: pre-wrap;
}

.raw-source-value > summary {
  color: #004CBE;
  cursor: pointer;
  font-weight: 600;
}

.designation-record {
  border-left: 4px solid #181A7B;
}

.source-card {
  height: 100%;
  border-top: 3px solid #21883f;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.history-summary-card {
  border-top: 3px solid #181A7B;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.history-summary-value {
  color: #181A7B;
  font-size: 1.75rem;
  font-weight: 700;
}

.history-panel {
  border: 1px solid #dee2e6;
  border-radius: .3rem;
  background: #fff;
}

.history-table th {
  white-space: nowrap;
}

.history-table td {
  max-width: 320px;
  vertical-align: middle;
}

.history-code {
  display: inline-block;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: .72rem;
}

.history-release-button {
  max-width: 260px;
  overflow-wrap: anywhere;
  font-size: .72rem;
}

.artifact-release > summary {
  text-transform: capitalize;
}

.skeleton-block {
  min-height: 14px;
  border-radius: .3rem;
  background: linear-gradient(90deg,#eceff1 25%,#f7f9fa 37%,#eceff1 63%);
  background-size: 800px 100%;
  animation: screening-shimmer 1.3s linear infinite;
}

@keyframes screening-shimmer {
  from { background-position: -400px 0; }
  to { background-position: 400px 0; }
}

.empty-state {
  padding: 2.2rem 1rem;
  color: #555;
  text-align: center;
}

.empty-state i {
  display: block;
  margin-bottom: .7rem;
  color: #adb5bd;
  font-size: 2.2rem;
}

.docs-nav {
  position: sticky;
  top: 1rem;
}

.docs-content section { scroll-margin-top: 1rem; }

.endpoint {
  padding: .75rem 1rem;
  border: 1px solid #DCE6F2;
  border-radius: 8px;
  background: #F4F7FB;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border-radius: .3rem;
  color: #f8f9fa;
  background: #0A1438;
}

pre code { color: inherit; }

@media (max-width: 767px) {
  .nav-toggle { display: inline-block; }
  #primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 70;
    padding: .4rem 1rem .7rem;
    background: #111;
    box-shadow: 0 6px 14px rgba(0,0,0,.4);
  }
  #primary-nav.show { display: block; }
  #primary-nav ul {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0 !important;
  }
  #primary-nav li { width: 100%; }
  #primary-nav a { display: block; padding: .55rem .25rem; }
  #nyc-top-header { position: relative; }
  .form-control,
  input,
  select { font-size: 16px; }
  .evidence-grid { grid-template-columns: 1fr 1fr; }
  .profile-options { grid-template-columns: 1fr 1fr; }
  .match-top,
  .decision-banner { align-items: stretch; flex-direction: column; }
  .score { width: 100%; }
  .docs-nav { position: static; }
}

@media (max-width: 480px) {
  .evidence-grid { grid-template-columns: 1fr; }
  .profile-options { grid-template-columns: 1fr; }
  .match-facts,
  .source-facts { grid-template-columns: 1fr; }
  .source-record-table th { width: auto; }
}

@media print {
  #global-header,
  footer,
  .btn,
  .nav-toggle { display: none !important; }
}
