/* ═══════════════════════════════════════════════════
   Oplexa HBM Fit — WordPress Plugin Styles
   Scoped to .oplexa-hbmfit to avoid theme conflicts
═══════════════════════════════════════════════════ */

.oplexa-hbmfit *,
.oplexa-hbmfit *::before,
.oplexa-hbmfit *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.oplexa-hbmfit {
  --ohf-bg:      #09090b;
  --ohf-s1:      #111114;
  --ohf-s2:      #17171b;
  --ohf-s3:      #1e1e24;
  --ohf-border:  rgba(255,255,255,0.07);
  --ohf-borderB: rgba(255,255,255,0.13);
  --ohf-text:    #e8e8ea;
  --ohf-muted:   #72727a;
  --ohf-dim:     #3a3a42;
  --ohf-accent:  #d4a853;
  --ohf-aD:      rgba(212,168,83,0.12);
  --ohf-green:   #3ecf8e;
  --ohf-gD:      rgba(62,207,142,0.12);
  --ohf-red:     #f87171;
  --ohf-rD:      rgba(248,113,113,0.1);
  --ohf-amber:   #f59e0b;
  --ohf-amD:     rgba(245,158,11,0.1);
  --ohf-blue:    #60a5fa;
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  color: var(--ohf-text);
  background: var(--ohf-bg);
  position: relative;
}

/* ── LAYOUT ─────────────────────────────────────── */
.ohf-app {
  display: grid;
  grid-template-columns: 400px 1fr;
  min-height: 85vh;
}

.ohf-sidebar {
  background: var(--ohf-s1);
  border-right: 1px solid var(--ohf-border);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  max-height: 90vh;
  position: sticky;
  top: 80px;
}

.ohf-main {
  padding: 36px 44px;
  overflow-y: auto;
  background: var(--ohf-bg);
}

/* ── SIDEBAR COMPONENTS ──────────────────────────── */
.ohf-tool-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ohf-text);
  margin-bottom: 6px;
}

.ohf-tool-sub {
  font-size: 12px;
  color: var(--ohf-muted);
  line-height: 1.6;
}

.ohf-divider {
  height: 1px;
  background: var(--ohf-border);
  flex-shrink: 0;
}

.ohf-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ohf-sec-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ohf-accent);
}

.ohf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ohf-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ohf-muted);
}

.ohf-hint {
  font-size: 11px;
  color: var(--ohf-dim);
  line-height: 1.5;
}

.ohf-input {
  background: var(--ohf-bg);
  border: 1px solid var(--ohf-borderB);
  color: var(--ohf-text);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
  -webkit-appearance: none;
}

.ohf-input:focus {
  border-color: var(--ohf-accent);
  box-shadow: none;
}

/* Segment buttons */
.ohf-seg-group {
  display: grid;
  gap: 2px;
}

.ohf-seg {
  background: var(--ohf-bg);
  border: 1px solid var(--ohf-borderB);
  color: var(--ohf-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 9px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 0;
}

.ohf-seg:hover { color: var(--ohf-text); }

.ohf-seg.active {
  border-color: var(--ohf-accent);
  color: var(--ohf-accent);
  background: var(--ohf-aD);
}

.ohf-seg-badge {
  font-size: 9px;
  color: var(--ohf-dim);
}

.ohf-seg.active .ohf-seg-badge {
  color: rgba(212,168,83,0.6);
}

/* GPU grid */
.ohf-gpu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.ohf-gpu {
  background: var(--ohf-bg);
  border: 1px solid var(--ohf-borderB);
  color: var(--ohf-muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  border-radius: 0;
}

.ohf-gpu:hover { color: var(--ohf-text); }

.ohf-gpu.active {
  border-color: var(--ohf-accent);
  color: var(--ohf-accent);
  background: var(--ohf-aD);
}

.ohf-gpu-name { font-size: 12px; font-weight: 500; }

.ohf-gpu-bw {
  font-size: 10px;
  color: var(--ohf-dim);
  margin-top: 2px;
}

.ohf-gpu.active .ohf-gpu-bw { color: rgba(212,168,83,0.5); }

/* Run button */
.ohf-run-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px;
  background: var(--ohf-accent);
  color: var(--ohf-bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  border-radius: 0;
}

.ohf-run-btn:hover { opacity: 0.85; }

.ohf-price-note {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ohf-dim);
  text-align: center;
  letter-spacing: 0.06em;
}

/* ── EMPTY / LOADING ────────────────────────────── */
.ohf-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  text-align: center;
  gap: 14px;
}

.ohf-empty-icon   { font-size: 44px; opacity: 0.3; }

.ohf-empty-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--ohf-muted);
}

.ohf-empty-sub {
  font-size: 13px;
  color: var(--ohf-dim);
  max-width: 340px;
  line-height: 1.7;
}

.ohf-loading {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  gap: 18px;
}

.ohf-spinner {
  width: 38px;
  height: 38px;
  border: 2px solid var(--ohf-border);
  border-top-color: var(--ohf-accent);
  border-radius: 50%;
  animation: ohf-spin 0.8s linear infinite;
}

@keyframes ohf-spin { to { transform: rotate(360deg); } }

.ohf-loading-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ohf-muted);
  letter-spacing: 0.1em;
}

.ohf-steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 300px;
}

.ohf-step {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ohf-dim);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}

.ohf-step.done  { color: var(--ohf-green); }
.ohf-step.active { color: var(--ohf-accent); }

.ohf-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ohf-dim);
  flex-shrink: 0;
  transition: background 0.3s;
}

.ohf-step.done .ohf-step-dot   { background: var(--ohf-green); }
.ohf-step.active .ohf-step-dot { background: var(--ohf-accent); animation: ohf-pulse 1s infinite; }

@keyframes ohf-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── REPORT ──────────────────────────────────────── */
.ohf-report {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Report header */
.ohf-rh {
  padding: 26px 30px;
  background: var(--ohf-s1);
  border: 1px solid var(--ohf-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ohf-rh-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ohf-accent);
  margin-bottom: 4px;
}

.ohf-rh-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ohf-text);
  margin-bottom: 4px;
}

.ohf-rh-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ohf-dim);
}

/* Section header */
.ohf-sec-head {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ohf-dim);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ohf-border);
  margin-bottom: 18px;
}

/* Stat grid */
.ohf-stat-grid {
  display: grid;
  gap: 2px;
  background: var(--ohf-border);
}

.ohf-stat-item {
  background: var(--ohf-s1);
  padding: 18px 22px;
}

.ohf-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ohf-dim);
  margin-bottom: 7px;
}

.ohf-stat-val {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--ohf-text);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.ohf-stat-sub {
  font-size: 11px;
  color: var(--ohf-dim);
}

/* BW Meter */
.ohf-bw-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 26px;
  background: var(--ohf-s1);
  border: 1px solid var(--ohf-border);
}

.ohf-bw-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.ohf-bw-name  { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ohf-muted); }
.ohf-bw-vals  { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--ohf-dim); }
.ohf-bw-vals strong { color: var(--ohf-text); }

.ohf-bw-track {
  height: 7px;
  background: var(--ohf-s3);
  position: relative;
  overflow: hidden;
}

.ohf-bw-fill {
  height: 100%;
  transition: width 1s ease;
}

.ohf-bw-fill.ok   { background: var(--ohf-green); }
.ohf-bw-fill.warn { background: var(--ohf-amber); }
.ohf-bw-fill.crit { background: var(--ohf-red); }
.ohf-bw-pct { font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--ohf-dim); margin-top:3px; }

/* Tables */
.ohf-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ohf-s1);
  border: 1px solid var(--ohf-border);
}

.ohf-table th {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ohf-dim);
  padding: 9px 14px;
  text-align: right;
  border-bottom: 1px solid var(--ohf-border);
  font-weight: 400;
  background: var(--ohf-s1);
}

.ohf-table th:first-child { text-align: left; }

.ohf-table td {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ohf-muted);
  padding: 11px 14px;
  text-align: right;
  border-bottom: 1px solid var(--ohf-border);
}

.ohf-table td:first-child { text-align: left; color: var(--ohf-text); font-weight: 500; }
.ohf-table tr:last-child td { border-bottom: none; }
.ohf-table tr.ohf-hl td { background: var(--ohf-aD); }
.ohf-table tr.ohf-hl td:first-child::before { content: "→ "; color: var(--ohf-accent); }

.ohf-c-ok   { color: var(--ohf-green) !important; }
.ohf-c-warn { color: var(--ohf-amber) !important; }
.ohf-c-fail { color: var(--ohf-red)   !important; }
.ohf-c-gold { color: var(--ohf-accent)!important; }

/* Recommendations */
.ohf-recs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--ohf-border);
}

.ohf-rec {
  background: var(--ohf-s1);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ohf-rec-n {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--ohf-accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
  width: 20px;
  margin-top: 2px;
}

.ohf-rec-text {
  font-size: 13px;
  color: var(--ohf-text);
  line-height: 1.65;
  font-weight: 300;
}

.ohf-rec-text strong { color: var(--ohf-accent); font-weight: 500; }

/* ── PAYWALL ─────────────────────────────────────── */
.ohf-paywall {
  position: relative;
  border: 1px solid var(--ohf-border);
  overflow: hidden;
}

.ohf-paywall-blur {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  opacity: 0.4;
  padding: 24px;
  background: var(--ohf-s1);
}

.ohf-paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(9,9,11,0.88);
  backdrop-filter: blur(2px);
  padding: 28px;
  text-align: center;
}

.ohf-po-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--ohf-text);
}

.ohf-po-sub {
  font-size: 13px;
  color: var(--ohf-muted);
  line-height: 1.7;
  max-width: 400px;
}

.ohf-po-includes {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  max-width: 380px;
  text-align: left;
}

.ohf-po-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--ohf-muted);
  font-family: 'IBM Plex Mono', monospace;
}

.ohf-po-item::before {
  content: '✓';
  color: var(--ohf-green);
  font-size: 11px;
  flex-shrink: 0;
}

.ohf-po-price {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--ohf-accent);
  letter-spacing: -0.02em;
}

.ohf-pay-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 15px 36px;
  background: var(--ohf-accent);
  color: var(--ohf-bg);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  max-width: 300px;
  border-radius: 0;
}

.ohf-pay-btn:hover   { opacity: 0.85; }
.ohf-pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── FULL REPORT SECTIONS ────────────────────────── */
.ohf-full {
  display: none;
  flex-direction: column;
  gap: 28px;
}

/* Download bar */
.ohf-dl-bar {
  display: flex;
  gap: 10px;
  padding: 18px 22px;
  background: var(--ohf-s1);
  border: 1px solid var(--ohf-border);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.ohf-dl-info strong  { display: block; font-size: 13px; color: var(--ohf-text); margin-bottom: 2px; }
.ohf-dl-info span    { font-size: 11px; color: var(--ohf-muted); }
.ohf-dl-btns         { display: flex; gap: 8px; flex-wrap: wrap; }

.ohf-dl-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 9px 18px;
  background: transparent;
  border: 1px solid var(--ohf-borderB);
  color: var(--ohf-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  display: inline-block;
  border-radius: 0;
}

.ohf-dl-btn:hover { color: var(--ohf-text); border-color: var(--ohf-muted); }

.ohf-dl-btn.gold {
  background: var(--ohf-accent);
  color: var(--ohf-bg);
  border-color: var(--ohf-accent);
}

.ohf-dl-btn.gold:hover { opacity: 0.85; }

/* ── PAYMENT OVERLAY ─────────────────────────────── */
.ohf-pay-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(9,9,11,0.96);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.ohf-pay-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  color: var(--ohf-text);
}

.ohf-pay-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--ohf-muted);
  letter-spacing: 0.08em;
}

/* ── TOAST ───────────────────────────────────────── */
.ohf-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--ohf-s1);
  border: 1px solid rgba(62,207,142,0.3);
  padding: 14px 18px;
  max-width: 300px;
}

.ohf-toast-title { font-size: 13px; font-weight: 500; color: var(--ohf-green); margin-bottom: 4px; }
.ohf-toast-sub   { font-size: 12px; color: var(--ohf-muted); line-height: 1.5; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .ohf-app {
    grid-template-columns: 1fr;
  }
  .ohf-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--ohf-border);
  }
  .ohf-main {
    padding: 24px 16px;
  }
}

@media print {
  .ohf-sidebar,
  .ohf-paywall,
  .ohf-dl-bar,
  .ohf-pay-overlay,
  .ohf-toast { display: none !important; }
  .ohf-app   { grid-template-columns: 1fr; }
  .ohf-full  { display: flex !important; flex-direction: column !important; }
}
