/**
 * LLM Quality Chart - CSS Variables
 *
 * Diese Variablen können im Theme überschrieben werden:
 *
 * .llm-quality-chart-wrapper {
 *   --llm-bg: #your-color;
 *   --llm-text: #your-color;
 *   ...
 * }
 */

/* ═══════════════════════════════════════════════════════════════
   Standard Theme (Dark) - CSS Variablen
   ═══════════════════════════════════════════════════════════════ */

.llm-quality-chart-wrapper {
  /* Hintergründe */
  --llm-bg: transparent;
  --llm-bg-card: rgba(140, 120, 180, 0.08);
  --llm-border: rgba(160, 140, 200, 0.25);

  /* Text - hoher Kontrast für DUNKLE Themes */
  --llm-text: #f1f5f9;
  --llm-text-muted: #cbd5e1;
  --llm-text-dim: #94a3b8;

  /* Akzent-Farben - passend zu java-fleet.com */
  --llm-accent: #a855f7;
  --llm-accent-light: #c084fc;
  --llm-accent-soft: rgba(168, 85, 247, 0.15);
  --llm-blue: #60a5fa;
  --llm-purple: #a78bfa;
  --llm-pink: #f472b6;
  --llm-teal: #2dd4bf;
  --llm-gray: #9ca3af;
  --llm-green: #4ade80;

  /* Typografie */
  --llm-font: inherit;
  --llm-font-mono: 'Cascadia Code', 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Abstände */
  --llm-radius: 10px;
  --llm-radius-sm: 6px;
  --llm-spacing: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Light Theme
   ═══════════════════════════════════════════════════════════════ */

.llm-quality-chart-wrapper.llm-chart-light {
  --llm-bg: #f8fafc;
  --llm-bg-card: #ffffff;
  --llm-border: #e2e8f0;
  --llm-text: #1e293b;
  --llm-text-muted: #64748b;
  --llm-text-dim: #94a3b8;
  --llm-accent-soft: rgba(245, 158, 11, 0.12);
}

/* ═══════════════════════════════════════════════════════════════
   Inherit Theme - Nutzt komplett die Page-Styles
   ═══════════════════════════════════════════════════════════════ */

.llm-quality-chart-wrapper.llm-chart-inherit {
  --llm-bg: transparent;
  --llm-bg-card: transparent;
  --llm-border: currentColor;
  --llm-text: inherit;
  --llm-text-muted: inherit;
  --llm-text-dim: inherit;
  --llm-font: inherit;
}

.llm-chart-inherit .llm-card {
  background: transparent !important;
  border-color: rgba(128, 128, 128, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════════
   Base Styles
   ═══════════════════════════════════════════════════════════════ */

.llm-quality-chart-wrapper {
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.llm-quality-chart-wrapper * {
  box-sizing: border-box;
}

.llm-chart-container {
  background: var(--llm-bg);
  padding: 16px 0;
  font-family: var(--llm-font);
  color: var(--llm-text);
}

.llm-chart-inner {
  max-width: 100%;
  margin: 0 auto;
}

/* Header */
.llm-header-tag {
  font-size: 11px;
  font-family: var(--llm-font-mono);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--llm-accent);
  opacity: 0.7;
  margin-bottom: 4px;
}

.llm-title {
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  margin: 0 0 8px 0;
  color: var(--llm-text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.llm-subtitle {
  font-size: 14px;
  color: var(--llm-text-muted);
  margin: 0 0 28px 0;
  line-height: 1.6;
  max-width: 660px;
}

/* Tabs */
.llm-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.llm-tab {
  padding: 9px 20px;
  font-size: 13px;
  font-family: var(--llm-font);
  font-weight: 400;
  border: 1px solid var(--llm-border);
  border-radius: 8px;
  background: var(--llm-bg-card);
  color: var(--llm-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.llm-tab:hover {
  border-color: var(--llm-accent);
  color: var(--llm-accent);
}

.llm-tab.active {
  font-weight: 600;
  border-color: var(--llm-accent);
  background: var(--llm-accent-soft);
  color: var(--llm-accent);
}

/* Cards */
.llm-card {
  background: var(--llm-bg-card);
  border: 1px solid var(--llm-border);
  border-radius: var(--llm-radius);
  padding: 22px var(--llm-spacing);
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(100, 80, 140, 0.08);
}

/* Legend */
.llm-legend {
  display: flex;
  gap: 16px;
  margin-left: 56px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.llm-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.llm-legend-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.llm-legend-label {
  font-size: 11px;
  color: var(--llm-text-muted);
}

/* Bar Charts */
.llm-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.llm-bar-label {
  width: 110px;
  font-size: 12px;
  font-family: var(--llm-font-mono);
  color: var(--llm-text-muted);
  text-align: right;
  flex-shrink: 0;
}

.llm-bar-track {
  flex: 1;
  position: relative;
  height: 30px;
  background: rgba(160, 140, 200, 0.15);
  border-radius: var(--llm-radius-sm);
}

.llm-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: var(--llm-radius-sm);
  display: flex;
  align-items: center;
  padding-left: 12px;
  min-width: 48px;
}

.llm-bar-value {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.llm-bar-suffix {
  width: 55px;
  font-size: 11px;
  font-family: var(--llm-font-mono);
  color: var(--llm-text-dim);
  text-align: right;
}

/* Hardware Cards */
.llm-hw-card {
  background: var(--llm-bg-card);
  border: 1px solid var(--llm-border);
  border-radius: var(--llm-radius);
  padding: var(--llm-spacing) 22px;
  box-shadow: 0 2px 8px rgba(100, 80, 140, 0.08);
}

.llm-hw-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.llm-hw-ram {
  font-size: 20px;
  font-weight: 800;
}

.llm-hw-tier {
  font-size: 12px;
  color: var(--llm-text-dim);
  margin-left: 10px;
  font-weight: 500;
}

.llm-hw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 12px;
}

.llm-hw-label {
  font-size: 10px;
  color: var(--llm-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
  font-weight: 600;
}

.llm-hw-value {
  font-size: 12px;
  color: var(--llm-text-muted);
  line-height: 1.5;
}

.llm-hw-value-mono {
  font-size: 13px;
  color: var(--llm-text);
  font-family: var(--llm-font-mono);
}

.llm-hw-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--llm-radius-sm);
  display: inline-block;
}

/* Info Boxes */
.llm-info-box {
  padding: 16px 18px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--llm-text-muted);
  line-height: 1.7;
  border-left: 3px solid var(--llm-accent);
  background: var(--llm-accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.llm-info-box.blue {
  border-left-color: var(--llm-blue);
  background: rgba(59, 130, 246, 0.04);
  border-color: rgba(59, 130, 246, 0.12);
}

.llm-info-label {
  font-weight: 700;
}

/* Insight Cards */
.llm-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 4px;
}

.llm-insight-card {
  background: var(--llm-bg-card);
  border: 1px solid var(--llm-border);
  border-radius: var(--llm-radius);
  padding: 16px 18px;
  border-top-width: 3px;
  box-shadow: 0 2px 8px rgba(100, 80, 140, 0.08);
}

.llm-insight-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.llm-insight-desc {
  font-size: 12px;
  color: var(--llm-text-muted);
  line-height: 1.55;
}

/* Footer */
.llm-footer {
  font-size: 11px;
  color: var(--llm-text-dim);
  line-height: 1.6;
  text-align: center;
  margin-top: 8px;
}

/* Tooltip */
.llm-tooltip {
  background: #1e1932 !important;
  border: 1px solid #a855f7 !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
  font-family: var(--llm-font);
  color: #f1f5f9 !important;
  max-width: 300px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
}

.llm-tooltip-title {
  font-size: 15px;
  font-weight: 700;
  color: #a855f7 !important;
  margin-bottom: 8px;
}

.llm-tooltip-row {
  font-size: 13px;
  margin-bottom: 4px;
  color: #f1f5f9 !important;
}

.llm-tooltip-note {
  font-size: 12px;
  color: #94a3b8 !important;
  line-height: 1.4;
  border-top: 1px solid rgba(168, 85, 247, 0.3);
  padding-top: 6px;
  margin-top: 6px;
}

/* Chart hint */
.llm-chart-hint {
  text-align: center;
  font-size: 11px;
  color: var(--llm-text-dim);
  margin-top: 6px;
}

/* Responsive */
@media (max-width: 640px) {
  .llm-hw-grid {
    grid-template-columns: 1fr;
  }

  .llm-legend {
    margin-left: 0;
  }

  .llm-bar-label {
    width: 80px;
    font-size: 10px;
  }
}
