/*--------------------------------------------------------------
# Border Business Indicators Publications Page — Custom Styles
# publications-bbi.css
# Depends on: main.css + txc.css
# Font sizes: rem only, min 0.75rem, multiples of 0.05
--------------------------------------------------------------*/

/* ══════════════════════════════════════════════════════════════
   HERO — logo + description (same pattern as Laredo Vision's .lv-hero)
══════════════════════════════════════════════════════════════ */
.bbi-hero {
  background: var(--surface-color);
  border: 1px solid color-mix(in srgb, var(--default-color) 10%, transparent);
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.bbi-hero-logo {
  max-height: 150px;
  width: auto;
  display: block;
}

.bbi-hero-desc {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--default-color);
  margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   FIRST / LAST EDITION CARDS — PDF icon tile in place of a photo
   (no scanned cover images exist for these historical issues)
══════════════════════════════════════════════════════════════ */
.bbi-pdf-tile {
  width: 100%;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent-color) 10%, var(--surface-color));
}

.bbi-pdf-tile i {
  font-size: 4.5rem;
  color: var(--accent-color);
  opacity: 0.85;
}

@media (max-width: 767px) {
  .bbi-pdf-tile {
    height: 220px;
  }
}

/* ══════════════════════════════════════════════════════════════
   SIDEBAR — paginated flat list of monthly issues (same pattern
   as Laredo Vision's .lv-sidebar)
══════════════════════════════════════════════════════════════ */
.bbi-sidebar {
  position: sticky;
  top: 90px;
  background-color: var(--surface-color);
  border-radius: 8px;
  overflow: hidden;
}

.bbi-sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 1rem 0;
  background: var(--surface-color);
  gap: 8px;
}

.bbi-sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0;
  white-space: nowrap;
}

/* ── Pagination nav ── */
.bbi-pagination {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bbi-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--default-color);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--default-font);
  line-height: 1;
}

.bbi-page-btn:hover {
  background: color-mix(in srgb, var(--accent-color) 10%, transparent);
  color: var(--accent-color);
}

.bbi-page-btn.active {
  background: var(--accent-color);
  color: #fff;
}

.bbi-page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bbi-page-btn i { font-size: 0.95rem; }

/* Year buttons show 4-digit labels, so they need more than the
   fixed 30px circle used for arrow icons and single/double-digit
   page numbers. */
.bbi-year-btn {
  width: auto;
  min-width: 30px;
  padding: 0 8px;
  border-radius: 14px;
}

/* ── List wrapper ── */
.bbi-list-content {
  padding: 1.5rem;
}

/* ── Individual issue row ── */
.bbi-issue-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
  text-decoration: none;
}

.bbi-issue-row:first-child {
  padding-top: 0;
}

.bbi-issue-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.bbi-issue-icon {
  font-size: 1.6rem;
  color: var(--accent-color);
  flex-shrink: 0;
  opacity: 0.85;
}

.bbi-issue-body {
  flex: 1;
  min-width: 0;
}

.bbi-issue-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading-color);
  line-height: 1.4;
  margin: 0;
}

.bbi-issue-open {
  font-size: 0.8rem;
  color: #6b6f71; /* Darkened for WCAG AA contrast vs light background-color (3.22:1 -> 4.63:1) */
  margin: 2px 0 0;
}

/* Empty / error state */
.bbi-sidebar-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: color-mix(in srgb, var(--default-color) 50%, transparent);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 991px) {
  .bbi-sidebar {
    position: static;
    margin-top: 32px;
  }
}

@media (max-width: 576px) {
  .bbi-hero {
    padding: 24px 20px;
  }

  .bbi-hero-logo {
    max-height: 110px;
  }
}
