/* =============================================================
   Component Showcase  -  /showcase?key=1
   Internal-only design tool; not part of the public site.
   Layout is LTR (developer chrome) but each variant stage
   defaults to RTL to match the public site context.
   ============================================================= */

.showcase-locked {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  color: #2d2d2d;
}

.showcase-locked h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.showcase-locked p {
  color: #777;
}

.showcase {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: #0d1117;
  color: #e6edf3;
  font-family: 'Open Sans', system-ui, sans-serif;
  z-index: 9999;
}

/* ---------- Sidebar ---------- */

.showcase-sidebar {
  background: #0a0d12;
  border-inline-end: 1px solid #1f2937;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.showcase-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #1f2937;
}

.showcase-mark {
  font-family: 'Silkscreen', monospace;
  font-size: 1.4rem;
  background: linear-gradient(120deg, #0894FF, #BD32D6 45%, #FFA304);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.showcase-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.showcase-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0.5rem 1.5rem;
}

.showcase-nav-group + .showcase-nav-group {
  margin-top: 1.25rem;
}

.showcase-nav-group-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  padding: 0 0.75rem 0.4rem;
  margin: 0;
  font-weight: 600;
}

.showcase-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.showcase-nav-item {
  width: 100%;
  text-align: start;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font: inherit;
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  display: block;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.showcase-nav-item:hover {
  background: #1f2937;
  color: #ffffff;
}

.showcase-nav-item.is-active {
  background: linear-gradient(120deg, rgba(8,148,255,0.18), rgba(189,50,214,0.18));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(100,98,234,0.45);
}

.showcase-sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #1f2937;
  color: #4b5563;
  font-size: 0.7rem;
}

/* ---------- Main pane ---------- */

.showcase-main {
  overflow-y: auto;
  padding: 1.5rem 2rem 4rem;
}

.showcase-main-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #1f2937;
  margin-bottom: 1.5rem;
}

.showcase-main-titles {
  min-width: 0;
}

.showcase-main-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #ffffff;
}

.showcase-main-description {
  margin: 0 0 0.4rem;
  color: #9ca3af;
  font-size: 0.9rem;
  max-width: 60ch;
}

.showcase-main-source {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  color: #64748b;
  background: #111827;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.showcase-viewport-switcher {
  display: inline-flex;
  background: #111827;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.showcase-viewport-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  text-transform: capitalize;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.showcase-viewport-btn:hover {
  color: #ffffff;
}

.showcase-viewport-btn.is-active {
  background: #1f2937;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(8,148,255,0.5);
}

/* ---------- Variant frame ---------- */

.showcase-variants {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.showcase-frame {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
}

.showcase-frame-header {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #1f2937;
  background: #0d1320;
}

.showcase-frame-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #e2e8f0;
}

.showcase-frame-description {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 0.8rem;
  max-width: 70ch;
}

.showcase-frame-body {
  padding: 1.5rem;
  display: flex;
  justify-content: center;
}

.showcase-stage {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: width 0.18s ease;
}

.showcase-frame--narrow .showcase-stage { max-width: 480px; }
.showcase-frame--medium .showcase-stage { max-width: 760px; }
.showcase-frame--wide .showcase-stage   { max-width: 1100px; }
.showcase-frame--full .showcase-stage   { max-width: 100%; }

/* Surfaces */

.showcase-stage--site {
  background: #ffffff;
  color: #2d2d2d;
  padding: 1.5rem;
}

.showcase-stage--light {
  background: #f9fafb;
  color: #2d2d2d;
  padding: 1.5rem;
}

.showcase-stage--dark {
  background: #0f172a;
  color: #f8fafc;
  padding: 1.5rem;
}

.showcase-stage--gradient {
  background: linear-gradient(135deg, #0894FF 0%, #6462EA 45%, #BD32D6 100%);
  color: #ffffff;
  padding: 1.5rem;
}

.showcase-stage--checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(-45deg, #f3f4f6 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f4f6 75%),
    linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  color: #2d2d2d;
  padding: 1.5rem;
}

/* Showcase prose - used inside variants for demo Hebrew text. */

.showcase-prose {
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
}

.showcase-prose + .showcase-prose {
  margin-top: 0.75rem;
}

.showcase-stage--dark .showcase-prose,
.showcase-stage--gradient .showcase-prose {
  color: inherit;
}

/* Variant chrome helpers - small labels inside a stage. */

.showcase-label {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  background: rgba(0,0,0,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

.showcase-stage--dark .showcase-label,
.showcase-stage--gradient .showcase-label {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
}

/* Dedicated scaffolds for sized brand-mark demos. The component
   itself is height-driven via .logo-10x { line-height: 0 }; the
   wrappers below set an explicit pixel height so each variant has
   a comparable footprint inside the showcase. */

.showcase-logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1.5rem;
}

.showcase-logo-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.showcase-logo-cell--sm  { height: 32px; }
.showcase-logo-cell--md  { height: 56px; }
.showcase-logo-cell--lg  { height: 96px; }
.showcase-logo-cell--xl  { height: 144px; }

.showcase-logo-cell .logo-10x,
.showcase-logo-cell .logo-10x-mark,
.showcase-logo-cell .logo-10x-architect,
.showcase-logo-cell .logo-10x-course {
  height: 100%;
}

.showcase-logo-cell-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.7rem;
  color: #6b7280;
}

/* On a dark stage, the cell label needs lighter text. */
.showcase-stage--dark .showcase-logo-cell-label,
.showcase-stage--gradient .showcase-logo-cell-label {
  color: rgba(255,255,255,0.75);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .showcase {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .showcase-sidebar {
    border-inline-end: none;
    border-bottom: 1px solid #1f2937;
    max-height: 35vh;
  }
}
