/**
 * FilamentColors × Spline Embed Styles
 * Standalone CSS for embedded colorizer widgets
 * Supports responsive breakpoints and layout modes
 * 
 * @version 2.0.0
 * @license MIT
 */

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

/* Force box-sizing on all embed elements */
.spc-embed-wrapper,
.spc-embed-wrapper * {
  box-sizing: border-box;
}

/* Base wrapper */
.spc-embed-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  font-family: "Spline Sans", system-ui, -apple-system, sans-serif;
  --spc-size: 48px;
  --spc-radius: 10px;
  --spc-gap: 8px;
  --spc-ring: #ffffff;
  --spc-ring-width: 3px;
  --spc-header-color: rgba(255, 255, 255, 0.6);
  --spc-label-color: rgba(255, 255, 255, 0.8);
  
  /* Radio option styling CSS variable defaults */
  --spc-radio-bg: rgba(255, 255, 255, 0.06);
  --spc-radio-bg-hover: rgba(255, 255, 255, 0.1);
  --spc-radio-bg-selected: rgba(99, 102, 241, 0.15);
  --spc-radio-border: rgba(255, 255, 255, 0.1);
  --spc-radio-border-selected: #6366f1;
  --spc-radio-text: rgba(255, 255, 255, 0.85);
  --spc-radio-radius: 8px;
  --spc-radio-padding: 10px;
}

/* Layout modes - controlled by JS */
.spc-embed-wrapper[data-layout="stacked"] {
  display: flex;
  flex-direction: column;
}

.spc-embed-wrapper[data-layout="side"] {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.spc-embed-wrapper[data-layout="overlay"] {
  display: block;
}

/* Scene container */
.spc_scene_container {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.spc_box {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #05060b;
  border: 1px solid #232733;
  box-sizing: border-box;
}

.spc_box canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  display: block;
  object-fit: contain;
  
  /* iOS Safari fixes - prevent touch gestures from interfering */
  touch-action: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  user-select: none;
}

/* Loading overlay */
.spc_loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
  opacity: 1;
  z-index: 10;
  background: inherit;
}

.spc_loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Spinner */
.spc_loader__spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 3px solid rgba(148, 163, 184, 0.4);
  border-top-color: #fff;
  animation: spc-spin 0.7s linear infinite;
}

@keyframes spc-spin {
  to { transform: rotate(360deg); }
}

/* Light theme loader */
.spc-embed-wrapper[data-theme="light"] .spc_loader__spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: #333;
}

/* Floating swatches panel - base styles */
.spc_floating {
  z-index: 50;
  position: relative;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  color: #fff;
}

/* Toggle visibility button (eye icon) */
.spc_toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.15s, color 0.15s;
  z-index: 10;
}

.spc_toggle:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}

.spc_toggle .spc_icon_hide { display: block; }
.spc_toggle .spc_icon_show { display: none; }
.spc_toggle.is-hidden .spc_icon_hide { display: none; }
.spc_toggle.is-hidden .spc_icon_show { display: block; }

/* Hide toggle button when panel is outside the scene */
.spc-embed-wrapper[data-mode="outside"] .spc_toggle { display: none; }

/* Collapsed state for floating panel */
.spc_floating.is-collapsed .spc_groups { display: none; }
.spc_floating.is-collapsed .spc_share_btn { display: none; }
.spc_floating.is-collapsed .spc_surprise_btn { display: none; }
.spc_floating.is-collapsed {
  padding: 6px !important;
  width: auto !important;
  min-width: 42px !important;
  max-width: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  overflow: hidden !important;
}

.spc_floating.is-collapsed .spc_toggle {
  position: static;
  margin: 0;
}

/* Overlay layout - floating is absolutely positioned */
.spc-embed-wrapper[data-layout="overlay"] .spc_floating {
  position: absolute;
  max-width: calc(100% - 32px);
}

/* Stacked/Side layouts - floating is in document flow */
.spc-embed-wrapper[data-layout="stacked"] .spc_floating,
.spc-embed-wrapper[data-layout="side"] .spc_floating {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  max-width: 100%;
  width: 100%;
}

.spc-embed-wrapper[data-layout="stacked"] .spc_floating {
  margin: 12px 0;
}

.spc-embed-wrapper[data-layout="side"] .spc_floating {
  margin: 0 12px;
  width: 220px;
  min-width: 180px;
  max-width: 280px;
  flex-shrink: 0;
  align-self: stretch;
}

.spc_floating::-webkit-scrollbar {
  width: 4px;
}

.spc_floating::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

/* Position variants for overlay mode */
.spc_floating[data-position="bottom-center"] {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.spc_floating[data-position="bottom-left"] {
  bottom: 16px;
  left: 16px;
}

.spc_floating[data-position="bottom-right"] {
  bottom: 16px;
  right: 16px;
}

.spc_floating[data-position="top-center"] {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.spc_floating[data-position="top-left"] {
  top: 16px;
  left: 16px;
}

.spc_floating[data-position="top-right"] {
  top: 16px;
  right: 16px;
}

.spc_floating[data-position="left"] {
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
}

.spc_floating[data-position="right"] {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

/* Overlay positions (docked to scene edge) */
.spc-embed-wrapper[data-layout="overlay"] .spc_floating[data-position="overlay-left"] {
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  height: 100%;
  width: auto;
  min-width: 180px;
  max-width: 280px;
  border-radius: 16px 0 0 16px;
  transform: none;
}

.spc-embed-wrapper[data-layout="overlay"] .spc_floating[data-position="overlay-right"] {
  top: 0;
  bottom: 0;
  right: 0;
  left: auto;
  height: 100%;
  width: auto;
  min-width: 180px;
  max-width: 280px;
  border-radius: 0 16px 16px 0;
  transform: none;
}

.spc-embed-wrapper[data-layout="overlay"] .spc_floating[data-position="overlay-top"] {
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;
  max-height: 50%;
  border-radius: 16px 16px 0 0;
  transform: none;
}

.spc-embed-wrapper[data-layout="overlay"] .spc_floating[data-position="overlay-bottom"] {
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  width: 100%;
  max-height: 50%;
  border-radius: 0 0 16px 16px;
  transform: none;
}

.spc_floating[data-position="overlay-left"] .spc_groups,
.spc_floating[data-position="overlay-right"] .spc_groups {
  flex-direction: column;
  gap: 10px;
}

.spc_floating[data-position="overlay-top"] .spc_groups,
.spc_floating[data-position="overlay-bottom"] .spc_groups {
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: auto;
}

/* Swatch groups */
.spc_groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
}

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

/* Vertical groups for side layouts */
.spc-embed-wrapper[data-layout="side"] .spc_groups {
  flex-direction: column;
  gap: 12px;
}

.spc_group {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Group header label */
.spc_group > .spc_label {
  font-size: var(--spc-header-size, 11px);
  font-weight: 600;
  color: var(--spc-header-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

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

/* Surprise Me Button */
.spc_surprise_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: #915EFF;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin-top: 8px;
}

.spc_surprise_btn:hover {
  background: #7448D4;
}

.spc_surprise_btn:active {
  transform: scale(0.98);
}

.spc_surprise_btn svg {
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

.spc_surprise_btn.is-spinning svg {
  transform: rotate(360deg);
}

/* Native Share to Apps Button */
.spc_share_native {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.1s ease;
  margin-top: 8px;
}

.spc_share_native:hover {
  opacity: 0.9;
}

.spc_share_native:active {
  transform: scale(0.98);
}

.spc_share_native svg {
  flex-shrink: 0;
}

/* Individual swatches */
.spc_swatch {
  position: relative;
  cursor: pointer;
  border-radius: var(--spc-radius);
  transition: transform 0.12s ease;
}

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

.spc_swatch input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

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

.spc_swatch:hover > span {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.spc_swatch input:checked + span {
  border-color: var(--spc-ring);
  box-shadow: 0 0 0 var(--spc-ring-width) var(--spc-ring), 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: scale(1.08);
}

/* Tooltip on hover */
.spc_swatch::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -8px);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  background: var(--spc-tooltip-bg, rgba(15, 23, 42, 0.95));
  color: var(--spc-tooltip-color, #fff);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 10;
}

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

/* Hide swatch labels when data attribute says so */
.spc-embed-wrapper[data-label-show="false"] .spc_swatch::after {
  display: none;
}

/* Info panel */
.spc_info {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.spc_info_label {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.spc_info_brand {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

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

.spc_link_amazon,
.spc_link_mfr {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

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

.spc_link_amazon:hover {
  background: #ffb84d;
}

.spc_link_mfr {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Share button - uses CSS variable for customizable color */
.spc_share_btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--spc-share-bg, #3b82f6);
  border: 1px solid var(--spc-share-border, rgba(59, 130, 246, 0.5));
  border-radius: 8px;
  color: var(--spc-share-color, #fff);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc_share_btn:hover {
  background: var(--spc-share-bg-hover, #2563eb);
  border-color: var(--spc-share-border-hover, rgba(37, 99, 235, 0.7));
}

.spc_share_btn:active {
  transform: scale(0.98);
}

.spc_share_btn svg {
  flex-shrink: 0;
  opacity: 0.8;
}

/* Share feedback toast */
.spc_share_feedback {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  z-index: 10000;
  pointer-events: none;
}

.spc_share_feedback.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ----------------------------------------------------------------
   Share Modal
----------------------------------------------------------------- */
.spc_share_modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.spc_share_modal.is-open {
  opacity: 1;
  visibility: visible;
}

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

.spc_share_content {
  position: relative;
  width: 90%;
  max-width: 400px;
  background: #1a1d24;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  padding: 24px;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}

.spc_share_modal.is-open .spc_share_content {
  transform: scale(1) translateY(0);
}

.spc_share_close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.spc_share_close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.spc_share_title {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
}

.spc_share_preview {
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.spc_share_preview_img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Social platform buttons grid */
.spc_share_socials {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.spc_social_btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc_social_btn:hover {
  border-color: transparent;
}

/* Platform brand hover colors */
.spc_social_btn[data-platform="twitter"]:hover { background: #1da1f2; }
.spc_social_btn[data-platform="facebook"]:hover { background: #1877f2; }
.spc_social_btn[data-platform="linkedin"]:hover { background: #0077b5; }
.spc_social_btn[data-platform="pinterest"]:hover { background: #e60023; }
.spc_social_btn[data-platform="whatsapp"]:hover { background: #25d366; }
.spc_social_btn[data-platform="reddit"]:hover { background: #ff4500; }
.spc_social_btn[data-platform="email"]:hover { background: #6366f1; }

.spc_share_actions {
  display: flex;
  gap: 12px;
}

.spc_share_action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc_share_action:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.spc_share_action:active {
  transform: scale(0.98);
}

.spc_share_copy {
  background: #3b82f6;
  border-color: rgba(59, 130, 246, 0.5);
}

.spc_share_copy:hover {
  background: #2563eb;
  border-color: rgba(37, 99, 235, 0.7);
}

.spc_share_download {
  background: #10b981;
  border-color: rgba(16, 185, 129, 0.5);
}

.spc_share_download:hover {
  background: #059669;
  border-color: rgba(5, 150, 105, 0.7);
}

.spc_link_mfr:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Style variants */
.spc-style-grid .spc_swatches {
  display: flex;
  flex-wrap: wrap;
}

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

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

.spc-style-list .spc_swatches {
  flex-direction: column;
}

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

.spc-style-list .spc_swatch::after {
  position: static;
  transform: none;
  opacity: 1;
  background: transparent;
  padding: 0;
}

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

/* Custom color picker */
.spc_swatch.spc_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;
}

/* Search input */
.spc_search {
  position: relative;
  margin-bottom: 8px;
}

.spc_search_input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(15, 23, 42, 0.8);
  font-size: 16px; /* Prevents iOS zoom on focus */
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.spc_search_input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.spc_search_input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.spc_search_results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  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 0.12s ease;
}

.spc_search_result:hover {
  background: rgba(255, 255, 255, 0.1);
}

.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: #fff;
  flex: 1;
}

.spc_result_brand {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.spc_no_results {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-style: italic;
  cursor: default;
}

.spc_no_results:hover {
  background: transparent;
}

/* Custom color picker span */
.spc_swatch.spc_custom .custom-span {
  display: block;
  width: var(--spc-size);
  height: var(--spc-size);
  border-radius: var(--spc-radius);
  background: conic-gradient(from 90deg, #ff5a6a, #f59e0b, #22c55e, #06b6d4, #4f46e5, #a855f7, #ff5a6a);
  border: 2px dashed rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.spc_swatch.spc_custom:hover .custom-span {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Tablet responsive - side layouts become stacked */
@media (max-width: 991px) {
  .spc-embed-wrapper[data-layout="side"] {
    flex-direction: column !important;
  }

  .spc-embed-wrapper[data-layout="side"] .spc_floating {
    width: 100% !important;
    max-width: 100% !important;
    margin: 12px 0 !important;
  }

  .spc-embed-wrapper[data-layout="side"] .spc_groups {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Mobile responsive - snap scroll groups */
@media (max-width: 767px) {
  /* Force all wrappers to respect viewport width with layout containment */
  .spc-embed-wrapper {
    flex-direction: column !important;
    overflow: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    contain: layout style;
  }
  
  /* Critical: Constrain scene container on mobile */
  .spc_scene_container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Critical: Constrain box on mobile */
  .spc_box {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Critical: Force canvas to respect container bounds */
  .spc_box canvas,
  .spc_box > canvas,
  .spc_scene_container canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    object-fit: contain !important;
    box-sizing: border-box !important;
  }
  
  /* Ultra-specific: Target canvas by ID with highest specificity */
  #spc_canvas,
  canvas#spc_canvas,
  .spc_box #spc_canvas,
  .spc_scene_container #spc_canvas,
  .spc-embed-wrapper #spc_canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    object-fit: contain !important;
    touch-action: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
  }
  
  /* Target any Spline-created internal wrappers */
  .spc_box *,
  .spc_scene_container * {
    max-width: 100% !important;
  }
  
  .spc-embed-wrapper .spc_floating {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 12px 10px !important;
    border-radius: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
  }

  /* Mobile snap scroll for groups */
  .spc_groups {
    display: flex;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 12px;
    padding: 8px 4px 12px 4px;
    max-height: none;
  }

  .spc_group {
    scroll-snap-align: center;
    flex-shrink: 0;
    min-width: 85vw;
    max-width: 320px;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: none;
  }

  .spc_groups::-webkit-scrollbar {
    height: 4px;
  }

  .spc_groups::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
  }

  .spc_groups::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
  }
}

/* iOS safe areas */
@supports (padding: env(safe-area-inset-bottom)) {
  .spc_floating {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

/* Light theme variant */
.spc-embed-wrapper[data-theme="light"] .spc_floating {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #222;
}

.spc-embed-wrapper[data-theme="light"] .spc_toggle {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.5);
}

.spc-embed-wrapper[data-theme="light"] .spc_toggle:hover {
  background: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.8);
}

.spc-embed-wrapper[data-theme="light"] .spc_label {
  color: rgba(0, 0, 0, 0.5);
}

.spc-embed-wrapper[data-theme="light"] .spc_swatch > span {
  border-color: rgba(0, 0, 0, 0.1);
}

.spc-embed-wrapper[data-theme="light"] .spc_info {
  background: rgba(0, 0, 0, 0.05);
}

.spc-embed-wrapper[data-theme="light"] .spc_info_label {
  color: #0b1020;
}

.spc-embed-wrapper[data-theme="light"] .spc_info_brand {
  color: rgba(0, 0, 0, 0.5);
}

.spc-embed-wrapper[data-theme="light"] .spc_link_mfr {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
  border-color: rgba(0, 0, 0, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_swatch::after {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_group {
  background: rgba(0, 0, 0, 0.03);
}

.spc-embed-wrapper[data-theme="light"] .spc_share_btn {
  background: var(--spc-share-bg, #3b82f6);
  border-color: var(--spc-share-border, rgba(59, 130, 246, 0.5));
  color: var(--spc-share-color, #fff);
}

.spc-embed-wrapper[data-theme="light"] .spc_share_btn:hover {
  background: var(--spc-share-bg-hover, #2563eb);
  border-color: var(--spc-share-border-hover, rgba(37, 99, 235, 0.7));
}

.spc-embed-wrapper[data-theme="light"] .spc_share_feedback {
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ----------------------------------------------------------------
   Scene Variables
---------------------------------------------------------------- */
.spc_variables {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spc_variable {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

.spc_var_label {
  flex: 1;
  font-size: 12px;
  color: var(--spc-label-color, rgba(255, 255, 255, 0.8));
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spc_var_input {
  width: 100px;
  padding: 4px 8px;
  font-size: 16px; /* Prevents iOS zoom on focus */
  font-family: inherit;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #fff;
}

.spc_var_input:focus {
  border-color: var(--spc-ring, #ffffff);
  outline: none;
}

.spc_var_toggle {
  position: relative;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.spc_var_toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.spc_toggle_slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: 0.2s;
}

.spc_toggle_slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.spc_var_toggle input:checked + .spc_toggle_slider {
  background: var(--spc-ring, #5046e5);
}

.spc_var_toggle input:checked + .spc_toggle_slider:before {
  transform: translateX(16px);
}

/* ----------------------------------------------------------------
   Variable Groups (matching compiler preview)
---------------------------------------------------------------- */
.spc_variable_group {
  display: block;
  width: 100%;
  flex-shrink: 0;
  padding: 8px;
  margin: 0;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.spc_variable_group > .spc_label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.spc_variable_group .spc_var_name {
  flex: 1;
  font-size: var(--spc-header-size, 14px);
  font-weight: 500;
  color: var(--spc-header-color, rgba(255, 255, 255, 0.85));
}

.spc_variable_group .spc_var_type {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  text-transform: uppercase;
  color: var(--spc-header-color, rgba(255, 255, 255, 0.6));
  font-weight: 500;
}

.spc_var_input_wrap {
  width: 100%;
}

.spc_var_input_wrap .spc_var_input {
  width: 100%;
  min-height: 16px;
  padding: 10px 12px;
  font-size: 16px; /* Prevents iOS zoom on focus */
  font-family: inherit;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  box-sizing: border-box;
}

.spc_var_input_wrap .spc_var_input:focus {
  border-color: var(--spc-ring, #5046e5);
  outline: none;
  box-shadow: 0 0 0 2px rgba(80, 70, 229, 0.25);
}

.spc_var_input_wrap .spc_var_input:focus-visible {
  box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.35);
}

.spc_var_input_wrap .spc_var_input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Boolean toggle in variable group */
.spc_var_input_wrap .spc_var_toggle {
  width: 44px;
  height: 24px;
}

.spc_var_input_wrap .spc_var_toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.spc_var_input_wrap .spc_toggle_slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  transition: background 0.2s ease;
}

.spc_var_input_wrap .spc_toggle_slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.spc_var_input_wrap .spc_var_toggle input:focus + .spc_toggle_slider {
  box-shadow: 0 0 0 2px rgba(80, 70, 229, 0.3);
}

.spc_var_input_wrap .spc_var_toggle input:focus-visible + .spc_toggle_slider {
  box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.4);
}

.spc_var_input_wrap .spc_var_toggle input:checked + .spc_toggle_slider {
  background: var(--spc-ring, #5046e5);
}

.spc_var_input_wrap .spc_var_toggle input:checked + .spc_toggle_slider:before {
  transform: translateX(20px);
}

/* Variable Select Dropdown */
.spc_var_select {
  width: 100%;
  min-height: 16px;
  padding: 10px 12px;
  font-size: 16px; /* Prevents iOS zoom on focus */
  font-family: inherit;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.spc_var_select:focus {
  border-color: var(--spc-ring, #5046e5);
  outline: none;
  box-shadow: 0 0 0 2px rgba(80, 70, 229, 0.25);
}

.spc_var_select:focus-visible {
  box-shadow: 0 0 0 3px rgba(80, 70, 229, 0.35);
}

.spc_var_select option {
  background: #1a1d24;
  color: #fff;
}

/* Variable Radio Group */
.spc_var_radio_group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spc_var_radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.spc_var_radio:hover {
  background: rgba(0, 0, 0, 0.25);
}

.spc_var_radio input {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--spc-ring, #5046e5);
}

.spc_var_radio input:focus {
  outline: 2px solid rgba(80, 70, 229, 0.4);
  outline-offset: 2px;
}

.spc_var_radio input:focus-visible {
  outline: 2px solid rgba(80, 70, 229, 0.6);
  outline-offset: 2px;
}

.spc_var_radio span {
  font-size: 13px;
  color: var(--spc-label-color, rgba(255, 255, 255, 0.85));
}

/* Variable Options (Pills & Buttons) */
.spc_var_options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spc_var_option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc_var_option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.spc_var_option input:focus + span {
  outline: 2px solid rgba(80, 70, 229, 0.4);
  outline-offset: 2px;
}

.spc_var_option input:focus-visible + span {
  outline: 2px solid rgba(80, 70, 229, 0.6);
  outline-offset: 2px;
}

.spc_var_option span {
  font-size: 13px;
  color: var(--spc-label-color, rgba(255, 255, 255, 0.85));
}

/* Pills display type */
.spc_var_pills .spc_var_option {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
}

.spc_var_pills .spc_var_option:hover {
  background: rgba(255, 255, 255, 0.15);
}

.spc_var_pills .spc_var_option.is-selected {
  background: var(--spc-ring, #5046e5);
  border-color: var(--spc-ring, #5046e5);
}

.spc_var_pills .spc_var_option.is-selected span {
  color: #fff;
}

/* Button group display type */
.spc_var_buttons {
  gap: 0;
}

.spc_var_buttons .spc_var_option {
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-left: -1px;
}

.spc_var_buttons .spc_var_option:first-child {
  margin-left: 0;
  border-radius: 6px 0 0 6px;
}

.spc_var_buttons .spc_var_option:last-child {
  border-radius: 0 6px 6px 0;
}

.spc_var_buttons .spc_var_option:hover {
  background: rgba(255, 255, 255, 0.15);
  z-index: 1;
}

.spc_var_buttons .spc_var_option.is-selected {
  background: var(--spc-ring, #5046e5);
  border-color: var(--spc-ring, #5046e5);
  z-index: 2;
}

.spc_var_buttons .spc_var_option.is-selected span {
  color: #fff;
}

/* Light theme variable styles */
.spc-embed-wrapper[data-theme="light"] .spc_variables {
  border-top-color: rgba(0, 0, 0, 0.1);
}

.spc-embed-wrapper[data-theme="light"] .spc_variable {
  background: rgba(0, 0, 0, 0.05);
}

.spc-embed-wrapper[data-theme="light"] .spc_variable_group {
  background: rgba(0, 0, 0, 0.03);
}

.spc-embed-wrapper[data-theme="light"] .spc_variable_group .spc_var_name {
  color: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_variable_group .spc_var_type {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.6);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_input,
.spc-embed-wrapper[data-theme="light"] .spc_var_input_wrap .spc_var_input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #222;
}

.spc-embed-wrapper[data-theme="light"] .spc_var_input::placeholder,
.spc-embed-wrapper[data-theme="light"] .spc_var_input_wrap .spc_var_input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_input:focus,
.spc-embed-wrapper[data-theme="light"] .spc_var_input_wrap .spc_var_input:focus {
  box-shadow: 0 0 0 2px rgba(80, 70, 229, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_toggle_slider,
.spc-embed-wrapper[data-theme="light"] .spc_var_input_wrap .spc_toggle_slider {
  background: rgba(0, 0, 0, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_select {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #222;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23333' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.spc-embed-wrapper[data-theme="light"] .spc_var_select option {
  background: #fff;
  color: #222;
}

.spc-embed-wrapper[data-theme="light"] .spc_var_radio {
  background: rgba(0, 0, 0, 0.05);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_radio:hover {
  background: rgba(0, 0, 0, 0.1);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_radio span {
  color: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_option span {
  color: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_pills .spc_var_option {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_pills .spc_var_option:hover {
  background: rgba(0, 0, 0, 0.12);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_buttons .spc_var_option {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

.spc-embed-wrapper[data-theme="light"] .spc_var_buttons .spc_var_option:hover {
  background: rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------------------------------
   Group Visibility Controls
----------------------------------------------------------------- */
.spc_group_set {
  display: block;
  width: 100%;
  flex-shrink: 0;
  padding: 10px 12px;
  margin: 0 0 8px 0;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.spc_group_set > .spc_label,
.spc_group_set > legend,
.spc_group_checkboxes > .spc_label,
.spc_group_checkboxes > legend,
.spc_views_set > .spc_label,
.spc_views_set > legend {
  font-size: var(--spc-header-size, 14px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--spc-header-color, rgba(255, 255, 255, 0.85));
  margin-bottom: 10px;
  padding: 4px 0;
  display: block;
}

.spc_group_radios {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spc_group_radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--spc-radio-padding, 10px) calc(var(--spc-radio-padding, 10px) + 2px);
  background: var(--spc-radio-bg, rgba(255, 255, 255, 0.06));
  border: 1px solid var(--spc-radio-border, rgba(255, 255, 255, 0.1));
  border-radius: var(--spc-radio-radius, 8px);
  cursor: pointer;
  font-size: 13px;
  color: var(--spc-radio-text, rgba(255, 255, 255, 0.85));
  transition: all 0.15s ease;
}

.spc_group_radio:hover {
  background: var(--spc-radio-bg-hover, rgba(255, 255, 255, 0.1));
  border-color: var(--spc-radio-border-selected, rgba(255, 255, 255, 0.2));
}

.spc_group_radio:focus-within {
  outline: 2px solid var(--spc-radio-border-selected, var(--spc-ring, #6366f1));
  outline-offset: 2px;
}

.spc_group_radio.is-selected {
  background: var(--spc-radio-bg-selected, rgba(99, 102, 241, 0.15));
  border-color: var(--spc-radio-border-selected, var(--spc-ring, #6366f1));
  color: #fff;
}

.spc_group_radio input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--spc-radio-border, rgba(255, 255, 255, 0.3));
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
}

/* Unchecked state - just a ring */
.spc_group_radio input[type="radio"]:not(:checked) {
  background: transparent;
}

/* Checked/Selected state - filled with dot */
.spc_group_radio input[type="radio"]:checked {
  border-color: var(--spc-radio-border-selected, var(--spc-ring, #6366f1));
  background: var(--spc-radio-border-selected, var(--spc-ring, #6366f1));
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.8);
}

/* Remove any focus ring - parent label handles focus state */
.spc_group_radio input[type="radio"]:focus {
  outline: none;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.8);
}

.spc_group_radio input[type="radio"]:focus:not(:checked) {
  box-shadow: none;
  border-color: var(--spc-radio-border, rgba(255, 255, 255, 0.5));
}

.spc_group_radio span {
  flex: 1;
  user-select: none;
}

.spc_group_select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
}

.spc_group_select:focus {
  outline: none;
  border-color: var(--spc-ring, #6366f1);
}

/* Pills - Horizontal button-style group options */
.spc_group_pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spc_group_pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  min-width: 60px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: none;
  white-space: nowrap;
}

.spc_group_pill:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.spc_group_pill:focus {
  outline: 2px solid var(--spc-ring, #6366f1);
  outline-offset: 2px;
}

.spc_group_pill.is-selected {
  background: linear-gradient(135deg, var(--spc-ring, #6366f1) 0%, #4f46e5 100%);
  border-color: var(--spc-ring, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.spc_group_pill.is-selected:hover {
  background: linear-gradient(135deg, #7c3aed 0%, var(--spc-ring, #6366f1) 100%);
  transform: translateY(-1px);
}

.spc_group_checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.15s ease;
}

.spc_group_checkbox:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.spc_group_checkbox:focus-within {
  outline: 2px solid var(--spc-ring, #6366f1);
  outline-offset: 2px;
}

.spc_group_checkbox input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s ease;
}

.spc_group_checkbox input[type="checkbox"]:checked {
  border-color: var(--spc-ring, #6366f1);
  background: var(--spc-ring, #6366f1);
}

.spc_group_checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.spc_group_checkbox input[type="checkbox"]:focus {
  outline: none;
}

.spc_group_checkbox span {
  flex: 1;
  user-select: none;
}

.spc_group_checkboxes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* -----------------------------------------------------------------
   Camera Views - Preview Panel Buttons
----------------------------------------------------------------- */
.spc_views_set {
  display: block;
  width: 100%;
  flex-shrink: 0;
  padding: 10px 12px;
  margin: 0 0 8px 0;
  border: none;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
}

.spc_views_set > legend {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--spc-header-color, rgba(255, 255, 255, 0.6));
  margin-bottom: 10px;
  padding: 0;
}

.spc_view_buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spc_view_btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc_view_btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.spc_view_btn.is-active {
  background: var(--spc-ring, #6366f1);
  border-color: var(--spc-ring, #6366f1);
  color: #fff;
}

.spc_view_btn:focus {
  outline: 2px solid var(--spc-ring, #6366f1);
  outline-offset: 2px;
}

/* Light theme for views */
.spc-embed-wrapper[data-theme="light"] .spc_views_set {
  background: rgba(0, 0, 0, 0.03);
}

.spc-embed-wrapper[data-theme="light"] .spc_views_set > legend {
  color: rgba(0, 0, 0, 0.6);
}

.spc-embed-wrapper[data-theme="light"] .spc_view_btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_view_btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Light theme for group controls */
.spc-embed-wrapper[data-theme="light"] .spc_group_set,
.spc-embed-wrapper[data-theme="light"] .spc_group_checkboxes,
.spc-embed-wrapper[data-theme="light"] .spc_views_set {
  background: rgba(0, 0, 0, 0.03);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_set > .spc_label,
.spc-embed-wrapper[data-theme="light"] .spc_group_set > legend,
.spc-embed-wrapper[data-theme="light"] .spc_group_checkboxes > .spc_label,
.spc-embed-wrapper[data-theme="light"] .spc_group_checkboxes > legend,
.spc-embed-wrapper[data-theme="light"] .spc_views_set > legend {
  color: rgba(0, 0, 0, 0.85);
}

/* Light theme radio defaults - can be overridden by CSS variables */
.spc-embed-wrapper[data-theme="light"] {
  --spc-radio-bg: rgba(0, 0, 0, 0.04);
  --spc-radio-bg-hover: rgba(0, 0, 0, 0.08);
  --spc-radio-bg-selected: rgba(99, 102, 241, 0.12);
  --spc-radio-border: rgba(0, 0, 0, 0.12);
  --spc-radio-text: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_radio input[type="radio"]:checked {
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_radio input[type="radio"]:focus:not(:checked) {
  border-color: rgba(0, 0, 0, 0.4);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_select {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.15);
  color: #222;
}

.spc-embed-wrapper[data-theme="light"] .spc_group_checkbox {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.85);
}

/* Light theme pills */
.spc-embed-wrapper[data-theme="light"] .spc_group_pill {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.02) 100%);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.85);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_pill:hover {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.04) 100%);
  border-color: rgba(0, 0, 0, 0.2);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_pill.is-selected {
  background: linear-gradient(135deg, var(--spc-ring, #6366f1) 0%, #4f46e5 100%);
  border-color: var(--spc-ring, #6366f1);
  color: #fff;
}

.spc-embed-wrapper[data-theme="light"] .spc_group_checkbox:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
}

.spc-embed-wrapper[data-theme="light"] .spc_group_checkbox input[type="checkbox"] {
  border-color: rgba(0, 0, 0, 0.3);
}

/* ----------------------------------------------------------------
   Mobile Scroll Indicators
----------------------------------------------------------------- */

/* Slider dots container */
.spc_slider_dots {
  display: none;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}

.spc_slider_dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
}

.spc_slider_dot.is-active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.spc-embed-wrapper[data-theme="light"] .spc_slider_dot {
  background: rgba(0, 0, 0, 0.2);
}

.spc-embed-wrapper[data-theme="light"] .spc_slider_dot.is-active {
  background: rgba(0, 0, 0, 0.6);
}

/* Swipe hint animation */
.spc_swipe_hint {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 16px;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  opacity: 0;
  animation: spc-swipe-hint 2s ease-out 0.5s forwards;
  pointer-events: none;
}

.spc_swipe_hint svg {
  width: 14px;
  height: 14px;
  animation: spc-swipe-arrow 1s ease-in-out infinite;
}

@keyframes spc-swipe-hint {
  0% { opacity: 0; transform: translateY(-50%) translateX(10px); }
  20% { opacity: 1; transform: translateY(-50%) translateX(0); }
  80% { opacity: 1; transform: translateY(-50%) translateX(0); }
  100% { opacity: 0; transform: translateY(-50%) translateX(-10px); }
}

@keyframes spc-swipe-arrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

/* Edge fade effect */
.spc_groups[data-edge-fade="true"] {
  position: relative;
}

.spc_groups[data-edge-fade="true"]::before,
.spc_groups[data-edge-fade="true"]::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.spc_groups[data-edge-fade="true"]::before {
  left: 0;
  background: linear-gradient(90deg, var(--spc-panel-bg, rgba(26, 29, 36, 0.9)), transparent);
}

.spc_groups[data-edge-fade="true"]::after {
  right: 0;
  background: linear-gradient(-90deg, var(--spc-panel-bg, rgba(26, 29, 36, 0.9)), transparent);
}

.spc_groups[data-edge-fade="true"][data-can-scroll-left="true"]::before {
  opacity: 1;
}

.spc_groups[data-edge-fade="true"][data-can-scroll-right="true"]::after {
  opacity: 1;
}

/* Mobile: Show indicators */
@media (max-width: 767px) {
  .spc_slider_dots[data-show="true"] {
    display: flex;
  }
  
  .spc_groups {
    position: relative;
  }
}
