/* ============================================
   VISUAL EDITOR
   Properties panel (left) + Component tray (right)
   ============================================ */

/* ============================================
   VISUAL EDITOR COLOR TOKENS
   Semantic colors for editor UI
   ============================================ */
:root {
  /* Editor surfaces */
  --ve-surface: #131313;
  --ve-surface-elevated: #1a1a1a;
  --ve-surface-subtle: rgba(255, 255, 255, 0.04);
  --ve-surface-hover: rgba(255, 255, 255, 0.06);
  --ve-surface-active: rgba(255, 255, 255, 0.08);

  /* Editor text */
  --ve-text: #ffffff;
  --ve-text-secondary: rgba(255, 255, 255, 0.7);
  --ve-text-tertiary: rgba(255, 255, 255, 0.5);
  --ve-text-muted: rgba(255, 255, 255, 0.35);

  /* Editor borders */
  --ve-border: rgba(255, 255, 255, 0.1);
  --ve-border-subtle: rgba(255, 255, 255, 0.05);
  --ve-border-focus: rgba(255, 255, 255, 0.3);

  /* Editor accents */
  --ve-accent: #4ade80;
  --ve-accent-secondary: #48dbfb;

  /* Editor focus ring */
  --ve-focus-ring: rgba(255, 255, 255, 0.1);
}

/* Tray width variable - used for toast centering */
body.visual-editor-open {
  --ve-tray-width: 280px;
  /* Prevent Magic Mouse/trackpad swipe-back gesture */
  overscroll-behavior-x: contain;
}

/* Prevent swipe-back gesture on preview iframe and its container */
body.visual-editor-open .sidebar-preview-iframe-container,
body.visual-editor-open .sidebar-preview-iframe,
body.visual-editor-open .right-sidebar-wrapper {
  overscroll-behavior-x: contain;
}

/* Tray stays at full width at all breakpoints */

/* Preview interactive mode — hide tray, expand iframe to full width */
body.preview-interactive .ve-tray,
body.preview-interactive .ve-properties-form {
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

/* Tray on right — slide out right */
body.preview-interactive .ve-tray:not(.is-left) {
  transform: translateX(calc(100% + var(--panel-inset))) !important;
}

/* Tray on left — slide out left */
body.preview-interactive .ve-tray.is-left {
  transform: translateX(calc(-100% - var(--panel-inset))) !important;
}

body.preview-interactive .ve-properties-panel {
  display: none !important;
}

/* Expand iframe to fill the space vacated by the tray */
body.preview-interactive .right-sidebar-wrapper.visual-editor-active {
  right: var(--panel-inset) !important;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ============================================
   PROPERTIES ACCORDION PANEL (Left side)
   ============================================ */

.ve-properties-panel {
  position: fixed;
  top: calc(var(--panel-inset) + var(--spacing-sm));
  right: calc(var(--ve-tray-width) + var(--panel-inset) * 2 + var(--spacing-sm));
  width: var(--ve-tray-width);
  max-height: calc(100vh - var(--panel-inset) * 2 - var(--spacing-sm) * 2);
  background: var(--ve-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--ve-border-subtle);
  z-index: 299;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--duration-normal) var(--ease-in-out), opacity var(--duration-fast) ease;
}

/* Tray on left — properties panel in top-right of the canvas */
body.tray-on-left .ve-properties-panel {
  right: calc(var(--panel-inset) + var(--spacing-sm));
}

.ve-properties-panel.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ve-properties-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg) 0;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}

.ve-properties-header:active {
  cursor: grabbing;
}

.ve-drag-handle {
  font-size: var(--text-xs);
  color: var(--ve-text-muted);
}

.ve-properties-title {
  flex: 1;
  font-size: 11px;
  font-weight: var(--font-medium);
  color: var(--ve-text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  text-align: center;
}

.ve-properties-close {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
  border: none;
  background: transparent;
  color: var(--ve-text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  transition: all var(--duration-fast) ease;
}

.ve-properties-close:hover {
  background: var(--ve-surface-active);
  color: var(--ve-text);
}

.ve-properties-body {
  overflow-y: auto;
  padding: var(--spacing-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--ve-border) transparent;
}

.ve-properties-body::-webkit-scrollbar {
  width: 4px;
}

.ve-properties-body::-webkit-scrollbar-track {
  background: transparent;
}

.ve-properties-body::-webkit-scrollbar-thumb {
  background: var(--ve-border);
  border-radius: 2px;
}

/* Accordion rows */
.ve-accordion-row {
  border-bottom: 1px solid var(--ve-border-subtle);
}

.ve-accordion-row:last-child {
  border-bottom: none;
}

.ve-accordion-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  cursor: pointer;
  transition: background var(--duration-fast) ease;
}

.ve-accordion-header:hover {
  background: var(--ve-surface-subtle);
}

.ve-accordion-row.is-expanded .ve-accordion-header {
  background: var(--ve-surface-active);
}

.ve-accordion-icon {
  font-size: var(--text-base);
  color: var(--ve-text-tertiary);
  width: 20px;
  text-align: center;
}

.ve-accordion-row.is-expanded .ve-accordion-icon {
  color: var(--ve-text-secondary);
}

.ve-accordion-title {
  flex: 1;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: var(--ve-text-secondary);
}

.ve-accordion-row.is-expanded .ve-accordion-title {
  color: var(--ve-text);
}

.ve-accordion-chevron {
  font-size: 10px;
  color: var(--ve-text-muted);
  transition: transform var(--duration-fast) ease;
}

.ve-accordion-row.is-expanded .ve-accordion-chevron {
  transform: rotate(90deg);
  color: var(--ve-text-tertiary);
}

.ve-accordion-row.no-fields .ve-accordion-header {
  cursor: default;
  opacity: 0.5;
}

.ve-accordion-row.no-fields .ve-accordion-chevron {
  display: none;
}

/* Accordion content (properties panel - uses max-height animation) */
.ve-accordion-row .ve-accordion-content {
  max-height: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
  transition: max-height var(--duration-normal) ease;
}

.ve-accordion-row.is-expanded .ve-accordion-content {
  max-height: 600px;
  overflow-y: auto;
  padding: var(--spacing-lg);
}

.ve-no-fields {
  font-size: 11px;
  color: var(--ve-text-muted);
  font-style: italic;
  padding: var(--spacing-sm) 0;
}

/* ============================================
   LEGACY FLOATING PANEL (kept for reference)
   ============================================ */

.ve-floating-panel {
  display: none; /* Deprecated - using accordion now */
}

.ve-floating-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.ve-floating-title i {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
}

.ve-floating-close {
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: all 0.15s ease;
}

.ve-floating-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ve-floating-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-floating-body::-webkit-scrollbar {
  width: 4px;
}

.ve-floating-body::-webkit-scrollbar-track {
  background: transparent;
}

.ve-floating-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Property field groups */
.ve-field-group {
  margin-bottom: 16px;
}

.ve-field-group:last-child {
  margin-bottom: 0;
}

/* Field rows - for grouping fields horizontally */
.ve-field-row {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.ve-field-row:last-child {
  margin-bottom: 0;
}

.ve-field-row-2 {
  grid-template-columns: 1fr 1fr;
}

.ve-field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.ve-field-row .ve-field-group {
  margin-bottom: 0;
}

/* Square image previews in row layout */
.ve-field-row .ve-image-preview {
  aspect-ratio: 1;
  max-height: none;
}

.ve-field-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* Checkbox field */
.ve-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
}

.ve-field-checkbox {
  width: 15px;
  height: 15px;
  accent-color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  flex-shrink: 0;
}

.ve-checkbox-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ve-text-secondary);
}

.ve-field-input,
.ve-field-select,
.ve-field-textarea {
  width: 100%;
  background: var(--ve-surface-hover);
  border: 1px solid var(--ve-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-normal);
  color: var(--ve-text);
  transition: border-color var(--duration-fast) ease, background-color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}

.ve-field-input,
.ve-field-select {
  height: 40px;
  padding: 0 12px;
}

.ve-field-textarea {
  padding: 10px 12px;
}

.ve-field-input:focus,
.ve-field-textarea:focus,
.ve-field-select:focus {
  outline: none;
  border-color: var(--ve-border-focus);
  background: var(--ve-surface-active);
  box-shadow: 0 0 0 3px var(--ve-focus-ring);
}

/* Text selection highlight — visible on ALL inputs, textareas, and contenteditable */
.ve-field-input::selection,
.ve-field-textarea::selection,
.ve-richtext::selection,
.ve-richtext *::selection,
.ve-seed-new-preset-input::selection,
.ve-saved-rename-input::selection,
input::selection,
textarea::selection,
[contenteditable]::selection {
  background: rgba(100, 160, 255, 0.35);
  color: #fff;
}

.ve-field-input::-moz-selection,
.ve-field-textarea::-moz-selection {
  background: rgba(255, 255, 255, 0.2);
  color: var(--ve-text);
}

.ve-field-input::placeholder,
.ve-field-textarea::placeholder {
  color: var(--ve-text-tertiary);
}

.ve-italic-placeholder::placeholder {
  font-style: italic;
}

/* Service toggles — tabbed list of DSP services */
.ve-service-toggles {
  width: 100%;
}

.ve-service-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.ve-service-tab {
  flex: 1;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid var(--ve-border);
  background: transparent;
  color: var(--ve-text-tertiary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ve-service-tab.is-active {
  background: var(--ve-surface-hover);
  color: var(--ve-text);
  border-color: var(--ve-border-focus);
}

.ve-service-panel {
  display: none;
}

.ve-service-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ve-service-row-wrap {
  border-radius: 4px;
}

.ve-service-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s;
}

.ve-service-row:hover {
  background: var(--ve-surface-hover);
}

.ve-service-name {
  font-size: var(--text-sm);
  color: var(--ve-text);
}

.ve-service-source {
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  margin-left: 4px;
}

.ve-service-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ve-service-edit-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
  line-height: 1;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
}
.ve-service-edit-btn:hover,
.ve-service-edit-btn.is-active {
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}

.ve-service-link-edit {
  padding: 4px 8px 8px;
}

.ve-service-link-input {
  font-size: 11px !important;
}

.ve-service-view-btn {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ve-border-focus);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.ve-service-view-btn:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.ve-service-check {
  width: 16px;
  height: 16px;
  accent-color: var(--ve-border-focus);
  cursor: pointer;
}

.ve-service-accordion {
  margin-top: 2px;
}
.ve-service-accordion + .ve-service-accordion {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ve-service-accordion-header {
  width: 100%;
  padding: 5px 8px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.ve-service-accordion-header:hover {
  color: rgba(255,255,255,0.7);
}
.ve-accordion-icon {
  font-size: 10px;
  transition: transform 0.15s;
}
.ve-service-accordion-body {
  /* animated via display toggle */
}

/* Link Order — draggable reorder list */
.ve-link-order {
  display: flex;
  flex-direction: column;
}

.ve-link-order-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 4px;
  cursor: grab;
  transition: background 0.1s;
  user-select: none;
}
.ve-link-order-item:hover {
  background: var(--ve-surface-hover);
}
.ve-link-order-item.is-dragging {
  opacity: 0.4;
}
.ve-link-order-item.ve-lo-drop-above {
  border-top: 2px solid var(--ve-border-focus);
}
.ve-link-order-item.ve-lo-drop-below {
  border-bottom: 2px solid var(--ve-border-focus);
}

.ve-link-order-handle {
  color: rgba(255,255,255,0.2);
  font-size: 14px;
  cursor: grab;
  flex-shrink: 0;
}

.ve-link-order-name {
  flex: 1;
  font-size: 12px;
  color: var(--ve-text);
}

.ve-link-order-edit {
  background: none;
  border: none;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 3px;
  transition: color 0.15s;
}
.ve-link-order-edit:hover,
.ve-link-order-edit.is-active {
  color: rgba(255,255,255,0.7);
}

.ve-link-order-detail {
  padding: 4px 8px 8px 26px;
}

.ve-service-empty {
  font-size: 11px;
  color: var(--ve-text-tertiary);
  padding: 12px 8px;
  text-align: center;
  font-style: italic;
}

.ve-service-add-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.ve-service-add-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ve-service-add-icon {
  position: absolute;
  left: 10px;
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  pointer-events: none;
}

.ve-service-add-name {
  width: 100%;
  padding: 8px 8px 8px 30px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--ve-text);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.ve-service-add-name:focus {
  border-color: rgba(255,255,255,0.2);
}
.ve-service-add-name::placeholder {
  color: rgba(255,255,255,0.25);
}

.ve-service-suggest {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--ve-surface);
  border: 1px solid var(--ve-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 140px;
  overflow-y: auto;
  z-index: 10;
}

.ve-service-suggest-item {
  padding: 7px 10px;
  cursor: pointer;
  font-size: 12px;
  color: var(--ve-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ve-service-suggest-item:hover {
  background: var(--ve-surface-hover);
}
.ve-service-suggest-item .ve-suggest-cat {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ve-service-add-form {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ve-service-add-actions {
  display: flex;
  gap: 4px;
}

.ve-service-add-cat {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: var(--ve-text);
  font-size: 11px;
  font-family: inherit;
}

.ve-service-add-save {
  padding: 6px 20px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.ve-service-add-save:hover {
  background: rgba(255,255,255,0.2);
}

/* Artist tags — tag-style input with • separator */
.ve-artist-tags {
  width: 100%;
}

.ve-artist-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: var(--ve-surface-hover);
  border: 1px solid var(--ve-border);
  border-radius: var(--radius-md);
  align-items: center;
  min-height: 38px;
}

.ve-artist-tags-list:focus-within {
  border-color: var(--ve-border-focus);
  background: var(--ve-surface-active);
  box-shadow: 0 0 0 3px var(--ve-focus-ring);
}

.ve-artist-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: var(--text-sm);
  color: var(--ve-text);
  white-space: nowrap;
}

.ve-artist-tag-remove {
  background: none;
  border: none;
  color: var(--ve-text-tertiary);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
}

.ve-artist-tag-remove:hover {
  opacity: 1;
  color: #ef4444;
}

.ve-artist-tags-input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--ve-text);
  font-size: var(--text-sm);
  flex: 1;
  min-width: 80px;
  padding: 2px 0;
}

.ve-artist-tags-input::placeholder {
  color: var(--ve-text-tertiary);
}

/* Tab select (icon toggle buttons) */
/* Icon grid - compact grid of icon buttons */
.ve-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}

.ve-icon-grid__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: transparent;
  color: var(--ve-text-tertiary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-icon-grid__btn:hover {
  color: var(--ve-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.ve-icon-grid__btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

.ve-tab-select {
  display: flex;
  gap: 4px;
  background: var(--ve-bg-secondary);
  border-radius: 6px;
  padding: 3px;
}

.ve-tab-select__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: transparent;
  color: var(--ve-text-tertiary);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-tab-select__btn:hover {
  color: var(--ve-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.ve-tab-select__btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ve-tab-select__btn i {
  font-size: 13px;
}

.ve-tab-select.is-disabled {
  opacity: 0.3 !important;
  pointer-events: none !important;
}

.ve-tab-select.is-disabled .ve-tab-select__btn {
  cursor: default;
}

.ve-tab-select.is-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* Label with inline action button */
.ve-form-label--with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ve-label-reset {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  font-size: 10px;
  font-family: inherit;
  transition: color 0.15s ease;
}

.ve-label-reset:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* Image field hover overlay + reset */
.ve-form-image {
  position: relative;
}

.ve-image-hover-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
  cursor: pointer;
  border-radius: inherit;
}

.ve-image-clickable:hover .ve-image-hover-overlay {
  opacity: 1;
}

.ve-image-reset {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s ease;
  z-index: 2;
}

.ve-form-image:hover .ve-image-reset {
  opacity: 1;
}

.ve-image-reset:hover {
  color: white;
  background: rgba(0, 0, 0, 0.8);
}

/* Image label reset — minimal icon, no circle */
.ve-image-label-reset {
  width: auto;
  height: auto;
  background: none;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  right: 8px;
}

.ve-image-label-reset:hover {
  background: none;
  color: rgba(255, 255, 255, 0.5);
}

/* Custom colour picker panel */
.ve-color-panel {
  position: fixed;
  width: var(--ve-tray-width);
  background: var(--ve-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--ve-border-subtle);
  z-index: 10000;
  overflow: hidden;
}

.ve-color-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ve-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--ve-text-secondary);
  cursor: grab;
}

.ve-color-panel-header:active {
  cursor: grabbing;
}

.ve-color-panel-close {
  background: none;
  border: none;
  color: var(--ve-text-tertiary);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
}

.ve-color-panel-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.ve-color-satval {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  cursor: crosshair;
  display: block;
}

.ve-color-hue-slider {
  width: 100%;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 6px;
  background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
  outline: none;
  cursor: pointer;
}

.ve-color-hue-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.ve-color-panel-row {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.ve-color-panel-preview {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  border: 1px solid var(--ve-border);
}

.ve-color-panel-hex {
  text-align: center;
  font-family: monospace;
  font-size: 13px;
  text-transform: uppercase;
}

.ve-color-panel-apply {
  width: 100%;
  text-align: center;
  padding: 6px;
  font-size: 12px;
  font-weight: 600;
}

.ve-field-textarea {
  min-height: 60px;
  max-height: none;
  resize: none;
  line-height: 1.5;
  overflow: hidden;
}

/* Textarea with formatting toolbar */
.ve-textarea-wrapper {
  display: flex;
  flex-direction: column;
}

.ve-textarea-toolbar {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding-top: var(--spacing-sm);
}

.ve-format-hint {
  font-size: 11px;
  color: var(--ve-text-muted);
  margin-left: var(--spacing-sm);
  font-family: var(--font-mono);
}

.ve-format-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--ve-surface-subtle);
  border: 1px solid var(--ve-border);
  border-radius: var(--radius-xs);
  color: var(--ve-text-tertiary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  transition: all var(--duration-fast) ease;
}

.ve-format-btn:hover {
  background: var(--ve-surface-active);
  color: var(--ve-text);
  border-color: var(--ve-border-focus);
}

.ve-field-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Image upload field */
.ve-field-image {
  position: relative;
}

/* Square image field - constrained width for true 1:1 ratio */
.ve-field-image.ve-image-square {
  max-width: 140px;
}

.ve-field-image.ve-image-square .ve-image-preview {
  max-height: none;
}

.ve-field-image.ve-field-image--landscape .ve-image-preview {
  aspect-ratio: 3/2;
  max-height: none;
}

.ve-image-preview {
  width: 100%;
  aspect-ratio: 1;
  max-height: 140px;
  background: var(--ve-surface-subtle);
  border: 1px solid var(--ve-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ve-image-preview.ve-image-clickable {
  cursor: pointer;
  transition: border-color var(--duration-fast) ease;
}

.ve-image-preview.ve-image-clickable:hover {
  border-color: var(--ve-border-focus);
}

.ve-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-image-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ve-image-hover-overlay i {
  color: #fff;
  font-size: 20px;
}

.ve-image-preview.ve-image-clickable:hover .ve-image-hover-overlay {
  opacity: 1;
}

.ve-image-preview.is-uploading {
  opacity: 0.6;
  pointer-events: none;
}

.ve-image-preview.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ve-image-preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.ve-image-preview-empty i {
  font-size: 24px;
  margin-bottom: 6px;
}

/* Media drop zone */
.ve-media-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  color: rgba(255, 255, 255, 0.35);
  font-size: 12px;
}

.ve-media-drop-zone i {
  font-size: 22px;
  opacity: 0.5;
}

.ve-media-drop-hint {
  font-size: 10px;
  opacity: 0.5;
}

.ve-media-drop-zone:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.ve-media-drop-zone.is-dragover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}

.ve-media-audio-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  color: rgba(255, 255, 255, 0.4);
}

.ve-media-audio-preview i {
  font-size: 24px;
}

.ve-media-audio-preview audio {
  width: 100%;
  height: 32px;
}

/* Drag-over feedback on image/media fields */
.ve-field-image.is-dragover {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: -2px;
  border-radius: 8px;
}

.ve-field-image.is-dragover .ve-image-preview {
  opacity: 0.5;
}

/* Upload progress bar */
.ve-upload-progress {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border-radius: inherit;
  z-index: 5;
  gap: 8px;
}

.ve-upload-progress-track {
  width: 60%;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.ve-upload-progress-bar {
  width: 0%;
  height: 100%;
  background: white;
  border-radius: 2px;
  transition: width 0.15s ease;
}

.ve-upload-progress-text {
  font-family: "TWKLausanne", -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.03em;
}

/* Metric key input with validation */
.ve-metric-key-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ve-metric-key-wrapper .ve-field-input {
  flex: 1;
}

.ve-metric-key-status {
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 20px;
}

.ve-metric-key-checking {
  color: rgba(255, 255, 255, 0.4);
}

.ve-metric-key-valid {
  color: #4ade80;
}

.ve-metric-key-empty {
  color: rgba(255, 255, 255, 0.3);
}

/* Icon picker grid */
.ve-icon-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.ve-icon-picker-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.4;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ve-icon-picker-item:hover {
  opacity: 0.7;
}

.ve-icon-picker-item.is-selected {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.6);
}

.ve-icon-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ve-icon-picker-add {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px dashed rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.3);
  font-size: 14px;
  opacity: 1;
}

.ve-icon-picker-add:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.5);
}

/* Release picker grid */
.ve-release-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ve-release-picker-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.4;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ve-release-picker-item:hover {
  opacity: 0.7;
}

.ve-release-picker-item.is-selected {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.6);
}

.ve-release-picker-item.is-current {
  cursor: default;
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.ve-release-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ve-release-picker-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.2);
  font-size: 16px;
}

.ve-release-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  padding: 12px;
}

/* Date input */
.ve-field-input[type="date"] {
  color-scheme: dark;
  min-height: 44px;
}

/* Read-only field */
.ve-field-readonly {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.5);
  cursor: default;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Dragging state for properties panel */
.ve-panel-dragging {
  cursor: grabbing !important;
}

.ve-panel-dragging * {
  cursor: grabbing !important;
}

.ve-panel-dragging iframe,
.ve-panel-dragging .sidebar-preview-iframe,
.ve-panel-dragging .ve-tray,
.ve-panel-dragging .right-sidebar-wrapper {
  pointer-events: none !important;
}

.ve-panel-dragging .ve-properties-panel {
  pointer-events: auto !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 2px #fff;
}

/* ============================================
   MAIN CONTENT FADE WHEN EDITING
   ============================================ */

.main-content {
  transition: opacity 0.3s ease;
}

body.visual-editor-open .main-content {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   FULL-WIDTH PROPERTIES FORM (Unexpanded view)
   ============================================ */

.ve-properties-form {
  position: fixed;
  top: var(--panel-inset, 1rem);
  left: calc(var(--sidebar-collapsed, 72px) + var(--panel-inset, 1rem) * 2);
  width: var(--ve-tray-width);
  bottom: var(--panel-inset, 1rem);
  background: var(--bg-color, #131313);
  border-radius: var(--radius-lg, 12px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.ve-properties-form.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ve-form-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.ve-form-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

.ve-form-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-form-body::-webkit-scrollbar {
  width: 6px;
}

.ve-form-body::-webkit-scrollbar-track {
  background: transparent;
}

.ve-form-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* Form sections - collapsed by default */
.ve-form-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
  overflow: hidden;
}

.ve-form-section:last-child {
  margin-bottom: 0;
}

.ve-form-section:hover {
  border-color: rgba(255, 255, 255, 0.08);
}

.ve-form-section.is-active,
.ve-form-section.is-expanded {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

/* Form section header - clickable */
.ve-form-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ve-form-section-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ve-form-section.is-expanded .ve-form-section-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.06);
}

.ve-form-section-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.ve-form-section.is-expanded .ve-form-section-icon {
  color: rgba(255, 255, 255, 0.7);
}

.ve-form-section-title {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.ve-form-section.is-expanded .ve-form-section-title {
  color: #fff;
}

.ve-form-section-chevron {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, color 0.15s ease;
  flex-shrink: 0;
}

.ve-form-section.is-expanded .ve-form-section-chevron {
  transform: rotate(90deg);
  color: rgba(255, 255, 255, 0.45);
}

/* Form section body - hidden by default */
.ve-form-section-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.ve-form-section.is-expanded .ve-form-section-body {
  max-height: 600px;
  padding: 16px;
  overflow-y: auto;
}

/* Form fields - spacious */
.ve-form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ve-form-label {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-form-input,
.ve-form-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 13px;
  color: #fff;
  transition: all 0.15s ease;
}

select.ve-form-input,
.ve-form-select {
  padding-right: 28px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.ve-form-input:focus,
.ve-form-select:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.ve-form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ve-form-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 13px;
  color: #fff;
  resize: vertical;
  line-height: 1.5;
  transition: all 0.15s ease;
}

.ve-form-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.ve-form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

/* Rich text contenteditable */
.ve-richtext {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  cursor: text;
}

.ve-richtext:empty::before {
  content: attr(data-placeholder);
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

.ve-richtext strong, .ve-richtext b { font-weight: 700; }
.ve-richtext em, .ve-richtext i { font-style: italic; }
.ve-richtext u { text-decoration: underline; }
.ve-richtext del, .ve-richtext s, .ve-richtext strike { text-decoration: line-through; }

.ve-richtext::selection,
.ve-richtext *::selection {
  background: rgba(96, 165, 250, 0.4);
  color: #fff;
}

.ve-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23999' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Image upload field */
.ve-form-image {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ve-form-image-preview {
  width: 100%;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.ve-field-image--landscape .ve-form-image-preview {
  aspect-ratio: 3/2;
}

.ve-form-image-default-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 4px;
}

.ve-form-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-form-image-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 12px;
}

.ve-form-image-empty i {
  font-size: 24px;
}

.ve-form-image-btn {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s ease;
  width: fit-content;
}

.ve-form-image-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* Date input dark mode */
.ve-form-input[type="date"] {
  color-scheme: dark;
}


/* ============================================
   PREVIEW ADJUSTMENTS FOR EDIT MODE
   ============================================ */

/* Preview shifts left to make room for tray */
.right-sidebar-wrapper {
  transition: right var(--duration-normal) var(--ease-in-out);
}

.right-sidebar-wrapper.visual-editor-active {
  right: calc(var(--panel-inset, 1rem) + var(--ve-tray-width) + var(--panel-inset, 1rem));
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   COMPONENTS TRAY - Absolutely positioned overlay
   ============================================ */

.ve-tray {
  position: fixed;
  top: var(--panel-inset);
  right: var(--panel-inset);
  bottom: var(--panel-inset);
  width: 280px;
  display: flex;
  flex-direction: column;
  z-index: 300;
  /* Closed state: slid off-screen right. Animate back when is-open is removed. */
  transform: translateX(calc(100% + var(--panel-inset)));
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-in-out), opacity var(--duration-fast) ease;
}

.ve-top-panel {
  flex: 1;
  min-height: 0;
  background: var(--ve-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-theme="light"] .ve-top-panel {
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ve-tray.is-open {
  transform: translateX(0);
  opacity: 1;
  transition: transform var(--duration-normal) var(--ease-in-out), opacity var(--duration-fast) ease;
}

/* Tray positioned on left side */
.ve-tray.is-left {
  right: auto;
  left: calc(var(--panel-inset) + var(--sidebar-collapsed) + var(--spacing-sm));
  transform: translateX(calc(-100% - 10px));
  z-index: 240; /* Below sidebar (250) - slides behind during open/close */
}

.ve-tray.is-left.is-open {
  transform: translateX(0);
}

/* Sidebar always mini — no wide-screen override needed */

/* Extend sidebar to cover the left gap when tray is on left - acts as mask */
body.visual-editor-open.tray-on-left .sidebar::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--panel-inset, 10px));
  left: calc(-1 * var(--panel-inset, 10px));
  bottom: calc(-1 * var(--panel-inset, 10px));
  width: var(--panel-inset, 10px);
  background: #000;
  z-index: 1;
}

/* Tray dragging state */
.ve-tray.is-dragging {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: -2px;
  cursor: grabbing;
}

.ve-tray-header {
  cursor: grab;
}

.ve-tray.is-dragging .ve-tray-header {
  cursor: grabbing;
}

/* Drop zone indicator — wider for easier dragging */
.ve-tray-dropzone {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ve-tray-dropzone.is-left {
  left: calc(var(--panel-inset) + var(--sidebar-collapsed));
  background: linear-gradient(to right, rgba(72, 219, 251, 0.08), transparent);
  border-left: 2px solid rgba(72, 219, 251, 0.5);
}

.ve-tray-dropzone.is-right {
  right: 0;
  background: linear-gradient(to left, rgba(72, 219, 251, 0.08), transparent);
  border-right: 2px solid rgba(72, 219, 251, 0.5);
}

.ve-tray-dropzone.is-active {
  opacity: 1;
}

/* Preview shifts when tray is on left */
.right-sidebar-wrapper.visual-editor-active.tray-on-left {
  right: var(--panel-inset);
  left: calc(var(--panel-inset) + var(--sidebar-collapsed) + var(--spacing-sm) + var(--ve-tray-width) + var(--spacing-sm));
}

/* Preview interactive — expand iframe when tray on left collapses */
body.preview-interactive .right-sidebar-wrapper.visual-editor-active.tray-on-left {
  left: calc(var(--panel-inset) + var(--sidebar-collapsed) + var(--spacing-sm)) !important;
}

/* Tray stays on the right when artist sidebar is on left - no change needed */

.ve-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) var(--spacing-lg);
  flex-shrink: 0;
}

.ve-tray-title {
  font-size: 11px;
  font-weight: var(--font-medium);
  color: var(--ve-text-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.ve-grid-toggle,
.ve-tray-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--ve-surface-hover);
  color: var(--ve-text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  transition: all var(--duration-fast) ease;
  margin-left: auto;
}

.ve-tray-close {
  margin-left: var(--spacing-xs);
}

.ve-grid-toggle:hover,
.ve-tray-close:hover {
  background: var(--ve-surface-active);
  color: var(--ve-text);
}

.ve-tray-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: var(--spacing-md);
  scrollbar-width: thin;
  scrollbar-color: var(--ve-border) transparent;
}

.ve-tray-body::-webkit-scrollbar {
  width: 4px;
}

.ve-tray-body::-webkit-scrollbar-track {
  background: transparent;
}

.ve-tray-body::-webkit-scrollbar-thumb {
  background: var(--ve-border);
  border-radius: 2px;
}

.ve-tray-info {
  margin-bottom: var(--spacing-md);
}

.ve-tray-info p {
  font-size: var(--text-xs);
  color: var(--ve-text-tertiary);
  line-height: var(--leading-normal);
  margin: 0 0 var(--spacing-xs);
}

.ve-tray-info .ve-tray-hint {
  font-size: 10px;
  color: var(--ve-text-muted);
  margin: 0;
}

.ve-tray-divider {
  height: 1px;
  background: var(--ve-border-subtle);
  margin: var(--spacing-md) 0;
}

.ve-tray-footer {
  padding: var(--spacing-md) var(--spacing-lg);
  flex-shrink: 0;
}

/* Categories */
.ve-category {
  margin-bottom: var(--spacing-lg);
}

.ve-category:last-child {
  margin-bottom: 0;
}

.ve-category-title {
  font-size: 9px;
  font-weight: var(--font-medium);
  color: var(--ve-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-sm);
  padding-left: 2px;
}

/* ============================================
   TAB STYLES (for artist mode)
   ============================================ */
.ve-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  background: #131313;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
}

.ve-tab.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ve-tab i {
  font-size: 12px;
}

.ve-tab-content {
  display: none;
}

.ve-tab-content.is-active {
  display: block;
}

/* Social Links section in INFO tab */
.ve-social-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-social-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ve-social-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-social-add-wrapper {
  position: relative;
}

.ve-social-add {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ve-social-add:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ve-social-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: #131313;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 4px;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ve-social-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ve-social-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s ease;
}

.ve-social-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ve-social-dropdown-item i,
.ve-social-dropdown-item .icon-x,
.ve-social-dropdown-item .icon-apple-music {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.ve-social-dropdown-item .icon-x,
.ve-social-dropdown-item .icon-apple-music {
  height: 14px;
  opacity: 0.6;
}

.ve-social-dropdown-empty {
  padding: 12px 10px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-align: center;
  font-style: italic;
}

.ve-social-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ve-social-item {
  display: flex;
  gap: 6px;
  align-items: center;
}

.ve-social-icon {
  width: 32px;
  height: 32px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ve-social-icon i,
.ve-social-icon .icon-x,
.ve-social-icon .icon-apple-music {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.ve-social-icon .icon-x,
.ve-social-icon .icon-apple-music {
  height: 14px;
  opacity: 0.7;
}

.ve-social-input-wrapper {
  flex: 1;
  min-width: 0;
  position: relative;
}

.ve-social-input {
  width: 100%;
  padding: 8px 36px 8px 10px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: white;
  font-size: 12px;
  font-family: inherit;
  box-sizing: border-box;
}

.ve-social-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
}

.ve-social-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-social-remove {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
  transition: all 0.15s ease;
  padding: 0;
}

.ve-social-remove i {
  display: block;
  line-height: 1;
}

.ve-social-remove:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

/* Custom social icons */
.icon-x,
.icon-apple-music {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

.icon-x {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z' fill='%23fff'/%3E%3C/svg%3E");
}

.icon-apple-music {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23fff'%3E%3Cpath d='M17 2.5v11a3 3 0 1 1-2-2.83V5.29l-8 1.77v8.44a3 3 0 1 1-2-2.83V4.5l12-2.67v.67z'/%3E%3C/svg%3E");
}

.ve-social-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  text-align: center;
  padding: 12px;
}

/* YouTube Videos section in INFO tab */
.ve-youtube-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-youtube-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ve-youtube-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}

.ve-youtube-title i {
  color: #ff0000;
  font-size: 14px;
}

.ve-youtube-refresh {
  padding: 4px 10px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.ve-youtube-refresh:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ve-youtube-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ve-youtube-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 0;
}

.ve-youtube-status--success {
  color: #22c55e;
}

.ve-youtube-status--success i {
  margin-right: 4px;
}

.ve-youtube-status--error {
  color: #f87171;
}

.ve-youtube-status--error i {
  margin-right: 4px;
}

.ve-youtube-channel {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
}

.ve-youtube-channel-name {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.ve-youtube-channel-handle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

.ve-youtube-channel-subs {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

/* Gallery YouTube Import Button */
.ve-gallery-youtube-import {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-gallery-youtube-import:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.ve-gallery-youtube-import i {
  font-size: 14px;
}

/* Gallery Video URL Input */
.ve-gallery-video-url-wrapper {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.ve-gallery-video-url {
  flex: 1;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  outline: none;
  transition: all 0.15s ease;
}

.ve-gallery-video-url::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ve-gallery-video-url:focus {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.ve-gallery-video-url-add {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  color: #818cf8;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-gallery-video-url-add:hover {
  background: rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
}

.ve-gallery-video-url-add i {
  font-size: 14px;
}

/* Video Picker Modal */
.ve-video-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ve-video-picker-modal.is-visible {
  opacity: 1;
}

.ve-video-picker-modal.is-closing {
  opacity: 0;
}

.ve-video-picker-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.ve-video-picker-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  height: 70vh;
  background: var(--bg-color, #1a1a1a);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(10px);
  transition: transform 0.2s ease;
}

.ve-video-picker-modal.is-visible .ve-video-picker-content {
  transform: translateY(0);
}

.ve-video-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
}

.ve-video-picker-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ve-video-picker-artist-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ve-video-picker-actions {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-video-picker-url-input {
  flex: 1;
  display: flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.ve-video-picker-url {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.9);
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.ve-video-picker-url::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-video-picker-url-add {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  padding: 0 10px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ve-video-picker-url-add:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
}

/* Ellipsis loading animation (in thumbnail preview area) */
.ve-ellipsis-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 24px;
  font-size: 16px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.4);
}

.ve-ellipsis-loading::after {
  content: '';
  animation: ellipsis 1.2s steps(4, end) infinite;
}

@keyframes ellipsis {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.ve-url-preview {
  display: flex;
  align-items: center;
  padding: 0 4px;
  flex-shrink: 0;
}

.ve-url-preview img {
  width: 32px;
  height: 24px;
  object-fit: cover;
  border-radius: 3px;
}

.ve-video-picker-upload {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ve-video-picker-upload:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

/* Gallery add media button */
/* Custom confirm dialog */
.ve-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ve-confirm-overlay.is-visible {
  opacity: 1;
}

.ve-confirm-dialog {
  background: var(--ve-surface, #1e1e1e);
  border: 1px solid var(--ve-border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 24px;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  transform: translateY(8px);
  transition: transform 0.15s ease;
}

.ve-confirm-overlay.is-visible .ve-confirm-dialog {
  transform: translateY(0);
}

.ve-confirm-message {
  margin: 0 0 20px 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.ve-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ve-confirm-cancel,
.ve-confirm-ok {
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-confirm-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
}

.ve-confirm-cancel:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.ve-confirm-ok {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.ve-confirm-ok:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Image picker upload area */
.ve-image-picker-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 20px;
  padding: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-image-picker-drop i {
  font-size: 16px;
}

.ve-image-picker-drop:hover,
.ve-image-picker-drop.is-dragover {
  border-color: rgba(72, 219, 251, 0.4);
  color: rgba(255, 255, 255, 0.6);
  background: rgba(72, 219, 251, 0.03);
}

/* Drag-over state for picker modal */
.ve-video-picker-content.is-dragover {
  outline: 2px dashed rgba(72, 219, 251, 0.5);
  outline-offset: -2px;
  background: rgba(72, 219, 251, 0.03);
}

.ve-gallery-add-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.ve-gallery-add-btn:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Quick drop zone */
.ve-gallery-quick-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 12px;
  margin-top: 6px;
  aspect-ratio: 4/3;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-gallery-quick-drop i {
  font-size: 20px;
}

.ve-gallery-quick-drop:hover,
.ve-gallery-quick-drop.is-dragover {
  border-color: rgba(72, 219, 251, 0.4);
  color: rgba(255, 255, 255, 0.5);
  background: rgba(72, 219, 251, 0.03);
}

/* Media picker filter tabs */
.ve-video-picker-filters {
  display: flex;
  gap: 2px;
  padding: 0 20px 10px;
}

.ve-video-picker-filter {
  padding: 4px 12px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-video-picker-filter:hover {
  color: rgba(255, 255, 255, 0.7);
}

.ve-video-picker-filter.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.ve-video-picker-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-video-picker-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.ve-video-picker-body {
  flex: 1;
  overflow: hidden;
  overflow-y: auto;
  border-radius: 16px;
  scrollbar-width: none;
}

.ve-video-picker-body::-webkit-scrollbar {
  display: none;
}

.ve-video-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 12px;
  row-gap: 12px;
  padding: 0;
}

.ve-video-picker-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s ease;
}

.ve-video-picker-item:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

/* Newly selected in this session — green highlight */
.ve-video-picker-item.is-selected {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
}

/* Already added to gallery — green outline, non-interactive */
.ve-video-picker-item.is-added {
  border-color: rgba(76, 175, 80, 0.4);
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.ve-video-picker-item.is-added .ve-video-picker-remove-item,
.ve-video-picker-item.is-added .ve-video-picker-remove-pool {
  display: none;
}

.ve-video-picker-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.ve-video-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-video-picker-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: white;
}

.ve-video-picker-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4CAF50;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.15s ease;
}

.ve-video-picker-item.is-selected .ve-video-picker-check {
  opacity: 1;
  transform: scale(1);
}

.ve-video-picker-item.is-added .ve-video-picker-check {
  opacity: 0.5;
  transform: scale(1);
  background: rgba(255, 255, 255, 0.2);
}

/* Remove from pool button */
.ve-video-picker-remove-item,
.ve-video-picker-remove-pool {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.15s ease;
  z-index: 2;
}

.ve-video-picker-item:hover .ve-video-picker-remove-item,
.ve-video-picker-item:hover .ve-video-picker-remove-pool {
  opacity: 1;
}

.ve-video-picker-remove-item:hover,
.ve-video-picker-remove-pool:hover {
  color: #f87171;
  background: rgba(0, 0, 0, 0.8);
}

.ve-video-picker-item.is-focused {
  outline: 1px solid rgba(96, 165, 250, 0.4);
  outline-offset: -1px;
}

.ve-video-picker-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.03em;
  z-index: 1;
}

/* Deleted panel */
.ve-video-picker-deleted {
  flex: 1;
  padding: 16px 20px;
  border-radius: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
}

.ve-video-picker-deleted::-webkit-scrollbar {
  display: none;
}

.ve-video-picker-deleted .ve-video-picker-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ve-video-picker-item--deleted {
  opacity: 0.75;
}

.ve-video-picker-item--deleted.is-selected {
  border-color: #4CAF50;
  background: rgba(76, 175, 80, 0.1);
  opacity: 1;
}

.ve-video-picker-item--deleted {
  cursor: pointer;
}

.ve-video-picker-empty-bin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.05);
  color: rgba(239, 68, 68, 0.7);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-video-picker-empty-bin:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.ve-video-picker-filter--deleted {
  color: rgba(255, 255, 255, 0.3);
}

.ve-video-picker-filter--deleted.is-active {
  background: rgba(239, 68, 68, 0.1);
  color: rgba(239, 68, 68, 0.8);
}

.ve-video-picker-title {
  padding: 6px 8px 8px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 300;
  color: #9A9A9A;
  text-align: left;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ve-video-picker-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-picker-footer-main,
.ve-picker-footer-deleted {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.ve-video-picker-action-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s ease;
}

.ve-video-picker-action-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

.ve-video-picker-count {
  margin-left: auto;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.ve-video-picker-count .count {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.ve-video-picker-cancel,
.ve-video-picker-confirm {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-video-picker-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.ve-video-picker-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-video-picker-confirm {
  background: #4CAF50;
  border: none;
  color: white;
}

.ve-video-picker-confirm:hover {
  background: #45a049;
}

/* Links section in INFO tab (collapsible) */
.ve-links-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-links-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s ease;
}

.ve-links-toggle:hover {
  color: rgba(255, 255, 255, 0.6);
}

.ve-links-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-links-chevron {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.ve-links-section.is-collapsed .ve-links-chevron {
  transform: rotate(-90deg);
}

.ve-links-content {
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 500px;
  opacity: 1;
}

.ve-links-section.is-collapsed .ve-links-content {
  max-height: 0;
  opacity: 0;
}

.ve-links-header {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

/* ============================================
   ACCORDION STYLES (for artist settings/components)
   ============================================ */
.ve-accordion {
  margin-bottom: 12px;
}

.ve-accordion:last-child {
  margin-bottom: 0;
}

.ve-accordion-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  background: #1e1e1e;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease;
}

.ve-accordion-toggle:hover {
  background: #2a2a2a;
}

.ve-accordion-toggle i:first-child {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.ve-accordion-arrow {
  margin-left: auto;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
}

.ve-accordion-toggle.is-open .ve-accordion-arrow {
  transform: rotate(180deg);
}

.ve-accordion-content {
  display: none;
  padding: 12px 0 0;
}

.ve-accordion-content.is-open {
  display: block;
}

/* ============================================
   SELECTION PROPERTIES (in Properties tab)
   ============================================ */

.ve-selection-properties {
  display: none;
}

.ve-selection-properties.has-selection {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ve-border) transparent;
}

.ve-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ve-selection-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-selection-close {
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ve-selection-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.ve-selection-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ve-selection-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-style: italic;
  padding: 8px 0;
}

.ve-selection-actions {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.ve-btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.ve-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ve-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Edit Info button wrapper */
.ve-edit-info-wrapper {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-edit-info-btn {
  width: 100%;
  justify-content: center;
}

/* Metadata section header */
.ve-metadata-header {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Settings form inside accordion */
.ve-settings-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
}

.ve-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Side-by-side form groups */
.ve-form-group-row {
  display: flex;
  gap: 12px;
}

.ve-form-group-half {
  flex: 1;
  min-width: 0;
}

.ve-form-group-half .ve-form-image-preview {
  height: 80px;
}

.ve-form-group-half .ve-form-image-btn {
  font-size: 9px;
  padding: 4px 8px;
}

.ve-form-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-form-input,
.ve-form-textarea {
  width: 100%;
  padding: 8px 10px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ve-form-input:focus,
.ve-form-textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: #2a2a2a;
}

.ve-form-input::placeholder,
.ve-form-textarea::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Toggle switch */
.ve-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px;
  min-width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.ve-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ve-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.2s ease;
}

.ve-toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.ve-toggle input:checked + .ve-toggle-slider {
  background: #22c55e;
}

.ve-toggle input:checked + .ve-toggle-slider::before {
  transform: translateX(16px);
}

/* Toggle form group - side by side label and toggle */
.ve-form-group--toggle {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ve-form-group--toggle .ve-form-label {
  margin: 0;
  flex: 1;
}

/* LIVE Toggle Button */
.ve-live-toggle-group {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.ve-live-toggle {
  flex-shrink: 0;
}

.ve-live-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ve-live-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.ve-live-btn.is-live {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.ve-live-btn.is-live .ve-live-indicator {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* ── Publish section ── */
.ve-publish-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ve-publish-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ve-publish-label {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.ve-publish-confirm {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
}

.ve-publish-confirm input[type="checkbox"] {
  margin: 1px 0 0 0;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  accent-color: var(--ve-border-focus);
}

.ve-publish-confirm span {
  flex: 1;
}

/* Links list in tray */
.ve-links-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ve-link-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  text-decoration: none;
  color: white;
  cursor: pointer;
  width: 100%;
  text-align: left;
  font: inherit;
  transition: background 0.15s ease;
}

.ve-link-item:hover {
  background: transparent;
}

.ve-link-item:hover .ve-link-thumb {
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-link-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #131313;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ve-link-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-link-thumb-gradient {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.ve-link-thumb-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise-texture);
  opacity: 0.33;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.ve-link-info {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  transition: border-color 0.15s ease;
}

.ve-link-item:hover .ve-link-info {
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-link-title {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
}

.ve-link-status {
  font-size: 10px;
  margin-top: 1px;
}

.ve-link-item.is-published .ve-link-status {
  color: #4ade80;
}

.ve-link-item.is-draft .ve-link-status {
  color: rgba(255, 255, 255, 0.4);
}

.ve-link-arrow {
  display: none;
}

.ve-links-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 16px;
}

.ve-components {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Component card */
.ve-component {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #1e1e1e;
  border-radius: 8px;
  cursor: grab;
  transition: all 0.15s ease;
  text-align: left;
}

.ve-component:hover {
  background: #2a2a2a;
  transform: translateY(-1px);
}

.ve-component:active {
  cursor: grabbing;
  transform: scale(0.97);
}

.ve-component.is-disabled {
  opacity: 0.3;
  cursor: pointer;
}

.ve-component-added {
  margin-left: auto;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-component i {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
}

.ve-component span {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

/* Featured components row */
.ve-featured-row {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

/* Featured component */
.ve-component-featured {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.ve-component-featured span {
  font-size: 11px;
}

/* Component being dragged */
.ve-component.is-dragging {
  opacity: 1;
  transform: scale(0.95);
  cursor: grabbing;
  box-shadow: 0 0 0 2px #fff;
}

/* Global dragging state */
.ve-dragging-component {
  cursor: grabbing !important;
}

.ve-dragging-component * {
  cursor: grabbing !important;
}

/* Full-canvas drop overlay (for subscribe component) */
.ve-drag-overlay--full-canvas {
  background: rgba(72, 219, 251, 0.08) !important;
  border: 2px dashed rgba(72, 219, 251, 0.5);
  border-radius: var(--radius-lg, 12px);
  transition: background 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ve-drag-overlay--full-canvas::before {
  content: 'Drop to add Subscribe widget';
  font-size: 14px;
  font-weight: 500;
  color: rgba(72, 219, 251, 0.9);
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px;
  pointer-events: none;
}

.ve-drag-overlay--full-canvas:hover {
  background: rgba(72, 219, 251, 0.15) !important;
  border-color: rgba(72, 219, 251, 0.8);
}

/* Done button */
.ve-btn {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-btn-done {
  background: #6366f1;
  color: #fff;
}

.ve-btn-done:hover {
  background: #5558e3;
}

.ve-btn-done.has-changes {
  background: #22c55e;
}

.ve-btn-done.has-changes:hover {
  background: #16a34a;
}

.ve-btn-done .ve-btn-icon {
  display: none;
  font-size: 18px;
}

.ve-btn-done .ve-btn-text {
  display: inline;
}

/* Unsaved changes status (legacy) */
.ve-status {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #22c55e;
  margin-bottom: 8px;
}

.ve-status i {
  font-size: 18px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* Draft status indicator */
.ve-draft-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.ve-draft-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ve-draft-indicator.has-changes {
  background: #fbbf24;
  animation: pulse 1.5s ease-in-out infinite;
}

.ve-draft-indicator.is-saving {
  background: #6366f1;
  animation: pulse 0.8s ease-in-out infinite;
}

.ve-draft-indicator.is-saved {
  background: #22c55e;
}

.ve-draft-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

/* Footer buttons row */
.ve-footer-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ve-btn-discard {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ve-btn-discard:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-btn-discard:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ve-btn-duplicate {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  order: -1;
}

.ve-btn-duplicate:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-btn-duplicate i {
  font-size: 14px;
}

.ve-btn-duplicate .ve-btn-text {
  font-size: 12px;
  font-weight: 500;
}

.ve-btn-publish {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #22c55e;
  color: #fff;
}

.ve-btn-publish:hover:not(:disabled) {
  background: #16a34a;
}

.ve-btn-publish:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
}

.ve-btn-publish .ve-btn-icon {
  display: none;
  font-size: 16px;
}

.ve-btn-publish .ve-btn-text {
  display: inline;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   VERSION HISTORY
   ============================================ */

.ve-version-history {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ve-version-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ve-version-refresh {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease;
}

.ve-version-refresh:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.ve-version-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: visible;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-version-list::-webkit-scrollbar {
  width: 4px;
}

.ve-version-list::-webkit-scrollbar-track {
  background: transparent;
}

.ve-version-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.ve-version-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  user-select: none;
  -webkit-user-select: none;
}

.ve-version-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ve-version-item.is-previewing {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.4);
}

.ve-version-item.is-previewing .ve-version-date {
  color: #fbbf24;
}

.ve-version-item.is-previewing .ve-version-type {
  color: rgba(251, 191, 36, 0.7);
}

.ve-version-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ve-version-date,
.ve-version-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ve-version-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.ve-version-type {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ve-version-type i {
  font-size: 10px;
}

.ve-version-actions {
  display: flex;
  gap: 8px; /* slightly more breathing room between the heart and the RESTORE button */
  align-items: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.ve-version-btn {
  padding: 4px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ve-version-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ve-version-restore {
  padding: 4px 10px;
}

.ve-version-create {
  padding: 4px 6px;
}

.ve-version-create i {
  font-size: 11px;
}

.ve-version-loading,
.ve-version-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 16px;
}

.ve-version-loading i {
  margin-right: 6px;
}

/* Version marker dot for marked versions */
.ve-version-marker {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  flex-shrink: 0;
  margin-right: 6px;
}

/* Marked rows keep the same layout as unmarked — amber border is enough signal,
   no need for a different flex flow or indent. */

/* Version action buttons (mark and restore) */
.ve-version-action-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ve-version-action-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.ve-version-fav .bi-heart-fill {
  color: rgba(255, 255, 255, 0.8);
}

.ve-version-restore-text-btn {
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.12s ease;
  box-sizing: border-box;
}

.ve-version-restore-text-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-version-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ve-version-action-btn i {
  font-size: 12px;
}

.ve-version-mark i {
  font-size: 11px;
}

/* Filled bookmark for marked versions */
.ve-version-item.is-marked .ve-version-mark i {
  color: #fbbf24;
}

/* More button for version actions (legacy) */
.ve-version-more {
  width: 24px;
  height: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ve-version-more:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.ve-version-more i {
  font-size: 14px;
}

/* Version action menu popup */
.ve-version-menu {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 4px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 99999;
}

.ve-version-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease;
}

.ve-version-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ve-version-menu-item.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ve-version-menu-item.is-disabled:hover {
  background: transparent;
}

.ve-version-menu-item i {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
}

/* Version modal overlay */
.ve-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.ve-modal {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.ve-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.ve-modal-header i {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

.ve-modal-body {
  margin-bottom: 20px;
}

.ve-modal-message {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

.ve-modal-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.ve-modal-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.ve-modal-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.ve-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-modal-actions {
  display: flex;
  gap: 8px;
}

.ve-modal-btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-modal-btn-primary {
  background: #3b82f6;
  color: #fff;
}

.ve-modal-btn-primary:hover {
  background: #2563eb;
}

.ve-modal-btn-danger {
  background: #f87171;
  color: #fff;
}

.ve-modal-btn-danger:hover {
  background: #dc2626;
}

.ve-modal-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

.ve-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Light theme adjustments */
[data-theme="light"] .ve-version-menu {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ve-version-menu-item {
  color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .ve-version-menu-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .ve-version-menu-item i {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-modal-overlay {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-modal {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-modal-header {
  color: #000;
}

[data-theme="light"] .ve-modal-header i {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-modal-message {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .ve-modal-label {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-modal-input {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #000;
}

[data-theme="light"] .ve-modal-input:focus {
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .ve-modal-input::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-modal-btn-secondary {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .ve-modal-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #000;
}

[data-theme="light"] .ve-version-action-btn {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-version-action-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .ve-version-item.is-marked .ve-version-mark i {
  color: #d97706;
}

[data-theme="light"] .ve-version-more {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-version-more:hover {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.8);
}

/* ============================================
   NARROW VIEWPORT - Collapse panels
   ============================================ */

/* Tray and properties panel stay at full width — no responsive shrinking */

/* Removed: 1400px breakpoint that shrank the component tray */

/* Very narrow - hide properties panel */
@media (max-width: 1200px) {
  .ve-properties-panel {
    display: none;
  }
}

/* ============================================
   ARTIST DETAILS SIDEBAR
   Slides out from behind the navigation
   ============================================ */

.ve-artist-sidebar {
  position: fixed;
  top: var(--panel-inset, 10px);
  left: calc(var(--sidebar-collapsed, 72px) + var(--panel-inset, 10px) * 2);
  bottom: var(--panel-inset, 10px);
  width: 360px;
  background: #131313;
  border-radius: var(--radius-lg, 12px);
  display: flex;
  flex-direction: column;
  z-index: 250; /* Above expanded preview (z-index 200) */
  transform: translateX(calc(-100% - var(--panel-inset, 10px) * 2));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
  box-sizing: border-box;
}

.ve-artist-sidebar.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* Settings cog button - positioned at left edge of expanded preview */
.ve-settings-cog {
  position: fixed;
  top: 50%;
  left: calc(var(--sidebar-collapsed, 72px) + var(--panel-inset, 10px) * 2);
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: none;
  border-radius: 0 var(--radius-md, 8px) var(--radius-md, 8px) 0;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 251;
  transition: all 0.2s ease;
}

.ve-settings-cog:hover {
  background: rgba(40, 40, 40, 0.95);
  color: #fff;
}

.ve-settings-cog i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.ve-settings-cog:hover i {
  transform: rotate(45deg);
}

/* Hide cog when sidebar is open */
.ve-artist-sidebar.is-open ~ .ve-settings-cog {
  opacity: 0;
  pointer-events: none;
}

/* Hide search bar and main content in visual editor mode */
body.visual-editor-open .top-bar-search,
body.visual-editor-open .main-content {
  display: none !important;
}

/* Expanded nav sidebar adjustments - position elements relative to wider nav */
@media (min-width: 1601px) {
  .ve-artist-sidebar {
    left: calc(var(--sidebar-collapsed, 72px) + var(--panel-inset, 10px));
  }

  .ve-settings-cog {
    left: calc(var(--sidebar-collapsed, 72px) + var(--panel-inset, 10px));
  }
}

/* Full width fields in artist sidebar */
.ve-artist-sidebar .ve-field {
  width: 100%;
  margin-bottom: 20px;
}

.ve-artist-sidebar .ve-field:last-child {
  margin-bottom: 0;
}

.ve-artist-sidebar .ve-input,
.ve-artist-sidebar .ve-textarea {
  width: 100%;
  box-sizing: border-box;
}

.ve-artist-sidebar .ve-textarea {
  min-height: 100px;
  resize: vertical;
}

.ve-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.ve-sidebar-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.ve-sidebar-close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ve-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ve-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-sidebar-body::-webkit-scrollbar {
  width: 4px;
}

.ve-sidebar-body::-webkit-scrollbar-track {
  background: transparent;
}

.ve-sidebar-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.ve-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.ve-sidebar-footer .ve-btn {
  flex: 1;
}

/* Artist avatar styles */
.ve-artist-image-upload {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.ve-artist-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.ve-artist-avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 32px;
  flex-shrink: 0;
}

.ve-artist-image-upload .ve-image-dropzone {
  flex: 1;
  padding: 12px 16px;
  border-radius: 8px;
  gap: 8px;
  min-height: auto;
}

.ve-artist-image-upload .ve-image-dropzone i {
  font-size: 16px;
}

.ve-artist-image-upload .ve-image-dropzone span {
  font-size: 12px;
}

/* Field hint */
.ve-field-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

/* Social links in sidebar */
.ve-artist-sidebar .ve-social-links-section {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-artist-sidebar .ve-social-link-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
}

.ve-artist-sidebar .ve-social-link-item:last-child {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.ve-artist-sidebar .ve-social-link-item .ve-input {
  width: 100%;
  font-size: 13px;
  padding: 10px 12px;
}

.ve-artist-sidebar .ve-social-link-item .ve-remove-social {
  position: absolute;
  top: 0;
  right: 0;
}

.ve-btn-icon {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ve-btn-icon:hover {
  background: rgba(255, 100, 100, 0.15);
  color: #ff6b6b;
}

/* Artist sidebar overlays the canvas - no position adjustment needed */
/* Canvas stays in standard expanded preview position (same as releases) */

@media (max-width: 1600px) {
  .ve-artist-sidebar {
    width: 320px;
  }
}

@media (max-width: 1400px) {
  .ve-artist-sidebar {
    width: 280px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .ve-tray,
  .ve-properties-panel,
  .ve-artist-sidebar,
  .ve-component,
  .ve-accordion-row {
    transition: none;
  }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.ve-toast {
  position: fixed;
  top: calc(var(--panel-inset, 10px) + 8px);
  /* Horizontal positioning defined in style.css with .floating-ui */
  transform: translateX(-50%) translateY(-20px);
  padding: 10px 24px;
  background: var(--bg-color, #131313);
  color: var(--text-color, #fff);
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  isolation: isolate; /* Create stacking context for ::before z-index */
  white-space: nowrap;
}

/* Gradient border using conic-gradient + mask (same as search bar) */
.ve-toast::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 9999px;
  background: conic-gradient(
    from var(--glow-angle, 0deg),
    #48dbfb,
    #4ade80,
    #48dbfb,
    #54a0ff,
    #ff9ff3,
    #54a0ff,
    #48dbfb
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  z-index: -1;
  pointer-events: none;
  animation: toast-glow-rotate 3s linear infinite;
}

@keyframes toast-glow-rotate {
  from { --glow-angle: 0deg; }
  to { --glow-angle: 360deg; }
}

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

/* ============================================
   GALLERY FIELD
   ============================================ */

.ve-gallery-field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ve-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  position: relative;
}

.ve-gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  cursor: grab;
}

.ve-gallery-item:active {
  cursor: grabbing;
}

.ve-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-gallery-item.is-dragging {
  opacity: 0.5;
}

/* Hide hover states on all items while reordering */
.ve-gallery-grid.is-reordering .ve-gallery-item .ve-gallery-remove {
  opacity: 0 !important;
  pointer-events: none;
}

/* Drop indicator - shows where item will land */
.ve-gallery-drop-indicator {
  position: absolute;
  width: 2px;
  background: #fff;
  border-radius: 1px;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
}

.ve-gallery-drop-indicator.is-visible {
  opacity: 1;
}

.ve-gallery-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  z-index: 10;
}

.ve-gallery-item:hover .ve-gallery-remove {
  opacity: 1;
}

.ve-gallery-remove:hover {
  background: #f87171;
}

/* Video badge (play icon) */
.ve-gallery-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  pointer-events: none;
}

/* Video duration badge */
.ve-gallery-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  font-family: system-ui, sans-serif;
  pointer-events: none;
}

/* Video element in gallery item */
.ve-gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* Drag handle hidden - whole thumbnail is draggable */
.ve-gallery-drag-handle {
  display: none;
}

.ve-gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.3);
}

.ve-gallery-empty i {
  font-size: 24px;
}

.ve-gallery-empty span {
  font-size: 12px;
}

.ve-gallery-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-gallery-dropzone i {
  font-size: 20px;
}

.ve-gallery-dropzone span {
  font-size: 11px;
}

.ve-gallery-dropzone:hover:not(.is-disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.ve-gallery-dropzone.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
}

.ve-gallery-dropzone.is-dragover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  border-style: solid;
}

.ve-gallery-dropzone.is-uploading {
  opacity: 0.7;
  pointer-events: none;
}

/* Selected state for label editing */
.ve-gallery-item.is-selected::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid #fff;
  border-radius: 8px;
  pointer-events: none;
  z-index: 5;
}

/* Dropzone highlight when image is selected */
.ve-gallery-dropzone.has-selection {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.02);
}

/* Image label input disabled state */
.ve-image-label-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   STICKER PICKER
   ============================================ */

.ve-sticker-picker {
  position: relative;
}

/* Action button row (regenerate + undo) */
.ve-separator-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Hero mode tabs (RELEASE / PLAYLIST) */
.ve-hero-mode-tabs {
  display: flex;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 4px;
}

.ve-hero-mode-tab {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 0;
  transition: background 0.12s, color 0.12s;
}

.ve-hero-mode-tab + .ve-hero-mode-tab {
  border-left: 1px solid rgba(255,255,255,0.08);
}

.ve-hero-mode-tab:hover {
  color: rgba(255,255,255,0.6);
}

.ve-hero-mode-tab.active {
  background: rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.ve-sep-toggle {
  display: flex;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
}

.ve-sep-toggle-btn {
  flex: 1;
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 7px 0;
  transition: background 0.12s, color 0.12s;
}

.ve-sep-toggle-btn + .ve-sep-toggle-btn {
  border-left: 1px solid rgba(255,255,255,0.08);
}

.ve-sep-toggle-btn:hover {
  color: rgba(255,255,255,0.6);
}

.ve-sep-toggle-btn.active {
  background: rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.85);
}

.ve-separator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 2px 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ve-separator-item:last-child {
  border-bottom: none;
}

.ve-sep-item-label {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.ve-sep-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  line-height: 1;
  font-size: 13px;
  border-radius: 4px;
  color: rgba(255,255,255,0.25);
  transition: color 0.12s, background 0.12s;
}

.ve-sep-delete-btn:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.07);
}

.ve-action-btn-row {
  display: flex;
  gap: 6px;
}

.ve-action-btn-row button {
  flex: 1;
  height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.ve-action-btn-row button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.ve-action-btn-row button i {
  font-size: 13px;
}

[data-theme="light"] .ve-action-btn-row button {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.15);
  color: #333;
}

[data-theme="light"] .ve-action-btn-row button:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.25);
}

.ve-action-btn-row button.ve-action-btn-muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.ve-action-btn-row button.ve-action-btn-muted:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
}

[data-theme="light"] .ve-action-btn-row button.ve-action-btn-muted {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-action-btn-row button.ve-action-btn-muted:hover {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
  color: rgba(0, 0, 0, 0.6);
}

.ve-action-btn-row button.is-generating {
  opacity: 0.7;
  cursor: wait;
}

.ve-gen-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: ve-spin 0.6s linear infinite;
  flex-shrink: 0;
}

[data-theme="light"] .ve-gen-spinner {
  border-color: rgba(59, 130, 246, 0.2);
  border-top-color: #3b82f6;
}

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

/* Playlist Length Toggle */
.ve-length-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ve-length-toggle {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}

.ve-length-mode {
  flex: 1;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-length-mode.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.ve-length-select {
  width: 100%;
  padding: 10px 12px;
}

[data-theme="light"] .ve-length-toggle {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-length-mode {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-length-mode.is-active {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.8);
}

/* Expandable section — collapsible group of fields */
.ve-expandable-section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
}

.ve-expandable-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s ease;
}

.ve-expandable-header:focus,
.ve-expandable-header:focus-visible {
  outline: none;
}

.ve-expandable-header:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ve-expandable-chevron {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease;
}

.ve-expandable-section.is-open .ve-expandable-chevron {
  transform: rotate(90deg);
}

.ve-expandable-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}

.ve-expandable-body {
  display: none;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-expandable-section:not(.is-open) .ve-expandable-body {
  display: none;
}

/* Snap slider for playlist length (Tracks / Time) */
.ve-length-slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 4px 4px;
}

.ve-length-slider-value {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  text-align: center;
}

.ve-length-snap-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.ve-length-snap-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.ve-length-snap-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.ve-length-snap-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
}

/* Toggle switch (used for boolean toggles) */
.ve-toggle-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 6px 0;
}

.ve-toggle-row-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.ve-toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.ve-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ve-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ve-toggle-input:checked + .ve-toggle-slider {
  background: #4ade80;
  border-color: #4ade80;
}

.ve-toggle-input:checked + .ve-toggle-slider::before {
  transform: translate(16px, -50%);
  background: #fff;
}

/* Artist inclusion — label + toggle header, full-width button below */
.ve-artist-inclusion-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.ve-artist-inclusion-btn {
  width: 100%;
}

/* Compact Options Row — consolidated icon toggles */
.ve-options-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.ve-options-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ve-options-group-buttons {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 2px;
}

.ve-options-btn {
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.12s ease;
}

.ve-options-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.04);
}

.ve-options-btn.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.ve-options-caption {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* Playlist Seed / Saved Playlists */
.ve-seed-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* "+ New Preset" button at the top of the preset section */
.ve-seed-new-preset-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-seed-new-preset-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.ve-seed-new-preset-btn i {
  font-size: 14px;
}

/* Morphed input — replaces the button, same dimensions */
.ve-seed-new-preset-input-wrap {
  width: 100%;
  position: relative;
}

.ve-seed-new-preset-input {
  padding-right: 36px !important; /* room for the status icon */
  width: 100%;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.ve-seed-new-preset-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.ve-seed-new-preset-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.ve-seed-new-preset-input.is-invalid {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.5);
}

/* Inline validation status button — sits inside the input on the right */
.ve-seed-new-preset-status {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.12s ease, transform 0.12s ease;
}

.ve-seed-new-preset-status:disabled {
  cursor: not-allowed;
}

.ve-seed-new-preset-status.is-valid {
  color: #4ade80;
}

.ve-seed-new-preset-status.is-valid:hover {
  transform: translateY(-50%) scale(1.1);
}

.ve-seed-new-preset-status.is-invalid {
  color: #f87171;
}

/* (Old save-input-wrap removed — replaced by "+ New Preset" button + inline rename) */

/* Validation icon now lives INSIDE the SAVE button — this is just an inline span */
.ve-seed-input-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}

/* Small message below the field for "Already in use".
   Collapses to zero height when empty so the saved-preset list sits tight to the input. */
.ve-seed-input-msg {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  padding: 0 4px;
}

.ve-seed-input-msg:empty {
  display: none;
}

/* Balanced spacing — small breathing room above, more below to separate from the saved list */
.ve-seed-input-msg:not(:empty) {
  margin-top: 2px;
  margin-bottom: 8px;
  padding-top: 0;
  padding-bottom: 0;
}

.ve-seed-input-msg.is-invalid {
  color: #f87171;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ve-seed-input-msg.is-invalid i {
  font-size: 12px;
  line-height: 1;
}

.ve-seed-input-status-text {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.ve-seed-input-status.is-valid {
  color: #4ade80;
}

.ve-seed-input-status.is-invalid {
  color: #f87171;
}

.ve-seed-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ve-seed-save-btn--full {
  width: 100% !important;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ve-saved-playlists {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.ve-saved-playlist {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 10px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.1s ease;
}

.ve-saved-playlist:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.ve-saved-playlist.is-active {
  border-color: #4ade80;
}

.ve-saved-playlist.is-active .ve-saved-dot {
  color: #4ade80;
}

.ve-saved-playlist.is-active .ve-saved-name {
  color: #fff;
}

.ve-saved-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.ve-saved-action-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ve-saved-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Text variant — auto-width button with readable label (e.g. "Update") */
.ve-saved-action-btn--text {
  width: auto;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 500;
}

/* Bookmark icon on the left of each preset row — toggles the preset as the
   "default" shown to visitors who land on the bare URL. Outline = not default,
   filled = is default. */
.ve-saved-bookmark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: color 0.12s ease, transform 0.12s ease;
}

.ve-saved-bookmark:hover {
  color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.ve-saved-playlist.is-default .ve-saved-bookmark {
  color: #fbbf24; /* warm amber for the marked default */
}

.ve-saved-playlist.is-default .ve-saved-bookmark:hover {
  color: #f59e0b;
}

/* Full-width "Copy generation link" button beneath the preset list.
   Height matches the .ve-field-input / primary CTA height (36px) for consistency. */
.ve-saved-share-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
  box-sizing: border-box;
}

.ve-saved-share-full:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-saved-share-full i {
  font-size: 13px;
}

.ve-saved-playlist-select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  min-width: 0;
}

.ve-saved-dot {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ve-saved-playlist.is-active .ve-saved-dot {
  color: #fff;
}

.ve-saved-name {
  color: rgba(255, 255, 255, 0.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-saved-playlist.is-active .ve-saved-name {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.ve-saved-delete {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.12s ease;
}

.ve-saved-delete:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.ve-seed-name-row {
  display: flex;
  gap: 4px;
  width: 100%;
  align-items: stretch;
}

.ve-seed-name-row .ve-field-input {
  flex: 1;
  height: 36px;
  box-sizing: border-box;
}

/* Inline SAVE button — flex sibling inside the wrap, sits flush right.
   Width matches the row's [Update]+[Trash] combined footprint (~90–96px) so
   the column lines up with the preset list below. */
/* Save trigger — square icon button matching the trash button style.
   Empty: greyed save icon, disabled. Valid: white save icon, clickable.
   Invalid: red ⚠ icon, not interactive. */
.ve-seed-input-wrap .ve-seed-save-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
  box-sizing: border-box;
}

.ve-seed-input-wrap .ve-seed-save-btn[hidden] {
  display: none;
}

.ve-seed-input-wrap .ve-seed-save-btn i {
  line-height: 1;
}

/* Valid — white icon, full-strength border, clickable */
.ve-seed-input-wrap .ve-seed-save-btn.is-valid {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.ve-seed-input-wrap .ve-seed-save-btn.is-valid:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Disabled (empty OR duplicate name) — same greyed look in both cases */
.ve-seed-input-wrap .ve-seed-save-btn:disabled {
  cursor: not-allowed;
}

.ve-seed-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  transition: opacity 0.15s ease;
}

.ve-seed-actions.is-disabled {
  opacity: 0.25;
  pointer-events: none;
}

.ve-seed-actions .ve-seed-share-link {
  flex: 1;
  margin-top: 0;
}

.ve-seed-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.ve-seed-phrase {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', 'Menlo', monospace;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.03em;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-seed-copy {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s ease;
}

.ve-seed-copy:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.ve-seed-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  color: inherit;
  font-size: 11px;
  font-family: inherit;
  padding: 8px 10px;
}

.ve-seed-input:focus {
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-seed-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .ve-seed-phrase {
  color: rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-seed-copy {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-seed-copy:hover {
  color: rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-seed-input {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ve-seed-input:focus {
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .ve-seed-input::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

/* ============================================
   TRACK ANALYSIS DISPLAY
   ============================================ */

.ve-field-label--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ve-analysis-refresh {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
  transition: color 0.15s ease;
}

.ve-analysis-refresh:hover {
  color: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .ve-analysis-refresh {
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ve-analysis-refresh:hover {
  color: rgba(0, 0, 0, 0.6);
}

/* ============================================
   PLAYLIST TRACKLIST
   ============================================ */

.ve-playlist-tracks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-playlist-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 2px;
  border-radius: 4px;
  cursor: grab;
  transition: background 0.1s ease;
}

.ve-playlist-track:hover {
  background: rgba(255, 255, 255, 0.04);
}

.ve-playlist-track.is-dragging {
  opacity: 0.3;
}

.ve-playlist-track.is-pinned {
  background: rgba(72, 219, 251, 0.06);
}

.ve-playlist-track-drag {
  color: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  cursor: grab;
  flex-shrink: 0;
}

.ve-playlist-track-num {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  width: 16px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.ve-playlist-track-title {
  flex: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-playlist-track-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.ve-playlist-track:hover .ve-playlist-track-actions {
  opacity: 1;
}

.ve-playlist-track.is-pinned .ve-playlist-pin {
  opacity: 1;
}

.ve-playlist-track-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 2px;
  font-size: 11px;
  transition: color 0.1s ease;
}

.ve-playlist-track-btn:hover {
  color: rgba(255, 255, 255, 0.7);
}

.ve-playlist-track.is-pinned .ve-playlist-pin {
  color: #48dbfb;
}

.ve-playlist-unhide-all {
  width: 100%;
  padding: 6px;
  margin-top: 4px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-playlist-unhide-all:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.ve-excluded-accordion {
  margin-top: 6px;
}

.ve-excluded-toggle {
  width: 100%;
  padding: 6px 8px;
  border: none;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.12s ease;
}

.ve-excluded-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.6);
}

.ve-excluded-arrow {
  font-size: 8px;
  transition: transform 0.15s ease;
  display: inline-block;
}

.ve-excluded-arrow.is-open {
  transform: rotate(90deg);
}

.ve-excluded-list {
  padding-top: 4px;
}

.ve-excluded-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 8px;
  border-radius: 3px;
}

.ve-excluded-track:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ve-excluded-track-title {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-excluded-restore {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 2px;
  font-size: 12px;
  transition: color 0.12s ease;
}

.ve-excluded-restore:hover {
  color: #4ade80;
}

[data-theme="light"] .ve-playlist-track:hover { background: rgba(0, 0, 0, 0.03); }
[data-theme="light"] .ve-playlist-track.is-pinned { background: rgba(72, 219, 251, 0.06); }
[data-theme="light"] .ve-playlist-track-drag { color: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .ve-playlist-track-num { color: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .ve-playlist-track-title { color: rgba(0, 0, 0, 0.7); }
[data-theme="light"] .ve-playlist-track-btn { color: rgba(0, 0, 0, 0.3); }
[data-theme="light"] .ve-playlist-track-btn:hover { color: rgba(0, 0, 0, 0.6); }
[data-theme="light"] .ve-playlist-unhide-all { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.4); }
[data-theme="light"] .ve-excluded-toggle { background: rgba(0, 0, 0, 0.02); color: rgba(0, 0, 0, 0.4); }
[data-theme="light"] .ve-excluded-toggle:hover { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .ve-excluded-track-title { color: rgba(0, 0, 0, 0.35); }
[data-theme="light"] .ve-excluded-restore { color: rgba(0, 0, 0, 0.2); }

/* ============================================
   PLAYLIST FILTERS
   ============================================ */

.ve-filter-box {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  cursor: text;
}

.ve-filter-box:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-filter-chips {
  display: contents;
}

.ve-filter-chip {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  font-size: 10px;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.ve-chip-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 0 2px;
  font-family: inherit;
}

.ve-chip-remove:hover {
  color: rgba(255, 255, 255, 0.7);
}

.ve-filter-keywords {
  flex: 1;
  min-width: 80px;
  border: none;
  background: none;
  outline: none;
  color: inherit;
  font-size: 10px;
  font-family: inherit;
  padding: 3px 0;
}

.ve-filter-keywords::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

.ve-filter-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.ve-filter-checkbox input {
  margin: 0;
  cursor: pointer;
}

[data-theme="light"] .ve-filter-checkbox { color: rgba(0, 0, 0, 0.5); }
[data-theme="light"] .ve-filter-box { border-color: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.02); }
[data-theme="light"] .ve-filter-box:focus-within { border-color: rgba(0, 0, 0, 0.2); }
[data-theme="light"] .ve-filter-chip { border-color: rgba(0, 0, 0, 0.1); background: rgba(0, 0, 0, 0.04); color: rgba(0, 0, 0, 0.6); }
[data-theme="light"] .ve-chip-remove { color: rgba(0, 0, 0, 0.25); }
[data-theme="light"] .ve-chip-remove:hover { color: rgba(0, 0, 0, 0.6); }
[data-theme="light"] .ve-filter-keywords::placeholder { color: rgba(0, 0, 0, 0.3); }

/* ============================================
   PLAYLIST DESCRIBE
   ============================================ */

.ve-describe-container {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  margin-bottom: 4px;
}

.ve-describe-input {
  flex: 1;
  resize: none;
  font-size: 11px;
  line-height: 1.4;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-family: inherit;
}

.ve-describe-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
}

.ve-describe-btn {
  padding: 6px 12px;
  border: 1px solid rgba(72, 219, 251, 0.3);
  border-radius: 4px;
  background: rgba(72, 219, 251, 0.1);
  color: #48dbfb;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.ve-describe-btn:hover {
  background: rgba(72, 219, 251, 0.2);
  border-color: rgba(72, 219, 251, 0.5);
}

.ve-describe-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

[data-theme="light"] .ve-describe-input {
  border-color: rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .ve-describe-input::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ve-describe-btn {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
}

[data-theme="light"] .ve-describe-btn:hover {
  background: rgba(59, 130, 246, 0.15);
}

/* ============================================
   PLAYLIST GRAPH
   ============================================ */

.ve-graph-container {
  margin-bottom: 4px;
}

.ve-graph-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 2px;
  margin-bottom: 8px;
}

.ve-graph-tab {
  flex: 1;
  padding: 5px 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.ve-graph-tab:hover { color: rgba(255, 255, 255, 0.6); }
.ve-graph-tab.is-active { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.9); }

.ve-graph-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  isolation: isolate;
}

.ve-graph-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 25% 25%;
  pointer-events: none;
}

.ve-graph-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ve-graph-selector {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid white;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 10;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.ve-graph-selector:active { cursor: grabbing; }

.ve-graph-selector-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.ve-graph-flow-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

.ve-graph-label {
  position: absolute;
  font-size: 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
  opacity: 0.7;
}

.ve-graph-label-left { left: 6px; top: 50%; transform: translateY(-50%); }
.ve-graph-label-right { right: 6px; top: 50%; transform: translateY(-50%); }
.ve-graph-label-bottom { bottom: 4px; left: 50%; transform: translateX(-50%); }
.ve-graph-label-top { top: 4px; left: 50%; transform: translateX(-50%); }

.ve-graph-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.ve-graph-control-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.ve-graph-radius {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

.ve-graph-radius::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

.ve-graph-radius:disabled {
  opacity: 0.25;
  pointer-events: none;
}

.ve-graph-radius:disabled::-webkit-slider-thumb {
  background: rgba(255, 255, 255, 0.3);
  cursor: default;
}

.ve-graph-control-label.is-disabled {
  opacity: 0.25;
}

.ve-graph-flow-toggle,
.ve-graph-flow-clear {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.12s ease;
}

.ve-graph-flow-clear:hover {
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.ve-graph-flow-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-graph-flow-toggle.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

[data-theme="light"] .ve-graph-tabs { background: rgba(0, 0, 0, 0.04); }
[data-theme="light"] .ve-graph-tab { color: rgba(0, 0, 0, 0.35); }
[data-theme="light"] .ve-graph-tab.is-active { background: rgba(0, 0, 0, 0.08); color: rgba(0, 0, 0, 0.8); }
[data-theme="light"] .ve-graph-canvas { background: rgba(0, 0, 0, 0.02); border-color: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .ve-graph-canvas::before { background: linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px); background-size: 25% 25%; }
[data-theme="light"] .ve-graph-dot { background: rgba(0, 0, 0, 0.15); }
[data-theme="light"] .ve-graph-label { color: #3b82f6; opacity: 0.6; }
[data-theme="light"] .ve-graph-control-label { color: rgba(0, 0, 0, 0.4); }
[data-theme="light"] .ve-graph-radius { background: rgba(0, 0, 0, 0.08); }
[data-theme="light"] .ve-graph-flow-toggle { border-color: rgba(0, 0, 0, 0.1); color: rgba(0, 0, 0, 0.5); }

.ve-analysis-status {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-weight: 500;
}

.ve-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ve-status-idle {
  background: rgba(255, 255, 255, 0.2);
}

.ve-status-pending {
  background: #eab308;
  animation: statusPulse 1.5s ease-in-out infinite;
}

.ve-status-running {
  background: #3b82f6;
  animation: statusPulse 1s ease-in-out infinite;
}

.ve-status-done {
  background: #4ade80;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

[data-theme="light"] .ve-analysis-status {
  color: rgba(0, 0, 0, 0.45);
}

.ve-analysis-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  padding: 8px 0;
}

.ve-analysis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.ve-analysis-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.ve-analysis-value {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1;
}

.ve-analysis-label {
  font-size: 8px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

/* View toggle tabs */
.ve-analysis-views {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 2px;
}

.ve-analysis-view-btn {
  flex: 1;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.12s ease;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ve-analysis-view-btn:hover {
  color: rgba(255, 255, 255, 0.6);
}

.ve-analysis-view-btn.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .ve-analysis-views {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ve-analysis-view-btn {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-analysis-view-btn:hover {
  color: rgba(0, 0, 0, 0.55);
}

[data-theme="light"] .ve-analysis-view-btn.is-active {
  background: rgba(0, 0, 0, 0.08);
  color: rgba(0, 0, 0, 0.8);
}

/* View visibility */
.ve-analysis-view {
  display: none;
}

.ve-analysis-view.is-active {
  display: flex;
}

/* Per-track value labels */
.ve-analysis-bar-value {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  width: 30px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

[data-theme="light"] .ve-analysis-bar-value {
  color: rgba(0, 0, 0, 0.4);
}

/* Confidence badges */
.ve-conf-badge {
  display: inline-block;
  width: 12px;
  height: 12px;
  line-height: 12px;
  text-align: center;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 700;
  margin-left: 2px;
  vertical-align: middle;
}

.ve-conf-high {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.ve-conf-med {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.ve-conf-low {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

[data-theme="light"] .ve-conf-high {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

[data-theme="light"] .ve-conf-med {
  background: rgba(202, 138, 4, 0.1);
  color: #ca8a04;
}

[data-theme="light"] .ve-conf-low {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* Fill colours per metric */
.ve-fill-energy {
  background: linear-gradient(90deg, #4ade80, #eab308, #f87171);
}

.ve-fill-bpm {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.ve-fill-loudness {
  background: linear-gradient(90deg, #6ee7b7, #fbbf24, #f87171);
}

.ve-analysis-bars {
  flex-direction: column;
  gap: 3px;
  max-height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.ve-analysis-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ve-analysis-bar-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  width: 70px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-analysis-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.ve-analysis-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #4ade80, #eab308, #f87171);
  transition: width 0.3s ease;
}

[data-theme="light"] .ve-analysis-empty {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-analysis-stat {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ve-analysis-value {
  color: #111;
}

[data-theme="light"] .ve-analysis-label {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-analysis-bar-label {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-analysis-bar {
  background: rgba(0, 0, 0, 0.06);
}

.ve-sticker-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-sticker-dropzone i {
  font-size: 20px;
}

.ve-sticker-dropzone span {
  font-size: 11px;
}

.ve-sticker-dropzone:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.ve-sticker-dropzone.is-dragover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  border-style: solid;
}

.ve-sticker-preview {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
}

.ve-sticker-preview img {
  display: block;
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  border-radius: 8px;
}

.ve-sticker-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.15s ease;
  border-radius: 8px;
}

.ve-sticker-preview:hover .ve-sticker-preview-overlay {
  opacity: 1;
}

.ve-sticker-preview.is-uploading {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================
   COLOR SWATCHES
   ============================================ */

.ve-color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ve-color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, border-color 0.1s ease;
  padding: 0;
  font-size: 12px;
  color: white;
}

.ve-color-swatch:hover {
  transform: scale(1.15);
}

.ve-color-swatch.is-selected {
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

[data-theme="light"] .ve-color-swatch.is-selected {
  border-color: rgba(0, 0, 0, 0.4);
}


.ve-gallery-item.is-uploading {
  opacity: 0.5;
  pointer-events: none;
}

.ve-gallery-item.is-uploading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   CREDITS LIST FIELD
   ============================================ */

.ve-credits-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ve-credits-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ve-credits-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}

.ve-credits-item:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.ve-credits-item:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Drag handle */
.ve-credits-drag-handle {
  flex-shrink: 0;
  width: 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.2);
  cursor: grab;
  transition: color 0.15s ease;
}

.ve-credits-drag-handle:hover {
  color: rgba(255, 255, 255, 0.5);
}

.ve-credits-drag-handle:active {
  cursor: grabbing;
}

/* Drag states */
.ve-credits-item.is-dragging {
  opacity: 0.5;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.ve-credits-items.is-reordering .ve-credits-item:not(.is-dragging) {
  transition: transform 0.15s ease;
}

.ve-credits-item.drag-over-above {
  box-shadow: 0 -2px 0 0 rgba(255, 255, 255, 0.55);
}

.ve-credits-item.drag-over-below {
  box-shadow: 0 2px 0 0 rgba(255, 255, 255, 0.55);
}

.ve-credits-item-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.ve-credits-label,
.ve-credits-value {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ve-credits-label::placeholder,
.ve-credits-value::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-credits-label:focus,
.ve-credits-value:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.3);
}

.ve-credits-label {
  font-weight: 500;
  font-size: 12px;
}

.ve-credits-value {
  font-size: 13px;
}

.ve-credits-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.ve-credits-remove:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.ve-credits-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-credits-add:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.9);
}

.ve-credits-add i {
  font-size: 14px;
}

/* Credits Editor (single-credit editing) */
.ve-credits-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ve-credits-editor-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.ve-credits-editor-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.ve-credits-editor-hint i {
  font-size: 16px;
}

.ve-credit-edit-inline {
  padding: 10px;
  background: rgba(96, 165, 250, 0.04);
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 8px;
}

.ve-credit-edit-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ve-credit-edit-pos {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
  min-width: 40px;
  text-align: center;
}

.ve-credit-nav-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.15s ease;
}

.ve-credit-nav-btn:hover:not([disabled]) {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.ve-credit-nav-btn[disabled] {
  opacity: 0.2;
  cursor: default;
}

.ve-credit-edit-fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ve-credit-edit-delete {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.6);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  padding: 0;
  transition: color 0.15s ease;
}

.ve-credit-edit-delete:hover {
  color: #f87171;
}

/* Artist picker */
.ve-artist-picker-btn {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.ve-artist-picker-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.ve-artist-picker-toolbar {
  display: flex;
  gap: 6px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-artist-picker-toolbar-btn {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s ease;
}

.ve-artist-picker-toolbar-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-artist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Artist picker modal — constrain content height */
.ve-video-picker-content:has(.ve-artist-grid) {
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.ve-video-picker-content:has(.ve-artist-grid) .ve-video-picker-footer {
  flex-shrink: 0;
}

.ve-video-picker-content:has(.ve-artist-grid) .ve-video-picker-confirm {
  width: 100%;
}

.ve-artist-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  transition: all 0.15s ease;
  position: relative;
  opacity: 0.35;
}

.ve-artist-grid-item.is-selected {
  opacity: 1;
}

.ve-artist-grid-item.is-current {
  opacity: 1;
  cursor: default;
}

.ve-artist-grid-item:hover:not(.is-current) {
  background: rgba(255, 255, 255, 0.06);
}

.ve-artist-grid-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.3);
  font-size: 24px;
}

.ve-artist-grid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-artist-grid-item.is-selected .ve-artist-grid-img {
  box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.6);
}

.ve-artist-grid-name {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  line-height: 14px;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ve-artist-grid-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8px;
  padding: 1px 4px;
  background: rgba(74, 222, 128, 0.2);
  color: rgba(74, 222, 128, 0.8);
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Share link button (playlist seed) */
.ve-seed-share-link {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.ve-seed-share-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Seed paste (generate button / visibility) */
.ve-seed-paste-row {
  display: flex;
  gap: 4px;
  align-items: stretch;
  width: 100%;
}

.ve-seed-paste-row .ve-field-input {
  flex: 1;
  height: 36px;
  box-sizing: border-box;
}

.ve-seed-paste-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.12s ease;
  box-sizing: border-box;
}

.ve-seed-paste-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-seed-paste-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(74, 222, 128, 0.7);
}

.ve-seed-paste-status i {
  font-size: 13px;
}

/* Preset picker (visibility dropdown) */
.ve-preset-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ve-preset-picker-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  text-align: center;
}

.ve-preset-picker-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(74, 222, 128, 0.7);
}

.ve-preset-picker-status i {
  font-size: 13px;
}

/* Track search (playlist) */
.ve-track-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.ve-track-search-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.2);
}

.ve-track-search-input-wrap i {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  flex-shrink: 0;
}

.ve-track-search-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.ve-track-search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-track-search-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
  max-height: 240px;
  overflow-y: auto;
}

.ve-track-search-result {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  gap: 10px;
  transition: background 0.1s ease;
}

.ve-track-search-result:hover:not(.is-added):not(.is-excluded) {
  background: rgba(255, 255, 255, 0.06);
}

.ve-track-search-result.is-added {
  opacity: 0.35;
  cursor: default;
}

.ve-track-search-result.is-excluded {
  opacity: 0.35;
}

.ve-track-search-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ve-track-search-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.ve-track-search-title {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ve-track-search-artist {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ve-track-search-add,
.ve-track-search-exclude,
.ve-track-search-restore {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 13px;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.ve-track-search-add:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.ve-track-search-exclude:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.ve-track-search-restore:hover {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.3);
  color: #4ade80;
}

.ve-track-search-excluded-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(239, 68, 68, 0.5);
  flex-shrink: 0;
}


.ve-track-search-added {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.ve-track-search-empty {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   SAVING STATE
   ============================================ */

.ve-btn-done.is-saving {
  opacity: 0.7;
  pointer-events: none;
}

.ve-spin {
  animation: ve-spin 0.8s linear infinite;
}

@keyframes ve-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   TABBED PANEL (Artist Editor)
   ============================================ */

.ve-tabbed-panel {
  width: 340px;
}

.ve-tabbed-panel .ve-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-panel-tabs {
  display: flex;
  gap: 4px;
}

.ve-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.8);
}

.ve-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ve-tab i {
  font-size: 14px;
}

.ve-tab-content .ve-panel-body {
  flex: 1;
  overflow-y: auto;
}

/* Social Links */
.ve-social-links-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-social-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.ve-social-link-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.ve-social-link-item .ve-input {
  font-size: 12px;
  padding: 8px 10px;
}

.ve-btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.ve-btn-icon:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.ve-btn-sm {
  font-size: 12px;
  padding: 6px 12px;
}

.ve-btn-add-social {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.ve-btn-add-social:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Component categories in Page Editor tab */
.ve-component-category {
  margin-bottom: 16px;
}

.ve-category-title {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.ve-category-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ve-component-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md) var(--spacing-sm);
  background: var(--ve-surface-subtle);
  border: 1px solid var(--ve-border-subtle);
  border-radius: var(--radius-md);
  cursor: grab;
  transition: all var(--duration-fast) ease;
  font-size: 11px;
  color: var(--ve-text-secondary);
}

.ve-component-item:hover {
  background: var(--ve-surface-active);
  border-color: var(--ve-border);
  color: var(--ve-text);
}

.ve-component-item.is-dragging {
  opacity: 0.5;
}

.ve-component-item i {
  font-size: 18px;
  color: var(--ve-text-tertiary);
}

.ve-component-item:hover i {
  color: var(--ve-text-secondary);
}

/* Input with inner button (e.g., slug refresh) */
.ve-input-inner-btn {
  position: relative;
}

.ve-input-inner-btn .ve-form-input {
  padding-right: 36px;
}

.ve-input-inner-action {
  position: absolute;
  right: var(--spacing-xs);
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: var(--ve-surface-active);
  color: var(--ve-text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  transition: all 0.15s ease;
  padding: 0;
}

.ve-input-inner-action:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.ve-input-inner-action i {
  display: block;
  line-height: 1;
}

/* Slug row styles */
.ve-slug-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ve-slug-value {
  flex: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.ve-slug-change-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-slug-change-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Slug change modal */
.ve-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ve-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ve-modal {
  width: 380px;
  background: var(--bg-color, #131313);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ve-modal-overlay.is-open .ve-modal {
  transform: scale(1) translateY(0);
}

.ve-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ve-modal-header i {
  font-size: 18px;
  color: #f59e0b;
}

.ve-modal-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.ve-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.15s ease;
}

.ve-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.ve-modal-body {
  padding: 20px;
}

.ve-modal-warning {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm, 6px);
  margin-bottom: 16px;
}

.ve-modal-warning i {
  font-size: 16px;
  color: #f59e0b;
  flex-shrink: 0;
  margin-top: 2px;
}

.ve-modal-warning p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0;
}

.ve-modal-form-group {
  margin-bottom: 16px;
}

.ve-modal-form-group:last-child {
  margin-bottom: 0;
}

.ve-modal-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.ve-modal-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm, 6px);
  outline: none;
  transition: all 0.15s ease;
}

.ve-modal-input:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4);
}

.ve-modal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.ve-modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: flex-end;
}

.ve-modal-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm, 6px);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ve-modal-btn-secondary {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.ve-modal-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ve-modal-btn-danger {
  color: #fff;
  background: #dc2626;
  border: 1px solid #dc2626;
}

.ve-modal-btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.ve-modal-btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ve-modal-error {
  font-size: 12px;
  color: #f87171;
  margin-top: 6px;
}

/* ============================================
   LIGHT MODE OVERRIDES
   ============================================ */

[data-theme="light"] .ve-component-tray {
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-tray-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-tray-title {
  color: #111;
  font-weight: 600;
}

[data-theme="light"] .ve-tray-close {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-tray-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #111;
}

[data-theme="light"] .ve-tabs {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-tab {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-tab:hover {
  background: rgba(0, 0, 0, 0.04);
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .ve-tab.is-active {
  background: rgba(0, 0, 0, 0.06);
  color: #111;
}

[data-theme="light"] .ve-category-title {
  color: rgba(0, 0, 0, 0.35);
  font-weight: 600;
  letter-spacing: 0.08em;
}

[data-theme="light"] .ve-component {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #333;
}

[data-theme="light"] .ve-component:hover {
  background: #f0f0f1;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-component i {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .ve-component span {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 500;
}

[data-theme="light"] .ve-component-featured {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-component-featured:hover {
  background: #f0f0f1;
  border-color: rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .ve-settings-form .ve-form-label {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-form-input,
[data-theme="light"] .ve-form-textarea {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #333;
}

[data-theme="light"] .ve-form-input:focus,
[data-theme="light"] .ve-form-textarea:focus {
  border-color: rgba(0, 0, 0, 0.3);
  background: #fff;
}

[data-theme="light"] .ve-form-input::placeholder,
[data-theme="light"] .ve-form-textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .ve-form-image {
  background: #d1d5db;
  border-color: #9ca3af;
}

[data-theme="light"] .ve-form-image-preview {
  background: #d1d5db;
}

[data-theme="light"] .ve-form-image-btn {
  background: #9ca3af;
  color: #374151;
}

[data-theme="light"] .ve-form-image-btn:hover {
  background: #6b7280;
  color: #fff;
}

[data-theme="light"] .ve-form-image-empty {
  color: #6b7280;
}

[data-theme="light"] .ve-tray-footer {
  background: #ffffff;
  border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-btn-done {
  background: #333;
  color: #fff;
}

[data-theme="light"] .ve-btn-done:hover {
  background: #222;
}

[data-theme="light"] .ve-social-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-social-title {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-social-add {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-social-add:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-social-item {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-social-icon {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-social-input {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-social-input:focus {
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .ve-social-remove {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-social-remove:hover {
  color: #dc2626;
}

/* Properties panel light mode */
[data-theme="light"] .ve-properties-panel {
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-properties-title {
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-properties-close {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-properties-close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

[data-theme="light"] .ve-drag-handle {
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ve-properties-body {
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

[data-theme="light"] .ve-properties-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

/* Accordion - light mode */
[data-theme="light"] .ve-accordion-row {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-accordion-header:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ve-accordion-row.is-expanded .ve-accordion-header {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ve-accordion-icon {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-accordion-row.is-expanded .ve-accordion-icon {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .ve-accordion-title {
  color: #374151;
}

[data-theme="light"] .ve-accordion-row.is-expanded .ve-accordion-title {
  color: #1f2937;
}

[data-theme="light"] .ve-accordion-chevron {
  color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .ve-accordion-row.is-expanded .ve-accordion-chevron {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-accordion-row .ve-accordion-content {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .ve-no-fields {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-field-label {
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .ve-field-input,
[data-theme="light"] .ve-field-textarea,
[data-theme="light"] .ve-field-select {
  background: #f7f7f8;
  border-color: rgba(0, 0, 0, 0.08);
  color: #222;
}

[data-theme="light"] .ve-field-input:focus,
[data-theme="light"] .ve-field-textarea:focus,
[data-theme="light"] .ve-field-select:focus {
  border-color: rgba(0, 0, 0, 0.2);
  background: #fff;
}

[data-theme="light"] .ve-btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ve-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-edit-info-wrapper {
  border-top-color: rgba(0, 0, 0, 0.08);
}

/* Buttons - clean for light mode */
[data-theme="light"] .ve-btn-publish {
  background: #111;
  color: #fff;
}

[data-theme="light"] .ve-btn-publish:hover:not(:disabled) {
  background: #333;
}

[data-theme="light"] .ve-btn-publish:disabled {
  background: #e5e5e5;
  color: #aaa;
}

[data-theme="light"] .ve-btn-duplicate {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-btn-duplicate:hover {
  background: #eee;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ve-btn-discard {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-btn-discard:hover:not(:disabled) {
  background: #eee;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ve-btn-icon {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .ve-btn-icon:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Toggle switch - light mode */
[data-theme="light"] .ve-toggle {
  background: #e5e5e5;
}

[data-theme="light"] .ve-toggle input:checked + .ve-toggle-slider {
  background: #4b5563;
}

[data-theme="light"] .ve-toggle-slider {
  background: #d1d5db;
}

[data-theme="light"] .ve-toggle-slider::before {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Form groups toggle row - light mode */
[data-theme="light"] .ve-form-group--toggle .ve-form-label {
  color: #374151;
}

/* Draft status - light mode */
[data-theme="light"] .ve-draft-status {
  color: #6b7280;
}

[data-theme="light"] .ve-draft-status.has-unsaved {
  color: #059669;
}

[data-theme="light"] .ve-draft-text {
  color: #374151;
}

/* Form select - light mode */
[data-theme="light"] .ve-form-select {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.15);
  color: #333;
}

[data-theme="light"] .ve-form-select:focus {
  border-color: rgba(0, 0, 0, 0.3);
}

/* Social dropdown - light mode */
[data-theme="light"] .ve-social-dropdown {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .ve-social-dropdown-item {
  color: #333;
}

[data-theme="light"] .ve-social-dropdown-item:hover {
  background: #f3f4f6;
}

[data-theme="light"] .ve-social-dropdown-empty {
  color: #9ca3af;
}

/* Slug row - light mode */
[data-theme="light"] .ve-slug-value {
  color: #6b7280;
}

[data-theme="light"] .ve-slug-change-btn {
  color: #4b5563;
  background: #f3f4f6;
  border-color: #d1d5db;
}

[data-theme="light"] .ve-slug-change-btn:hover {
  color: #374151;
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* YouTube section - light mode */
[data-theme="light"] .ve-youtube-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-youtube-title {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-youtube-refresh {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .ve-youtube-refresh:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

[data-theme="light"] .ve-youtube-status {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-youtube-channel {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .ve-youtube-channel-name {
  color: #333;
}

[data-theme="light"] .ve-youtube-channel-handle {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-youtube-channel-subs {
  color: rgba(0, 0, 0, 0.4);
}

/* Gallery YouTube Import - light mode */
[data-theme="light"] .ve-gallery-youtube-import {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-gallery-youtube-import:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.6);
}

/* Gallery Video URL Input - light mode */
[data-theme="light"] .ve-gallery-video-url {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

[data-theme="light"] .ve-gallery-video-url::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-gallery-video-url:focus {
  border-color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .ve-gallery-video-url-add {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.2);
  color: #6366f1;
}

[data-theme="light"] .ve-gallery-video-url-add:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Video Picker Modal - light mode */
[data-theme="light"] .ve-video-picker-content {
  background: #fff;
}

[data-theme="light"] .ve-video-picker-header {
}

[data-theme="light"] .ve-video-picker-header h3 {
  color: #333;
}

[data-theme="light"] .ve-video-picker-close {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-video-picker-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

[data-theme="light"] .ve-video-picker-item {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .ve-video-picker-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-video-picker-title {
  color: #9A9A9A;
}

[data-theme="light"] .ve-video-picker-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-video-picker-count {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-video-picker-count .count {
  color: #333;
}

[data-theme="light"] .ve-video-picker-cancel {
  border-color: rgba(0, 0, 0, 0.15);
  color: #555;
}

[data-theme="light"] .ve-video-picker-cancel:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.2);
}

/* Links section - light mode */
[data-theme="light"] .ve-links-section {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-links-toggle {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-links-toggle:hover {
  color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .ve-links-header {
  color: rgba(0, 0, 0, 0.5);
}

/* Link items - light mode */
[data-theme="light"] .ve-link-item {
  color: #333;
}

[data-theme="light"] .ve-link-thumb {
  background: #f3f4f6;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-link-item:hover .ve-link-thumb {
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .ve-link-info {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-link-item:hover .ve-link-info {
  border-color: rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .ve-link-title {
  color: #333;
}

[data-theme="light"] .ve-link-item.is-draft .ve-link-status {
  color: #9ca3af;
}

[data-theme="light"] .ve-links-empty {
  color: #9ca3af;
}

/* Version history - light mode */
[data-theme="light"] .ve-version-history {
  border-top-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-version-title {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-version-refresh {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-version-refresh:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

[data-theme="light"] .ve-version-list {
  scrollbar-color: rgba(0, 0, 0, 0.1) transparent;
}

[data-theme="light"] .ve-version-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .ve-version-item {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .ve-version-item:hover {
  background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .ve-version-item.is-previewing {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.5);
}

[data-theme="light"] .ve-version-date {
  color: #333;
}

[data-theme="light"] .ve-version-type {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .ve-version-btn {
  border-color: rgba(0, 0, 0, 0.15);
  color: #4b5563;
}

[data-theme="light"] .ve-version-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.25);
  color: #333;
}

[data-theme="light"] .ve-version-loading,
[data-theme="light"] .ve-version-empty {
  color: #9ca3af;
}

/* Input with inner button - light mode */
[data-theme="light"] .ve-input-inner-action {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .ve-input-inner-action:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.08);
}

/* ============================================
   BUTTON COMPONENT WIREFRAME PREVIEWS
   ============================================ */

/* Button component preview - narrow row with icon */
.ve-button-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.ve-button-preview .ve-button-icon {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ve-button-preview .ve-button-icon i {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.ve-button-preview .ve-button-text {
  flex: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.ve-button-preview .ve-button-arrow {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
}

/* ============================================
   LINK COMPONENT WIREFRAME PREVIEWS
   ============================================ */

/* Link component preview container */
.ve-link-preview {
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  margin-top: 8px;
}

/* Card variant - 2-column layout */
.ve-link-preview--card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ve-link-preview--card .ve-link-media {
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ve-link-preview--card .ve-link-media i {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.3);
}

.ve-link-preview--card .ve-link-media img,
.ve-link-preview--card .ve-link-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ve-link-preview--card .ve-link-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.ve-link-preview--card .ve-link-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ve-link-preview--card .ve-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  width: fit-content;
}

/* Hero variant - full-width callout */
.ve-link-preview--hero {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ve-link-preview--hero .ve-link-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ve-link-preview--hero .ve-link-media img,
.ve-link-preview--hero .ve-link-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.ve-link-preview--hero .ve-link-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  z-index: 1;
}

.ve-link-preview--hero .ve-link-headline {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  z-index: 2;
  text-align: left;
  line-height: 1.2;
}

.ve-link-preview--hero .ve-link-bottom {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
}

.ve-link-preview--hero .ve-link-desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  line-height: 1.4;
}

.ve-link-preview--hero .ve-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}

/* Hero portrait variant - 4:5 aspect ratio */
.ve-link-preview--hero-portrait {
  aspect-ratio: 4/5;
}

/* Empty media placeholder icon */
.ve-link-preview .ve-link-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ve-link-preview .ve-link-media-empty i {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.2);
}

/* ── Cheatcode Builder ── */
.ve-cheatcode-builder {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ve-cheatcode-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ve-cheatcode-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ve-cheatcode-section-header .ve-cheatcode-counter {
  margin-left: auto;
  font-weight: 400;
}

.ve-cheatcode-counter {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
}

/* ── Desktop: key pills ── */
.ve-cheatcode-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 28px;
}

.ve-cheatcode-key-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 12px;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.8);
}

.ve-cheatcode-key-pill-num {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-family: -apple-system, sans-serif;
  margin-right: 2px;
}

.ve-cheatcode-key-pill-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  margin-left: 2px;
  transition: color 0.15s;
}

.ve-cheatcode-key-pill-remove:hover {
  color: #f87171;
}

.ve-cheatcode-record-keys-btn {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ve-cheatcode-record-keys-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

.ve-cheatcode-record-keys-btn.is-recording {
  background: rgba(248, 113, 113, 0.15);
  border-color: #f87171;
  color: #f87171;
  animation: ve-cheatcode-pulse 1.5s ease-in-out infinite;
}

@keyframes ve-cheatcode-pulse {
  0%, 100% { border-color: rgba(248, 113, 113, 0.5); }
  50% { border-color: rgba(248, 113, 113, 1); }
}

/* ── Mobile: 3x3 grid ── */
.ve-cheatcode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
}

.ve-cheatcode-grid-cell {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: background 0.1s, color 0.1s, transform 0.1s, border-color 0.1s;
}

.ve-cheatcode-grid-cell:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
}

.ve-cheatcode-grid-cell:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
}

.ve-cheatcode-grid-cell.is-active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.7);
}

.ve-cheatcode-grid-orders {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  font-family: monospace;
  line-height: 1;
}

.ve-cheatcode-grid-label {
  font-size: 8px;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: absolute;
  bottom: 6px;
}

.ve-cheatcode-grid-cell.is-active .ve-cheatcode-grid-label {
  color: rgba(255, 255, 255, 0.35);
}

.ve-cheatcode-grid-cell:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Multi-touch ── */
.ve-cheatcode-multitouch {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

/* ── Mobile: zone pills ── */
.ve-cheatcode-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 28px;
}

.ve-cheatcode-zone-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.ve-cheatcode-zone-pill-num {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
  margin-right: 2px;
}

.ve-cheatcode-zone-pill-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  margin-left: 2px;
  transition: color 0.15s;
}

.ve-cheatcode-zone-pill-remove:hover {
  color: #f87171;
}

/* ── Shared: action buttons ── */
.ve-cheatcode-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ve-cheatcode-clear-btn:disabled {
  opacity: 0.2;
  cursor: default;
}

.ve-cheatcode-clear-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}

.ve-cheatcode-clear-btn:hover:not(:disabled) {
  color: #f87171;
}

.ve-cheatcode-key-capture-inner i {
  font-size: 28px;
  animation: ve-cheatcode-pulse 1.5s ease-in-out infinite;
}
