/* Editor Variables - Isolated from app theme */
:root {
  --editor-bg: #1a1a1a;
  --editor-content-bg: #121212;
  --editor-panel-bg: #1a1a1a;
  --editor-panel-border: #2a2a2a;
  --editor-panel-text: #e0e0e0;
  --editor-panel-text-muted: #808080;
  --editor-button-bg: #2a2a2a;
  --editor-button-hover: #3a3a3a;
  --editor-accent: #7c4dfd;
  --editor-accent-hover: #9370ff;
  --editor-success: #22c55e;
  --editor-error: #ef4444;
}

/* Hide editor for non-admins */
body:not(.user-admin) .floating-edit-btn,
body:not(.user-admin) .apex-zone-overlay,
body:not(.user-admin) .editor-panel {
  display: none !important;
}

/* Floating Edit Button */
.floating-edit-btn {
  position: fixed;
  bottom: 30px;
  right: 40px;
  background: var(--editor-button-bg);
  color: var(--editor-panel-text);
  border: none;
  padding: 15px 25px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  z-index: 1000;
}

@media (max-width: 768px) {
  .floating-edit-btn {
    display: none !important;
  }
}

.floating-edit-btn:hover {
  background: var(--editor-button-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.5);
}

.floating-edit-btn.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.editor-mode .floating-edit-btn {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hide editor scrollbar when not active */
.editor-content {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.editor-content::-webkit-scrollbar {
  display: none;
}

.editor-canvas.active .editor-content {
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.editor-canvas.active .editor-content::-webkit-scrollbar {
  display: block;
  width: 6px;
  height: 6px;
}

.editor-canvas.active .editor-content::-webkit-scrollbar-track {
  background: var(--editor-panel-bg);
}

.editor-canvas.active .editor-content::-webkit-scrollbar-thumb {
  background: var(--editor-panel-border);
  border-radius: 3px;
}

.editor-canvas.active .editor-content::-webkit-scrollbar-thumb:hover {
  background: var(--editor-button-hover);
}

/* Editor Content Loading State */
.editor-content.loading {
  filter: blur(20px);
  pointer-events: none;
  transition: none;
  position: relative;
}

.editor-content:not(.loading) {
  filter: blur(0);
  transition: filter 0.4s ease 0.2s;
}

/* Loader Overlay */
.editor-content-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.editor-content.loading ~ .editor-content-loader {
  display: flex;
}

body.editor-mode .editor-content.loading ~ .editor-content-loader {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.editor-loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--editor-panel-border);
  border-top-color: var(--editor-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.editor-loader-text {
  color: var(--editor-panel-text);
  font-size: 14px;
  font-weight: 500;
  background: var(--editor-panel-bg);
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Editor Canvas */
.editor-canvas {
  display: flex;
  width: 100%;
  min-height: 100dvh;
  min-height: var(--full-vh, 100vh);
  position: relative;
}

body.editor-mode .editor-canvas {
  background: var(--editor-bg);
  /* In editor mode, use 100vh directly because the editor manages its own zoom */
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}

body.editor-mode .app-content-container {
  /* Reset for editor mode - no zoom compensation here */
  max-height: none;
}

/* Editor mode with top navbar - content must be able to scroll freely */
body.editor-mode.navbar-position-top .app-content-container {
  max-height: none;
  overflow: visible;
  height: auto;
}

body.editor-mode.navbar-position-top #app {
  display: block;
  height: auto;
  min-height: auto;
  overflow: visible;
}

body.editor-mode.navbar-position-top .editor-content {
  overflow-y: auto;
}

/* Editor Panels */
.editor-panel {
  width: 0;
  min-width: 0;
  max-width: 0;
  background: var(--editor-panel-bg);
  color: var(--editor-panel-text);
  padding: 0;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition:
    width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s,
    min-width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s,
    max-width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s,
    padding 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.2s;
}

.editor-panel-content {
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 280px;
  overflow: hidden;
}

.editor-canvas.active .editor-panel-content {
  opacity: 1;
  transition: opacity 0.3s ease 2s;
}

.editor-panel.active,
.editor-canvas.active .editor-panel {
  width: 320px;
  min-width: 320px;
  max-width: 320px;
  padding: 0;
  overflow: hidden;
  /* In editor mode, use 100vh directly */
  height: 100vh;
}

.editor-left {
  border-right: 2px solid var(--editor-panel-border);
}

/* Panel Structure */
.editor-panel-header {
  padding: 15px 15px 0 15px;
  border-bottom: none;
}

.editor-panel-header h4 {
  display: none;
}

.editor-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.editor-panel-footer {
  padding: 15px;
  padding-top:0;
}

.editor-panel h4 {
  color: var(--editor-panel-text);
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
}

.editor-panel p {
  color: var(--editor-panel-text-muted);
  font-size: 14px;
}

/* Editor Tabs - Modern Pill Style */
.editor-tabs {
  display: flex;
  gap: 0;
  background: var(--editor-content-bg);
  border-radius: 12px;
  padding: 4px;
  width: 100%;
}

.editor-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.editor-tab:hover {
  color: var(--editor-panel-text);
}

.editor-tab.active {
  background: var(--editor-accent);
  color: white;
  box-shadow: 0 2px 8px rgba(124, 77, 253, 0.4);
}

.editor-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.editor-tab span {
  display: inline;
  white-space: nowrap;
}

/* Editor Sections */
.editor-section {
  margin-bottom: 20px;
}

.editor-category {
  margin-bottom: 20px;
}

.editor-category-title {
  color: var(--editor-panel-text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px 0;
}

/* Components Grid */
.editor-components-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.editor-component-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  cursor: grab;
  transition: all 0.2s ease;
}

.editor-component-item:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-text-muted);
  transform: translateY(-2px);
}

.editor-component-item:active {
  cursor: grabbing;
}

.editor-component-icon {
  color: var(--editor-panel-text);
  opacity: 0.8;
}

.editor-component-name {
  color: var(--editor-panel-text);
  font-size: 11px;
  font-weight: 500;
}

.editor-text-muted {
  color: var(--editor-panel-text-muted);
  font-size: 13px;
}

/* Close Button */
.editor-close-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--editor-button-bg);
  color: var(--editor-panel-text);
  border: 1px solid var(--editor-panel-border);
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.editor-close-btn:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-text-muted);
}

/* Editor Content (Page au milieu) */
.editor-content {
  flex: 1;
  background: var(--editor-content-bg);
  overflow: hidden;
  display: block;
  position: relative;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 100%;
  box-shadow: none;
  border-radius: 0;
  transition:
    background 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    padding 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    margin 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    width 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    height 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    border-radius 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s,
    box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.6s;
}

.editor-canvas.active .editor-content {
  margin: 15px;
  width: calc(100% - 30px);
  /* Use var(--full-vh) to compensate for HTML zoom */
  height: calc(var(--full-vh, 100vh) - 30px);
  overflow: hidden;
  min-height: auto;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
  border-radius: 0;
}

/* App zoom in editor mode */
.editor-canvas #app {
  zoom: 1;
  transition: zoom 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-canvas.active #app {
  zoom: 0.75;
  /* Height compensated: (100vh - 60px) / 0.75 to account for padding/margin */
  height: 100%;
  min-height: 0;
}

.editor-canvas.active #app > .flex-grow-1 {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Override body when editor is active */
body.editor-mode {
  overflow: hidden;
}

/* ============================================ */
/* EDITABLE ZONES STYLING                       */
/* ============================================ */

/* Editable zone container */
.apex-editable-zone {
  position: relative;
  transition: all 0.3s ease;
}

/* ---- Empty zone hiding ---- */
/* Normal mode: empty zones are hidden */
.apex-editable-zone.apex-zone-empty,
.apex-dynamic-zone.apex-zone-empty {
  display: none;
}
/* Editor mode: empty zones visible with placeholder */
body.editor-mode .apex-editable-zone.apex-zone-empty,
body.editor-mode .apex-dynamic-zone.apex-zone-empty {
  display: block;
  opacity: 0.45;
  min-height: 60px;
  border: 2px dashed rgba(124, 77, 253, 0.35);
  border-radius: 12px;
  background: rgba(124, 77, 253, 0.04);
}
body.editor-mode .apex-editable-zone.apex-zone-empty:hover,
body.editor-mode .apex-dynamic-zone.apex-zone-empty:hover {
  opacity: 0.7;
}

.apex-editable-zone .apex-zone-content {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Overlay for the edit button */
.apex-editable-zone .apex-zone-overlay {
  position: absolute;
  top: -15px;
  right: -15px;
  left: auto;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 9999;
}

/* Show the overlay only in editor mode */
body.editor-mode .apex-editable-zone:hover .apex-zone-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.editor-mode .apex-editable-zone:hover {
  outline: 2px dashed var(--editor-accent);
  outline-offset: 4px;
}

/* Zone edit button */
.apex-zone-edit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: var(--editor-accent);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: all 0.2s ease;
}

.apex-zone-edit-btn:hover {
  background: var(--editor-accent-hover);
  transform: scale(1.1);
}

.apex-zone-edit-btn span {
  display: none;
}

.apex-zone-edit-btn i {
  font-size: 16px;
}

/* ============================================ */
/* ZONE ITEMS IN PANEL                          */
/* ============================================ */

.editor-zone-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.editor-zone-item:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  transform: translateX(4px);
}

.editor-zone-icon {
  color: var(--editor-accent);
  opacity: 0.8;
}

.editor-zone-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-zone-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-zone-current {
  font-size: 11px;
  color: var(--editor-accent-hover);
}

.editor-zone-arrow {
  color: var(--editor-panel-text-muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.editor-zone-item:hover .editor-zone-arrow {
  transform: translateX(4px);
  color: var(--editor-accent);
}

/* Subcategory */
.editor-subcategory {
  margin-bottom: 15px;
}

.editor-subcategory-title {
  font-size: 10px;
  color: var(--editor-accent-hover);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  padding-left: 5px;
}

/* Separator */
.editor-separator {
  border: none;
  border-top: 1px solid var(--editor-panel-border);
  margin: 20px 0;
}

/* Loading */
.editor-loading {
  text-align: center;
  padding: 20px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
}

.editor-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.editor-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--editor-panel-border);
  border-top-color: var(--editor-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================ */
/* ZONE SELECTOR (Component picker)             */
/* ============================================ */

.apex-zone-selector {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.apex-zone-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--editor-panel-border);
  margin-bottom: 15px;
}

.apex-zone-selector-header h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.apex-zone-selector-close {
  background: transparent;
  border: none;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.apex-zone-selector-close:hover {
  background: var(--editor-button-bg);
  color: var(--editor-panel-text);
}

.apex-zone-selector-list {
  flex: 1;
  overflow-y: auto;
}

.apex-zone-selector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: var(--editor-button-bg);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.apex-zone-selector-item:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-border);
}

.apex-zone-selector-item.active {
  border-color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.1);
}

.apex-zone-selector-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
}

.apex-zone-selector-item.active .apex-zone-selector-item-icon {
  background: var(--editor-accent);
  color: white;
}

.apex-zone-selector-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apex-zone-selector-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.apex-zone-selector-item-desc {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

.apex-zone-selector-item-active {
  color: var(--editor-accent);
  font-weight: bold;
  font-size: 18px;
}

/* ============================================ */
/* EDITOR NAVIGATION SYSTEM (Elementor-like)    */
/* ============================================ */

/* Page container */
.editor-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: editorPageIn 0.25s ease;
}

@keyframes editorPageIn {
  from {
    opacity: 0;
    transform: translateX(15px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Page header with back button */
.editor-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.editor-back-btn:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  color: var(--editor-accent);
}

.editor-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-left: auto;
}

.editor-delete-btn:hover {
  background: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #dc3545;
}

.editor-page-title {
  flex: 1;
}

.editor-page-title h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-page-title span {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

/* Main categories list */
.editor-categories-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-category-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 16px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-category-card:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  transform: translateY(-2px);
}

.editor-category-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--editor-accent) 0%,
    var(--editor-accent-hover) 100%
  );
  border-radius: 12px;
  color: white;
  font-size: 20px;
}

.editor-category-info {
  flex: 1;
}

.editor-category-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--editor-panel-text);
  margin-bottom: 4px;
}

.editor-category-desc {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.editor-category-arrow {
  color: var(--editor-panel-text-muted);
  font-size: 18px;
  transition: transform 0.2s ease;
}

.editor-category-card:hover .editor-category-arrow {
  transform: translateX(5px);
  color: var(--editor-accent);
}

/* Zone page content */
.editor-zone-page-content {
  flex: 1;
}

.editor-zone-section {
  margin-bottom: 20px;
}

.editor-zone-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--editor-panel-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  padding-left: 4px;
}

/* Component cards in zone page */
.editor-component-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--editor-button-bg);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.editor-component-card:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-border);
}

.editor-component-card.active {
  border-color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.1);
}

.editor-component-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-panel-border);
  border-radius: 10px;
  color: var(--editor-panel-text);
  flex-shrink: 0;
}

.editor-component-card.active .editor-component-card-icon {
  background: var(--editor-accent);
  color: white;
}

.editor-component-card-info {
  flex: 1;
}

.editor-component-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
  margin-bottom: 3px;
}

.editor-component-card-desc {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

/* New card layout: main + actions */
.editor-component-card-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding-right: 10px;
}

.editor-component-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.editor-component-config-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 6px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-component-config-btn:hover {
  background: var(--editor-button-hover);
  color: var(--editor-accent);
  border-color: var(--editor-accent);
}

.editor-component-card-check {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-accent);
  border-radius: 50%;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* ============================================ */
/* CONFIG PAGE STYLES                           */
/* ============================================ */

.editor-config-page-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding:15px 0;
}

.editor-config-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.editor-config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.editor-config-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--editor-panel-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-config-input,
.editor-config-textarea {
  padding: 10px 12px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 13px;
  transition: all 0.2s ease;
}

.editor-config-input:focus,
.editor-config-textarea:focus {
  outline: none;
  border-color: var(--editor-accent);
  background: var(--editor-button-hover);
}

.editor-config-input::placeholder,
.editor-config-textarea::placeholder {
  color: var(--editor-panel-text-muted);
  opacity: 0.7;
}

.editor-config-textarea {
  resize: vertical;
  min-height: 80px;
}

.editor-config-color-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editor-config-color {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--editor-panel-border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
}

.editor-config-color::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-config-color::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.editor-config-color-value {
  font-size: 13px;
  color: var(--editor-panel-text-muted);
  font-family: monospace;
}

/* Checkbox field */
.editor-config-checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.editor-config-checkbox-wrapper:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-border);
}

.editor-config-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--editor-panel-border);
  border-radius: 4px;
  background: var(--editor-content-bg);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.editor-config-checkbox:hover {
  border-color: var(--editor-accent);
}

.editor-config-checkbox:checked {
  background: var(--editor-accent);
  border-color: var(--editor-accent);
}

.editor-config-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.editor-config-checkbox-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--editor-panel-text);
  cursor: pointer;
  flex: 1;
  margin: 0;
}

.editor-config-checkbox:checked + .editor-config-checkbox-label {
  color: var(--editor-accent);
}

/* Config actions removed - changes are now auto-queued and saved via Save All */

.editor-config-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  background: rgba(124, 77, 253, 0.08);
  border: 1px solid rgba(124, 77, 253, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.editor-config-note svg {
  flex-shrink: 0;
  color: var(--editor-accent);
  margin-top: 2px;
}

/* Preview badge */
.editor-preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(124, 77, 253, 0.15);
  border: 1px dashed var(--editor-accent);
  border-radius: 8px;
  color: var(--editor-accent);
  font-size: 12px;
  margin-top: 15px;
}

.editor-preview-badge i {
  font-size: 14px;
}

/* ============================================ */
/* IMAGE SELECTOR FIELD STYLES                  */
/* ============================================ */

.editor-image-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-image-selector .editor-image-preview {
  width: 100%;
  height: 120px;
  background: var(--editor-content-bg);
  border: 2px solid var(--editor-panel-border);
  border-radius: 10px;
  overflow: hidden;
}

.editor-image-selector .editor-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.editor-image-actions {
  display: flex;
  gap: 8px;
}

.editor-image-select-btn,
.editor-image-reset-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-image-select-btn:hover {
  background: var(--editor-accent);
  border-color: var(--editor-accent);
}

.editor-image-reset-btn {
  flex: 0 0 auto;
  background: transparent;
}

.editor-image-reset-btn:hover {
  background: var(--editor-error);
  border-color: var(--editor-error);
}

.editor-image-select-btn svg,
.editor-image-reset-btn svg {
  width: 14px;
  height: 14px;
}

/* Image Selector Modal */
.editor-image-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.editor-image-modal {
  width: 90%;
  max-width: 600px;
  max-height: 80dvh;
  max-height: calc(var(--full-vh, 100vh) * 0.8);
  background: var(--editor-panel-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editor-image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-image-modal-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-image-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--editor-button-bg);
  border: none;
  border-radius: 8px;
  color: var(--editor-panel-text);
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-image-modal-close:hover {
  background: var(--editor-error);
}

.editor-image-modal-close svg {
  width: 16px;
  height: 16px;
}

.editor-image-modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.editor-image-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--editor-panel-text-muted);
  font-size: 14px;
}

.editor-image-section {
  margin-bottom: 20px;
}

.editor-image-section:last-child {
  margin-bottom: 0;
}

.editor-image-section-title {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-panel-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.editor-image-item {
  position: relative;
  aspect-ratio: 1;
  background: var(--editor-content-bg);
  border: 2px solid var(--editor-panel-border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-image-item:hover {
  border-color: var(--editor-accent);
  transform: translateY(-2px);
}

.editor-image-item.selected {
  border-color: var(--editor-success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.editor-image-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  background: var(--editor-content-bg);
}

.editor-image-item-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  font-size: 11px;
  color: white;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-image-item-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: var(--editor-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.editor-image-item-check svg {
  width: 12px;
  height: 12px;
}

.editor-image-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--editor-panel-text-muted);
  font-size: 14px;
}

/* ============================================ */
/* SETTINGS SECTION STYLES                      */
/* ============================================ */

.editor-settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mode Selector */
.editor-settings-mode {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--editor-button-bg);
  border-radius: 10px;
}

.editor-settings-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-settings-mode-btn:hover {
  color: var(--editor-panel-text);
  background: var(--editor-button-hover);
}

.editor-settings-mode-btn.active {
  background: var(--editor-accent);
  color: white;
}

.editor-settings-mode-btn svg {
  width: 16px;
  height: 16px;
}

/* Settings Content */
.editor-settings-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-settings-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.editor-settings-block:first-child {
  margin-bottom: 0;
}

.editor-settings-title {
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-panel-text);
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-settings-desc {
  margin: 0;
  font-size: 12px;
  color: var(--editor-panel-text-muted);
  line-height: 1.5;
}

/* Color Picker */
.editor-settings-color-picker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-color-input-large {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--editor-panel-border);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  background: transparent;
}

.editor-color-input-large::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-color-input-large::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.editor-color-value {
  font-size: 12px;
  font-weight: 500;
  color: var(--editor-panel-text-muted);
  font-family: monospace;
}

/* Preview Grid */
.editor-settings-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-preview-grid {
  display: flex;
  gap: 8px;
}

.editor-preview-swatch {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  border: 2px solid var(--editor-panel-border);
  transition: transform 0.2s ease;
}

.editor-preview-swatch:hover {
  transform: scale(1.05);
}

/* Custom Colors List */
.editor-custom-colors-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-custom-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--editor-button-bg);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.editor-custom-color-row:hover {
  background: var(--editor-button-hover);
}

.editor-custom-color-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-custom-color-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--editor-panel-text);
}

.editor-custom-color-desc {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

.editor-custom-color-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-color-input-small {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 2px solid var(--editor-panel-border);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
  background: transparent;
}

.editor-color-input-small::-webkit-color-swatch-wrapper {
  padding: 0;
}

.editor-color-input-small::-webkit-color-swatch {
  border: none;
  border-radius: 6px;
}

.editor-custom-color-value {
  font-size: 10px;
  font-weight: 500;
  color: var(--editor-panel-text-muted);
  font-family: monospace;
  min-width: 60px;
}

/* Settings Actions */
.editor-settings-actions {
  padding-top: 10px;
  border-top: 1px solid var(--editor-panel-border);
}

.editor-settings-reset-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-settings-reset-btn:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  color: var(--editor-accent);
}

.editor-settings-reset-btn svg {
  width: 16px;
  height: 16px;
}

/* Settings Note */
.editor-settings-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: rgba(124, 77, 253, 0.08);
  border: 1px solid rgba(124, 77, 253, 0.2);
  border-radius: 8px;
  font-size: 11px;
  color: var(--editor-panel-text-muted);
  line-height: 1.4;
}

.editor-settings-note svg {
  flex-shrink: 0;
  color: var(--editor-accent);
  margin-top: 1px;
}

/* ============================================ */
/* SETTINGS CATEGORIES NAVIGATION               */
/* ============================================ */

.editor-settings-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-settings-category-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-settings-category-card:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  transform: translateY(-2px);
}

.editor-settings-category-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 16px;
}

.editor-settings-category-icon svg {
  width: 20px;
  height: 20px;
}

.editor-settings-category-card:hover .editor-settings-category-icon {
  background: var(--editor-accent);
  color: white;
}

.editor-settings-category-info {
  flex: 1;
}

.editor-settings-category-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
  margin-bottom: 3px;
}

.editor-settings-category-desc {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

.editor-settings-category-arrow {
  color: var(--editor-panel-text-muted);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.editor-settings-category-arrow svg {
  width: 18px;
  height: 18px;
}

.editor-settings-category-card:hover .editor-settings-category-arrow {
  transform: translateX(5px);
  color: var(--editor-accent);
}

/* Settings Page (after clicking category) */
.editor-settings-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  animation: editorPageIn 0.25s ease;
}

.editor-settings-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-settings-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.editor-settings-back-btn:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-accent);
  color: var(--editor-accent);
}

.editor-settings-page-title {
  flex: 1;
}

.editor-settings-page-title h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-settings-page-title span {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
}

.editor-settings-page-content {
  padding:10px 0;
  flex: 1;
}

/* ============================================ */
/* LAYOUT SETTINGS - Option Cards               */
/* ============================================ */

.editor-layout-option-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.editor-layout-option-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--editor-panel-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.editor-layout-options {
  display: flex;
  gap: 10px;
}

.editor-layout-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 15px 12px;
  background: var(--editor-button-bg);
  border: 2px solid var(--editor-panel-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-layout-option:hover {
  background: var(--editor-button-hover);
  border-color: var(--editor-panel-text-muted);
}

.editor-layout-option.active {
  border-color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.1);
}

.editor-layout-option-preview {
  width: 60px;
  height: 45px;
  background: var(--editor-panel-border);
  border-radius: 6px;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* Preview visuals for navbar position */
.editor-layout-option-preview.navbar-left {
  flex-direction: row;
}

.editor-layout-option-preview.navbar-left::before {
  content: "";
  width: 12px;
  height: 100%;
  background: var(--editor-accent);
  border-radius: 4px 0 0 4px;
}

.editor-layout-option-preview.navbar-top {
  flex-direction: column;
}

.editor-layout-option-preview.navbar-top::before {
  content: "";
  width: 100%;
  height: 10px;
  background: var(--editor-accent);
  border-radius: 4px 4px 0 0;
}

/* Preview visuals for navbar style */
.editor-layout-option-preview.navbar-detached {
  padding: 4px;
}

.editor-layout-option-preview.navbar-detached::before {
  content: "";
  width: 12px;
  height: calc(100% - 8px);
  background: var(--editor-accent);
  border-radius: 4px;
  margin: auto 0;
}

.editor-layout-option-preview.navbar-attached::before {
  content: "";
  width: 12px;
  height: 100%;
  background: var(--editor-accent);
  border-radius: 0;
}

.editor-layout-option-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-layout-option.active .editor-layout-option-name {
  color: var(--editor-accent);
}

.editor-layout-option-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--editor-accent);
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
}

.editor-layout-option.active .editor-layout-option-check {
  display: flex;
}

/* ============================================ */
/* NAVBAR LAYOUT VARIATIONS                     */
/* ============================================ */

/* Default: Left navbar, detached */
#app {
  display: flex;
  flex-direction: row;
}

/* Navbar Position: Top */
body.navbar-position-top #app {
  flex-direction: column;
}

body.navbar-position-top #navbar-wrapper {
  width: 100%;
  padding: 15px 20px;
}

body.navbar-position-top #navbar {
  flex-direction: row;
  height: auto;
  width: 100%;
  padding: 10px 20px;
}

body.navbar-position-top .navbar-links {
  flex-direction: row;
  flex: 1;
  justify-content: center;
}

body.navbar-position-top #navbar > a:first-child {
  padding: 0 20px 0 10px;
}

body.navbar-position-top #navbar > a:last-child {
  padding: 0 10px 0 20px;
  margin: 0;
}

body.navbar-position-top .navbar-link {
  width: 50px;
  height: 50px;
  font-size: 18px;
}

body.navbar-position-top .highlight-2 {
  display: none;
}

/* Navbar Style: Attached (no margin, stuck to edges) */
body.navbar-style-attached #navbar-wrapper {
  padding: 0;
}

body.navbar-style-attached #navbar {
  border-radius: 0;
  height: 100dvh;
  height: var(--full-vh, 100vh);
}

body.navbar-style-attached .highlight-2 {
  display: none;
}

/* Attached + Top combination */
body.navbar-style-attached.navbar-position-top #navbar {
  height: auto;
  border-radius: 0;
}

body.navbar-style-attached.navbar-position-top #navbar-wrapper {
  padding: 0;
}

/* Detached (default) adjustments */
body.navbar-style-detached #navbar-wrapper {
  padding: 20px;
}

body.navbar-style-detached #navbar {
  border-radius: 10px;
  height: calc(100dvh - 40px);
  height: calc(var(--full-vh, 100vh) - 40px);
}

body.navbar-style-detached.navbar-position-top #navbar {
  height: auto;
  border-radius: 10px;
}

body.navbar-style-detached.navbar-position-top #navbar-wrapper {
  padding: 15px 20px;
}

/* Content adjustments for top navbar */
body.navbar-position-top .app-content-container {
  height: auto;
  max-height: none;
  padding-left: 20px;
}

body.navbar-style-attached.navbar-position-top .app-content-container {
  height: auto;
  max-height: none;
}

/* ============================================
   EDITOR MODE OVERRIDES - Reset viewport units
   In editor mode, use 100vh directly because 
   the editor has its own zoom system (0.75)
   ============================================ */
body.editor-mode.navbar-style-attached #navbar {
  height: 100%;
}

body.editor-mode.navbar-style-detached #navbar {
  height: 100%;
}

/* Editor mode with top navbar - no fixed height, natural scroll */
body.editor-mode.navbar-position-top .app-content-container {
  height: auto;
  max-height: none;
  overflow: visible;
}

body.editor-mode.navbar-style-attached.navbar-position-top .app-content-container {
  height: auto;
  max-height: none;
  overflow: visible;
}

/* ============================================
   SAVE BAR - Global Save System
   ============================================ */

.editor-save-bar {
  background: linear-gradient(
    135deg,
    rgba(124, 77, 253, 0.15),
    rgba(124, 77, 253, 0.05)
  );
  border: 1px solid rgba(124, 77, 253, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 0 16px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.editor-save-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--editor-accent);
  font-size: 13px;
  font-weight: 500;
}

.editor-save-bar-info svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.editor-save-bar-actions {
  display: flex;
  gap: 8px;
}

.editor-discard-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--editor-panel-border);
  color: var(--editor-panel-text-muted);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.editor-discard-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--editor-panel-text-muted);
  color: var(--editor-panel-text);
}

.editor-save-all-btn {
  flex: 2;
  background: var(--editor-accent);
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.editor-save-all-btn:hover {
  background: var(--editor-accent-hover);
  transform: translateY(-1px);
}

.editor-save-all-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.editor-save-all-btn svg {
  width: 14px;
  height: 14px;
}

/* Save Message */
.editor-save-message {
  padding: 8px 16px;
  margin: 0 16px 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.editor-save-message-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--editor-success);
}

.editor-save-message-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--editor-error);
}

/* Reset Configuration Bar */
.editor-reset-bar {
  padding: 0 16px 12px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--editor-panel-border);
}

.editor-reset-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: transparent;
  border: 1px dashed var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-reset-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--editor-error);
  border-style: solid;
  color: var(--editor-error);
}

.editor-reset-btn svg {
  width: 14px;
  height: 14px;
}

.editor-save-message-info {
  background: rgba(124, 77, 253, 0.15);
  border: 1px solid rgba(124, 77, 253, 0.3);
  color: var(--editor-accent);
}

/* Info badge variants */
.editor-preview-badge-info,
.editor-config-note-info,
.editor-settings-note-info {
  background: rgba(124, 77, 253, 0.1);
  border: 1px solid rgba(124, 77, 253, 0.2);
  color: var(--editor-accent);
}

.editor-preview-badge-info i,
.editor-config-note-info svg,
.editor-settings-note-info svg {
  color: var(--editor-accent);
}

/* ============================================
   IMAGES SETTINGS PAGE
   ============================================ */

.editor-images-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Toolbar - Upload & Refresh */
.editor-images-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.editor-images-upload-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--editor-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-images-upload-btn:hover {
  background: var(--editor-accent-hover);
}

.editor-images-upload-btn svg {
  width: 14px;
  height: 14px;
}

.editor-images-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 6px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-images-toolbar-btn:hover {
  background: var(--editor-button-hover);
  color: var(--editor-panel-text);
  border-color: transparent;
}

.editor-images-toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.editor-images-toolbar-btn svg {
  width: 16px;
  height: 16px;
}

/* Progress Bar */
.editor-images-progress {
  width: 100%;
  height: 3px;
  background: var(--editor-panel-border);
  border-radius: 2px;
  overflow: hidden;
}

.editor-images-progress-bar {
  height: 100%;
  background: var(--editor-accent);
  transition: width 0.3s ease;
}

/* Messages */
.editor-images-message {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.editor-images-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--editor-error);
}

.editor-images-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--editor-success);
}

/* Loading State */
.editor-images-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
}

.editor-images-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--editor-panel-border);
  border-top-color: var(--editor-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Images Grid - Google Style Compact */
.editor-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 2px;
}

.editor-images-grid::-webkit-scrollbar {
  width: 4px;
}

.editor-images-grid::-webkit-scrollbar-track {
  background: transparent;
}

.editor-images-grid::-webkit-scrollbar-thumb {
  background: var(--editor-panel-border);
  border-radius: 2px;
}

/* Image Card - Compact Google Style */
.editor-image-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  background: var(--editor-content-bg);
  cursor: pointer;
  flex-shrink: 0;
  height: 100px; /* Fixed height on card */
}

.editor-image-preview {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--editor-content-bg);
}

.editor-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.editor-image-card:hover .editor-image-preview img {
  transform: scale(1.08);
}

/* Overlay with actions */
.editor-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.editor-image-card:hover .editor-image-overlay {
  opacity: 1;
}

.editor-image-overlay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-image-overlay-btn:hover {
  background: var(--editor-accent);
  transform: scale(1.1);
}

.editor-image-overlay-delete:hover {
  background: var(--editor-error);
}

.editor-image-overlay-btn svg {
  width: 14px;
  height: 14px;
}

/* Empty State */
.editor-images-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 16px;
  text-align: center;
}

.editor-images-empty-icon {
  font-size: 36px;
  opacity: 0.5;
}

.editor-images-empty p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-images-empty span {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

}

.editor-images-empty p {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-images-empty span {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

/* ============================================ */
/* DYNAMIC ZONES - Multi-component areas */
/* ============================================ */

/* Dynamic zone container */
.apex-dynamic-zone {
  position: relative;
  transition: all 0.3s ease;
}

body:not(.user-admin) .apex-dynamic-zone-overlay,
body:not(.user-admin) .apex-dynamic-item-overlay {
  display: none !important;
}

/* Dynamic zone overlay (add button) */
.apex-dynamic-zone-overlay {
  display: none;
  justify-content: center;
  padding: 20px;
  border: 2px dashed rgba(124, 77, 253, 0.3);
  border-radius: 12px;
  background: rgba(124, 77, 253, 0.05);
  margin-top: 16px;
  transition: all 0.3s ease;
}

body.editor-mode .apex-dynamic-zone-overlay {
  display: flex;
}

.apex-dynamic-zone-overlay:hover {
  border-color: rgba(124, 77, 253, 0.5);
  background: rgba(124, 77, 253, 0.1);
}

/* Add button in dynamic zone */
.apex-dynamic-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--editor-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.apex-dynamic-add-btn:hover {
  background: var(--editor-accent-hover);
  transform: translateY(-2px);
}

/* Dynamic item wrapper */
.apex-dynamic-item {
  position: relative;
  transition: all 0.3s ease;
}

body.editor-mode .apex-dynamic-item {
  border: 2px solid transparent;
  border-radius: 12px;
}

body.editor-mode .apex-dynamic-item:hover {
  border-color: rgba(124, 77, 253, 0.3);
}

/* Dynamic item overlay */
.apex-dynamic-item-overlay {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

body.editor-mode .apex-dynamic-item-overlay {
  display: flex;
}

.apex-dynamic-item-actions {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  padding: 6px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

body.editor-mode .apex-dynamic-item:hover .apex-dynamic-item-actions {
  opacity: 1;
  transform: translateY(0);
}

.apex-dynamic-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  transition: all 0.15s ease;
}

.apex-dynamic-btn:hover {
  background: var(--editor-accent);
  transform: scale(1.1);
}

.apex-dynamic-btn.apex-dynamic-delete:hover {
  background: var(--editor-error);
}

.apex-dynamic-item-label {
  display: none;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
}

body.editor-mode .apex-dynamic-item:hover .apex-dynamic-item-label {
  display: block;
}

/* ============================================ */
/* DYNAMIC ZONE EDITOR PAGE */
/* ============================================ */

.editor-dynamic-add-btn-large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-dynamic-add-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 77, 253, 0.4);
}

.editor-dynamic-components-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-dynamic-component-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.editor-dynamic-component-item:hover {
  border-color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.05);
}

.editor-dynamic-component-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.editor-dynamic-component-order {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--editor-accent);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.editor-dynamic-component-info {
  flex: 1;
}

.editor-dynamic-component-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-dynamic-component-desc {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
  margin-top: 2px;
}

.editor-dynamic-component-actions {
  display: flex;
  gap: 4px;
}

.editor-dynamic-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--editor-button-bg);
  border: none;
  border-radius: 6px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-dynamic-action-btn:hover {
  background: var(--editor-button-hover);
  color: var(--editor-panel-text);
}

.editor-dynamic-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--editor-error);
}

.editor-dynamic-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--editor-panel-text-muted);
}

.editor-dynamic-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.editor-dynamic-empty p {
  margin: 0;
  font-size: 14px;
}

/* ============================================ */
/* ADD COMPONENT MODAL */
/* ============================================ */

.editor-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.editor-modal {
  background: var(--editor-panel-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.editor-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-modal-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.editor-modal-close:hover {
  background: var(--editor-button-bg);
  color: var(--editor-panel-text);
}

.editor-modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ============================================ */
/* ADD COMPONENT MODAL - ENHANCED DESIGN */
/* ============================================ */

.editor-modal.editor-add-modal {
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
}

.editor-add-modal .editor-modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--editor-panel-border);
}

.editor-add-modal .editor-modal-header h5 {
  font-size: 20px;
  font-weight: 700;
}

.editor-add-modal .editor-modal-content {
  padding: 0;
}

.editor-add-components-wrapper {
  padding: 24px 28px;
}

.editor-add-components-search {
  position: relative;
  margin-bottom: 20px;
}

.editor-add-components-search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 12px;
  color: var(--editor-panel-text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.editor-add-components-search input:focus {
  outline: none;
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 253, 0.15);
}

.editor-add-components-search input::placeholder {
  color: var(--editor-panel-text-muted);
}

.editor-add-components-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--editor-panel-text-muted);
  width: 18px;
  height: 18px;
}

.editor-add-components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .editor-add-components-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .editor-add-components-grid {
    grid-template-columns: 1fr;
  }
}

.editor-add-component-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.editor-add-component-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--editor-accent), #9370ff);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.editor-add-component-card:hover {
  border-color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(124, 77, 253, 0.2);
}

.editor-add-component-card:hover::before {
  opacity: 1;
}

.editor-add-component-card:active {
  transform: translateY(-2px);
}

.editor-add-component-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(124, 77, 253, 0.3);
  transition: all 0.25s ease;
}

.editor-add-component-card:hover .editor-add-component-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(124, 77, 253, 0.4);
}

.editor-add-component-icon svg {
  color: white;
  width: 24px;
  height: 24px;
}

.editor-add-component-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--editor-panel-text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.editor-add-component-desc {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.editor-add-components-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--editor-panel-text-muted);
}

.editor-add-components-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.editor-add-components-empty p {
  font-size: 14px;
  margin: 0;
}

/* ============================================ */
/* SELECT FIELD STYLE */
/* ============================================ */

.editor-config-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23808080' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.editor-config-select:hover {
  border-color: var(--editor-accent);
}

.editor-config-select:focus {
  outline: none;
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 253, 0.2);
}

.editor-config-select option {
  background: var(--editor-panel-bg);
  color: var(--editor-panel-text);
}

/* Dynamic zone card indicator */
.editor-component-card.dynamic-zone {
  border-left: 3px solid var(--editor-accent);
}

/* ============================================ */
/* CODE EDITOR MODAL STYLES */
/* ============================================ */

.code-editor-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.code-editor-modal {
  width: 95vw;
  height: 90vh;
  max-width: 1400px;
  background: var(--editor-panel-bg);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--editor-panel-border);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.code-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--editor-content-bg);
  border-bottom: 1px solid var(--editor-panel-border);
}

.code-editor-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.code-editor-title svg {
  color: var(--editor-accent);
}

.code-editor-actions {
  display: flex;
  gap: 12px;
}

.code-editor-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.code-editor-btn.secondary {
  background: var(--editor-button-bg);
  color: var(--editor-panel-text);
}

.code-editor-btn.secondary:hover {
  background: var(--editor-button-hover);
}

.code-editor-btn.primary {
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  color: white;
}

.code-editor-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(124, 77, 253, 0.4);
}

.code-editor-tabs {
  display: flex;
  gap: 0;
  background: var(--editor-content-bg);
  border-bottom: 1px solid var(--editor-panel-border);
  padding: 0 24px;
}

.code-editor-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: none;
  color: var(--editor-panel-text-muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.code-editor-tab:hover {
  color: var(--editor-panel-text);
  background: rgba(255, 255, 255, 0.05);
}

.code-editor-tab.active {
  color: var(--editor-panel-text);
  background: var(--editor-panel-bg);
  border-bottom-color: var(--editor-accent);
}

.code-editor-tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.code-editor-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.code-editor-info {
  padding: 12px 24px;
  background: rgba(124, 77, 253, 0.1);
  border-bottom: 1px solid var(--editor-panel-border);
  font-size: 13px;
  color: var(--editor-panel-text-muted);
}

/* Syntax highlighted editor */
.code-editor-wrapper {
  position: relative;
  flex: 1;
  overflow: hidden;
}

.code-editor-highlight {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 20px 24px;
  background: #0d0d0d;
  color: #e0e0e0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
  pointer-events: none;
  tab-size: 2;
}

.code-editor-textarea {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: transparent;
  caret-color: #fff;
  font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  line-height: 1.6;
  resize: none;
  outline: none;
  tab-size: 2;
  z-index: 1;
}

.code-editor-textarea::placeholder {
  color: transparent;
}

.code-editor-textarea:focus {
  outline: none;
}

/* Syntax highlighting colors */
.syntax-comment { color: #6a9955; font-style: italic; }
.syntax-tag { color: #569cd6; }
.syntax-attr { color: #9cdcfe; }
.syntax-string { color: #ce9178; }
.syntax-bracket { color: #808080; }
.syntax-doctype { color: #569cd6; }
.syntax-selector { color: #d7ba7d; }
.syntax-property { color: #9cdcfe; }
.syntax-value { color: #ce9178; }
.syntax-number { color: #b5cea8; }
.syntax-keyword { color: #c586c0; }
.syntax-builtin { color: #4ec9b0; }
.syntax-function { color: #dcdcaa; }
.syntax-boolean { color: #569cd6; }

.code-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--editor-content-bg);
  border-top: 1px solid var(--editor-panel-border);
}

.code-editor-shortcuts {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.code-editor-security {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.code-editor-security svg {
  width: 14px;
  height: 14px;
  color: var(--editor-accent);
}

/* ============================================ */
/* CODE EDITOR SECTION IN CONFIG PAGE */
/* ============================================ */

.editor-code-section {
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.editor-code-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-code-section-header svg {
  color: var(--editor-accent);
}

.editor-code-description {
  font-size: 13px;
  color: var(--editor-panel-text-muted);
  margin-bottom: 16px;
}

.editor-open-code-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-open-code-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 77, 253, 0.4);
}

.editor-open-code-btn svg {
  width: 18px;
  height: 18px;
}

.editor-code-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--editor-panel-border);
}

.editor-code-preview-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--editor-button-bg);
  border-radius: 6px;
  font-size: 12px;
}

.code-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.code-badge.html {
  background: rgba(227, 76, 38, 0.2);
  color: #e34c26;
}

.code-badge.css {
  background: rgba(38, 77, 228, 0.2);
  color: #264de4;
}

.code-badge.js {
  background: rgba(247, 223, 30, 0.2);
  color: #f7df1e;
}

.code-lines {
  color: var(--editor-panel-text-muted);
}

/* ============================================
   BIG FOOTER SETTINGS - NEW CARD DESIGN
   ============================================ */

.footer-config-card {
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.footer-config-card:hover {
  border-color: rgba(124, 77, 253, 0.3);
}

.footer-config-card.footer-config-main {
  background: linear-gradient(135deg, rgba(124, 77, 253, 0.1), rgba(147, 112, 255, 0.05));
  border-color: rgba(124, 77, 253, 0.3);
}

.footer-config-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.footer-config-card-header.clickable {
  cursor: pointer;
  transition: background 0.2s ease;
}

.footer-config-card-header.clickable:hover {
  background: rgba(255, 255, 255, 0.03);
}

.footer-config-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--editor-button-bg);
  border-radius: 10px;
  font-size: 20px;
  flex-shrink: 0;
}

.footer-config-card-icon.column-icon {
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.footer-config-card-info {
  flex: 1;
  min-width: 0;
}

.footer-config-card-info h6 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.footer-config-card-info span {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.footer-config-card-body {
  padding: 0 18px 18px 18px;
  border-top: 1px solid var(--editor-panel-border);
  margin-top: 0;
  padding-top: 16px;
}

.footer-config-field {
  margin-bottom: 14px;
}

.footer-config-field:last-child {
  margin-bottom: 0;
}

.footer-config-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--editor-panel-text-muted);
  margin-bottom: 6px;
}

.footer-config-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--editor-panel-border);
  margin-top: 10px;
}

.footer-config-toggle-row span {
  font-size: 13px;
  color: var(--editor-panel-text);
}

.footer-config-section-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 20px 0 12px 0;
  padding-left: 4px;
}

.footer-config-section-title span {
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-panel-text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-config-section-title small {
  font-size: 11px;
  color: var(--editor-panel-text-muted);
  font-weight: 400;
}

/* Column cards */
.footer-column-card .footer-config-card-header {
  position: relative;
}

.footer-column-chevron {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-panel-text-muted);
  transition: transform 0.3s ease;
}

.footer-column-chevron svg {
  width: 16px;
  height: 16px;
}

.footer-column-card.expanded .footer-column-chevron {
  transform: rotate(90deg);
}

.footer-column-card .footer-config-card-body {
  display: none;
}

.footer-column-card.expanded .footer-config-card-body {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-config-hint {
  display: block;
  font-size: 11px;
  color: var(--editor-panel-text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

.footer-links-textarea {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
}

/* Links Preview */
.footer-links-preview {
  margin-top: 14px;
  padding: 12px;
  background: var(--editor-button-bg);
  border-radius: 8px;
}

.footer-links-preview label {
  font-size: 11px;
  font-weight: 600;
  color: var(--editor-panel-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.footer-links-preview ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-preview li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-links-preview li:last-child {
  border-bottom: none;
}

.footer-links-preview .link-label {
  color: var(--editor-panel-text);
  font-weight: 500;
}

.footer-links-preview .link-arrow {
  color: var(--editor-panel-text-muted);
  font-size: 10px;
}

.footer-links-preview .link-url {
  color: var(--editor-accent);
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 11px;
}

/* ============================================
   FOOTER COLUMN EDITOR - Visual Link Editor
   ============================================ */

.footer-column-editor {
  background: var(--editor-content-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.footer-column-editor:hover {
  border-color: rgba(124, 77, 253, 0.3);
}

.footer-column-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.footer-column-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.footer-column-number {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  border-radius: 8px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.footer-column-info {
  flex: 1;
  min-width: 0;
}

.footer-column-info strong {
  display: block;
  font-size: 14px;
  color: var(--editor-panel-text);
  margin-bottom: 2px;
}

.footer-column-info small {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.footer-column-chevron {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--editor-panel-text-muted);
  transition: transform 0.3s ease;
}

.footer-column-chevron svg {
  width: 16px;
  height: 16px;
}

.footer-column-editor.expanded .footer-column-chevron {
  transform: rotate(90deg);
}

.footer-column-content {
  padding: 16px;
  border-top: 1px solid var(--editor-panel-border);
  animation: slideDown 0.2s ease;
}

/* Links Editor */
.footer-links-editor {
  margin-top: 12px;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.footer-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  padding: 10px 12px;
  transition: all 0.2s ease;
}

.footer-link-item:hover {
  border-color: rgba(124, 77, 253, 0.4);
  background: rgba(124, 77, 253, 0.08);
}

.footer-link-item.editing {
  background: rgba(124, 77, 253, 0.1);
  border-color: var(--editor-accent);
  padding: 12px;
}

.footer-link-drag {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-link-move-btn {
  width: 22px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 4px;
  color: var(--editor-panel-text-muted);
  font-size: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-link-move-btn:hover:not(:disabled) {
  background: var(--editor-accent);
  color: white;
}

.footer-link-move-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.footer-link-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-link-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--editor-panel-text);
}

.footer-link-url {
  font-size: 11px;
  color: var(--editor-accent);
  font-family: 'Monaco', 'Menlo', monospace;
  opacity: 0.8;
}

.footer-link-actions {
  display: flex;
  gap: 6px;
}

.footer-link-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  border-radius: 6px;
  color: var(--editor-panel-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.footer-link-action-btn svg {
  width: 14px;
  height: 14px;
}

.footer-link-action-btn.edit:hover {
  background: var(--editor-accent);
  color: white;
}

.footer-link-action-btn.delete:hover {
  background: #e74c3c;
  color: white;
}

/* Link Edit Form */
.footer-link-edit-form {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.footer-link-edit-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-link-edit-row .editor-config-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
}

.footer-link-done-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, var(--editor-accent), #9370ff);
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-link-done-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 77, 253, 0.4);
}

.footer-link-done-btn svg {
  width: 14px;
  height: 14px;
}

/* Add Link Button */
.footer-add-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 2px dashed var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.footer-add-link-btn:hover {
  border-color: var(--editor-accent);
  color: var(--editor-accent);
  background: rgba(124, 77, 253, 0.08);
}

.footer-add-link-btn svg {
  width: 16px;
  height: 16px;
}

/* Toggle Card Style */
.editor-config-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(135deg, rgba(124, 77, 253, 0.15), rgba(147, 112, 255, 0.08));
  border: 1px solid rgba(124, 77, 253, 0.3);
  border-radius: 12px;
}

.editor-config-toggle-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editor-config-toggle-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 77, 253, 0.2);
  border-radius: 8px;
  color: var(--editor-accent);
}

.editor-config-toggle-icon svg {
  width: 20px;
  height: 20px;
}

.editor-config-toggle-info strong {
  display: block;
  font-size: 14px;
  color: var(--editor-panel-text);
  margin-bottom: 2px;
}

.editor-config-toggle-info small {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}

.editor-config-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--editor-panel-text);
  margin: 20px 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--editor-panel-border);
}

/* ============================================ */
/* BIG FOOTER SETTINGS PAGE STYLES              */
/* ============================================ */

.editor-settings-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.editor-settings-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--editor-panel-text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.editor-settings-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 13px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.editor-settings-input:focus {
  outline: none;
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 253, 0.15);
}

.editor-settings-input::placeholder {
  color: var(--editor-panel-text-muted);
}

.editor-settings-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 8px;
  color: var(--editor-panel-text);
  font-size: 13px;
  resize: vertical;
  min-height: 80px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.editor-settings-textarea:focus {
  outline: none;
  border-color: var(--editor-accent);
  box-shadow: 0 0 0 3px rgba(124, 77, 253, 0.15);
}

.editor-settings-textarea::placeholder {
  color: var(--editor-panel-text-muted);
}

.editor-settings-toggle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--editor-button-bg);
  border: 1px solid var(--editor-panel-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.editor-settings-toggle-field:hover {
  background: var(--editor-button-hover);
  border-color: rgba(124, 77, 253, 0.3);
}

.editor-settings-toggle-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--editor-panel-text);
}

/* Big Footer Toggle Row */
.editor-bigfooter-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(124, 77, 253, 0.12), rgba(147, 112, 255, 0.06));
  border: 1px solid rgba(124, 77, 253, 0.25);
  border-radius: 12px;
  margin-bottom: 20px;
}

.editor-bigfooter-toggle-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.editor-bigfooter-toggle-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 77, 253, 0.2);
  border-radius: 10px;
  color: var(--editor-accent);
}

.editor-bigfooter-toggle-icon svg {
  width: 22px;
  height: 22px;
}

.editor-bigfooter-toggle-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.editor-bigfooter-toggle-text strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--editor-panel-text);
}

.editor-bigfooter-toggle-text small {
  font-size: 12px;
  color: var(--editor-panel-text-muted);
}
