/* File: assets/css/demos.css */

:root {
  --card-bg: #fff;
  --card-border: #ddd;
  --card-radius: 8px;
  --primary: #2d3e50;
  --danger: #d63638;
  --dangerHover: #f14b4e;  
  --bg-muted: #f7f7fa;
  --text-muted: #666;
  --transition-speed: 0.2s;
}

/* Grid Layout */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Demo Card */
.demo-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1rem;
  position: relative;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  outline-offset: 2px;
}
.demo-card:hover,
.demo-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.demo-card.imported {
  border-color: var(--primary);
}
.demo-card.is-locked {
  opacity: 0.6;
  pointer-events: none;
}

/* Badge */
.demo-card .badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: #fff;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 4px;
}

/* Thumbnail */
.demo-thumb {
  margin-bottom: 0.75rem;
  text-align: center;
}
.demo-thumb img {
  max-width: 100%;
  border-radius: 4px;
}
.demo-placeholder {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Title */
.demo-title {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1rem;
}

/* Actions */
.actions {
  text-align: center;
  margin-bottom: 1rem;
}
.actions .sb-btn {
  position: relative;
}
.actions .sb-btn .spinner {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  margin-top: -0.5rem;
  border: 2px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Confirmation & Import UI */
.demo-card.is-confirming .import-confirmation,
.demo-card.is-importing .import-ui {
  display: block;
  animation: fadeIn var(--transition-speed) ease;
}
.import-confirmation,
.import-ui {
  display: none;
  background: var(--bg-muted);
  border-top: 1px solid var(--card-border);
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 0 0 var(--card-radius) var(--card-radius);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Fieldsets */
.import-mode-fieldset,
.parts-fieldset {
  margin-bottom: 1rem;
}
.import-mode-fieldset legend,
.parts-fieldset legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.import-mode-fieldset label,
.parts-fieldset label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.import-mode-fieldset input,
.parts-fieldset input {
  margin-right: 0.5rem;
}

/* Import Controls */
.import-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.import-controls .sb-btn {
  flex: 1;
}

/* Progress & Logs */
.progress-container {
  background: var(--bg-muted);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.progress-bar {
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}
.import-status {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}
.import-log {
  background: var(--bg-muted);
  padding: 0.5rem;
  height: 8rem;
  overflow: auto;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

/* Navigation */
.sb-demo-importer-nav {
  text-align: right;
  margin-top: 1.5rem;
}
.sb-demo-importer-nav .sb-btn-continue {
  margin-left: auto;
}

/* Reset Button */
#reset-demo {
  margin-bottom: 1rem;
  display: inline-block;
  background: var(--danger);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background var(--transition-speed);
}
#reset-demo:hover {
  background: var(--dangerHover);
  color: #ffffffe5;
}


