/* ============================================================
   cannstprice.css
   Page-specific styles for the CannPrice state price comparison
   page (/cannpricestate1.html).

   IMPORTANT: This file is a COMPANION to the site-wide
   cannbus-market-report.css — it is NOT a replacement. Load both,
   in this order, in the page <head>:

     <link rel="stylesheet" href="{% static 'cannbus/css/cannbus-market-report.css' %}">
     <link rel="stylesheet" href="{% static 'cannprice/css/cannstprice.css' %}">

   This file deliberately does NOT redefine colors, fonts, the
   admin bar, the site header, the sidebar shell, the right rail
   shell, data-table, badge, or callout-block styles — those all
   already exist in cannbus-market-report.css and are reused as-is
   so this page matches every other CannBus report pixel-for-pixel.
   See INSTRUCTIONS_FOR_RAJIB.md section 3 for the full list of
   reused vs. new classes.

   Everything below is NEW and specific to the price-comparison
   table/toolbar UI that no other CannBus page currently needs.
   ============================================================ */

/* ── PAGE HERO (reuses report-header pattern colors, new layout) ── */
.cannprice-hero {
  background: var(--green-deep);
  padding: 140px 0 28px;
}
.cannprice-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}
.cannprice-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-light);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0 0 10px;
}
.cannprice-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  color: white;
  margin: 0 0 12px;
}
.cannprice-hero-lead {
  max-width: 760px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 0 20px;
}
.cannprice-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.cannprice-chip {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

/* ── STATUS / FRESHNESS STRIP ──
   A 4-up summary row showing last update time, status, and the
   automation breakdown (X live / Y manual). Sits just below the
   hero, above the toolbar. Reuses .rail-stat-val / .rail-stat-label
   typography scale from the right-rail pattern for consistency. */
.cannprice-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.cannprice-status-cell {
  background: white;
  padding: 14px 18px;
}
.cannprice-status-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}
.cannprice-status-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--green-deep);
}
.cannprice-status-value.status-success { color: var(--green-bright); }
.cannprice-status-value.status-partial { color: #8a6f30; }
.cannprice-status-value.status-failed  { color: var(--alert); }

/* ── TOOLBAR (search + filters) ──
   No equivalent exists elsewhere in CannBus reports since they
   don't have interactive filtering — this is new. Matches the
   visual weight of .data-table-block (white card, bordered,
   rounded) so it sits naturally above the table. */
.cannprice-toolbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.cannprice-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.cannprice-field label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.cannprice-field input[type="search"],
.cannprice-field select {
  min-width: 220px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--black);
  background: white;
}
.cannprice-field input[type="search"]:focus,
.cannprice-field select:focus {
  outline: none;
  border-color: var(--green-bright);
}
.cannprice-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 9px;
  font-size: 12.5px;
  color: var(--green-deep);
  font-weight: 600;
}
.cannprice-toolbar-btn {
  border: 1px solid var(--border);
  background: var(--cream);
  color: var(--green-deep);
  font-weight: 700;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 7px;
  cursor: pointer;
}
.cannprice-toolbar-btn:hover { background: var(--green-light); }
.cannprice-toolbar-btn.primary {
  background: var(--green-bright);
  color: white;
  border-color: var(--green-bright);
}
.cannprice-toolbar-btn.primary:hover { background: var(--green-mid); }

/* ── PRICE TABLE — extends .data-table with price-grid-specific cells ──
   The base .data-table / .data-table-block / .data-table-header
   classes from cannbus-market-report.css are used unchanged for the
   wrapper, header bar, and base row/cell styling. The rules below
   only add the things specific to a wide, sortable price grid: the
   sticky header (needed because this table is taller than typical
   CannBus tables), the stacked price+unit cell, and the "Not
   published" placeholder style. */
.cannprice-table-wrap {
  overflow-x: auto;
}
.cannprice-table-wrap table.data-table {
  min-width: 1180px;
}
.cannprice-table-wrap table.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.cannprice-price-cell {
  white-space: nowrap;
}
.cannprice-price-cell .price-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--green-deep);
  font-size: 13.5px;
  display: block;
}
.cannprice-price-cell .price-unit {
  font-size: 10.5px;
  color: var(--muted);
}
.cannprice-not-published {
  color: var(--muted);
  font-style: italic;
  font-size: 12.5px;
}
.cannprice-notes-cell {
  max-width: 280px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.cannprice-source-links a {
  display: block;
  font-size: 11.5px;
  margin-bottom: 3px;
}

/* ── METHODOLOGY GRID — 4-up cards below the table ──
   Reuses .callout-block visual language (rounded, left accent
   border) in a compact card-grid layout, since CannBus doesn't
   have an existing "info card grid" component. */
.cannprice-method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.cannprice-method-card {
  background: white;
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-bright);
  border-radius: 8px;
  padding: 14px 16px;
}
.cannprice-method-card h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 400;
  color: var(--green-deep);
  margin: 0 0 6px;
}
.cannprice-method-card p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .cannprice-status-strip { grid-template-columns: repeat(2, 1fr); }
  .cannprice-method-grid { grid-template-columns: repeat(2, 1fr); }
  .cannprice-toolbar { align-items: stretch; }
  .cannprice-field input[type="search"],
  .cannprice-field select { min-width: 100%; }
}
@media (max-width: 600px) {
  .cannprice-status-strip { grid-template-columns: 1fr; }
  .cannprice-method-grid { grid-template-columns: 1fr; }
}
