/**
 * Page Authoring: Component Catalog Styles
 *
 * Site-agnostic. Inserted as raw HTML into body_html via TinyMCE component picker.
 * Loaded engine-side so all sites get identical styling out of the box.
 *
 * Conventions:
 *   1. All component classes namespaced .component-{id}
 *   2. Variants via BEM modifier .component-{id}--{variant}
 *   3. rgba() tints for background colors so dark + light themes both work
 *   4. Border + accent color is the variant signal (high contrast on both)
 *
 * Wrapper-class scheme (Phase 3 styling fields, instance-backed):
 *   .component-wrapper--width-{full|three-quarter|half|centered-small}
 *   .component-wrapper--align-{center|right}
 *
 * Visual verified: OSINT_Output/components-preview/preview.png (2026-05-07)
 */

.component-wrapper {
  display: block;
  margin: 1.25rem 0;
}
.component-wrapper--width-full           { width: 100%; }
.component-wrapper--width-three-quarter  { width: 75%; }
.component-wrapper--width-half           { width: 50%; }
.component-wrapper--width-centered-small { max-width: 480px; margin-left: auto; margin-right: auto; }
.component-wrapper--align-center { margin-left: auto; margin-right: auto; }
.component-wrapper--align-right  { margin-left: auto; }

.component-hero {
  width: 100%;
  margin: 1.25rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(120, 120, 140, 0.08);
}
.component-hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.component-hero__caption {
  padding: 0.5rem 1rem;
  background: rgba(120, 120, 140, 0.12);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}
.component-hero__caption-text { display: inline; }
.component-hero__caption-credit {
  display: inline;
  margin-left: 0.5em;
  opacity: 0.7;
  font-style: italic;
}

.component-info-card {
  display: block;
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(120, 120, 140, 0.25);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(120, 120, 140, 0.04);
}
.component-info-card__title {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.component-info-card__body { font-size: 1rem; line-height: 1.6; }
.component-info-card__body p:last-child { margin-bottom: 0; }
.component-info-card__body :last-child  { margin-bottom: 0; }

.component-info-card--default { border-left-color: rgba(120, 120, 140, 0.5); }
.component-info-card--blue    { border-left-color: #0ea5e9; }
.component-info-card--green   { border-left-color: #10b981; }
.component-info-card--amber   { border-left-color: #f59e0b; }
.component-info-card--red     { border-left-color: #ef4444; }

.component-stat-card {
  display: inline-block;
  min-width: 180px;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid rgba(120, 120, 140, 0.25);
  border-radius: 10px;
  background: rgba(120, 120, 140, 0.04);
  text-align: left;
  vertical-align: top;
}
.component-stat-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
}
.component-stat-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25em;
  margin-top: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.component-stat-card__arrow              { font-size: 0.85em; }
.component-stat-card--trend-up   .component-stat-card__trend { color: #10b981; }
.component-stat-card--trend-down .component-stat-card__trend { color: #ef4444; }
.component-stat-card--trend-flat .component-stat-card__trend { color: #94a3b8; }
.component-stat-card__label {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.85;
}
.component-stat-card__context {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  opacity: 0.6;
}

.component-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid;
  border-radius: 8px;
  font-size: 1rem;
  line-height: 1.55;
}
.component-callout__icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  font-family: 'Georgia', serif;
}
.component-callout__body  { flex: 1; min-width: 0; }
.component-callout__title { margin: 0 0 0.25rem 0; font-weight: 600; }
.component-callout__message p:last-child { margin-bottom: 0; }
.component-callout__message :last-child  { margin-bottom: 0; }

.component-callout--info {
  border-left-color: #0ea5e9;
  background: rgba(14, 165, 233, 0.10);
}
.component-callout--info     .component-callout__icon { background: #0ea5e9; color: #fff; }
.component-callout--success {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.10);
}
.component-callout--success  .component-callout__icon { background: #10b981; color: #fff; }
.component-callout--warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.10);
}
.component-callout--warning  .component-callout__icon { background: #f59e0b; color: #fff; }
.component-callout--danger {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.10);
}
.component-callout--danger   .component-callout__icon { background: #ef4444; color: #fff; }
.component-callout--critical {
  border-left-color: #dc2626;
  background: rgba(220, 38, 38, 0.15);
  font-weight: 500;
}
.component-callout--critical .component-callout__icon { background: #dc2626; color: #fff; }
.component-callout--critical .component-callout__title { color: #dc2626; text-transform: uppercase; letter-spacing: 0.04em; }
