/**
 * AmazingAI Live Demo Preview Frame & Device Switcher
 */

.demo-frame-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #030712;
  z-index: var(--z-modal);
  overflow: hidden;
}

.demo-top-bar {
  height: 56px;
  background: #0b0f19;
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  color: #ffffff;
  z-index: 10;
}

.demo-bar-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.demo-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration-fast) var(--ease-smooth);
}
.demo-close-btn:hover {
  color: #ffffff;
  border-color: var(--brand-primary);
}

.demo-item-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

/* Device Viewport Switcher */
.demo-device-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.device-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease-smooth);
}
.device-btn:hover {
  color: #ffffff;
}
.device-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.demo-bar-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.demo-remove-frame {
  color: var(--text-muted);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: 4px;
}
.demo-remove-frame:hover {
  color: var(--text-primary);
}

/* Iframe Stage */
.demo-iframe-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #030712;
  overflow: auto;
  padding: 0;
  transition: padding var(--duration-normal) var(--ease-spring);
}

.demo-iframe-stage.device-tablet {
  padding: 24px;
}
.demo-iframe-stage.device-mobile {
  padding: 24px;
}

.demo-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
  transition: all var(--duration-normal) var(--ease-spring);
}

.demo-iframe-stage.device-tablet .demo-iframe {
  width: 768px;
  height: 1024px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 0 8px #1e293b;
}

.demo-iframe-stage.device-mobile .demo-iframe {
  width: 375px;
  height: 812px;
  max-height: 85vh;
  border-radius: var(--radius-2xl);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 0 10px #1e293b;
}
