/* ============================================================
   OB — Spec Table — scoped component styles
   Phase 3 / Plan 03-01 / BRAND-05

   Ported from design/phase-03-performance-electronics/mockups/oberbuilt.css
   lines 218–256. All token references already use --ob-* prefix.

   Dual delivery:
     - Front end: enqueued via wp_enqueue_scripts in functions.php
     - VB iframe: injected via ?inline import + IIFE in index.jsx
   ============================================================ */

.ob-spectable {
  width: 100%;
  max-width: var(--ob-container);
  margin: 0 auto;
  background: var(--ob-bg-card);
  border: 1px solid var(--ob-border);
  border-radius: var(--ob-r-lg);
  overflow: hidden;
}

.ob-spec-group {
  border-bottom: 1px solid var(--ob-border-strong);
}

.ob-spec-group:last-child {
  border-bottom: none;
}

.ob-spec-trigger {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ob-s-4);
  background: var(--ob-bg-inset);
  border: none;
  cursor: pointer;
  padding: var(--ob-s-4) var(--ob-s-6);
  text-align: left;
  font-family: var(--ob-font-display);
  font-size: var(--ob-text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ob-track-caps);
  color: var(--ob-fg-3);
}

.ob-spec-chevron {
  width: 18px;
  height: 18px;
  color: var(--ob-accent);
  transition: transform var(--ob-t-base) var(--ob-ease);
  flex-shrink: 0;
}

.ob-spec-trigger[aria-expanded="true"] .ob-spec-chevron {
  transform: rotate(180deg);
}

.ob-spec-panel {
  overflow: hidden;
  transition: max-height var(--ob-t-base) var(--ob-ease);
}

@media (max-width: 767px) {
  /* Mobile: start collapsed so JS doesn't have to animate closed on load */
  .ob-spec-panel {
    max-height: 0;
  }
}

.ob-spec-row {
  display: flex;
  align-items: baseline;
  gap: var(--ob-s-4);
  padding: var(--ob-s-4) var(--ob-s-6);
  border-bottom: 1px solid var(--ob-border);
}

.ob-spec-row:last-child {
  border-bottom: none;
}

.ob-spec-label {
  flex: 0 0 38%;
  font-family: var(--ob-font-display);
  font-size: var(--ob-text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ob-track-caps);
  color: var(--ob-fg-2);
}

.ob-spec-value {
  flex: 1;
  font-family: var(--ob-font-sans);
  font-size: var(--ob-text-base);
  color: var(--ob-fg-1);
}

.ob-spec-value.num,
.ob-spec-value .num {
  font-family: var(--ob-font-mono);
  font-variant-numeric: tabular-nums;
}

.ob-spec-row:hover {
  background: var(--ob-bg-inset);
}

@media (min-width: 768px) {
  /* Desktop: all panels expanded (no-JS / desktop fallback) */
  .ob-spec-panel {
    max-height: none;
  }
  .ob-spec-row {
    flex-wrap: nowrap;
  }
}

@media (max-width: 360px) {
  .ob-spec-row {
    flex-direction: column;
    gap: var(--ob-s-1);
  }
  .ob-spec-label {
    flex: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ob-spec-panel {
    transition: none;
  }
  .ob-spec-chevron {
    transition: none;
  }
}
