@import url("../../hub.css");

.lab-category {
  margin-top: 36px;
}

.lab-curriculum-intro {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--lab-accent);
  border-radius: 12px;
  margin-top: 24px;
  padding: 20px 22px;
}

.lab-curriculum-intro p {
  color: #374151;
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

.lab-orientation {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--lab-accent);
  border-radius: 10px;
  padding: 16px 18px;
}

.lab-orientation-heading {
  color: var(--lab-accent);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.lab-orientation-text {
  color: #374151;
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 700px) {
  .lab-orientation {
    padding: 14px 16px;
  }

  .lab-orientation-text {
    font-size: 0.95rem;
  }

  .lab-curriculum-intro {
    padding: 16px;
  }
}

.lab-category h2 {
  color: #111827;
  font-size: 1.25rem;
  margin: 0 0 8px;
}

.lab-category > p {
  color: #4B5563;
  margin: 0 0 16px;
}

.lab-demo-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.lab-demo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lab-demo-card:hover {
  border-color: var(--lab-accent);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12);
}

.lab-demo-card h3 {
  color: var(--lab-accent);
  font-size: 1.05rem;
  margin: 0;
}

.lab-demo-card p {
  color: #6B7280;
  font-size: 0.92rem;
  margin: 0;
}

.lab-relationship {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 36px;
  padding: 20px;
}

.lab-relationship h2 {
  font-size: 1.1rem;
  margin: 0 0 10px;
}

/* Wrapper pages */
body.lab-wrapper-body {
  background: var(--bg-color);
  margin: 0;
  min-height: 100vh;
}

.lab-wrapper {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.lab-wrapper h1 {
  font-size: 1.75rem;
  margin: 16px 0 8px;
}

.category-pill {
  background: #EDE9FE;
  border-radius: 999px;
  color: #5B21B6;
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
}

.sim-viewport {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  margin: 24px 0;
  overflow: visible;
}

.sim-toolbar {
  align-items: center;
  background: #1f2937;
  border-bottom: 1px solid #374151;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.sim-zoom-btn,
.sim-zoom-reset {
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 8px;
  color: #f9fafb;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
}

.sim-zoom-reset {
  font-size: 0.85rem;
  margin-left: auto;
}

.sim-zoom-label {
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: 3.5rem;
  text-align: center;
}

.sim-usability-hint {
  background: #1f2937;
  border-bottom: 1px solid #374151;
  color: #9ca3af;
  font-size: 0.8rem;
  line-height: 1.45;
  margin: 0;
  padding: 8px 12px;
}

.sim-usability-hint strong {
  color: #e5e7eb;
  font-weight: 600;
}

.sim-frame-scroll {
  -webkit-overflow-scrolling: touch;
  max-height: min(72vh, 900px);
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  width: 100%;
}

.sim-frame-scroll:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: -2px;
}

.sim-frame-scroll::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

.sim-frame-scroll::-webkit-scrollbar-track {
  background: #374151;
}

.sim-frame-scroll::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border: 2px solid #374151;
  border-radius: 8px;
}

.sim-frame-inner {
  display: block;
  height: 900px;
  min-width: 980px;
  width: 980px;
}

.sim-frame {
  border: 0;
  display: block;
  height: 900px;
  min-width: 980px;
  transform-origin: top left;
  width: 980px;
}

/* Legacy alias — keep if referenced elsewhere */
.sim-frame-wrap {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  margin: 24px 0;
  overflow: hidden;
}

.sim-frame-wrap iframe {
  border: 0;
  display: block;
  height: min(72vh, 720px);
  width: 100%;
}

@media (max-width: 700px) {
  .lab-wrapper {
    padding: 16px 12px 40px;
  }

  .sim-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .sim-zoom-btn,
  .sim-zoom-reset {
    font-size: 1rem;
    min-height: 44px;
    min-width: 44px;
  }

  .sim-frame-scroll {
    max-height: min(65vh, 720px);
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
  }

  .sim-frame-inner,
  .sim-frame {
    min-width: 980px;
  }
}

.shows-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 24px;
}

.shows-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

.shows-panel h2 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.shows-panel ul {
  margin: 0;
  padding-left: 20px;
}

.shows-panel li {
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.shows-panel--not h2 { color: #B45309; }
.shows-panel--yes h2 { color: #059669; }

.lab-cta {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 12px;
  margin-top: 28px;
  padding: 20px;
  text-align: center;
}

.lab-cta p { margin: 0 0 14px; }

.lab-cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.wrapper-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}

.wrapper-nav a {
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
}

.wrapper-nav a:hover { text-decoration: underline; }
