/* Scoped styles for website-screenshot-generator (prefix: wssg-) */

.wssg-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem 1rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
}

.wssg-header {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wssg-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.85rem;
  font-weight: 700;
  color: #0f172a;
}

.wssg-subtitle {
  margin: 0;
  font-size: 1rem;
  color: #64748b;
  line-height: 1.5;
}

.wssg-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wssg-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.wssg-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wssg-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

.wssg-input {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  background: #f8fafc;
  color: #0f172a;
}

.wssg-select {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
}

.wssg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.wssg-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.wssg-btn-primary:hover {
  background: #1d4ed8;
}

.wssg-btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.wssg-btn-secondary:hover {
  background: #e2e8f0;
}

.wssg-stage-wrapper {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  min-height: 480px;
}

.wssg-canvas-card {
  width: 100%;
  max-width: 820px;
  border-radius: 16px;
  padding: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}

.wssg-bg-ocean {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.wssg-bg-sunset {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
}

.wssg-bg-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
}

.wssg-bg-transparent {
  background: repeating-conic-gradient(#e2e8f0 0% 25%, #ffffff 0% 50%) 50% / 16px 16px;
}

.wssg-device-frame {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, max-width 0.3s ease;
}

.wssg-mode-desktop {
  width: 100%;
  max-width: 680px;
}

.wssg-mode-tablet {
  width: 480px;
  max-width: 100%;
}

.wssg-mode-mobile {
  width: 280px;
  max-width: 100%;
}

.wssg-browser-chrome {
  background: #f1f5f9;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid #e2e8f0;
}

.wssg-traffic-lights {
  display: flex;
  gap: 0.35rem;
}

.wssg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wssg-dot-red { background: #ef4444; }
.wssg-dot-yellow { background: #f59e0b; }
.wssg-dot-green { background: #10b981; }

.wssg-address-bar {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #64748b;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wssg-viewport-screen {
  background: #ffffff;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wssg-screen-img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .wssg-controls-grid {
    grid-template-columns: 1fr;
  }
}

/* Animated Progress Loader */
.wssg-actions-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.wssg-loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 4rem 1rem;
  text-align: center;
  background: var(--tf-surface, #ffffff);
  height: 100%;
}

.wssg-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--tf-rule, #e2e8f0);
  border-top-color: var(--tf-accent, #0284c7);
  border-radius: 50%;
  animation: wssg-spin 0.8s linear infinite;
}

@keyframes wssg-spin {
  to { transform: rotate(360deg); }
}

.wssg-loader-status {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tf-ink, #0f172a);
  margin: 0;
}

.wssg-loader-sub {
  font-size: 0.8rem;
  color: var(--tf-ink-soft, #64748b);
}

/* High-Fidelity Simulated Mockup */
.wssg-simulated-preview {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  background: var(--tf-surface, #ffffff);
}

.wssg-sim-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid var(--tf-rule, #e2e8f0);
}

.wssg-sim-logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wssg-sim-favicon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.wssg-sim-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--tf-ink, #0f172a);
}

.wssg-sim-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.wssg-sim-link {
  font-size: 0.85rem;
  color: var(--tf-ink-soft, #64748b);
}

.wssg-sim-cta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tf-accent, #0284c7);
  text-decoration: none;
}

.wssg-sim-cta:hover {
  text-decoration: underline;
}

.wssg-sim-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  gap: 0.75rem;
  flex: 1;
}

.wssg-sim-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
}

.wssg-sim-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tf-ink, #0f172a);
  margin: 0;
}

.wssg-sim-desc {
  font-size: 1rem;
  color: var(--tf-ink-soft, #64748b);
  max-width: 480px;
  margin: 0;
}

.wssg-sim-hero-actions {
  margin-top: 0.5rem;
}

/* Mobile simulated mockup responsiveness */
.wssg-mode-mobile .wssg-sim-nav-links .wssg-sim-link {
  display: none;
}
.wssg-mode-mobile .wssg-sim-nav {
  padding: 0.6rem 0.75rem;
}
.wssg-mode-mobile .wssg-sim-hero {
  padding: 2rem 1rem;
}
.wssg-mode-mobile .wssg-sim-title {
  font-size: 1.25rem;
}
.wssg-mode-mobile .wssg-sim-desc {
  font-size: 0.8rem;
}
