/* States Overview Page */
/* Depends on: style.css (root vars), sidebar.css, states.css */
/* Reuses as-is: .bch-bottom-cta(-left/-icon), .bch-button, .bch-side-card, .bch-onpage-list,
   .bch-resources-list, .bch-help-row, .bch-help-icon-img, .bch-sidebar-layout,
   .bch-sidebar-wrap, .bch-sidebar, .bch-section-title, .bch-section-sub
   Only NEW / States-Overview-specific rules live here. */

/* ---- Hero: icon badge (matches FCRA's icon-badge spec) ---- */

.bch-overview-hero-top {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 30px;
  align-items: center;
}

.bch-hero-map {
  max-width: 400px;
  margin: -200px 0;
}

.bch-hero-map svg,
.bch-hero-map img {
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .bch-hero-map {
    display: none;
  }
  .bch-overview-hero-top {
    grid-template-columns: 1fr;
  }
}

.bch-diff-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin: 20px 0 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 65, 141, .06);
}

.bch-diff-grid,
.bch-diff-grid * {
  user-select: none !important;
  -webkit-user-select: none !important;
}

.bch-diff-grid:has(~ .bch-diff-panels .bch-diff-panel:not([hidden])) {
  margin-bottom: 0;
  border-radius: 10px 10px 0 0;
  border-bottom: 0;
  overflow: visible;
}

.bch-diff-panels:not(:has(.bch-diff-panel:not([hidden]))) {
  display: none;
}

.bch-diff-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 12px;
  row-gap: 12px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  padding: 26px 10px 30px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: background .18s ease;
}

.bch-diff-card:nth-child(5n + 1) {
  border-left: 0;
}

.bch-diff-card:first-child {
  border-top-left-radius: 10px;
}

.bch-diff-card:nth-child(5) {
  border-top-right-radius: 10px;
}

.bch-diff-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.bch-diff-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bch-diff-count {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.bch-diff-label {
  flex-basis: 100%;
  min-height: 40px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.35;
}

.bch-page .bch-diff-card,
.bch-page .bch-diff-card:focus,
.bch-page .bch-diff-card:active {
  border-color: var(--border);
  background: transparent;
}

.bch-page .bch-diff-card:hover {
  border-color: var(--border);
  background: var(--soft-teal);
}

.bch-page .bch-diff-card[aria-selected="true"] {
  border-color: var(--border);
  background: var(--soft-teal);
}

.bch-diff-card[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: var(--soft-teal);
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateX(-50%) rotate(45deg);
  z-index: 2;
}


.bch-diff-card:focus-visible,
.bch-diff-card[aria-selected="true"] {
  outline: 0;
  box-shadow: inset 2px 0 0 0 var(--teal), inset 0 2px 0 0 var(--teal), inset -2px 0 0 0 var(--teal);
}

.bch-diff-panels {
  border: 2px solid var(--teal);
  border-radius: 0 0 10px 10px;
  background: #fff;
  padding: 24px 26px;
  margin-bottom: 40px;
  box-shadow: 0 10px 28px rgba(15, 65, 141, .06);
}

.bch-diff-panel h3 {
  font-size: 17px;
  color: var(--navy);
  margin: 0 0 12px;
}

.bch-diff-panel p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

.bch-diff-panel p:last-child {
  margin-bottom: 0;
}

.bch-diff-panel ul {
  columns: 4;
  column-gap: 26px;
  max-width: 814px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

/* Column count follows list length so the last column never holds a single item */
@media (min-width: 781px) {
  .bch-diff-panel ul:not(:has(li:nth-child(10))) { columns: 3; max-width: 604px; }
  .bch-diff-panel ul:not(:has(li:nth-child(7)))  { columns: 2; max-width: 394px; }
  .bch-diff-panel ul:not(:has(li:nth-child(4)))  { columns: 1; max-width: 394px; }
}

.bch-diff-panel li {
  position: relative;
  break-inside: avoid;
  padding-left: 13px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.bch-diff-panel li a {
  color: inherit;
  text-decoration: none;
}

.bch-diff-panel li a:hover {
  color: var(--teal);
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.bch-diff-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

@media (max-width: 780px) {
  .bch-diff-panel ul {
    columns: 2;
    max-width: none;
  }
}

@media (max-width: 520px) {
  .bch-diff-panel ul {
    columns: 1;
  }
}

@media (max-width: 900px) {
  .bch-diff-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bch-diff-card:nth-child(5n + 1) { border-left: 1px solid var(--border); }
  .bch-diff-card:nth-child(3n + 1) { border-left: 0; }
  .bch-diff-card:nth-child(n + 4)  { border-top: 1px solid var(--border); }
  .bch-diff-card:nth-child(5) { border-top-right-radius: 0; }
  .bch-diff-card:nth-child(3) { border-top-right-radius: 10px; }
}

@media (max-width: 560px) {
  .bch-diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bch-diff-card:nth-child(3n + 1) { border-left: 1px solid var(--border); }
  .bch-diff-card:nth-child(2n + 1) { border-left: 0; }
  .bch-diff-card:nth-child(n + 3)  { border-top: 1px solid var(--border); }
  .bch-diff-card:nth-child(3) { border-top-right-radius: 0; }
  .bch-diff-card:nth-child(2) { border-top-right-radius: 10px; }
}

/* ---- Background Check Law Trends ---- */
.bch-trends-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bch-trends-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.bch-trends-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--lightblue);
  padding: 5px;
}

.bch-trends-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bch-trends-item h4 {
  margin: 0 0 3px;
  font-size: 14.5px;
  color: var(--navy);
}

.bch-trends-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.bch-trends-item a.bch-view-all {
  margin-top: 10px;
  display: inline-block;
}

/* ---- FAQ accordion ---- */
.bch-faq-list {
  display: flex;
  flex-direction: column;
}

.bch-faq-item {
  border-bottom: 1px solid var(--border);
}

.bch-faq-item:last-child {
  border-bottom: none;
}

.bch-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
}

.bch-faq-item:first-child .bch-faq-question {
  padding-top: 0;
}

.bch-faq-question::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
  flex-shrink: 0;
}

.bch-faq-item.open .bch-faq-question::after {
  transform: rotate(-135deg) translateY(-2px);
}

.bch-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
}

.bch-faq-item.open .bch-faq-answer {
  max-height: 400px;
}

.bch-faq-answer p {
  margin: 0;
  padding: 0 4px 16px;
}

/* ---- Two-panel section row ---- */
.bch-panel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 40px;
}

.bch-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 24px;
  box-shadow: 0 10px 28px rgba(15, 65, 141, .06);
}

.bch-panel > h2.bch-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.bch-panel > h2.bch-section-title img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .bch-panel-row {
    grid-template-columns: 1fr;
  }
}

.bch-regulated-panel {
  margin-bottom: 40px;
  background: var(--soft-teal);
}

.bch-regulated-panel .bch-section-sub {
  margin-top: -10px;
}

.bch-regulated-panel .bch-restrictive-grid {
  margin: 18px 0 0;
}

.bch-regulated-panel .bch-restrictive-card {
  border-top: 1px solid var(--border);
}

/* ---- Most Restrictive States ---- */
.bch-restrictive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.bch-restrictive-card {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal2);
  border-radius: 10px;
  background: #fff;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 65, 141, .06);
  transition: transform .18s ease, box-shadow .18s ease;
}

.bch-restrictive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 65, 141, .12);
}

.bch-restrictive-card:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.bch-restrictive-icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 100px;
  height: 100px;
  opacity: .10;
  pointer-events: none;
}

.bch-restrictive-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

.bch-restrictive-card h3,
.bch-restrictive-cats {
  position: relative;
  z-index: 1;
}

.bch-restrictive-card h3 {
  font-size: 15px;
  color: var(--navy);
  margin: 0 0 8px;
  line-height: 1.3;
}

.bch-restrictive-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.bch-restrictive-cats li {
  position: relative;
  padding-left: 12px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 3px;
}

.bch-restrictive-cats li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
}

@media (max-width: 900px) {
  .bch-restrictive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .bch-restrictive-grid {
    grid-template-columns: 1fr;
  }
}
