/* =================================================================
   FilamentColors Compiler v4 – Full-Page Editor Layout
   Specialized for 3D printing with FilamentColors.xyz integration
   Last Updated: 2025-12-11
   Version: 4.0.0
   ================================================================= */

@import url("https://fonts.googleapis.com/css2?family=Spline+Sans:wght@300;400;500;600;700&display=swap");

/* -----------------------------------------------------------------
   CSS Variables - Design Tokens from Figma
----------------------------------------------------------------- */

/* Global design tokens */
:root {
  /* Typography - Spline Sans */
  --fc-font-family: 'Spline Sans', system-ui, -apple-system, sans-serif;
  --fc-font-size-xs: 11px;
  --fc-font-size-sm: 12px;
  --fc-font-size-md: 14px;
  --fc-font-size-lg: 16px;
  --fc-line-height-tight: 16px;
  --fc-line-height-normal: 24px;
  --fc-font-weight-regular: 400;
  --fc-font-weight-medium: 500;
  
  /* Spacing (4pt grid) */
  --fc-space-1: 4px;
  --fc-space-2: 8px;
  --fc-space-3: 12px;
  --fc-space-4: 16px;
  --fc-space-5: 20px;
  --fc-space-6: 24px;
  --fc-space-8: 32px;
  
  /* Radii */
  --fc-radius-sm: 8px;
  --fc-radius-md: 12px;
  --fc-radius-lg: 16px;
  --fc-radius-pill: 999px;
  
  /* Transitions */
  --fc-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Layout */
  --fc-sidebar-width: 380px;
}

.fc-compiler.v3 {
  /* Dark theme (default) - Spline Design System */
  
  /* Background Colors */
  --fc-bg-main: #121316;
  --fc-bg-app: #121316;
  --fc-bg-sidebar: #121316;
  --fc-bg-context: #212226;
  --fc-bg-surface: #191A1D;
  --fc-bg-surface-soft: #202124;
  --fc-bg-input: rgba(255, 255, 255, 0.03);
  --fc-bg-input-hover: rgba(255, 255, 255, 0.06);
  --fc-bg-overlay: rgba(18, 19, 22, 0.95);
  
  /* Elevation layers (opacity-based for dark mode) */
  --fc-elevation-01: rgba(255, 255, 255, 0.03);
  --fc-elevation-02: rgba(255, 255, 255, 0.06);
  --fc-elevation-03: rgba(255, 255, 255, 0.10);
  --fc-elevation-04: rgba(255, 255, 255, 0.20);
  
  /* Elevation layers (opaque alternatives) */
  --fc-elevation-01-opaque: #191A1D;
  --fc-elevation-02-opaque: #202124;
  --fc-elevation-03-opaque: #2A2B2D;
  --fc-elevation-04-opaque: #414245;

  /* Border */
  --fc-border: rgba(255, 255, 255, 0.05);
  --fc-border-subtle: rgba(255, 255, 255, 0.05);
  --fc-border-strong: rgba(255, 255, 255, 0.10);
  --fc-border-focus: #2589FF;

  /* Text Colors */
  --fc-text-opaque: #ffffff;
  --fc-text-primary: rgba(255, 255, 255, 0.9);
  --fc-text-secondary: rgba(255, 255, 255, 0.6);
  --fc-text-muted: rgba(255, 255, 255, 0.6);
  --fc-text-tertiary: rgba(255, 255, 255, 0.6);
  --fc-text-placeholder: rgba(255, 255, 255, 0.4);

  /* Accent Colors */
  --fc-accent-blue: #2589FF;
  --fc-accent-blue-dark: #1F77DE;
  --fc-accent-purple: #915EFF;
  --fc-accent-purple-dark: #7448D4;
  --fc-accent-purple-bright: #D680FF;
  --fc-accent-green: #00A376;
  --fc-accent-green-dark: #008761;
  --fc-accent-green-bright: #38E2B3;
  --fc-accent-red: #FD5B5D;
  --fc-accent-red-dark: #DB4D4F;
  --fc-accent-yellow: #FFB221;
  
  /* Legacy accent mapping */
  --fc-accent: #2589FF;
  --fc-accent-soft: rgba(37, 137, 255, 0.15);
  --fc-accent-strong: #1F77DE;

  /* Component-specific */
  --fc-slider-thumb: #505050;
  --fc-slider-track: #505050;
  --fc-toast-bg: rgba(30, 30, 30, 0.9);

  /* Shadows */
  --fc-shadow-popup: 0 8px 8px rgba(0, 0, 0, 0.4);
  --fc-shadow-menu: 0 4px 24px rgba(0, 0, 0, 0.15);
  --fc-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --fc-shadow-float: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);

  --fc-swatch-active-ring: #ffffff;
}

/* Light theme - Spline Design System */
.fc-compiler.v3[data-theme="light"] {
  /* Background Colors */
  --fc-bg-main: #ffffff;
  --fc-bg-app: #ffffff;
  --fc-bg-sidebar: #ffffff;
  --fc-bg-context: #212226;
  --fc-bg-surface: #F7F7F7;
  --fc-bg-surface-soft: #F0F0F0;
  --fc-bg-input: rgba(0, 0, 0, 0.03);
  --fc-bg-input-hover: rgba(0, 0, 0, 0.06);
  --fc-bg-overlay: rgba(255, 255, 255, 0.95);

  /* Elevation layers (opacity-based for light mode) */
  --fc-elevation-01: rgba(0, 0, 0, 0.03);
  --fc-elevation-02: rgba(0, 0, 0, 0.06);
  --fc-elevation-03: rgba(0, 0, 0, 0.10);
  --fc-elevation-04: rgba(0, 0, 0, 0.20);
  
  /* Elevation layers (opaque alternatives) */
  --fc-elevation-01-opaque: #F7F7F7;
  --fc-elevation-02-opaque: #F0F0F0;
  --fc-elevation-03-opaque: #E5E5E5;
  --fc-elevation-04-opaque: #CCCCCC;

  /* Border */
  --fc-border: rgba(0, 0, 0, 0.05);
  --fc-border-subtle: rgba(0, 0, 0, 0.05);
  --fc-border-strong: rgba(0, 0, 0, 0.10);

  /* Text Colors */
  --fc-text-opaque: #000000;
  --fc-text-primary: rgba(0, 0, 0, 0.9);
  --fc-text-secondary: rgba(0, 0, 0, 0.6);
  --fc-text-muted: rgba(0, 0, 0, 0.6);
  --fc-text-tertiary: rgba(0, 0, 0, 0.6);
  --fc-text-placeholder: rgba(0, 0, 0, 0.4);

  /* Accent colors stay the same */
  --fc-accent: #2589FF;
  --fc-accent-soft: rgba(37, 137, 255, 0.15);
  --fc-accent-strong: #1F77DE;

  /* Shadows */
  --fc-shadow-popup: 0 8px 8px rgba(0, 0, 0, 0.1);
  --fc-shadow-menu: 0 4px 24px rgba(0, 0, 0, 0.08);
  --fc-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.08);
  --fc-shadow-float: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);

  --fc-swatch-active-ring: #000000;
}

/* -----------------------------------------------------------------
   Reset & Base
----------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--fc-bg-app);
  font-family: "Spline Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fc-text-primary);
  -webkit-font-smoothing: antialiased;
}

/* -----------------------------------------------------------------
   Main Layout
----------------------------------------------------------------- */
.fc-compiler.v3 {
  position: fixed;
  inset: 0;
  display: flex;
  background: var(--fc-bg-app);
  overflow: hidden;
}

/* -----------------------------------------------------------------
   Sidebar
----------------------------------------------------------------- */
.fc-sidebar {
  position: relative;
  z-index: 100;
  width: var(--fc-sidebar-width);
  height: 100%;
  background: var(--fc-bg-sidebar);
  border-right: 1px solid var(--fc-border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--fc-transition), opacity var(--fc-transition), position 0s;
  will-change: transform, opacity;
}

.fc-compiler.v3[data-sidebar="closed"] .fc-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}

.fc-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--fc-border-subtle);
  flex-shrink: 0;
}

.fc-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-logo svg {
  color: var(--fc-accent);
}

.fc-logo-badge {
  padding: 2px 8px;
  background: var(--fc-accent-soft);
  border: 1px solid var(--fc-accent);
  border-radius: var(--fc-radius-pill);
  font-size: 10px;
  font-weight: 600;
  color: var(--fc-accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Header actions (theme toggle + close) */
.fc-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Theme toggle button */
.fc-theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: transparent;
  color: var(--fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fc-transition), color var(--fc-transition);
}

.fc-theme-toggle:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-accent);
}

/* Show sun icon in dark mode, moon in light mode */
.fc-theme-icon-light { display: none; }
.fc-theme-icon-dark { display: block; }

.fc-compiler.v3[data-theme="light"] .fc-theme-icon-light { display: block; }
.fc-compiler.v3[data-theme="light"] .fc-theme-icon-dark { display: none; }

.fc-sidebar-close {
  width: 32px;
  height: 32px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: transparent;
  color: var(--fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--fc-transition), color var(--fc-transition);
}

.fc-sidebar-close:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
}

.fc-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 24px;
}

/* -----------------------------------------------------------------
   Sidebar Toggle (when closed)
----------------------------------------------------------------- */
.fc-sidebar-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 200;
  width: 44px;
  height: 44px;
  border-radius: var(--fc-radius-md);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface);
  color: var(--fc-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--fc-shadow-float);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity var(--fc-transition), transform var(--fc-transition), background var(--fc-transition);
}

.fc-compiler.v3[data-sidebar="closed"] .fc-sidebar-toggle {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.fc-sidebar-toggle:hover {
  background: var(--fc-bg-surface-soft);
}

/* -----------------------------------------------------------------
   Section styling
----------------------------------------------------------------- */
.fc-section {
  margin-bottom: 12px;
}

/* -----------------------------------------------------------------
   Details / Accordion
----------------------------------------------------------------- */
.fc-details {
  background: var(--fc-bg-surface-soft);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}

.fc-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-text-primary);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.fc-details summary::-webkit-details-marker {
  display: none;
}

.fc-chevron {
  color: var(--fc-text-muted);
  transition: transform var(--fc-transition);
}

.fc-details[open] .fc-chevron {
  transform: rotate(180deg);
}

.fc-details-content {
  padding: 0 12px 12px;
  display: grid;
  gap: 10px;
}

/* -----------------------------------------------------------------
   Fields
----------------------------------------------------------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field.compact {
  gap: 3px;
}

.field > span {
  font-size: 11px;
  font-weight: 500;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.field .hint {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fc-text-muted);
}

/* Inputs */
input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: background var(--fc-transition), border-color var(--fc-transition), box-shadow var(--fc-transition);
}

input::placeholder {
  color: var(--fc-text-placeholder);
}

input:hover,
select:hover {
  background: var(--fc-bg-input-hover);
}

input:focus,
select:focus {
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236c7488' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* Inline toggles */
.fc-inline-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--fc-text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 1.3;
}

/* Hide the actual checkbox */
.fc-inline-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Toggle track (the pill background) */
.fc-inline-toggle .fc-toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-strong);
  flex-shrink: 0;
  transition: background var(--fc-transition), border-color var(--fc-transition);
}

/* Toggle thumb (the sliding circle) */
.fc-inline-toggle .fc-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fc-text-muted);
  transition: transform var(--fc-transition), background var(--fc-transition);
}

/* Checked state */
.fc-inline-toggle input[type="checkbox"]:checked + .fc-toggle-track {
  background: var(--fc-accent-blue);
  border-color: var(--fc-accent-blue);
}

.fc-inline-toggle input[type="checkbox"]:checked + .fc-toggle-track .fc-toggle-thumb {
  transform: translateX(14px);
  background: var(--fc-text-opaque);
}

/* Hover state */
.fc-inline-toggle:hover .fc-toggle-track {
  border-color: var(--fc-border-strong);
  background: var(--fc-elevation-02);
}

.fc-inline-toggle:hover input[type="checkbox"]:checked + .fc-toggle-track {
  background: var(--fc-accent-blue-dark);
  border-color: var(--fc-accent-blue-dark);
}

/* Focus state for accessibility */
.fc-inline-toggle input[type="checkbox"]:focus-visible + .fc-toggle-track {
  outline: 2px solid var(--fc-accent-blue);
  outline-offset: 2px;
}

/* Field row */
.fc-field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

/* -----------------------------------------------------------------
   Color Schemes Panel
----------------------------------------------------------------- */
.fc-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.fc-section-divider {
  height: 1px;
  background: var(--fc-border-subtle);
  margin: 12px 0;
}

.fc-loading {
  font-size: 12px;
  color: var(--fc-text-muted);
  padding: 12px;
  text-align: center;
}

/* Target Object Panel - Shows which object receives new colors */
.fc-target-object-panel {
  background: var(--fc-accent-soft);
  border: 1px solid var(--fc-accent);
  border-radius: var(--fc-radius-md);
  padding: 12px;
  margin-bottom: 4px;
}

.fc-target-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.fc-target-header .fc-section-label {
  margin-bottom: 0;
  color: var(--fc-accent-strong);
}

.fc-target-select {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-accent);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
  font-size: 13px;
  font-weight: 500;
}

.fc-target-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

.fc-target-preview {
  min-height: 40px;
}

.fc-target-empty {
  font-size: 12px;
  color: var(--fc-text-muted);
  font-style: italic;
}

.fc-target-current {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-target-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-target-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.fc-target-swatches-label {
  font-size: 10px;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  width: 100%;
  margin-bottom: 2px;
}

.fc-target-chip {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.fc-target-chip:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.fc-target-chip .remove-chip {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fc-accent-red);
  border: none;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc-target-chip:hover .remove-chip {
  opacity: 1;
}

.fc-target-add-hint {
  font-size: 11px;
  color: var(--fc-accent-strong);
  padding: 4px 0;
}

/* Recommended Schemes */
.fc-recommended-schemes {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.fc-recommended-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-recommended-item:hover {
  border-color: var(--fc-accent);
  background: var(--fc-bg-input-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fc-scheme-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fc-scheme-desc {
  font-size: 10px;
  color: var(--fc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-scheme-preview-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-scheme-preview-btn:hover {
  border-color: var(--fc-accent);
  color: var(--fc-accent-strong);
  background: var(--fc-accent-soft);
}

.fc-scheme-apply-btn {
  padding: 5px 10px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-scheme-apply-btn:hover {
  background: var(--fc-accent-strong);
}

/* Scheme Categories */
.fc-scheme-category {
  margin-bottom: 12px;
}

.fc-scheme-category-title {
  display: block;
  font-size: 9px;
  font-weight: 600;
  color: var(--fc-accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  padding-left: 2px;
}

.fc-scheme-category-items {
  display: grid;
  gap: 4px;
}

/* Expand button */
.fc-scheme-expand-btn {
  width: 24px;
  height: 24px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: transparent;
  color: var(--fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-scheme-expand-btn:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
}

.fc-scheme-expand-btn.is-expanded {
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  border-color: var(--fc-accent);
}

.fc-scheme-expand-btn.is-expanded svg {
  transform: rotate(180deg);
}

/* Expanded Panel */
.fc-scheme-expanded {
  background: var(--fc-bg-surface-soft);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  margin: 4px 0 8px;
  padding: 8px;
  overflow: hidden;
}

.fc-scheme-expanded[hidden] {
  display: none;
}

.fc-scheme-expanded-colors {
  display: grid;
  gap: 6px;
}

.fc-expanded-swatch {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-expanded-swatch:hover {
  border-color: var(--fc-accent);
  background: var(--fc-bg-input-hover);
}

.fc-expanded-chip {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fc-expanded-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.fc-expanded-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-expanded-meta {
  font-size: 10px;
  color: var(--fc-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-expanded-hex {
  font-size: 10px;
  color: var(--fc-text-secondary);
  font-family: ui-monospace, monospace;
}

.fc-add-swatch-btn {
  padding: 4px 10px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-accent);
  background: transparent;
  color: var(--fc-accent-strong);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fc-transition);
  opacity: 0;
  white-space: nowrap;
}

.fc-expanded-swatch:hover .fc-add-swatch-btn {
  opacity: 1;
}

.fc-add-swatch-btn:hover {
  background: var(--fc-accent);
  color: #fff;
}

.fc-add-swatch-btn:disabled {
  background: var(--fc-accent-green);
  border-color: var(--fc-accent-green);
  color: #fff;
  opacity: 1;
}

/* Expanded panel actions */
.fc-scheme-expanded-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--fc-border-subtle);
}

.fc-add-all-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-accent);
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-add-all-btn:hover {
  background: var(--fc-accent);
  color: #fff;
}

.fc-add-all-btn:disabled {
  background: var(--fc-accent-green);
  border-color: var(--fc-accent-green);
  color: #fff;
}

/* Saved Schemes */
.fc-schemes-list {
  display: grid;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.fc-schemes-empty {
  font-size: 11px;
  color: var(--fc-text-muted);
  padding: 10px;
  text-align: center;
  background: var(--fc-bg-input);
  border-radius: var(--fc-radius-sm);
  border: 1px dashed var(--fc-border-subtle);
}

.fc-scheme-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  cursor: default;
  transition: all var(--fc-transition);
}

.fc-scheme-item:hover {
  border-color: var(--fc-border-strong);
  background: var(--fc-bg-input-hover);
}

.fc-scheme-colors {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.fc-scheme-chip {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.fc-scheme-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.fc-scheme-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fc-text-primary);
}

.fc-scheme-meta {
  font-size: 10px;
  color: var(--fc-text-muted);
}

.fc-scheme-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  opacity: 0;
  transition: opacity var(--fc-transition);
}

.fc-scheme-item:hover .fc-scheme-actions {
  opacity: 1;
}

.fc-scheme-apply {
  padding: 4px 10px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.fc-scheme-apply:hover {
  background: var(--fc-accent-strong);
}

.fc-scheme-delete {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-scheme-delete:hover {
  background: var(--fc-accent-red);
  color: #fff;
}

/* Create scheme button */
.fc-create-scheme-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px dashed var(--fc-border-strong);
  background: transparent;
  color: var(--fc-text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-create-scheme-btn:hover {
  border-color: var(--fc-accent);
  color: var(--fc-accent-strong);
  background: var(--fc-accent-soft);
}

/* -----------------------------------------------------------------
   Object list
----------------------------------------------------------------- */
.obj-list {
  display: grid;
  gap: 6px;
}

.obj-item {
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  padding: 8px 10px;
  transition: border-color var(--fc-transition);
}

.obj-item:hover {
  border-color: var(--fc-border-strong);
}

.obj-item.is-selected {
  border-color: var(--fc-accent);
  background: var(--fc-accent-soft);
}

.obj-item .select-obj {
  padding: 4px 10px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-accent);
  background: transparent;
  color: var(--fc-accent-strong);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.obj-item .select-obj:hover {
  background: var(--fc-accent);
  color: #fff;
}

.obj-item.is-selected .select-obj {
  background: var(--fc-accent);
  color: #fff;
}

.obj-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.obj-item .id {
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.obj-item .sub {
  font-size: 11px;
  color: var(--fc-text-muted);
}

.obj-item .actions {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  justify-content: flex-end;
}

.obj-item .actions button {
  padding: 4px 10px;
  font-size: var(--fc-font-size-xs);
  font-family: var(--fc-font-family);
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-elevation-01);
  color: var(--fc-text-secondary);
  cursor: pointer;
  transition: background var(--fc-transition), border-color var(--fc-transition);
}

.obj-item .actions button:hover {
  background: var(--fc-elevation-02);
  border-color: var(--fc-border-strong);
}

.obj-item .actions .edit {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
}

.obj-item .actions .edit:hover {
  background: var(--fc-accent-strong);
}

.obj-edit {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--fc-border-subtle);
  gap: 8px;
}

.obj-item.editing .obj-edit {
  display: grid;
}

/* Add object row */
.obj-new {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.obj-new input {
  flex: 1;
}

.obj-new button {
  padding: 0 14px;
  height: 36px;
  font-family: var(--fc-font-family);
  font-size: var(--fc-font-size-sm);
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.obj-new button:hover {
  background: var(--fc-accent-blue-dark);
}

/* -----------------------------------------------------------------
   FilamentColors Search Block
----------------------------------------------------------------- */
.fc-search-block {
  margin-top: 10px;
  padding: 10px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
}

.fc-search-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fc-search-input {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
  font-size: 13px;
  outline: none;
}

.fc-search-input:focus {
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

.fc-results {
  margin-top: 8px;
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}

.fc-result {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--fc-radius-sm);
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-result:hover {
  transform: translateY(-1px);
  border-color: var(--fc-accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fc-swatch-chip {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 8px;
  border: 1px solid var(--fc-border-subtle);
}

.fc-result-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-result-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-result-meta {
  font-size: 10px;
  color: var(--fc-text-muted);
}

.fc-result-hex {
  font-size: 10px;
  color: var(--fc-text-secondary);
  font-family: ui-monospace, monospace;
}

/* -----------------------------------------------------------------
   Selected Swatch Display
----------------------------------------------------------------- */
.fc-selected-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 10px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  margin-top: 8px;
}

.fc-selected {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fc-selected-chip {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--fc-border-strong);
  flex-shrink: 0;
}

.fc-selected-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-selected-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-selected-meta {
  font-size: 11px;
  color: var(--fc-text-muted);
}

.fc-selected-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.fc-selected-link {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--fc-radius-pill);
  border: 1px solid var(--fc-accent);
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  text-decoration: none;
  transition: all var(--fc-transition);
}

.fc-selected-link:hover {
  background: var(--fc-accent);
  color: #fff;
}

.fc-selected-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.fc-color-picker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--fc-text-muted);
}

.fc-color-input {
  width: 32px;
  height: 32px;
  padding: 2px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-strong);
  background: transparent;
  cursor: pointer;
}

/* -----------------------------------------------------------------
   Swatch Manager (Add/Delete/Reorder Colors)
----------------------------------------------------------------- */
.fc-swatches-manager {
  margin-top: 12px;
  padding: 10px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
}

.fc-swatches-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fc-add-color-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-accent);
  background: transparent;
  border: 1px solid var(--fc-accent);
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fc-add-color-btn:hover {
  background: var(--fc-accent);
  color: #fff;
}

.fc-swatches-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  overflow-y: auto;
}

.fc-swatches-empty {
  padding: 16px;
  text-align: center;
  color: var(--fc-text-muted);
  font-size: 12px;
}

.fc-swatch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.fc-swatch-item:hover {
  border-color: var(--fc-border-strong);
  background: var(--fc-bg-surface);
}

.fc-swatch-item.active {
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

.fc-swatch-item.dragging {
  opacity: 0.5;
  transform: scale(0.98);
}

.fc-swatch-item.drag-over {
  border-color: var(--fc-accent);
  border-style: dashed;
}

.fc-swatch-drag {
  color: var(--fc-text-muted);
  font-size: 12px;
  cursor: grab;
  padding: 2px 4px;
  opacity: 0.5;
  transition: opacity 0.15s;
}

.fc-swatch-drag:hover {
  opacity: 1;
}

.fc-swatch-drag:active {
  cursor: grabbing;
}

.fc-swatch-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.fc-swatch-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.fc-swatch-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--fc-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-swatch-hex {
  font-size: 10px;
  color: var(--fc-text-muted);
  font-family: monospace;
}

.fc-swatch-delete {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--fc-text-muted);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s;
  flex-shrink: 0;
}

.fc-swatch-delete:hover {
  opacity: 1;
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
}

.fc-add-color-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--fc-border-subtle);
  align-items: center;
}

.fc-add-color-row input[type="color"] {
  width: 36px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--fc-border-strong);
  border-radius: var(--fc-radius-sm);
  background: transparent;
  cursor: pointer;
}

.fc-add-color-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
}

.fc-add-color-row input[type="text"]:focus {
  outline: none;
  border-color: var(--fc-accent);
}

.fc-add-color-confirm,
.fc-add-color-cancel {
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.fc-add-color-confirm {
  background: var(--fc-accent);
  color: #fff;
}

.fc-add-color-confirm:hover {
  background: var(--fc-accent-hover);
}

.fc-add-color-cancel {
  background: var(--fc-bg-surface);
  color: var(--fc-text-secondary);
  border: 1px solid var(--fc-border-subtle);
}

.fc-add-color-cancel:hover {
  background: var(--fc-bg-surface-hover);
}

/* -----------------------------------------------------------------
   Linked Objects Section
----------------------------------------------------------------- */
.linked-objects-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--fc-border-subtle);
}

.edit-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.linked-list {
  display: grid;
  gap: 4px;
}

.linked-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: var(--fc-bg-surface-soft);
  border-radius: var(--fc-radius-sm);
  font-size: 12px;
  color: var(--fc-text-primary);
}

.linked-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: var(--fc-accent-red);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.linked-empty {
  font-size: 11px;
  color: var(--fc-text-muted);
  font-style: italic;
}

.linked-add-row {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.linked-add-row input {
  flex: 1;
  height: 32px;
}

.linked-add-btn {
  padding: 0 12px;
  height: 32px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-secondary);
  font-size: 12px;
  cursor: pointer;
}

/* -----------------------------------------------------------------
   Output blocks
----------------------------------------------------------------- */
.out-block {
  margin-bottom: 10px;
}

.out-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-muted);
  text-transform: uppercase;
}

.out-head button {
  padding: 4px 10px;
  font-size: var(--fc-font-size-xs);
  font-family: var(--fc-font-family);
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent-blue);
  color: #fff;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.out-head button:hover {
  background: var(--fc-accent-blue-dark);
}

/* -----------------------------------------------------------------
   Export Tabs
----------------------------------------------------------------- */
.fc-export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 3px;
  background: var(--fc-bg-input);
  border-radius: var(--fc-radius-sm);
}

.fc-export-tab {
  flex: 1;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--fc-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-export-tab:hover {
  color: var(--fc-text-secondary);
}

.fc-export-tab.active {
  background: var(--fc-bg-surface);
  color: var(--fc-text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fc-export-panel {
  display: none;
}

.fc-export-panel.active {
  display: block;
}

/* -----------------------------------------------------------------
   Footer actions
----------------------------------------------------------------- */
.fc-footer-actions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--fc-border-subtle);
}

.fc-btn-ghost {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: transparent;
  color: var(--fc-text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--fc-transition), color var(--fc-transition), border-color var(--fc-transition);
}

.fc-btn-ghost:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
  border-color: var(--fc-border-strong);
}

/* -----------------------------------------------------------------
   Sidebar Attribution Footer
----------------------------------------------------------------- */
.fc-sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
  overflow: hidden;
}

.fc-attribution {
  font-size: 11px;
  color: var(--fc-text-muted);
  text-align: center;
  margin-bottom: 12px;
}

.fc-attribution a {
  color: var(--fc-accent);
  text-decoration: none;
  font-weight: 500;
}

.fc-attribution a:hover {
  text-decoration: underline;
}

.fc-powered-by {
  text-align: center;
}

.fc-powered-by > span {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fc-text-muted);
  margin-bottom: 10px;
}

.fc-powered-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
  flex-wrap: wrap;
}

.fc-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  max-width: 100%;
  overflow: hidden;
}

.fc-logo-link:hover {
  background: var(--fc-bg-input-hover);
  border-color: var(--fc-border-strong);
  transform: translateY(-1px);
}

.fc-logo-link img {
  display: block;
  height: 48px !important;
  max-height: 48px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain;
}

/* Light mode attribution fixes */
.fc-compiler.v3[data-theme="light"] .fc-attribution {
  color: #4b5563;
}

.fc-compiler.v3[data-theme="light"] .fc-attribution a {
  color: #6366f1;
}

.fc-compiler.v3[data-theme="light"] .fc-powered-by > span {
  color: #6b7280;
}

.fc-compiler.v3[data-theme="light"] .fc-logo-link {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.fc-compiler.v3[data-theme="light"] .fc-logo-link:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Dark/Light mode logo switching */
.fc-logo-dark,
.fc-logo-light {
  display: none !important;
}

/* Dark mode: show light-on-dark logos */
.fc-compiler.v3[data-theme="dark"] .fc-logo-dark {
  display: block !important;
}

/* Light mode: show dark-on-light logos */
.fc-compiler.v3[data-theme="light"] .fc-logo-light {
  display: block !important;
}

/* Fallback if no theme set - assume dark */
.fc-compiler.v3:not([data-theme]) .fc-logo-dark {
  display: block !important;
}

/* -----------------------------------------------------------------
   Main Preview Area
----------------------------------------------------------------- */
.fc-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 32px;
  transition: padding-left var(--fc-transition);
}

.fc-compiler.v3[data-sidebar="closed"] .fc-main {
  padding-left: 56px;
  padding-right: 16px;
  width: 100%;
  max-width: 100%;
}

/* Full-width preview when sidebar is closed */
.fc-compiler.v3[data-sidebar="closed"] .fc-resizable-preview {
  max-width: calc(100vw - 72px);
  margin-left: 0;
  margin-right: auto;
}

.fc-compiler.v3[data-sidebar="closed"] .spc_box {
  max-width: 100%;
  width: 100%;
}

.fc-compiler.v3[data-sidebar="closed"] .fc-preview-wrap {
  max-width: 100%;
  width: 100%;
}

.fc-compiler.v3[data-sidebar="closed"] .fc-floating-swatches {
  max-width: calc(100vw - 100px);
}

/* -----------------------------------------------------------------
   Preview Toolbar
----------------------------------------------------------------- */
.fc-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--fc-bg-surface);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-md);
  margin-bottom: 12px;
  gap: 12px;
  flex-shrink: 0;
}

.fc-device-presets {
  display: flex;
  gap: 4px;
}

.fc-device-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fc-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-device-btn:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-secondary);
}

.fc-device-btn.active {
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  border-color: var(--fc-accent);
}

.fc-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fc-width-display {
  padding: 4px 10px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  color: var(--fc-text-secondary);
  min-width: 70px;
  text-align: center;
}

/* Export button */
.fc-export-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-export-btn:hover {
  background: var(--fc-accent-blue-dark);
  transform: translateY(-1px);
}

.fc-export-btn svg {
  flex-shrink: 0;
}

/* Share button */
.fc-share-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-accent);
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-share-btn:hover {
  background: var(--fc-accent);
  color: #fff;
}

.fc-share-btn:active {
  transform: scale(0.97);
}

/* -----------------------------------------------------------------
   Resizable Preview Container
----------------------------------------------------------------- */
.fc-resizable-preview {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 300px;
  max-width: 100%;
  margin: 0 auto;
  transition: width 0.15s ease;
  overflow: visible;
}

/* Disable transitions during resize for smooth dragging */
.fc-resizable-preview.is-resizing {
  transition: none !important;
}

.fc-resizable-preview.is-resizing * {
  transition: none !important;
}

.fc-resizable-preview .fc-preview-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

/* Resize handles */
.fc-resize-handle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 100px;
  cursor: ew-resize;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
  border-radius: 4px;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.fc-resize-handle:hover,
.fc-resize-handle.is-dragging {
  background: rgba(79, 70, 229, 0.2);
}

.fc-resize-handle::before {
  content: "";
  width: 4px;
  height: 50px;
  background: var(--fc-border-strong, #444);
  border-radius: 2px;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease, height 0.15s ease;
  pointer-events: none;
}

.fc-resize-handle:hover::before,
.fc-resize-handle.is-dragging::before {
  opacity: 1;
  background: var(--fc-accent, #4f46e5);
  height: 60px;
}

.fc-resize-left {
  left: -10px;
}

.fc-resize-right {
  right: -10px;
}

/* Ensure parent doesn't clip handles */
.fc-resizable-preview {
  overflow: visible !important;
}

/* Scene box */
.spc_box {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 300px;
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
  background: #05060b;
  border: 1px solid var(--fc-border-subtle);
  box-shadow: var(--fc-shadow-lg);
}

#fc_canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 300px;
  min-height: 200px;
  display: block;
}

.preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  place-content: center;
  gap: 12px;
  text-align: center;
  color: var(--fc-text-muted);
  font-size: 14px;
}

.preview-empty-icon {
  opacity: 0.4;
}

/* -----------------------------------------------------------------
   Floating Swatches - Compact Edition
----------------------------------------------------------------- */
.fc-floating-swatches {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  max-width: calc(100% - 32px);
  /* Panel styling via CSS vars (set by JS) - using fallbacks */
  background: var(--spc-panel-bg, var(--fc-bg-overlay));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--spc-panel-border, var(--fc-border-subtle));
  border-style: solid;
  border-width: var(--spc-panel-border-width, 1px);
  border-radius: var(--spc-panel-radius, 12px);
  padding: var(--spc-panel-padding, 8px);
  padding-top: calc(var(--spc-panel-padding, 8px) + 24px); /* Space for toggle button */
  box-shadow: var(--spc-panel-shadow, var(--fc-shadow-float));
  max-height: calc(100% - 32px);
  overflow: visible; /* Allow toggle to show outside */
}

.fc-floating-swatches .spc_groups {
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fc-floating-swatches:empty,
.fc-floating-swatches:has(.spc_groups:empty) {
  display: none;
}

/* Compact scrollbar */
.fc-floating-swatches .spc_groups::-webkit-scrollbar {
  width: 4px;
}
.fc-floating-swatches .spc_groups::-webkit-scrollbar-track {
  background: transparent;
}
.fc-floating-swatches .spc_groups::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
}

/* Swatch Visibility Toggle Button - Prominent */
.fc-floating-swatches .spc_toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface);
  color: var(--fc-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--fc-transition);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  font-size: 14px;
}

.fc-floating-swatches .spc_toggle:hover {
  background: var(--fc-accent);
  color: #fff;
  border-color: var(--fc-accent);
}

.fc-floating-swatches .spc_toggle .spc_icon_show {
  display: none;
}

.fc-floating-swatches .spc_toggle .spc_icon_hide {
  display: block;
}

/* Collapsed state */
.fc-floating-swatches.is-collapsed {
  padding: 8px 12px;
  min-width: auto;
  max-width: none;
  transform: none;
  left: auto;
  right: 24px;
  bottom: 24px;
}

.fc-floating-swatches.is-collapsed .spc_groups {
  display: none;
}

.fc-floating-swatches.is-collapsed .spc_toggle {
  position: static;
  top: auto;
  right: auto;
}

.fc-floating-swatches.is-collapsed .spc_toggle .spc_icon_show {
  display: block;
}

.fc-floating-swatches.is-collapsed .spc_toggle .spc_icon_hide {
  display: none;
}

/* Hidden variant for groups (used by JS) */
.spc_groups.is-hidden {
  display: none !important;
}

/* Collapsed inline swatches - scene takes full width */
.fc-floating-swatches.is-collapsed[data-position="inline-left"],
.fc-floating-swatches.is-collapsed[data-position="inline-right"] {
  position: absolute;
  width: auto;
  min-width: auto;
  max-width: none;
  margin: 0;
  top: 16px;
  right: 16px;
  bottom: auto;
  left: auto;
}

/* When inline swatches collapse, preview wrap goes back to column layout */
.fc-preview-wrap:has(.fc-floating-swatches.is-collapsed[data-position="inline-left"]),
.fc-preview-wrap:has(.fc-floating-swatches.is-collapsed[data-position="inline-right"]) {
  flex-direction: column !important;
}

/* Scene expands when inline swatches are collapsed */
.fc-preview-wrap:has(.fc-floating-swatches.is-collapsed) .spc_box {
  flex: 1;
  max-width: 100%;
  width: 100%;
}

/* -----------------------------------------------------------------
   Swatch Position Variants
----------------------------------------------------------------- */

/* Bottom positions (default is bottom-center) */
.fc-floating-swatches[data-position="bottom-center"] {
  bottom: 24px;
  left: 50%;
  right: auto;
  top: auto;
  transform: translateX(-50%);
}

.fc-floating-swatches[data-position="bottom-left"] {
  bottom: 24px;
  left: 24px;
  right: auto;
  top: auto;
  transform: none;
}

.fc-floating-swatches[data-position="bottom-right"] {
  bottom: 24px;
  right: 24px;
  left: auto;
  top: auto;
  transform: none;
}

/* Top positions */
.fc-floating-swatches[data-position="top-center"] {
  top: 24px;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translateX(-50%);
}

.fc-floating-swatches[data-position="top-left"] {
  top: 24px;
  left: 24px;
  right: auto;
  bottom: auto;
  transform: none;
}

.fc-floating-swatches[data-position="top-right"] {
  top: 24px;
  right: 24px;
  left: auto;
  bottom: auto;
  transform: none;
}

/* Side positions */
.fc-floating-swatches[data-position="left"] {
  top: 50%;
  left: 24px;
  right: auto;
  bottom: auto;
  transform: translateY(-50%);
}

.fc-floating-swatches[data-position="right"] {
  top: 50%;
  right: 24px;
  left: auto;
  bottom: auto;
  transform: translateY(-50%);
}

/* Inline positions (outside the scene box - stacked) */
.fc-floating-swatches[data-position="above"],
.fc-floating-swatches[data-position="below"] {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  max-width: 100%;
  width: 100%;
  margin: 0;
}

.fc-floating-swatches[data-position="above"] {
  order: -1;
  margin-bottom: 12px;
}

.fc-floating-swatches[data-position="below"] {
  order: 1;
  margin-top: 12px;
}

/* Inline positions (beside the scene - side by side) */
.fc-floating-swatches[data-position="inline-left"],
.fc-floating-swatches[data-position="inline-right"] {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  width: 220px;
  min-width: 180px;
  max-width: 280px;
  max-height: 100%;
  overflow-y: auto;
  flex-shrink: 0;
  margin: 0;
  align-self: stretch;
}

.fc-floating-swatches[data-position="inline-left"] {
  order: -1;
  margin-right: 12px;
  border-radius: 12px 0 0 12px;
}

.fc-floating-swatches[data-position="inline-right"] {
  order: 2;
  margin-left: 12px;
  border-radius: 0 12px 12px 0;
}

/* Preview container becomes flex when inline positions used */
.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-left"]),
.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-right"]) {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
}

.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-left"]) .spc_box,
.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-right"]) .spc_box {
  flex: 1;
  min-width: 0;
  order: 0;
}

/* Left of scene: swatches order -1 (before scene which is order 0) */
.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-left"]) .fc-floating-swatches {
  order: -1;
}

/* Right of scene: scene order 0, swatches order 2 (after scene) */
.fc-preview-wrap:has(.fc-floating-swatches[data-position="inline-right"]) .fc-floating-swatches {
  order: 2;
}

/* Inline swatches: stack content vertically */
.fc-floating-swatches[data-position="inline-left"] .spc_groups,
.fc-floating-swatches[data-position="inline-right"] .spc_groups {
  flex-direction: column;
  gap: 12px;
}

.fc-floating-swatches[data-position="inline-left"] .spc_group,
.fc-floating-swatches[data-position="inline-right"] .spc_group {
  width: 100%;
}

.fc-floating-swatches[data-position="inline-left"] .spc_swatches,
.fc-floating-swatches[data-position="inline-right"] .spc_swatches {
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* -----------------------------------------------------------------
   Overlay Positions (inside scene, on edge)
----------------------------------------------------------------- */

/* Overlay positions - absolute inside scene container */
.fc-floating-swatches[data-position="overlay-left"],
.fc-floating-swatches[data-position="overlay-right"],
.fc-floating-swatches[data-position="overlay-top"],
.fc-floating-swatches[data-position="overlay-bottom"] {
  position: absolute;
  z-index: 50;
  background: var(--fc-bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Overlay Left - Full height strip on left edge */
.fc-floating-swatches[data-position="overlay-left"] {
  top: 0;
  left: 0;
  bottom: 0;
  right: auto;
  width: 200px;
  max-width: 30%;
  transform: none;
  border-radius: 0 12px 12px 0;
  overflow-y: auto;
}

/* Overlay Right - Full height strip on right edge */
.fc-floating-swatches[data-position="overlay-right"] {
  top: 0;
  right: 0;
  bottom: 0;
  left: auto;
  width: 200px;
  max-width: 30%;
  transform: none;
  border-radius: 12px 0 0 12px;
  overflow-y: auto;
}

/* Overlay Top - Full width strip on top edge */
.fc-floating-swatches[data-position="overlay-top"] {
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  max-height: 40%;
  transform: none;
  border-radius: 0 0 12px 12px;
  overflow-x: auto;
}

/* Overlay Bottom - Full width strip on bottom edge */
.fc-floating-swatches[data-position="overlay-bottom"] {
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  max-width: 100%;
  max-height: 40%;
  transform: none;
  border-radius: 12px 12px 0 0;
  overflow-x: auto;
}

/* Overlay left/right: stack swatches vertically */
.fc-floating-swatches[data-position="overlay-left"] .spc_groups,
.fc-floating-swatches[data-position="overlay-right"] .spc_groups {
  flex-direction: column;
  gap: 10px;
}

/* Overlay top/bottom: horizontal scroll */
.fc-floating-swatches[data-position="overlay-top"] .spc_groups,
.fc-floating-swatches[data-position="overlay-bottom"] .spc_groups {
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.fc-floating-swatches[data-position="overlay-top"] .spc_group,
.fc-floating-swatches[data-position="overlay-bottom"] .spc_group {
  flex-shrink: 0;
  min-width: 150px;
}

/* Collapsed overlay swatches */
.fc-floating-swatches.is-collapsed[data-position="overlay-left"],
.fc-floating-swatches.is-collapsed[data-position="overlay-right"],
.fc-floating-swatches.is-collapsed[data-position="overlay-top"],
.fc-floating-swatches.is-collapsed[data-position="overlay-bottom"] {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  top: 16px;
  right: 16px;
  left: auto;
  bottom: auto;
  border-radius: 50%;
}

/* -----------------------------------------------------------------
   Swatch Info Panel & Search (Preview)
----------------------------------------------------------------- */

/* Search input per object - Compact */
.spc_search {
  position: relative;
  margin-bottom: 6px;
}

.spc_search_input {
  width: 100%;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
  font-size: 11px;
  outline: none;
}

.spc_search_input:focus {
  border-color: var(--fc-accent);
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

.spc_search_input::placeholder {
  color: var(--fc-text-muted);
}

.spc_search_results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--fc-bg-surface);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  box-shadow: var(--fc-shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  display: none;
  margin-top: 4px;
}

.spc_search_result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.spc_search_result:hover {
  background: var(--fc-bg-input-hover);
}

.spc_result_chip {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.spc_result_name {
  font-size: 12px;
  font-weight: 500;
  color: var(--fc-text-primary);
  flex: 1;
}

.spc_result_brand {
  font-size: 10px;
  color: var(--fc-text-muted);
}

.spc_no_results {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--fc-text-muted);
}

/* Info panel showing selected swatch details - Compact */
.spc_info {
  margin-top: 6px;
  padding: 6px 8px;
  background: var(--fc-bg-surface-soft);
  border: 1px solid var(--fc-border-subtle);
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.spc_info_label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.spc_info_brand {
  font-size: 10px;
  color: var(--fc-text-muted);
}

.spc_info_links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

.spc_link_amazon,
.spc_link_mfr {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.spc_link_amazon {
  background: #FF9900;
  color: #000;
}

.spc_link_amazon:hover {
  background: #FFB84D;
}

.spc_link_mfr {
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  border: 1px solid var(--fc-accent);
}

.spc_link_mfr:hover {
  background: var(--fc-accent);
  color: #fff;
  transform: translateY(-1px);
}

/* Empty state for links */
.spc_info_links:empty {
  display: none;
}

/* Custom color picker swatch */
.spc_swatch.spc_custom {
  position: relative;
}

.spc_swatch.spc_custom > span.custom-span {
  background: conic-gradient(from 90deg, #ff5a6a, #f59e0b, #22c55e, #06b6d4, #4f46e5, #a855f7, #ff5a6a);
  border-style: dashed;
  border-color: rgba(255,255,255,0.3);
}

.spc_colorpicker {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* Swatch groups styling - Compact */
.spc_groups {
  display: flex;
  flex-direction: column; /* Groups always stack vertically */
  gap: 16px;
  --spc-size: 36px;
  --spc-radius: 8px;
  --spc-gap: 5px;
  width: 100%;
}

/* Ensure all groups are visible regardless of style */
.spc_group,
fieldset.spc_group {
  display: block !important;
  width: 100%;
  flex-shrink: 0;
  padding: 2px !important;
  margin: 0 !important;
  border: none !important;
}

/* Group labels / headers - use CSS vars set by JS */
.spc_group > .spc_label {
  display: block;
  margin-bottom: 8px;
  font-size: var(--spc-header-size, 14px);
  color: var(--spc-header-color, var(--fc-text-secondary));
  background: var(--spc-header-bg, transparent);
  padding: 4px 0;
}

/* Hide group headers when data attribute says so */
.spc_groups[data-header-show="false"] .spc_group > .spc_label {
  display: none;
}

/* Individual swatch labels - use CSS variables set by JS */
.spc_label,
.spc_groups .spc_label,
.spc_name,
.spc_groups .spc_name {
  font-size: var(--spc-label-size, 11px) !important;
  font-weight: 500;
  color: var(--spc-label-color, var(--fc-text-muted)) !important;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Group header labels (object names) */
.spc_group > .spc_label {
  font-size: var(--spc-header-size, 14px) !important;
  color: var(--spc-header-color, var(--fc-text-secondary)) !important;
  background: var(--spc-header-bg, transparent) !important;
  padding: 4px 0;
  border-radius: 4px;
}

/* Hide swatch labels when data attribute says so */
.spc_groups[data-label-show="false"] .spc_name,
.spc_groups[data-label-show="false"] .spc_swatch .spc_name {
  display: none !important;
}

.spc_swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spc-gap);
}

.spc_swatch {
  position: relative;
  display: block;
  border-radius: var(--spc-radius);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.spc_swatch:hover {
  transform: translateY(-2px);
}

.spc_swatch > input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.spc_swatch > span {
  display: block;
  width: var(--spc-size);
  height: var(--spc-size);
  border-radius: var(--spc-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.spc_swatch > input:checked + span {
  border-color: var(--fc-swatch-active-ring);
  box-shadow: 0 0 0 2px var(--fc-swatch-active-ring), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Tooltip */
.spc_swatch::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -6px);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  background: var(--fc-bg-surface);
  color: var(--fc-text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.spc_swatch:hover::after {
  opacity: 1;
  transform: translate(-50%, -10px);
}

/* Edit/Remove buttons */
.spc_swatch .edit-mini {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--fc-accent);
  color: #fff;
  border: none;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.8);
  cursor: pointer;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 2;
}

.spc_swatch:hover .edit-mini {
  opacity: 1;
  transform: scale(1);
}

.spc_swatch .rm-mini {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fc-accent-red);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  display: grid;
  place-items: center;
  padding-bottom: 2px;
  opacity: 0;
  transform: scale(0.8);
  cursor: pointer;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 2;
}

.spc_swatch:hover .rm-mini {
  opacity: 1;
  transform: scale(1);
}

/* -----------------------------------------------------------------
   Swatch Style Variants
----------------------------------------------------------------- */

/* Grid (default) */
.spc_groups.spc-style-grid .spc_swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spc-gap, 11px);
}

/* Grid Compact */
.spc_groups.spc-style-grid-compact .spc_swatches {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spc-gap, 11px) * 0.6);
}

.spc_groups.spc-style-grid-compact .spc_swatch > span {
  width: calc(var(--spc-size, 60px) * 0.7);
  height: calc(var(--spc-size, 60px) * 0.7);
}

/* Pill */
.spc_groups.spc-style-pill .spc_swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spc-gap, 11px);
}

.spc_groups.spc-style-pill .spc_swatch > span {
  width: auto;
  min-width: calc(var(--spc-size, 60px) * 1.6);
  height: calc(var(--spc-size, 60px) * 0.75);
  border-radius: 999px;
}

/* Pill Justified */
.spc_groups.spc-style-pill-justified .spc_swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(calc(var(--spc-size, 60px) * 1.8), 1fr));
  gap: var(--spc-gap, 11px);
}

.spc_groups.spc-style-pill-justified .spc_swatch > span {
  width: 100%;
  height: calc(var(--spc-size, 60px) * 0.75);
  border-radius: 999px;
}

/* List */
.spc_groups.spc-style-list .spc_swatches {
  display: flex;
  flex-direction: column;
  gap: var(--spc-gap, 11px);
}

.spc_groups.spc-style-list .spc_swatch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.spc_groups.spc-style-list .spc_swatch::after {
  position: static;
  transform: none;
  opacity: 1;
  background: transparent;
  padding: 0;
  font-size: 12px;
  color: var(--fc-text-primary);
}

/* Dots */
.spc_groups.spc-style-dot .spc_swatches {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spc-gap, 11px) * 0.6);
}

.spc_groups.spc-style-dot .spc_swatch > span {
  width: calc(var(--spc-size, 60px) * 0.4);
  height: calc(var(--spc-size, 60px) * 0.4);
  border-radius: 999px;
}

/* Columns */
.spc_groups.spc-style-columns .spc_swatches {
  display: block;
  column-count: var(--spc-columns, 2);
  column-gap: var(--spc-gap, 11px);
}

.spc_groups.spc-style-columns .spc_swatch {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: var(--spc-gap, 11px);
}

.spc_groups.spc-style-columns .spc_swatch > span {
  width: 100%;
}

/* Selection Ring Color */
.spc_groups .spc_swatch input:checked + span {
  border-color: var(--spc-ring, var(--fc-swatch-active-ring, #fff));
  box-shadow: 0 0 0 2px var(--spc-ring, var(--fc-swatch-active-ring, #fff)), 0 4px 12px rgba(0,0,0,0.3);
}

/* -----------------------------------------------------------------
   Responsive
----------------------------------------------------------------- */
@media (max-width: 768px) {
  .fc-compiler.v3 {
    flex-direction: column;
  }

  .fc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
    box-shadow: var(--fc-shadow-lg);
  }

  .fc-compiler.v3[data-sidebar="closed"] .fc-sidebar {
    transform: translateX(-100%);
  }

  .fc-sidebar-toggle {
    top: 12px;
    left: 12px;
    width: 40px;
    height: 40px;
  }

  .fc-compiler.v3[data-sidebar="closed"] .fc-main {
    padding-left: 16px;
  }

  .fc-main {
    padding: 12px;
    padding-top: 64px;
  }

  .fc-floating-swatches {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    max-width: 100%;
    margin-top: 12px;
    background: var(--fc-bg-surface);
  }

  .spc_groups {
    --spc-size: 44px;
    --spc-gap: 6px;
    flex-direction: column;
  }
}

/* -----------------------------------------------------------------
   Edit Swatch Popover
----------------------------------------------------------------- */
.add-pop {
  position: fixed;
  z-index: 9999;
  width: 280px;
  padding: 14px;
  background: #151821;
  border: 1px solid #2d3650;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05);
  display: grid;
  gap: 10px;
}

.add-pop .row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.add-pop input[type="text"] {
  flex: 1;
  height: 36px;
  padding: 0 12px;
  background: #181b25;
  border: 1px solid #25293a;
  border-radius: 8px;
  color: #f9fafb;
  font-size: 13px;
}

.add-pop input[type="color"] {
  width: 36px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid #2d3650;
  background: #181b25;
  cursor: pointer;
}

.add-pop button {
  width: 100%;
  height: 38px;
  border-radius: 8px;
  border: none;
  background: #4f46e5;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.add-pop button:hover {
  background: #7c73fa;
}

.edit-swatch-pop {
  width: 300px;
}

.edit-swatch-pop .pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #25293a;
}

.edit-swatch-pop .pop-title {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.edit-swatch-pop .swatch-preview {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.15);
}

.edit-swatch-pop .custom-fields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #25293a;
}

.edit-swatch-pop .custom-fields-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.edit-swatch-pop .custom-fields-header span {
  font-size: 11px;
  font-weight: 600;
  color: #6c7488;
  text-transform: uppercase;
}

.edit-swatch-pop .add-field {
  width: auto;
  padding: 5px 10px;
  height: auto;
  font-size: 11px;
  background: #1a1e28;
  border: 1px solid #2d3650;
  border-radius: 6px;
  color: #a3adc2;
}

.edit-swatch-pop .custom-fields-list {
  display: grid;
  gap: 8px;
}

.edit-swatch-pop .custom-field-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 32px;
  gap: 6px;
  align-items: center;
}

.edit-swatch-pop .custom-field-row input {
  height: 32px;
  font-size: 12px;
  padding: 0 10px;
  background: #181b25;
  border: 1px solid #25293a;
  border-radius: 6px;
  color: #f9fafb;
}

.edit-swatch-pop .rm-field {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff5a6a;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  color: #fff;
  cursor: pointer;
}

.edit-swatch-pop .save {
  margin-top: 12px;
}

/* -----------------------------------------------------------------
   Scrollbar styling
----------------------------------------------------------------- */
.fc-sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.fc-sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.fc-sidebar-scroll::-webkit-scrollbar-thumb {
  background: var(--fc-border-subtle);
  border-radius: 3px;
}

.fc-sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--fc-border-strong);
}

/* -----------------------------------------------------------------
   iOS safe areas
----------------------------------------------------------------- */
@supports (padding: env(safe-area-inset-bottom)) {
  .fc-floating-swatches {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

/* =================================================================
   Dark Mode Text Fixes - Ensure all text is properly visible
   ================================================================= */

/* Base text color inheritance */
.fc-compiler.v3 {
  color: var(--fc-text-primary);
}

/* All labels, spans, paragraphs should inherit or use theme colors */
.fc-compiler.v3 label,
.fc-compiler.v3 span,
.fc-compiler.v3 p,
.fc-compiler.v3 div {
  color: inherit;
}

/* Field labels (uppercase labels) */
.fc-compiler.v3 .field > span,
.fc-compiler.v3 .field > span:first-child,
.fc-compiler.v3 label.field > span {
  color: var(--fc-text-muted) !important;
}

/* Hint text */
.fc-compiler.v3 .hint,
.fc-compiler.v3 span.hint,
.fc-compiler.v3 .field .hint {
  color: #8b95a8 !important;
}

.fc-compiler.v3[data-theme="light"] .hint,
.fc-compiler.v3[data-theme="light"] span.hint,
.fc-compiler.v3[data-theme="light"] .field .hint {
  color: #6b7280 !important;
}

/* Inline toggle labels */
.fc-compiler.v3 .fc-inline-toggle,
.fc-compiler.v3 .fc-inline-toggle span,
.fc-compiler.v3 .fc-inline-toggle > span {
  color: var(--fc-text-secondary) !important;
}

/* Details/accordion summary text */
.fc-compiler.v3 .fc-details summary,
.fc-compiler.v3 .fc-details summary span {
  color: var(--fc-text-primary) !important;
}

/* Object item text */
.fc-compiler.v3 .obj-item .id {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .obj-item .sub {
  color: var(--fc-text-muted) !important;
}

/* Edit head labels */
.fc-compiler.v3 .edit-head {
  color: var(--fc-text-muted) !important;
}

/* Output block headers */
.fc-compiler.v3 .out-head,
.fc-compiler.v3 .out-head span {
  color: var(--fc-text-muted) !important;
}

/* Search labels */
.fc-compiler.v3 .fc-search-label {
  color: var(--fc-text-muted) !important;
}

/* Result text */
.fc-compiler.v3 .fc-result-name {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .fc-result-meta {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .fc-result-hex {
  color: var(--fc-text-secondary) !important;
}

/* Selected swatch text */
.fc-compiler.v3 .fc-selected-name {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .fc-selected-meta {
  color: var(--fc-text-muted) !important;
}

/* Linked objects */
.fc-compiler.v3 .linked-item {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .linked-empty {
  color: var(--fc-text-muted) !important;
}

/* Scheme items */
.fc-compiler.v3 .fc-scheme-name {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .fc-scheme-meta {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .fc-schemes-empty {
  color: var(--fc-text-muted) !important;
}

/* Device buttons */
.fc-compiler.v3 .fc-device-btn {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .fc-device-btn:hover {
  color: var(--fc-text-secondary) !important;
}

.fc-compiler.v3 .fc-device-btn.active {
  color: var(--fc-accent-strong) !important;
}

/* Export tabs */
.fc-compiler.v3 .fc-export-tab {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .fc-export-tab.active {
  color: var(--fc-text-primary) !important;
}

/* Logo */
.fc-compiler.v3 .fc-logo,
.fc-compiler.v3 .fc-logo span {
  color: var(--fc-text-primary) !important;
}

.fc-compiler.v3 .fc-logo-badge {
  color: var(--fc-accent-strong) !important;
}

/* Button text */
.fc-compiler.v3 .fc-btn-ghost {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .fc-btn-ghost:hover {
  color: var(--fc-text-primary) !important;
}

/* Toolbar width display */
.fc-compiler.v3 .fc-width-display {
  color: var(--fc-text-secondary) !important;
}

/* Preview empty text */
.fc-compiler.v3 .preview-empty {
  color: var(--fc-text-muted) !important;
}

.fc-compiler.v3 .preview-empty strong {
  color: var(--fc-text-secondary) !important;
}

/* Swatch labels in preview */
.fc-compiler.v3 .spc_label {
  color: var(--fc-text-muted) !important;
}

/* Color picker label */
.fc-compiler.v3 .fc-color-picker-label {
  color: var(--fc-text-muted) !important;
}

/* Radio/Checkbox labels inline */
.fc-compiler.v3 input[type="radio"] + span,
.fc-compiler.v3 input[type="checkbox"] + span {
  color: var(--fc-text-secondary);
}

/* Ensure textareas have proper colors */
.fc-compiler.v3 textarea {
  color: var(--fc-text-primary);
  background: var(--fc-bg-input);
}

/* Action buttons text */
.fc-compiler.v3 .obj-item .actions button {
  color: var(--fc-text-secondary);
}

.fc-compiler.v3 .obj-item .actions .edit {
  color: #fff !important;
}

/* Create scheme button */
.fc-compiler.v3 .fc-create-scheme-btn {
  color: var(--fc-text-muted);
}

.fc-compiler.v3 .fc-create-scheme-btn:hover {
  color: var(--fc-accent-strong);
}

/* -----------------------------------------------------------------
   Toast Notifications
----------------------------------------------------------------- */
.fc-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.fc-toast {
  padding: 12px 20px;
  background: var(--fc-bg-surface);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-md);
  box-shadow: var(--fc-shadow-lg);
  color: var(--fc-text-primary);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: fc-toast-in 0.25s ease;
  max-width: 400px;
}

.fc-toast.is-leaving {
  animation: fc-toast-out 0.2s ease forwards;
}

.fc-toast-success {
  border-color: var(--fc-accent-green);
}

.fc-toast-success::before {
  content: "✓";
  color: var(--fc-accent-green);
  font-weight: bold;
}

.fc-toast-error {
  border-color: var(--fc-accent-red);
}

.fc-toast-error::before {
  content: "✕";
  color: var(--fc-accent-red);
  font-weight: bold;
}

.fc-toast-info {
  border-color: var(--fc-accent);
}

.fc-toast-info::before {
  content: "ℹ";
  color: var(--fc-accent);
  font-weight: bold;
}

@keyframes fc-toast-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fc-toast-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* Section reset buttons */
.fc-section-reset {
  padding: 2px 8px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: transparent;
  color: var(--fc-text-muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: all var(--fc-transition);
  margin-left: auto;
  margin-right: 8px;
  white-space: nowrap;
}

.fc-details:hover .fc-section-reset,
.fc-details[open] .fc-section-reset {
  opacity: 0.7;
}

.fc-section-reset:hover {
  opacity: 1;
  background: var(--fc-bg-surface-soft);
  color: var(--fc-accent-red);
  border-color: var(--fc-accent-red);
}

.fc-section-reset:active {
  transform: scale(0.97);
}

/* -----------------------------------------------------------------
   Webflow Export Panel
----------------------------------------------------------------- */
.fc-webflow-intro {
  padding: 10px 12px;
  background: var(--fc-accent-soft);
  border: 1px solid var(--fc-accent);
  border-radius: var(--fc-radius-sm);
  margin-bottom: 12px;
}

.fc-webflow-intro p {
  font-size: 12px;
  color: var(--fc-accent-strong);
  margin: 0;
}

.fc-webflow-hint {
  font-size: 10px;
  color: var(--fc-text-muted);
  font-weight: 400;
  text-transform: none;
  margin-left: auto;
  margin-right: 8px;
}

.fc-webflow-alt {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--fc-border-subtle);
}

.fc-webflow-alt .hint {
  font-size: 11px;
  margin-bottom: 10px;
}

/* -----------------------------------------------------------------
   Filament Provider UI
----------------------------------------------------------------- */
.fc-provider-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.fc-provider-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--fc-bg-input);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-sm);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-provider-item:hover {
  border-color: var(--fc-accent);
  background: var(--fc-accent-soft);
}

/* Toggle Switch */
.fc-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.fc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.fc-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-pill);
  transition: all var(--fc-transition);
}

.fc-toggle-slider::before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background: var(--fc-slider-thumb, #505050);
  border-radius: 50%;
  transition: all var(--fc-transition);
}

.fc-toggle input:checked + .fc-toggle-slider {
  background: var(--fc-accent-blue);
  border-color: var(--fc-accent-blue);
}

.fc-toggle input:checked + .fc-toggle-slider::before {
  transform: translateX(18px);
  background: var(--fc-text-opaque);
}

.fc-toggle input:focus + .fc-toggle-slider {
  box-shadow: 0 0 0 2px var(--fc-accent-soft);
}

/* -----------------------------------------------------------------
   Slider Controls (v1-style)
----------------------------------------------------------------- */
/* Slider Row Container */
.fc-slider-row {
  padding: 10px 12px;
  border-radius: 16px;
  background: var(--fc-bg-surface-soft);
  border: 1px solid var(--fc-border-subtle);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.fc-slider-row.compact {
  padding: 8px 10px;
  border-radius: 14px;
}

/* Slider Header */
.fc-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fc-slider-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fc-text-secondary);
}

.fc-slider-value {
  font-size: 12px;
  font-family: ui-monospace, monospace;
  color: var(--fc-text-primary);
  font-weight: 500;
}

/* Slider Controls Container */
.fc-slider-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

/* Number Input - compact pill style */
.fc-slider-input {
  width: 44px !important;
  min-width: 44px !important;
  max-width: 44px !important;
  height: 24px !important;
  padding: 0 4px !important;
  border-radius: var(--fc-radius-pill) !important;
  border: 1px solid var(--fc-border-subtle) !important;
  background: var(--fc-elevation-01) !important;
  color: var(--fc-text-secondary) !important;
  font-size: var(--fc-font-size-xs) !important;
  font-family: var(--fc-font-family) !important;
  line-height: 22px !important;
  text-align: center !important;
  outline: none !important;
  flex: 0 0 44px !important;
  font-family: inherit !important;
  -moz-appearance: textfield !important;
}

/* Hide spinner buttons */
.fc-slider-input::-webkit-outer-spin-button,
.fc-slider-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.fc-slider-input:focus {
  color: var(--fc-text-primary) !important;
  border-color: var(--fc-accent) !important;
  box-shadow: 0 0 0 1px var(--fc-accent) !important;
}

/* Light mode input - uses theme variables automatically */
.fc-compiler.v3[data-theme="light"] .fc-slider-input {
  background: var(--fc-elevation-01) !important;
  color: var(--fc-text-secondary) !important;
}

.fc-compiler.v3[data-theme="light"] .fc-slider-input:focus {
  color: var(--fc-text-primary) !important;
}

/* Range Slider - pill track with fill effect */
.fc-slider {
  appearance: none;
  -webkit-appearance: none;
  height: 24px;
  width: 100%;
  min-width: 80px;
  border-radius: 999px;
  background: transparent;
  outline: none;
  flex: 1 1 auto;
  position: relative;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

/* WebKit Track */
.fc-slider::-webkit-slider-runnable-track {
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--fc-elevation-02) 0%,
    var(--fc-elevation-02) var(--fc-slider-pct, 0%),
    var(--fc-elevation-01) var(--fc-slider-pct, 0%),
    var(--fc-elevation-01) 100%
  );
  border: 1px solid var(--fc-border-subtle);
}

/* Firefox Track */
.fc-slider::-moz-range-track {
  height: 24px;
  border-radius: 999px;
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
}

.fc-slider::-moz-range-progress {
  height: 24px;
  border-radius: 999px;
  background: var(--fc-elevation-02);
}

/* Thumb - pill shaped, solid opaque color */
.fc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 22px;
  border-radius: 999px;
  background: #505050; /* Solid dark gray - always opaque */
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 0;
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.fc-slider::-moz-range-thumb {
  width: 16px;
  height: 22px;
  border-radius: 999px;
  background: #505050; /* Solid dark gray - always opaque */
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.fc-slider:hover::-webkit-slider-thumb {
  background: #666666; /* Lighter on hover */
}

.fc-slider:hover::-moz-range-thumb {
  background: #666666; /* Lighter on hover */
}

/* Light mode slider - uses same design tokens, values adjust via theme variables */
.fc-compiler.v3[data-theme="light"] .fc-slider::-webkit-slider-runnable-track {
  background: linear-gradient(
    to right,
    var(--fc-elevation-02) 0%,
    var(--fc-elevation-02) var(--fc-slider-pct, 0%),
    var(--fc-elevation-01) var(--fc-slider-pct, 0%),
    var(--fc-elevation-01) 100%
  );
}

.fc-compiler.v3[data-theme="light"] .fc-slider::-webkit-slider-thumb {
  background: #505050;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.fc-compiler.v3[data-theme="light"] .fc-slider:hover::-webkit-slider-thumb {
  background: #666666;
}

.fc-compiler.v3[data-theme="light"] .fc-slider::-moz-range-track {
  background: var(--fc-elevation-01);
}

.fc-compiler.v3[data-theme="light"] .fc-slider::-moz-range-progress {
  background: var(--fc-elevation-02);
}

.fc-compiler.v3[data-theme="light"] .fc-slider::-moz-range-thumb {
  background: #505050;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.fc-compiler.v3[data-theme="light"] .fc-slider:hover::-moz-range-thumb {
  background: #666666;
}

/* 2-column slider layout */
.fc-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 768px) {
  .fc-row-2col {
    grid-template-columns: 1fr;
  }
}

/* Color input row */
.fc-color-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

/* Color + Opacity row */
.fc-color-opacity-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  align-items: flex-end;
}

.fc-color-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 60px;
}

.fc-color-field span {
  font-size: 11px;
  font-weight: 500;
  color: var(--fc-text-muted);
}

.fc-color-field input[type="color"] {
  width: 100%;
  height: 32px;
  padding: 2px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: transparent;
  cursor: pointer;
}

.fc-color-field input[type="color"]:hover {
  border-color: var(--fc-border-strong);
}

/* Opacity field */
.fc-opacity-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 80px;
}

.fc-opacity-field > span {
  font-size: 11px;
  font-weight: 500;
  color: var(--fc-text-muted);
}

.fc-opacity-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Opacity slider - pill style matching other sliders */
.fc-opacity-slider {
  flex: 1;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border-radius: var(--fc-radius-pill);
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.fc-opacity-slider::-webkit-slider-runnable-track {
  height: 24px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
}

.fc-opacity-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 24px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-slider-thumb, #505050);
  border: 1px solid var(--fc-elevation-03);
  cursor: pointer;
  margin-top: 0;
  transition: background 0.15s ease;
}

.fc-opacity-slider::-moz-range-track {
  height: 24px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
}

.fc-opacity-slider::-moz-range-thumb {
  width: 16px;
  height: 24px;
  border-radius: var(--fc-radius-pill);
  background: var(--fc-slider-thumb, #505050);
  border: 1px solid var(--fc-elevation-03);
  cursor: pointer;
}

.fc-opacity-slider:hover::-webkit-slider-thumb {
  background: var(--fc-elevation-04);
}

.fc-opacity-slider:hover::-moz-range-thumb {
  background: var(--fc-elevation-04);
}

.fc-opacity-value {
  font-size: 11px;
  font-weight: 500;
  color: var(--fc-text-secondary);
  min-width: 32px;
  text-align: right;
}

/* Section labels and dividers */
.fc-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
}

.fc-section-divider {
  height: 1px;
  background: var(--fc-border-subtle);
  margin: 16px 0;
}

/* Fallback: Style ALL range inputs in fc-compiler */
.fc-compiler input[type="range"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: transparent !important;
  outline: none !important;
  cursor: pointer !important;
  margin: 0 !important;
}

.fc-compiler input[type="range"]::-webkit-slider-runnable-track {
  height: 24px !important;
  border-radius: 999px !important;
  background: linear-gradient(to right, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.08) var(--fc-slider-pct,50%), rgba(255,255,255,0.03) var(--fc-slider-pct,50%), rgba(255,255,255,0.03) 100%) !important;
  border: 1px solid var(--fc-border-subtle) !important;
}

.fc-compiler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: #505050 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  margin-top: 0 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.fc-compiler input[type="range"]::-moz-range-track {
  height: 24px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid var(--fc-border-subtle) !important;
}

.fc-compiler input[type="range"]::-moz-range-thumb {
  width: 16px !important;
  height: 24px !important;
  border-radius: 999px !important;
  background: #505050 !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.fc-compiler input[type="range"]:hover::-webkit-slider-thumb {
  background: #666666 !important;
}

.fc-compiler input[type="range"]:hover::-moz-range-thumb {
  background: #666666 !important;
}

/* Light mode range */
.fc-compiler.v3[data-theme="light"] input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) var(--fc-slider-pct,50%), rgba(0,0,0,0.04) var(--fc-slider-pct,50%), rgba(0,0,0,0.04) 100%) !important;
}

.fc-compiler.v3[data-theme="light"] input[type="range"]::-webkit-slider-thumb {
  background: #505050 !important;
  border-color: rgba(0,0,0,0.15) !important;
}

.fc-compiler.v3[data-theme="light"] input[type="range"]::-moz-range-thumb {
  background: #505050 !important;
  border-color: rgba(0,0,0,0.15) !important;
}

/* Compact number inputs */
.fc-compiler .field.compact input[type="number"] {
  width: 52px !important;
  max-width: 52px !important;
  height: 28px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  border: 1px solid var(--fc-border-subtle) !important;
  background: rgba(255,255,255,0.04) !important;
  color: var(--fc-text-secondary) !important;
  font-size: 12px !important;
  text-align: center !important;
  -moz-appearance: textfield !important;
}

.fc-compiler .field.compact input[type="number"]::-webkit-outer-spin-button,
.fc-compiler .field.compact input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

.fc-compiler.v3[data-theme="light"] .field.compact input[type="number"] {
  background: rgba(0,0,0,0.04) !important;
}

.fc-provider-item:has(input:checked) .fc-provider-name {
  color: var(--fc-accent-strong);
}

.fc-provider-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fc-provider-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fc-text-primary);
}

.fc-provider-count {
  font-size: 11px;
  color: var(--fc-text-muted);
  background: var(--fc-bg-surface-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.fc-provider-options {
  padding: 10px 0;
  border-top: 1px solid var(--fc-border-subtle);
}

/* Sub-details for custom API */
.fc-sub-details {
  margin-top: 10px;
  border-top: 1px solid var(--fc-border-subtle);
  padding-top: 10px;
}

.fc-sub-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--fc-text-muted);
  cursor: pointer;
  padding: 4px 0;
}

.fc-sub-summary:hover {
  color: var(--fc-text-primary);
}

.fc-sub-summary svg {
  transition: transform var(--fc-transition);
}

.fc-sub-details[open] .fc-sub-summary svg {
  transform: rotate(180deg);
}

.fc-sub-content {
  padding: 10px 0 0;
}

/* -----------------------------------------------------------------
   Error States
----------------------------------------------------------------- */
.fc-input-error {
  border-color: var(--fc-accent-red) !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important;
}

.fc-input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3) !important;
}

/* -----------------------------------------------------------------
   Light Mode - Button and UI Fixes
----------------------------------------------------------------- */
/* Copy buttons */
.fc-compiler.v3[data-theme="light"] .out-head button {
  background: var(--fc-accent);
  color: #fff;
}

.fc-compiler.v3[data-theme="light"] .out-head button:hover {
  background: var(--fc-accent-blue-dark);
}

/* Share button */
.fc-compiler.v3[data-theme="light"] .fc-share-btn {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
  color: var(--fc-accent-strong);
}

.fc-compiler.v3[data-theme="light"] .fc-share-btn:hover {
  background: var(--fc-accent);
  color: #fff;
}

/* Device selector buttons */
.fc-compiler.v3[data-theme="light"] .fc-device-btn {
  background: transparent;
  border-color: var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-device-btn:hover {
  background: var(--fc-bg-surface-soft);
  border-color: var(--fc-border-strong);
  color: var(--fc-text-primary);
}

.fc-compiler.v3[data-theme="light"] .fc-device-btn.active {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
}

/* Object item action buttons - light mode */
.fc-compiler.v3[data-theme="light"] .obj-item .actions button {
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .obj-item .actions button:hover {
  background: var(--fc-elevation-02);
  border-color: var(--fc-border-strong);
  color: var(--fc-text-primary);
}

.fc-compiler.v3[data-theme="light"] .obj-item .actions .edit {
  background: var(--fc-accent-blue) !important;
  border-color: var(--fc-accent-blue) !important;
  color: #fff !important;
}

.fc-compiler.v3[data-theme="light"] .obj-item .actions .edit:hover {
  background: var(--fc-accent-blue-dark) !important;
}

/* Add button - light mode */
.fc-compiler.v3[data-theme="light"] .obj-new button {
  background: var(--fc-accent-blue);
  color: #fff;
}

.fc-compiler.v3[data-theme="light"] .obj-new button:hover {
  background: var(--fc-accent-blue-dark);
}

/* Randomize button and ghost buttons - light mode */
.fc-compiler.v3[data-theme="light"] .fc-btn-ghost {
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-btn-ghost:hover {
  background: var(--fc-elevation-02);
  border-color: var(--fc-border-strong);
  color: var(--fc-text-primary);
}

/* Create scheme button - light mode */
.fc-compiler.v3[data-theme="light"] .fc-create-scheme-btn {
  background: transparent;
  border: 1px dashed var(--fc-border-strong);
  color: var(--fc-text-muted);
}

.fc-compiler.v3[data-theme="light"] .fc-create-scheme-btn:hover {
  background: var(--fc-elevation-01);
  border-color: var(--fc-accent-blue);
  color: var(--fc-accent-blue);
}

/* Import button - light mode */
.fc-compiler.v3[data-theme="light"] .fc-import-btn {
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-import-btn:hover {
  background: var(--fc-elevation-02);
  border-color: var(--fc-accent-blue);
  color: var(--fc-accent-blue);
}

/* Export tabs */
.fc-compiler.v3[data-theme="light"] .fc-export-tab {
  background: transparent;
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-export-tab:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
}

.fc-compiler.v3[data-theme="light"] .fc-export-tab.active {
  background: var(--fc-accent);
  color: #fff;
}

/* Section reset buttons */
.fc-compiler.v3[data-theme="light"] .fc-section-reset {
  color: var(--fc-text-muted);
}

.fc-compiler.v3[data-theme="light"] .fc-section-reset:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-accent-red);
}

/* Provider toggle switches */
.fc-compiler.v3[data-theme="light"] .fc-toggle-slider {
  background: var(--fc-bg-input);
  border-color: var(--fc-border-subtle);
}

.fc-compiler.v3[data-theme="light"] .fc-toggle-slider::before {
  background: var(--fc-text-muted);
}

.fc-compiler.v3[data-theme="light"] .fc-toggle input:checked + .fc-toggle-slider {
  background: var(--fc-accent-blue);
  border-color: var(--fc-accent-blue);
}

.fc-compiler.v3[data-theme="light"] .fc-toggle input:checked + .fc-toggle-slider::before {
  background: #fff;
}

/* Inline toggle - light mode */
.fc-compiler.v3[data-theme="light"] .fc-inline-toggle .fc-toggle-track {
  background: var(--fc-elevation-01);
  border-color: var(--fc-border-subtle);
}

.fc-compiler.v3[data-theme="light"] .fc-inline-toggle .fc-toggle-thumb {
  background: var(--fc-slider-thumb);
}

.fc-compiler.v3[data-theme="light"] .fc-inline-toggle input[type="checkbox"]:checked + .fc-toggle-track {
  background: var(--fc-accent-blue);
  border-color: var(--fc-accent-blue);
}

.fc-compiler.v3[data-theme="light"] .fc-inline-toggle input[type="checkbox"]:checked + .fc-toggle-track .fc-toggle-thumb {
  background: #fff;
}

.fc-compiler.v3[data-theme="light"] .fc-inline-toggle:hover .fc-toggle-track {
  background: var(--fc-elevation-02);
  border-color: var(--fc-border-strong);
}

/* Provider items */
.fc-compiler.v3[data-theme="light"] .fc-provider-item {
  background: var(--fc-bg-input);
  border-color: var(--fc-border-subtle);
}

.fc-compiler.v3[data-theme="light"] .fc-provider-item:hover {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
}

.fc-compiler.v3[data-theme="light"] .fc-provider-name {
  color: var(--fc-text-primary);
}

.fc-compiler.v3[data-theme="light"] .fc-provider-count {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-muted);
}

/* Toast notifications */
.fc-compiler.v3[data-theme="light"] .fc-toast {
  background: var(--fc-bg-surface);
  border-color: var(--fc-border-subtle);
  color: var(--fc-text-primary);
  box-shadow: var(--fc-shadow-lg);
}

/* Webflow intro box */
.fc-compiler.v3[data-theme="light"] .fc-webflow-intro {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
}

.fc-compiler.v3[data-theme="light"] .fc-webflow-intro p {
  color: var(--fc-accent-strong);
}

/* Sidebar toggle button */
.fc-compiler.v3[data-theme="light"] .fc-sidebar-toggle {
  background: var(--fc-bg-surface);
  border-color: var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-sidebar-toggle:hover {
  background: var(--fc-bg-surface-soft);
  border-color: var(--fc-border-strong);
  color: var(--fc-text-primary);
}

/* Sub-details toggle */
.fc-compiler.v3[data-theme="light"] .fc-sub-summary {
  color: var(--fc-text-muted);
}

.fc-compiler.v3[data-theme="light"] .fc-sub-summary:hover {
  color: var(--fc-text-primary);
}

/* Search result source label */
.fc-result-source {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  border-radius: 4px;
  margin-left: auto;
}

.fc-no-results,
.spc_no_results {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--fc-text-muted);
}

/* -----------------------------------------------------------------
   Import from Scene Button & Modal
----------------------------------------------------------------- */

/* Import from Scene button */
.fc-import-scene-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  border-radius: var(--fc-radius-sm);
  border: 1px dashed var(--fc-accent);
  background: var(--fc-accent-soft);
  color: var(--fc-accent-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-import-scene-btn:hover {
  background: var(--fc-accent);
  border-style: solid;
  color: #fff;
}

.fc-import-scene-btn svg {
  flex-shrink: 0;
}

/* Randomize Colors Button */
.fc-randomize-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  margin: 12px 0;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-strong);
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-randomize-btn:hover {
  background: var(--fc-accent);
  border-color: var(--fc-accent);
  color: #fff;
}

.fc-randomize-btn svg {
  flex-shrink: 0;
}

/* Randomize button - light mode */
.fc-compiler.v3[data-theme="light"] .fc-randomize-btn {
  background: var(--fc-elevation-01);
  border: 1px solid var(--fc-border-subtle);
  color: var(--fc-text-secondary);
}

.fc-compiler.v3[data-theme="light"] .fc-randomize-btn:hover {
  background: var(--fc-accent-blue);
  border-color: var(--fc-accent-blue);
  color: #fff;
}

/* Modal Overlay */
.fc-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Modal Container */
.fc-modal {
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  background: var(--fc-bg-sidebar);
  border: 1px solid var(--fc-border-strong);
  border-radius: var(--fc-radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Modal Header */
.fc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--fc-border-subtle);
}

.fc-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: transparent;
  color: var(--fc-text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--fc-transition);
}

.fc-modal-close:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
}

/* Modal Search */
.fc-modal-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--fc-border-subtle);
}

.fc-modal-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-input);
  color: var(--fc-text-primary);
  font-size: 13px;
}

.fc-modal-search input:focus {
  outline: none;
  border-color: var(--fc-accent);
}

/* Modal Body */
.fc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
}

/* Import List */
.fc-import-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fc-import-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-input);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-import-item:hover {
  background: var(--fc-bg-input-hover);
  border-color: var(--fc-border-strong);
}

.fc-import-item:has(input:checked) {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
}

.fc-import-item:has(input:disabled) {
  opacity: 0.6;
  cursor: not-allowed;
}

.fc-import-item.has-color {
  background: rgba(var(--fc-accent-rgb, 99, 102, 241), 0.08);
}

.fc-import-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--fc-accent);
  flex-shrink: 0;
}

.fc-import-color {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.fc-import-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.fc-import-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fc-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fc-import-type {
  font-size: 11px;
  color: var(--fc-text-muted);
  text-transform: capitalize;
}

.fc-import-added {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-muted);
  border-radius: 4px;
}

/* Modal Footer */
.fc-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--fc-border-subtle);
}

.fc-import-count {
  font-size: 12px;
  color: var(--fc-text-muted);
  margin-right: auto;
}

.fc-btn-secondary {
  padding: 8px 16px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-strong);
  background: transparent;
  color: var(--fc-text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-btn-secondary:hover {
  background: var(--fc-bg-surface-soft);
  color: var(--fc-text-primary);
}

.fc-btn-primary {
  padding: 8px 16px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: var(--fc-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-btn-primary:hover {
  background: var(--fc-accent-strong);
}

.fc-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Suggestion chips for manual entry modal */
.fc-suggestion-chip {
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface);
  color: var(--fc-text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-suggestion-chip:hover {
  background: var(--fc-accent-soft);
  border-color: var(--fc-accent);
  color: var(--fc-accent-strong);
}

/* Light mode overrides for modal */
.fc-compiler.v3[data-theme="light"] .fc-modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.fc-compiler.v3[data-theme="light"] .fc-modal {
  background: var(--fc-bg-sidebar);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.fc-compiler.v3[data-theme="light"] .fc-import-item {
  background: var(--fc-bg-surface);
}

.fc-compiler.v3[data-theme="light"] .fc-import-item:hover {
  background: var(--fc-bg-surface-soft);
}

.fc-compiler.v3[data-theme="light"] .fc-import-color {
  border-color: rgba(0, 0, 0, 0.1);
}

/* -----------------------------------------------------------------
   Recent Colors
----------------------------------------------------------------- */

.fc-recent-colors {
  margin-bottom: 12px;
}

.fc-recent-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--fc-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.fc-recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.fc-recent-chip {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--fc-border-subtle);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: all var(--fc-transition);
  overflow: hidden;
}

.fc-recent-chip span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.fc-recent-chip:hover {
  border-color: var(--fc-accent);
  transform: scale(1.1);
}

.fc-recent-chip:active {
  transform: scale(0.95);
}

/* -----------------------------------------------------------------
   Export Modal
----------------------------------------------------------------- */
.fc-export-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.fc-export-modal.open {
  display: flex;
}

.fc-export-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.fc-export-modal-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  background: var(--fc-bg-surface);
  border: 1px solid var(--fc-border-subtle);
  border-radius: var(--fc-radius-lg);
  box-shadow: var(--fc-shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fc-export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--fc-border-subtle);
  background: var(--fc-bg-surface-soft);
}

.fc-export-modal-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fc-text-primary);
}

.fc-export-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--fc-radius-sm);
  border: none;
  background: transparent;
  color: var(--fc-text-muted);
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-export-modal-close:hover {
  background: var(--fc-elevation-02);
  color: var(--fc-text-primary);
}

.fc-export-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Export tabs in modal */
.fc-export-modal .fc-export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--fc-elevation-01);
  border-radius: var(--fc-radius-sm);
}

.fc-export-modal .fc-export-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--fc-text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--fc-transition);
}

.fc-export-modal .fc-export-tab:hover {
  background: var(--fc-elevation-02);
  color: var(--fc-text-primary);
}

.fc-export-modal .fc-export-tab.active {
  background: var(--fc-accent-blue);
  color: #fff;
}

/* Output blocks in modal */
.fc-export-modal .out-block {
  margin-bottom: 16px;
}

.fc-export-modal .out-block:last-child {
  margin-bottom: 0;
}

.fc-export-modal .out-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.fc-export-modal .out-head span:first-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--fc-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fc-export-modal .out-head button {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  background: var(--fc-accent-blue);
  color: #fff;
  cursor: pointer;
  transition: background var(--fc-transition);
}

.fc-export-modal .out-head button:hover {
  background: var(--fc-accent-blue-dark);
}

.fc-export-modal textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--fc-radius-sm);
  border: 1px solid var(--fc-border-subtle);
  background: var(--fc-elevation-01);
  color: var(--fc-text-primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.fc-export-modal textarea:focus {
  outline: none;
  border-color: var(--fc-accent-blue);
}

.fc-export-modal .fc-webflow-hint {
  font-size: 10px;
  color: var(--fc-text-muted);
  font-style: italic;
}

.fc-export-modal .fc-webflow-intro p {
  font-size: 13px;
  color: var(--fc-text-secondary);
  margin: 0 0 16px 0;
}

.fc-export-modal .fc-webflow-alt {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--fc-border-subtle);
}

.fc-export-modal .fc-webflow-alt .hint {
  font-size: 12px;
  color: var(--fc-text-muted);
  margin: 4px 0 12px 0;
}

/* Light mode for export modal */
.fc-compiler.v3[data-theme="light"] .fc-export-modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.fc-compiler.v3[data-theme="light"] .fc-export-modal-content {
  background: var(--fc-bg-surface);
  border-color: var(--fc-border-subtle);
}

