/* MechMocks Commercial Studio — Obsidian Quad-Laser Design System (Plates 01–06) */
:root {
  --mm-canvas: #090B10;
  --mm-surface: #111520;
  --mm-elevated: #161B29;
  --mm-panel: #0D111B;
  --mm-border: rgba(148, 163, 184, 0.16);
  --mm-border-strong: rgba(99, 102, 241, 0.45);
  --mm-indigo: #4F46E5;
  --mm-violet: #7C3AED;
  --mm-emerald: #10B981;
  --mm-amber: #F59E0B;
  --mm-rose: #F43F5E;
  --mm-ink: #F8FAFC;
  --mm-muted: #94A3B8;
}

html, body {
  background: var(--mm-canvas);
  color: var(--mm-ink);
  max-width: 100vw;
  overflow-x: hidden;
}

.epm-header {
  min-height: 56px;
  padding: 6px 18px;
  background: rgba(9, 11, 16, 0.92);
  border-bottom: 1px solid var(--mm-border);
}

.epm-header.cabss-header-inert {
  filter: grayscale(100%);
  opacity: 0.46;
  pointer-events: none;
  user-select: none;
}

.mm-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Hero Studio Stage (Plate 01) */
.mm-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.18fr);
  gap: 20px;
  align-items: stretch;
  background: radial-gradient(circle at 82% 18%, rgba(79, 70, 229, 0.20), transparent 56%), var(--mm-surface);
  border: 1px solid var(--mm-border);
  border-radius: 16px;
  padding: 20px;
}

.mm-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.mm-url-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.mm-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--mm-border);
  background: var(--mm-canvas);
  color: var(--mm-ink);
  font-size: 13px;
}

.mm-input:focus {
  outline: 2px solid var(--mm-indigo);
  border-color: transparent;
}

.mm-dropzone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  min-height: 48px;
  border-radius: 10px;
  background: rgba(79, 70, 229, 0.10);
  color: #E0E7FF;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mm-dropzone:hover, .mm-dropzone.dragover {
  background: rgba(79, 70, 229, 0.22);
}

.mm-bezel-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mm-pill {
  min-height: 38px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  color: var(--mm-muted);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.mm-pill:hover, .mm-pill.active {
  color: var(--mm-ink);
  background: rgba(79, 70, 229, 0.24);
  border-color: var(--mm-border-strong);
}

.mm-hero-stage-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(9, 11, 16, 0.72);
  border-radius: 12px;
  padding: 12px;
  min-width: 0;
}

.mm-canvas-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9.4;
  border-radius: 10px;
  overflow: hidden;
  background: #07090F;
}

.mm-canvas-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.mm-canvas-frame canvas:active {
  cursor: grabbing;
}

.mm-stage-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mm-swatch-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mm-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.mm-swatch-btn.active {
  border-color: #FFFFFF;
  transform: scale(1.1);
}

/* 3-Pane 2D/3D Studio Workspace (Plate 02) */
.mm-studio-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.mm-pane {
  background: var(--mm-surface);
  border: 1px solid var(--mm-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.mm-pane-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mm-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mm-bezel-scroll {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 2px;
}

.mm-bezel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--mm-ink);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
}

.mm-bezel-item:hover, .mm-bezel-item.active {
  background: rgba(79, 70, 229, 0.20);
  border-color: var(--mm-border-strong);
}

.mm-gimbal-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #C7D2FE;
  background: rgba(17, 21, 32, 0.86);
  padding: 7px 10px;
  border-radius: 8px;
}

.mm-slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mm-slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--mm-muted);
}

.mm-slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--mm-indigo);
}

/* Panoramic App Store Deck Builder (Plate 03) */
.mm-pano-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(129, 140, 248, 0.38) rgba(9, 11, 16, 0.65);
  border-radius: 14px;
  border: 1px solid var(--mm-border);
  background: linear-gradient(135deg, #312E81 0%, #4F46E5 38%, #7C3AED 72%, #090B10 100%);
  position: relative;
}

.mm-pano-strip::-webkit-scrollbar {
  height: 6px;
}

.mm-pano-strip::-webkit-scrollbar-track {
  background: rgba(9, 11, 16, 0.65);
  border-radius: 6px;
}

.mm-pano-strip::-webkit-scrollbar-thumb {
  background: rgba(129, 140, 248, 0.38);
  border-radius: 6px;
}

.code-block {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: hidden;
}

.mm-pano-slide {
  min-height: 330px;
  padding: 16px 14px;
  border-right: 1px dashed rgba(255, 255, 255, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.mm-pano-slide:last-child {
  border-right: none;
}

.mm-pano-device {
  margin-top: auto;
  height: 195px;
  border-radius: 22px 22px 0 0;
  border: 5px solid #272B3A;
  border-bottom: none;
  background: #0B0F19;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transform: perspective(650px) rotateY(-8deg);
}

.mm-locale-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Motion Keyframe Timeline & Tours (Plate 04) */
.mm-timeline-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--mm-panel);
  border: 1px solid var(--mm-border);
  border-radius: 10px;
  padding: 10px;
}

.mm-track-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.mm-track-lane {
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.mm-keyframe-pill {
  position: absolute;
  top: 4px;
  height: 18px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--mm-indigo), var(--mm-violet));
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 7px;
  white-space: nowrap;
}

.mm-hotspot-pin {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--mm-indigo);
  border: 2px solid #FFFFFF;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 6px rgba(79, 70, 229, 0.32);
  transform: translate(-50%, -50%);
}

.mm-hotspot-pin.active {
  background: var(--mm-emerald);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.35);
}

/* Pricing 4-Tier Grid & Brand Kits (Plate 05) */
.mm-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.epm-card.featured {
  border-color: var(--mm-indigo);
  box-shadow: 0 12px 36px rgba(79, 70, 229, 0.22);
}

.mm-swatch-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

/* Responsive Breakpoints: Tablet (768x1024) & Mobile (390x844) */
@media (max-width: 1100px) {
  .mm-hero-grid {
    grid-template-columns: 1fr;
  }
  .mm-studio-shell {
    grid-template-columns: 1fr;
  }
  .mm-pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mm-swatch-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .epm-header {
    min-height: 48px;
    padding: 4px 8px;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .epm-brand {
    font-size: 13.5px;
    gap: 5px;
    padding: 0 2px;
  }
  .mm-brand-mark {
    width: 22px;
    height: 22px;
  }
  .epm-nav {
    order: 0;
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    border-top: none;
  }
  .epm-nav-link {
    padding: 0 7px;
    min-height: 36px;
    min-width: 36px;
    font-size: 11.5px;
  }
  .epm-actions {
    gap: 4px;
  }
  .epm-actions button[aria-label="Ask Agent"],
  .epm-actions button[aria-label="Connected Apps"] {
    display: none;
  }
  .epm-actions .btn {
    padding: 0 8px;
    min-height: 36px;
    min-width: 36px;
    font-size: 11.5px;
  }
  .epm-actions .status-badge {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 6px !important;
    min-height: 32px !important;
    font-size: 10.5px;
  }
  .mm-pano-strip {
    grid-auto-columns: minmax(170px, 1fr);
  }
  .mm-hero-grid {
    padding: 12px;
    gap: 12px;
  }
  .mm-url-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .mm-pricing-grid {
    grid-template-columns: 1fr;
  }
  .mm-swatch-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mm-track-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* F10 / F25: menu button replaces the scrolling nav strip below 1024 px (tablet, narrow desktop, phone). */
.epm-menu-btn { display: none; }
@media (max-width: 1024px) {
  .epm-header { position: sticky; flex-wrap: nowrap; }
  .epm-menu-btn { display: inline-flex; order: 2; }
  .epm-actions { order: 3; }
  .epm-nav { display: none; }
  body.epm-nav-open .epm-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px 12px 12px;
    background: rgba(9, 11, 16, 0.98);
    border-bottom: 1px solid var(--mm-border, rgba(255, 255, 255, 0.08));
    overflow: visible;
  }
  body.epm-nav-open .epm-nav .epm-nav-link {
    justify-content: flex-start;
    min-height: 44px;
    font-size: 14px;
  }
  .epm-actions .status-badge {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 640px) {
  .epm-menu-btn span { display: none; }
  /* F10: the signed-in email chip gives way so Sign out stays on screen; the account is named on /workspace. */
  .epm-actions .status-badge { display: none; }
  /* F11: on phones the hero studio comes first and the stat strip follows it. */
  .epm-main > .mm-hero-grid { order: -1; }
  .mm-home-kpi .epm-stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* F12: render-queue rows become stacked cards with labelled fields, no sideways scroll. */
  .mm-queue-table thead { display: none; }
  .mm-queue-table, .mm-queue-table tbody, .mm-queue-table tr, .mm-queue-table td { display: block; width: 100%; }
  .mm-queue-table tr {
    border: 1px solid var(--mm-border, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
  }
  .mm-queue-table td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    border: 0;
    word-break: break-all;
  }
  .mm-queue-table td::before {
    content: attr(data-label);
    color: var(--mm-muted, #94a3b8);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
  }
}
