/* Minimal extras for static HTML runtime (core UI comes from react-compiled.css) */

/**
 * Directory pills (country / state / city): true white — react-compiled bundle often omits .bg-white,
 * so "bg-white" utilities in PHP/JS were inert and the pill picked up hsl(--background).
 */
.bararena-directory-pill {
  background-color: #ffffff !important;
}
.dark .bararena-directory-pill {
  background-color: #ffffff !important;
}
.bararena-directory-pill:hover {
  background-color: #fafafa !important;
}
.dark .bararena-directory-pill:hover {
  background-color: #fafafa !important;
}

/*
 * Show-more button uses Tailwind .inline-flex, which is ordered after the preflight
 * [hidden] rule in react-compiled.css, so display:inline-flex wins and the native
 * hidden attribute does not hide the control. Force display:none when hidden.
 */
button[data-bararena-show-more-btn][hidden] {
  display: none !important;
}

.html-toast {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  border-radius: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  padding: 0.65rem 0.9rem;
  font-size: 0.875rem;
  display: none;
}

.html-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Stat figures in directory hero (Tailwind tabular-nums not in react-compiled bundle). */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/**
 * Popular states: full width of parent (no side gutters from max-width + mx-auto).
 * overflow-x: clip on viewport; scrolling on .country-popular-states-track.
 */
.country-popular-states-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.country-popular-states-track {
  display: flex;
  width: 100%;
  min-width: 0;
  gap: 0.75rem;
  padding-bottom: 0.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.country-popular-states-track::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .country-popular-states-track {
    gap: 1rem;
  }
}

/* Blog article: content column + ad sidebar layout stability */
.bararena-blog-article .bararena-ad-slot {
  flex-shrink: 0;
}

@media print {
  .bararena-blog-article .bararena-ad-slot,
  .bararena-blog-article aside[aria-label] {
    display: none !important;
  }
}

/* Article body card: no theme border (avoids cool/blue --border); depth from shadow only */
.bararena-blog-body-shell {
  border: none;
  box-shadow:
    0 1px 2px rgb(15 23 42 / 0.04),
    0 8px 28px -6px rgb(15 23 42 / 0.07);
}

.dark .bararena-blog-body-shell {
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.2),
    0 12px 36px -10px rgb(0 0 0 / 0.45);
}

/* Plain-text fallback article body only (not ACF WYSIWYG). */
.bararena-blog-plain-content.bararena-blog-detail-content > .alignwide,
.bararena-blog-plain-content.bararena-blog-detail-content > .alignfull {
  max-width: none;
}

.bararena-blog-plain-content.bararena-blog-detail-content .wp-block-image,
.bararena-blog-plain-content.bararena-blog-detail-content figure {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.bararena-blog-plain-content.bararena-blog-detail-content .wp-block-image img,
.bararena-blog-plain-content.bararena-blog-detail-content figure img {
  border-radius: 0.75rem;
  border: 1px solid rgb(15 23 42 / 0.08);
}

.dark .bararena-blog-plain-content.bararena-blog-detail-content .wp-block-image img,
.dark .bararena-blog-plain-content.bararena-blog-detail-content figure img {
  border-color: rgb(148 163 184 / 0.2);
}

.bararena-blog-plain-content.bararena-blog-detail-content figcaption,
.bararena-blog-plain-content.bararena-blog-detail-content .wp-caption-text {
  margin-top: 0.65rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
}

.bararena-blog-plain-content.bararena-blog-detail-content > p:first-child {
  font-size: 1.07em;
  color: hsl(var(--foreground) / 0.92);
  line-height: 1.65;
}

.bararena-blog-plain-content.bararena-blog-detail-content > h2:first-child {
  margin-top: 0;
}

/**
 * ACF WYSIWYG / editor HTML: minimal theme layer so Tailwind preflight does not flatten
 * headings, lists, and spacing. Core block CSS (wp-block-library) handles block markup.
 */
.bararena-blog-wysiwyg.entry-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  color: hsl(var(--foreground) / 0.92);
  padding-top: 20px;
  padding-bottom: 20px;
}

.bararena-blog-wysiwyg.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

.bararena-blog-wysiwyg.entry-content > *:first-child {
  margin-top: 0 !important;
}

.bararena-blog-wysiwyg.entry-content > *:last-child {
  margin-bottom: 0 !important;
}

.bararena-blog-wysiwyg.entry-content :where(p) {
  margin: 0 0 1em;
  line-height: 1.75;
}

/* Headings without Gutenberg block classes: undo Tailwind preflight (inherit size/weight). */
.bararena-blog-wysiwyg.entry-content :is(h1, h2, h3, h4, h5, h6):not([class*='wp-block']) {
  font-weight: 700;
  line-height: 1.25;
  margin: 0.85em 0 0.45em;
  color: hsl(var(--foreground));
}

.bararena-blog-wysiwyg.entry-content h1:not([class*='wp-block']) {
  font-size: 2em;
}

.bararena-blog-wysiwyg.entry-content h2:not([class*='wp-block']) {
  font-size: 1.5em;
}

.bararena-blog-wysiwyg.entry-content h3:not([class*='wp-block']) {
  font-size: 1.25em;
}

.bararena-blog-wysiwyg.entry-content h4:not([class*='wp-block']) {
  font-size: 1.1em;
}

.bararena-blog-wysiwyg.entry-content h5:not([class*='wp-block']) {
  font-size: 1em;
}

.bararena-blog-wysiwyg.entry-content h6:not([class*='wp-block']) {
  font-size: 0.95em;
}

/* Block headings: restore margins only (sizes come from wp-block-library). */
.bararena-blog-wysiwyg.entry-content :is(h1, h2, h3, h4, h5, h6)[class*='wp-block'] {
  margin-top: 0.85em;
  margin-bottom: 0.45em;
  color: hsl(var(--foreground));
}

.bararena-blog-wysiwyg.entry-content :where(ul, ol) {
  margin: 0 0 1em;
  padding-left: 1.75em;
  list-style-position: outside;
}

.bararena-blog-wysiwyg.entry-content :where(ul) {
  list-style-type: disc;
}

.bararena-blog-wysiwyg.entry-content :where(ol) {
  list-style-type: decimal;
}

.bararena-blog-wysiwyg.entry-content :where(li) {
  margin: 0.25em 0;
}

.bararena-blog-wysiwyg.entry-content :where(li > ul, li > ol) {
  margin-bottom: 0;
}

.bararena-blog-wysiwyg.entry-content :where(blockquote) {
  margin: 1em 0;
  padding: 0.5em 0 0.5em 1em;
  border-left: 4px solid rgb(148 163 184 / 0.55);
}

.dark .bararena-blog-wysiwyg.entry-content :where(blockquote) {
  border-left-color: rgb(148 163 184 / 0.35);
}

.bararena-blog-wysiwyg.entry-content :where(a) {
  color: hsl(var(--primary));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bararena-blog-wysiwyg.entry-content :where(img) {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.bararena-blog-wysiwyg.entry-content :where(table) {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  table-layout: auto;
}

.bararena-blog-wysiwyg.entry-content .wp-block-table {
  overflow-x: auto;
}

.bararena-blog-wysiwyg.entry-content :where(td, th) {
  border: 1px solid rgb(15 23 42 / 0.12);
  padding: 0.5rem 0.65rem;
  text-align: inherit;
  vertical-align: top;
}

.dark .bararena-blog-wysiwyg.entry-content :where(td, th) {
  border-color: rgb(148 163 184 / 0.22);
}

.bararena-blog-wysiwyg.entry-content :where(hr) {
  margin: 1.5em 0;
  border: 0;
  border-top: 1px solid rgb(15 23 42 / 0.12);
}

.dark .bararena-blog-wysiwyg.entry-content :where(hr) {
  border-top-color: rgb(148 163 184 / 0.22);
}

.bararena-blog-wysiwyg.entry-content :where(pre, code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.bararena-blog-wysiwyg.entry-content :where(pre) {
  margin: 1em 0;
  padding: 1em;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.5;
  background: hsl(var(--muted) / 0.45);
  border-radius: 0.5rem;
}

.bararena-blog-wysiwyg.entry-content :where(code) {
  font-size: 0.9em;
}

.bararena-blog-wysiwyg.entry-content :where(pre code) {
  font-size: inherit;
  background: transparent;
  padding: 0;
}

/* Classic editor alignment classes */
.bararena-blog-wysiwyg.entry-content .alignleft {
  float: left;
  margin: 0 1em 0.75em 0;
}

.bararena-blog-wysiwyg.entry-content .alignright {
  float: right;
  margin: 0 0 0.75em 1em;
}

.bararena-blog-wysiwyg.entry-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
