/* ============================================================
   recalls.css — CannRecalls USA
   cannbus.org · Cannabis Recall Tracker
   Consolidated stylesheet (all styles — no embedded <style> blocks)
   Updated: March 2026
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  --teal-deep:   #0d3a3a;
  --teal-mid:    #1a5c5c;
  --teal-bright: #2a9090;
  --teal-light:  #4ab8b8;
  --teal-pale:   #e6f5f5;
  --teal-xpale:  #f0fafa;
  --white:       #ffffff;
  --off-white:   #f8fdfd;
  --red:         #c8401b;
  --red-pale:    #fff0ec;
  --amber:       #c8881b;
  --amber-pale:  #fff8ec;
  --green:       #217a3a;
  --green-pale:  #edf7f0;
  --text:        #1a2e2e;
  --text-muted:  #4a6868;
  --border:      rgba(42, 144, 144, 0.18);
  --shadow:      0 2px 16px rgba(13, 58, 58, 0.09);
  --shadow-md:   0 6px 32px rgba(13, 58, 58, 0.13);
  --shadow-lg:   0 12px 56px rgba(13, 58, 58, 0.16);
  --radius:      10px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
}

a {
  color: var(--teal-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Alert Bar ──────────────────────────────────────────── */
/* NOT sticky — sits in normal document flow above the sticky control bar */
.alert-bar {
  background: linear-gradient(90deg, #7a1c1c, #a82020);
  color: #fff;
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 50;
}

.alert-bar a {
  color: #ffc8b8;
}

/* ── Sticky Control Bar ─────────────────────────────────── */
.control-bar-wrap {
  background: var(--teal-deep);
  border-bottom: 3px solid var(--teal-bright);
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
}

.control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 28px;
  max-width: 1380px;
  margin: 0 auto;
}

.control-bar input[type="text"],
.control-bar select {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  flex: 1;
  min-width: 130px;
  max-width: 220px;
}

.control-bar input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.control-bar select option {
  background: #0d3a3a;
  color: #fff;
}

.control-bar input:focus,
.control-bar select:focus {
  border-color: var(--teal-light);
}

.control-bar label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cb-reset {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 0.79rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.cb-reset:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Inline Reset button in no-results row — uses margin class */
.cb-reset.ml-8 {
  margin-left: 8px;
}

#result-count {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}

/* ── Layout ─────────────────────────────────────────────── */
.section {
  padding: 52px 0;
}

.section:nth-child(even) {
  background: var(--white);
}

/* Section override: explicitly set white background via class */
.section-bg-white {
  background: var(--white);
}

.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Section Header ─────────────────────────────────────── */
.sec-hdr {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.sec-num {
  min-width: 42px;
  height: 42px;
  background: var(--teal-mid);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sec-wrap h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  color: var(--teal-deep);
  margin-bottom: 5px;
}

.sec-wrap p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Site Header ────────────────────────────────────────── */
.site-header {
  background: linear-gradient(135deg, var(--teal-deep) 0%, var(--teal-mid) 55%, var(--teal-bright) 100%);
  padding: 68px 0 58px;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 15% 50%, rgba(74, 184, 184, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 30%, rgba(42, 144, 144, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

.hdr-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hdr-eye {
  display: inline-block;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.site-header h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  color: #fff;
  line-height: 1.12;
  margin-bottom: 14px;
}

.site-header h1 em {
  font-style: italic;
  color: var(--teal-light);
}

.hdr-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.97rem;
  max-width: 680px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

.hdr-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 20px;
}

.hstat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 12px 20px;
  text-align: center;
  min-width: 120px;
}

.hstat-n {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.hstat-l {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 4px;
}

/* ── Summary Strip ──────────────────────────────────────── */
.sum-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin: 32px 0;
}

.sum-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--teal-bright);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow);
}

.sum-card.red   { border-top-color: var(--red); }
.sum-card.amber { border-top-color: var(--amber); }
.sum-card.green { border-top-color: var(--green); }

.sum-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal-deep);
  line-height: 1;
  margin-bottom: 5px;
}

.sum-card.red   .sum-num { color: var(--red); }
.sum-card.amber .sum-num { color: var(--amber); }
.sum-card.green .sum-num { color: var(--green); }

.sum-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Charts ─────────────────────────────────────────────── */
.chart-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 28px 0;
}

.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  box-shadow: var(--shadow);
}

.chart-card h3 {
  font-size: 0.98rem;
  color: var(--teal-deep);
  margin-bottom: 4px;
}

.chart-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.chart-wrap {
  position: relative;
  height: 230px;
}

/* ── Table Wrapper ──────────────────────────────────────── */
/* Horizontal scroll only — no vertical overflow clipping */
.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  background: var(--white);
  margin-top: 20px;
}

/* ── Recall Table ───────────────────────────────────────── */
table.recall-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 1040px;
}

.recall-table thead {
  background: var(--teal-deep);
  position: sticky;
  top: 0;
  z-index: 5;
}

.recall-table thead th {
  color: #fff;
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.recall-table thead th:hover {
  background: var(--teal-mid);
}

.sort-icon {
  margin-left: 4px;
  opacity: 0.45;
  font-style: normal;
}

.recall-table thead th.sorted .sort-icon {
  opacity: 1;
  color: var(--teal-light);
}

.recall-table tbody tr {
  border-bottom: 1px solid var(--teal-pale);
  transition: background 0.12s;
}

.recall-table tbody tr:hover {
  background: var(--teal-xpale);
}

.recall-table tbody td {
  padding: 11px 14px;
  vertical-align: top;
  line-height: 1.45;
  color: var(--text);
  white-space: normal;
  word-break: break-word;
}

/* ── Column Widths ──────────────────────────────────────── */
/* min/max only — no overflow:hidden — text wraps freely */
.col-date     { min-width: 88px;  max-width: 100px; }
.col-state    { min-width: 110px; max-width: 130px; }
.col-product  { min-width: 200px; max-width: 280px; }
.col-brand    { min-width: 120px; max-width: 170px; font-weight: 600; }
.col-supplier { min-width: 140px; max-width: 200px; }
.col-ptype    { min-width: 108px; max-width: 140px; }
.col-reason   { min-width: 150px; max-width: 220px; }
.col-rtype    { min-width: 100px; max-width: 120px; }
.col-link     { min-width: 72px;  max-width: 80px; }

td.col-date {
  font-weight: 600;
  color: var(--teal-mid);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-mandatory { background: var(--red-pale);   color: var(--red); }
.badge-voluntary { background: var(--amber-pale);  color: #7a4200; }
.badge-advisory  { background: var(--teal-pale);   color: var(--teal-mid); }
.badge-expanded  { background: #f3e8ff;            color: #6b21a8; }

/* ── Reason Tags ────────────────────────────────────────── */
.rtag {
  display: inline-block;
  background: var(--teal-pale);
  color: var(--teal-mid);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.67rem;
  font-weight: 600;
  margin: 2px 2px 2px 0;
  white-space: nowrap;
}

.rtag.red    { background: var(--red-pale);   color: #9a2010; }
.rtag.amber  { background: var(--amber-pale); color: #7a3e00; }
.rtag.purple { background: #f3e8ff;           color: #5b1b9a; }

/* ── Detail Link ────────────────────────────────────────── */
a.det-link {
  display: inline-block;
  background: var(--teal-bright);
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.14s;
  text-decoration: none;
}

a.det-link:hover {
  background: var(--teal-mid);
}

/* ── State Chip ─────────────────────────────────────────── */
.state-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── No-Results Row ─────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: none;
}

/* ── Callout Box ────────────────────────────────────────── */
.callout {
  background: linear-gradient(135deg, var(--teal-deep), var(--teal-mid));
  border-radius: var(--radius);
  padding: 26px 28px;
  color: #fff;
  margin: 28px 0;
}

.callout h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.callout p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* ── Portal Table ───────────────────────────────────────── */
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  min-width: 480px;
}

.portal-table thead {
  background: var(--teal-deep);
}

.portal-table thead th {
  color: #fff;
  padding: 11px 14px;
  text-align: left;
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.portal-table tbody tr {
  border-bottom: 1px solid var(--teal-pale);
}

.portal-table tbody tr:hover {
  background: var(--teal-xpale);
}

.portal-table tbody td {
  padding: 10px 14px;
  vertical-align: middle;
}

/* ── Site Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--teal-deep);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 26px 20px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.site-footer a {
  color: var(--teal-light);
}

/* ── Fade-in Animation ──────────────────────────────────── */
/* .fi / .fi.vis used in HTML; .fade-in / .fade-in.visible kept for compatibility */
.fi,
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.fi.vis,
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 800px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .control-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .control-bar input[type="text"],
  .control-bar select {
    max-width: 100%;
  }
}
