/* Demo Section Styles for Marketing Site */

.demo-section {
  padding: 5rem 2rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--card) 100%);
}

.demo-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.demo-section h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.demo-section .subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* Demo tabs for switching views */
.demo-tabs {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.demo-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease-out;
}

.demo-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.demo-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.demo-tab svg {
  width: 18px;
  height: 18px;
}

/* Demo frame container */
.demo-frame-container {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* Browser-style header */
.demo-frame-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.demo-frame-dots {
  display: flex;
  gap: 6px;
}

.demo-frame-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.demo-frame-dot.red { background: #FF5F57; }
.demo-frame-dot.yellow { background: #FEBC2E; }
.demo-frame-dot.green { background: #28C840; }

.demo-frame-url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}

.demo-frame-url svg {
  width: 12px;
  height: 12px;
  color: var(--accent);
}

/* Iframe styling */
.demo-frame {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
  background: var(--card);
}

/* Loading state */
.demo-frame-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.demo-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: demo-spin 1s ease-in-out infinite;
}

@keyframes demo-spin {
  to { transform: rotate(360deg); }
}

.demo-frame-loading span {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Demo labels */
.demo-labels {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.demo-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.demo-label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.demo-label-dot.entity { background: #7C3AED; }
.demo-label-dot.timeline { background: #F97316; }
.demo-label-dot.editor { background: #059669; }

/* Fallback for browsers that don't support iframes well */
.demo-fallback {
  display: none;
  padding: 3rem;
  text-align: center;
}

.demo-fallback-message {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.demo-fallback .btn {
  display: inline-flex;
}

/* Mobile responsiveness */
@media (max-width: 800px) {
  .demo-section {
    padding: 3rem 1rem;
  }

  .demo-tabs {
    gap: 0.25rem;
  }

  .demo-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .demo-tab span {
    display: none;
  }

  .demo-frame {
    height: 400px;
  }

  .demo-labels {
    gap: 1rem;
  }

  .demo-frame-url {
    display: none;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .demo-spinner {
    animation: none;
  }

  .demo-tab {
    transition: none;
  }
}
