/* ══════════════════════════════════════════
   edit-mode.css — Estilos del modo edición
   "in-page" de WiXArt.
   Solo se activan cuando <html> tiene .wx-edit-on
   o el botón flotante está presente.
   ══════════════════════════════════════════ */

/* ─── Botón "Modo Edición" en navbar ────── */
.navbar__edit-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-right: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  background: rgba(36, 113, 231, 0.10);
  border: 1px solid rgba(36, 113, 231, 0.40);
  color: #4DA3FF;
  border-radius: 999px;
  cursor: pointer;
  transition: all 160ms;
}
.navbar__edit-toggle:hover {
  background: rgba(36, 113, 231, 0.20);
  border-color: rgba(36, 113, 231, 0.65);
  color: #fff;
}
.navbar__edit-toggle.is-on {
  background: linear-gradient(135deg, #2471E7, #5A2DBF);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(90, 45, 191, 0.30);
}
.navbar__edit-toggle::before {
  content: '✎';
  font-size: 14px;
  line-height: 1;
}

/* Solo se muestra si el editor está habilitado en este navegador. */
html.wx-edit-enabled .navbar__edit-toggle {
  display: inline-flex;
}


/* ─── Toolbar superior del editor ───────── */
.wx-edit-toolbar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: rgba(15, 26, 51, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.40);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 13px;
  color: #fff;
  pointer-events: auto;
}

.wx-edit-toolbar__group {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}
.wx-edit-toolbar__group + .wx-edit-toolbar__group {
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  margin-left: 4px;
  padding-left: 8px;
}

.wx-edit-toolbar button {
  padding: 6px 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wx-edit-toolbar button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.wx-edit-toolbar button.is-active {
  background: rgba(36, 113, 231, 0.30);
  color: #fff;
  border-color: rgba(36, 113, 231, 0.55);
}
.wx-edit-toolbar button.btn-primary {
  background: linear-gradient(135deg, #2471E7, #1E5BBF);
  color: #fff;
}
.wx-edit-toolbar button.btn-primary:hover { filter: brightness(1.1); }
.wx-edit-toolbar button.btn-primary:disabled,
.wx-edit-toolbar button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wx-edit-toolbar button.btn-danger:hover {
  background: rgba(244, 91, 105, 0.18);
  color: #FFB4BC;
  border-color: rgba(244, 91, 105, 0.40);
}

.wx-edit-toolbar__label {
  padding: 0 6px;
  color: rgba(255, 255, 255, 0.50);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.wx-edit-toolbar__status {
  padding: 4px 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.60);
}
.wx-edit-toolbar__status.dirty   { color: #FFD06A; }
.wx-edit-toolbar__status.saved   { color: #6FFF93; }
.wx-edit-toolbar__status.error   { color: #FFB4BC; }


/* ─── Indicador de "Modo Edición Activo" en navbar ── */
html.wx-edit-on body {
  /* Padding extra arriba para no tapar la navbar con la toolbar. */
  padding-top: 56px;
}
html.wx-edit-on .navbar {
  border-bottom: 2px solid rgba(36, 113, 231, 0.55) !important;
}


/* ─── Hover de elementos editables ──────── */
html.wx-edit-on [data-content],
html.wx-edit-on [data-content-attr],
html.wx-edit-on [data-wx-editable-block] {
  outline-offset: 2px;
  cursor: pointer;
  transition: outline 120ms;
}
html.wx-edit-on [data-content]:hover,
html.wx-edit-on [data-content-attr]:hover,
html.wx-edit-on [data-wx-editable-block]:hover {
  outline: 2px dashed rgba(36, 113, 231, 0.75);
}

html.wx-edit-on .wx-edit-selected {
  outline: 2px solid #2471E7 !important;
  outline-offset: 3px;
}

html.wx-edit-on [contenteditable="true"] {
  outline: 2px solid #6FFF93 !important;
  outline-offset: 3px;
  background: rgba(111, 255, 147, 0.05);
  cursor: text !important;
}

/* En modo edición, los enlaces ancla no deben navegar al click. */
html.wx-edit-on a { cursor: pointer; }


/* ─── Panel lateral de estilos ──────────── */
.wx-edit-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 340px;
  z-index: 9997;
  background: rgba(10, 18, 36, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: -10px 0 32px rgba(0, 0, 0, 0.40);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 13px;
  overflow-y: auto;
  padding: 70px 18px 24px;
  transform: translateX(100%);
  transition: transform 200ms cubic-bezier(0.2, 0.9, 0.3, 1.05);
}
html.wx-edit-on .wx-edit-panel.is-open { transform: translateX(0); }

.wx-edit-panel__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.wx-edit-panel__close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.72);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 14px;
  cursor: pointer;
}
.wx-edit-panel__close:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.40);
}

.wx-edit-panel__selector {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.50);
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  word-break: break-all;
  margin: 8px 0 18px;
}

.wx-edit-panel__group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.wx-edit-panel__group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 8px;
  font-weight: 700;
}

.wx-edit-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.wx-edit-field:last-child { margin-bottom: 0; }
.wx-edit-field > label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.72);
  flex: 0 0 80px;
}
.wx-edit-field input[type="number"],
.wx-edit-field input[type="text"] {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 12px;
}
.wx-edit-field input:focus {
  outline: none;
  border-color: rgba(36, 113, 231, 0.65);
  background: rgba(36, 113, 231, 0.06);
}
.wx-edit-field input[type="color"] {
  width: 38px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}
.wx-edit-field select {
  flex: 1;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 12px;
}
.wx-edit-field button.wx-btn-clear {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
}
.wx-edit-field button.wx-btn-clear:hover {
  color: #FFB4BC;
  border-color: rgba(244, 91, 105, 0.40);
}

.wx-edit-panel__bp-pills {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: 999px;
}
.wx-edit-panel__bp-pills button {
  flex: 1;
  padding: 5px 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wx-edit-panel__bp-pills button.is-active {
  background: rgba(36, 113, 231, 0.45);
  color: #fff;
}
.wx-edit-panel__bp-help {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  margin: -8px 0 14px;
  line-height: 1.45;
}


/* ─── Galería modal (image picker) ──────── */
.wx-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5, 8, 18, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
}
.wx-edit-modal__card {
  width: min(720px, 100%);
  max-height: 80vh;
  background: #0F1A33;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  color: #fff;
  overflow: hidden;
}
.wx-edit-modal__head {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wx-edit-modal__title { font-size: 15px; font-weight: 700; margin: 0; }
.wx-edit-modal__body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.wx-edit-modal__foot {
  padding: 12px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.wx-edit-modal__foot button {
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.wx-edit-modal__foot button.btn-primary {
  background: linear-gradient(135deg, #2471E7, #1E5BBF);
  border-color: transparent;
}

.wx-edit-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.wx-edit-gallery__item {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
}
.wx-edit-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wx-edit-gallery__item:hover { border-color: rgba(255, 255, 255, 0.40); }
.wx-edit-gallery__item.is-selected { border-color: #2471E7; }
.wx-edit-gallery__upload {
  display: grid;
  place-items: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  border: 2px dashed rgba(255, 255, 255, 0.15);
}


/* ─── Toast del editor ──────────────────── */
.wx-edit-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 9999;
  background: rgba(15, 26, 51, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transition: all 220ms;
  pointer-events: none;
}
.wx-edit-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.wx-edit-toast.success { border-color: rgba(111, 255, 147, 0.40); }
.wx-edit-toast.error   { border-color: rgba(244, 91, 105, 0.40); color: #FFB4BC; }


/* ─── Animaciones aplicadas vía data-edit-anim ── */
[data-edit-anim="fade-up"]   { animation: wxAnimFadeUp 700ms ease both; }
[data-edit-anim="fade-in"]   { animation: wxAnimFadeIn 700ms ease both; }
[data-edit-anim="slide-up"]  { animation: wxAnimSlideUp 700ms cubic-bezier(0.2, 0.9, 0.3, 1.05) both; }
[data-edit-anim="zoom-in"]   { animation: wxAnimZoomIn 600ms ease both; }
[data-edit-anim="none"]      { animation: none !important; }

@keyframes wxAnimFadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes wxAnimFadeIn  { from { opacity: 0; }                                to { opacity: 1; } }
@keyframes wxAnimSlideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }
@keyframes wxAnimZoomIn  { from { opacity: 0; transform: scale(0.9); }       to { opacity: 1; transform: scale(1); } }


/* ─── v2.4.1: iframe preview de viewport ── */
.wx-edit-iframe-shell {
  position: fixed;
  inset: 56px 360px 0 0; /* deja sitio a toolbar arriba y panel a la derecha */
  z-index: 9996;
  background: rgba(5, 8, 18, 0.92);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}
.wx-edit-iframe-frame {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(15, 26, 51, 0.85);
  overflow: hidden;
  position: relative;
}
.wx-edit-iframe {
  border: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #fff;
}
.wx-edit-iframe-caption {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 26, 51, 0.92);
  color: rgba(255, 255, 255, 0.78);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
}

/* En modo iframe, ocultamos la página real (que está debajo). */
html.wx-edit-iframe-on body > *:not(.wx-edit-toolbar):not(.wx-edit-panel):not(.wx-edit-iframe-shell):not(.wx-edit-modal):not(.wx-edit-toast):not(.wx-edit-context-menu):not(script):not(style) {
  visibility: hidden;
}
html.wx-edit-iframe-on body { padding-top: 56px; }

/* Modo preview (dentro del iframe): nada que mostrar de UI editor */
html.wx-edit-preview .wx-edit-toolbar,
html.wx-edit-preview .wx-edit-panel,
html.wx-edit-preview .navbar__edit-toggle { display: none !important; }


/* ─── v2.4.1: Toolbar select ─────────────── */
.wx-edit-toolbar__select {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.wx-edit-toolbar__select option { background: #0F1A33; color: #fff; }


/* ─── v2.4.1: Panel pathbar y "Padre" ───── */
.wx-edit-panel__pathbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 12px;
}
.wx-edit-panel__up {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 9px;
  font: inherit;
  font-size: 11px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.wx-edit-panel__up:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.wx-edit-panel__pathbar .wx-edit-panel__selector {
  margin: 0; flex: 1;
}


/* ─── v2.4.1: Box-row (margen/padding compactos) ── */
.wx-edit-panel__box-row {
  margin-bottom: 12px;
}
.wx-edit-panel__box-title {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
}
.wx-edit-panel__box-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.wx-edit-panel__box-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wx-edit-panel__box-label {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.50);
}
.wx-edit-panel__box-cell input {
  width: 100%;
  padding: 4px 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 11px;
  text-align: center;
}


/* ─── v2.4.1: Segmented buttons (alineación) ── */
.wx-edit-segmented {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px;
  border-radius: 7px;
  flex: 1;
}
.wx-edit-segmented button {
  flex: 1;
  padding: 4px 8px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 5px;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.wx-edit-segmented button.is-active {
  background: rgba(36, 113, 231, 0.45);
  color: #fff;
}


/* ─── v2.4.1: Botón de acción dentro del panel ── */
.wx-btn-action {
  flex: 1;
  padding: 6px 10px;
  background: rgba(36, 113, 231, 0.15);
  border: 1px solid rgba(36, 113, 231, 0.45);
  color: #4DA3FF;
  border-radius: 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.wx-btn-action:hover {
  background: rgba(36, 113, 231, 0.30);
  color: #fff;
}


/* ─── v2.4.1: Color row (picker + texto) ── */
.wx-edit-panel__color-row {
  display: flex;
  gap: 6px;
  flex: 1;
}
.wx-edit-panel__color-row input[type="color"] {
  width: 32px; height: 28px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px; background: transparent; cursor: pointer;
  flex: 0 0 auto;
}
.wx-edit-panel__color-row input[type="text"] { flex: 1; min-width: 0; }


/* ─── v2.4.1: Textarea + helper text ──── */
.wx-edit-textarea {
  flex: 1;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  resize: vertical;
}
.wx-edit-help {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.45;
  flex: 1;
}
.wx-edit-mono {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  flex: 1;
}


/* ─── v2.5.0: Context menu (click derecho) ── */
.wx-edit-context-menu {
  position: fixed;
  z-index: 9999;
  min-width: 240px;
  background: rgba(15, 26, 51, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
  padding: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 13px;
  color: #fff;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 120ms, transform 120ms;
  transform-origin: top left;
}
.wx-edit-context-menu.show { opacity: 1; transform: scale(1); }
.wx-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 6px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.wx-ctx-item:hover {
  background: rgba(36, 113, 231, 0.18);
  color: #fff;
}
.wx-ctx-item.is-danger:hover { background: rgba(244, 91, 105, 0.18); color: #FFB4BC; }
.wx-ctx-icon {
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 18px;
}
.wx-ctx-label { flex: 1; }
.wx-ctx-sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 6px;
}


/* ─── v2.5.0: Galería de iconos ─────────── */
.wx-icon-search {
  width: 100%;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 7px;
  color: #fff;
  font: inherit;
  font-size: 13px;
  margin-bottom: 14px;
}
.wx-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.wx-icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 10px;
  cursor: pointer;
  transition: all 120ms;
}
.wx-icon-tile:hover {
  background: rgba(36, 113, 231, 0.15);
  border-color: rgba(36, 113, 231, 0.50);
  color: #fff;
}
.wx-icon-tile span {
  word-break: break-all;
  text-align: center;
  line-height: 1.1;
}


/* ─── v2.5.0: IA modal & paletas ────────── */
.wx-ai-modal-body { display: block; }
.wx-ai-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wx-ai-col h4 {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.wx-ai-text {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  padding: 12px;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.wx-ai-text--orig { color: rgba(255, 255, 255, 0.65); }
.wx-ai-text--out  { color: #fff; border-color: rgba(36, 113, 231, 0.40); }
.wx-ai-loading {
  color: rgba(255, 255, 255, 0.50);
  font-style: italic;
}
.wx-ai-error {
  color: #FFB4BC;
}
.wx-ai-regen {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
}
.wx-ai-regen:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.wx-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.wx-palette-tile {
  text-align: left;
  padding: 0;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: all 140ms;
  color: #fff;
}
.wx-palette-tile:hover {
  border-color: rgba(36, 113, 231, 0.50);
  transform: translateY(-2px);
}
.wx-palette-preview {
  padding: 16px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  min-height: 56px;
  display: grid;
  place-items: center;
}
.wx-palette-swatches {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.20);
  justify-content: center;
}
.wx-palette-swatches span {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.20);
}
.wx-palette-codes {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  flex-wrap: wrap;
  justify-content: center;
}


/* ─── Móvil: panel lateral pasa a fullscreen ── */
@media (max-width: 720px) {
  .wx-edit-panel { width: 100%; }
  .wx-edit-toolbar { font-size: 12px; flex-wrap: wrap; max-width: calc(100vw - 24px); }
  .wx-edit-iframe-shell { inset: 56px 0 0 0; }
  .wx-ai-pair { grid-template-columns: 1fr; }
  .wx-palette-grid { grid-template-columns: 1fr; }
}
