/*
Theme Name: Herbarium Block Theme
Theme URI: https://herbarium-intelligence.com
Author: Herbarium Botanical Intelligence Architecture
Author URI: https://herbarium-intelligence.com
Description: Production-ready, ultra-lightweight scientific Full Site Editing (FSE) block theme for Herbarium, a members-only AI herbal research and botanical intelligence platform. Synthesizes architectural and performance best practices from Kadence, Blocksy, Astra, GeneratePress, Neve, and OceanWP.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: herbarium-block-theme
Tags: full-site-editing, block-patterns, block-styles, grid-layout, wide-blocks, translation-ready
*/

/* ==========================================================================
   1. RESET & SCIENTIFIC INSTRUMENT BASELINE
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--wp--preset--color--warm-ivory, #FBF9F4);
  color: var(--wp--preset--color--charcoal, #1F2421);
  font-family: var(--wp--preset--font-family--sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  font-size: var(--wp--preset--font-size--base, 1rem);
  line-height: 1.65;
}

/* Scientific Numeric Alignment */
.tabular-nums,
.monograph-stat,
.citation-number,
.evidence-score {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid var(--wp--preset--color--forest-green, #1B3B2B);
  outline-offset: 3px;
}

/* ==========================================================================
   2. SCIENTIFIC CARD & RESEARCH CONTAINER UTILITIES
   ========================================================================== */

.herbarium-instrument-card {
  background: #FFFFFF;
  border: 1px solid var(--wp--preset--color--border-subtle, #E5E0D5);
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(27, 59, 43, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.herbarium-instrument-card:hover {
  border-color: var(--wp--preset--color--muted-olive, #7D8C6C);
  box-shadow: 0 4px 12px rgba(27, 59, 43, 0.08);
}

.herbarium-hairline-divider {
  height: 1px;
  background: var(--wp--preset--color--border-subtle, #E5E0D5);
  margin: 1.5rem 0;
  border: none;
}

/* ==========================================================================
   3. EVIDENCE LEVEL BADGES (Scientific Standard)
   ========================================================================== */

.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 2px;
  line-height: 1.2;
}

.evidence-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.evidence-badge-strong {
  background: rgba(27, 59, 43, 0.1);
  color: #1B3B2B;
  border: 1px solid rgba(27, 59, 43, 0.3);
}
.evidence-badge-strong::before {
  background: #1B3B2B;
}

.evidence-badge-moderate {
  background: rgba(91, 112, 101, 0.1);
  color: #384A41;
  border: 1px solid rgba(91, 112, 101, 0.3);
}
.evidence-badge-moderate::before {
  background: #5B7065;
}

.evidence-badge-limited {
  background: rgba(184, 151, 88, 0.12);
  color: #785E25;
  border: 1px solid rgba(184, 151, 88, 0.35);
}
.evidence-badge-limited::before {
  background: #B89758;
}

.evidence-badge-preliminary {
  background: rgba(200, 122, 62, 0.12);
  color: #8C4D1D;
  border: 1px solid rgba(200, 122, 62, 0.35);
}
.evidence-badge-preliminary::before {
  background: #C87A3E;
}

.evidence-badge-insufficient {
  background: rgba(122, 132, 126, 0.12);
  color: #4B5450;
  border: 1px solid rgba(122, 132, 126, 0.3);
}
.evidence-badge-insufficient::before {
  background: #7A847E;
}

/* ==========================================================================
   4. MONOGRAPH TAXONOMY & COMPOUND TAGS
   ========================================================================== */

.botanical-tag {
  display: inline-block;
  font-family: var(--wp--preset--font-family--mono, monospace);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  background: var(--wp--preset--color--parchment, #F3EFE6);
  color: var(--wp--preset--color--deep-pine, #12271D);
  border: 1px solid var(--wp--preset--color--border-subtle, #E5E0D5);
  border-radius: 2px;
}

.latin-binomial {
  font-style: italic;
  font-family: var(--wp--preset--font-family--serif, serif);
}

/* ==========================================================================
   5. AUDIO DOSSIER PLAYER BAR
   ========================================================================== */

.herbarium-audio-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--wp--preset--color--border-subtle, #E5E0D5);
  border-left: 4px solid var(--wp--preset--color--forest-green, #1B3B2B);
  padding: 0.85rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* ==========================================================================
   6. PRINT STYLES FOR CLINICAL RESEARCH DOSSIERS
   ========================================================================== */

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 10.5pt;
    line-height: 1.45;
  }

  .no-print,
  .herbarium-search-container,
  .herbarium-audio-panel,
  .wp-block-navigation,
  header,
  footer {
    display: none !important;
  }

  .herbarium-instrument-card {
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
    break-inside: avoid;
  }

  h1, h2, h3 {
    color: #000000 !important;
    page-break-after: avoid;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }
}
