.section-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-surface-border);
}

/* ═══ Generic Option Card ═══ */
.option-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: 10px;
  padding: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;

  &:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px var(--color-accent-glow);
  }

  &.option-selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
  }
}

/* ═══ Input Style Previews ═══ */
.input-preview-box {
  background: var(--color-surface-muted);
  border-radius: 8px;
  padding: 0.75rem;
}

.input-mock {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.input-mock-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.input-mock-value {
  font-size: 0.75rem;
  color: var(--color-text-primary);
  padding: 4px 8px;
  transition: all 0.15s;
}

.input-mock-outlined .input-mock-value {
  border: 1px solid var(--color-surface-border);
  border-radius: 8px;
  background: var(--color-surface);
}

.input-mock-filled .input-mock-value {
  border: none;
  border-radius: 8px;
  background: var(--color-surface-border);
}

.input-mock-underlined .input-mock-value {
  border: none;
  border-bottom: 1px solid var(--color-surface-border);
  border-radius: 0;
  background: transparent;
  padding-inline-start: 0;
}

/* ═══ Input Layout Mockups ═══ */
.layout-mock {
  display: flex;
  gap: 4px;
}

.layout-mock-stacked {
  flex-direction: column;
}

.layout-mock-side {
  flex-direction: row;
  align-items: center;
}

.lm-label {
  width: 40%;
  height: 4px;
  background: var(--color-text-muted);
  border-radius: 2px;
  opacity: 0.5;
  &.short { width: 28%; }
}

.lm-input {
  flex: 1;
  height: 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: 4px;
}

.layout-mock-stacked .lm-label { width: 40%; height: 3px; }
.layout-mock-stacked .lm-input { height: 14px; }

.layout-mock-side .lm-label { width: 30%; height: 4px; flex: none; }
.layout-mock-side .lm-input { height: 14px; }

/* ═══ Font Size Preview ═══ */
.font-size-preview {
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  padding: 0.5rem 0;
}

/* ═══ Font Family Preview ═══ */
.font-family-preview {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0.4rem 0;
  color: var(--color-text-primary);
}

/* ═══ Selected Badge ═══ */
.selected-badge {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;

  &.sm {
    width: 16px;
    height: 16px;
    top: 6px;
    inset-inline-end: 6px;
  }
}

/* ═══ Sidebar Variant Cards ═══ */
.variant-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;

  &:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px var(--color-accent-glow);
  }

  &.variant-selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
  }
}

.variant-preview {
  background: var(--color-surface-muted);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.variant-info { padding: 0.25rem 0; }

/* Layout Mockups */
.mockup {
  display: flex;
  height: 80px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface);
}

.mockup-sidebar {
  width: 22px;
  background: var(--color-brand);
  padding: 4px 3px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: width 0.2s ease;
}

.mockup-sidebar-full { width: 55px; }
.mockup-sidebar-mini { width: 16px; padding: 4px 2px; }

.mockup-logo {
  width: 100%;
  height: 6px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-bottom: 2px;
}

.mockup-menu-item {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 1px;
  &.short { width: 60%; }
}

.mockup-content { flex: 1; display: flex; flex-direction: column; }

.mockup-topbar {
  height: 10px;
  background: var(--color-surface-muted);
  border-bottom: 1px solid var(--color-surface-border);
}

.mockup-body {
  flex: 1;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mockup-line {
  width: 80%;
  height: 3px;
  background: var(--color-surface-border);
  border-radius: 1px;
  &.short { width: 50%; }
}

.mockup-block {
  width: 100%;
  height: 20px;
  background: var(--color-surface-muted);
  border-radius: 2px;
  margin-top: 2px;
}

/* ═══ Color Scheme Cards ═══ */
.scheme-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;

  &:hover {
    border-color: var(--color-accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }

  &.scheme-selected {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-accent-glow);
  }
}

.scheme-swatches {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  height: 48px;
  margin-bottom: 0.75rem;
}

.swatch-brand { flex: 1; }
.swatch-accent { flex: 1; }

.scheme-colors {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ═══ Dark Mode Card ═══ */
.dark-mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  max-width: 500px;
}

.dark-mode-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--color-brand);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ═══ Card Style Preview ═══ */
.card-style-preview {
  border: 1px solid var(--color-surface-border);
  background: var(--color-surface);
  overflow: hidden;
  height: 52px;
}

.csp-header {
  height: 14px;
  background: var(--color-brand);
}

.csp-body {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.csp-line {
  height: 4px;
  width: 80%;
  background: var(--color-surface-border);
  border-radius: 2px;
  &.short { width: 50%; }
}

/* ═══ Table Density Preview ═══ */
.td-preview {
  background: var(--color-surface-muted);
  border-radius: 6px;
  padding: 4px;
  overflow: hidden;
}

.td-row {
  display: flex;
  gap: 4px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--color-surface-border);

  &:last-child { border-bottom: none; }
  &.td-compact { padding: 2px 6px; }
  &.td-spacious { padding: 7px 6px; }
}

.td-cell {
  height: 4px;
  width: 24%;
  background: var(--color-surface-border);
  border-radius: 2px;
  &.long { width: 44%; }
}

/* Dark mode adjustments */
:host-context(body.dark-mode) {
  .section-heading { color: #e2e8f0; }
  .font-size-preview { color: #e2e8f0; }
  .font-family-preview { color: #e2e8f0; }
}
