/* ── Script Helper Subpage Stylesheet ── */

/* Workspace Container & Grid */
.workspace-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px 60px;
  animation: fadeUp 0.5s var(--ease);
}

.workspace-grid {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 32px;
  align-items: start;
}

.fav-preview-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }
}

/* Glassmorphic Workspace Cards */
.ws-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.ws-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ws-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.ws-card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inputs & Form Groups */
.control-group {
  margin-bottom: 20px;
}

.control-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg-70);
  margin-bottom: 8px;
}

.control-group input[type="text"],
.control-group input[type="url"],
.control-group textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--fg);
  padding: 12px 16px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.control-group input:focus,
.control-group textarea:focus {
  outline: none;
  border-color: var(--border-hover);
  background: var(--surface-3);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

/* Interactive Tabs */
.mockup-tab-headers {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 4px;
  margin-bottom: 24px;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--fg-40);
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--fg-70);
}

.tab-btn.active {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.mockup-viewports {
  position: relative;
  min-height: 400px;
}

.mockup-viewport {
  display: none;
  animation: fadeIn 0.35s var(--ease);
}

.mockup-viewport.active {
  display: block;
}

/* Pre-Formatted Code Block Skin */
.snippet-panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.snippet-header {
  background: var(--surface-3);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.snippet-header h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fg-70);
  margin: 0;
}

.snippet-pre-wrap {
  padding: 18px;
  overflow-x: auto;
  max-height: 345px;
}

.snippet-pre-wrap pre {
  margin: 0;
}

.snippet-pre-wrap code {
  font-family: "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--fg-90);
  white-space: pre;
}

/* Custom icon branding color matches */
.fa-react {
  color: #61dafb;
}

.fa-vuejs {
  color: #42b983;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Buttons */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--fg-90);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: rgba(245, 245, 245, 0.04);
  border-color: var(--border-hover);
  color: var(--fg);
}

.btn-full-width {
  width: 100%;
}

.btn-compact {
  padding: 6px 12px;
  font-size: 0.78rem;
}

.copy-btn {
  background: var(--surface-1);
  border: 1px solid var(--border);
  color: var(--fg-70);
  border-radius: var(--radius-xs);
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  border-color: var(--fg-40);
  color: var(--fg);
}
