/* ─── FLOATING VIEWPORT SWITCHER & SIMULATOR TRIGGER ───────────────── */
.demo-toolbar {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 18, 18, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 6px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.demo-tool-btn {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.demo-tool-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.demo-tool-btn.is-active {
  background: rgba(56, 242, 233, 0.16);
  color: var(--accent-cyan);
}

.demo-tool-btn.is-alert {
  background: rgba(255, 112, 67, 0.22);
  color: #ffd3c4;
}

.demo-tool-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}

/* ─── SIMULATOR SLIDE-OUT DRAWER ───────────────────────────────────── */
.sim-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 95;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.sim-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.sim-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(370px, 100vw);
  background: #141618;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.sim-drawer.is-open {
  transform: translateX(0);
}

.sim-drawer-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-drawer-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.sim-close-btn {
  border: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sim-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sim-section-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sim-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sim-chip {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--bg-btn);
  color: var(--text-secondary);
  border-radius: 10px;
  padding: 6px 9px;
  font-size: 11px;
  cursor: pointer;
}

.sim-chip.is-active {
  border-color: rgba(56, 242, 233, 0.45);
  background: rgba(56, 242, 233, 0.14);
  color: var(--accent-cyan);
}

.sim-chip.is-danger {
  border-color: rgba(255, 112, 67, 0.55);
  background: rgba(255, 112, 67, 0.22);
  color: #ffd3c4;
}

.sim-time-input {
  background: var(--bg-btn);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}

.sim-log-mini {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 190px;
  overflow-y: auto;
}

.sim-log-row {
  background: var(--bg-btn);
  border-radius: 9px;
  padding: 6px 8px;
  font-size: 10px;
  border-left: 2px solid var(--accent-cyan);
  display: flex;
  gap: 6px;
}

.sim-log-row.is-warn {
  border-left-color: var(--accent-warm);
}

.sim-log-row.is-critical {
  border-left-color: var(--accent-alert);
}

@media (max-width: 767px) {
  .demo-toolbar {
    display: none;
  }
}
