/* ============================================================
   LIVECO DESIGN — Editor visual (barra flotante + modo edición)
   ============================================================ */

/* ---------- Barra flotante (abajo a la derecha) ---------- */
.lv-bar {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: "Urbanist", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.lv-bar[hidden] { display: none; }

.lv-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(19, 19, 19, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  color: #fff;
}

.lv-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0 8px 0 6px;
  color: #fff;
  white-space: nowrap;
}
.lv-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #8F8F8F;
  box-shadow: 0 0 0 0 rgba(207, 240, 8, 0.5);
}
.lv-bar.is-editing .lv-dot {
  background: #CFF008;
  animation: lv-pulse 1.8s infinite;
}
@keyframes lv-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(207, 240, 8, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(207, 240, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(207, 240, 8, 0); }
}

.lv-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,0.12); margin: 2px 2px; }

.lv-btn {
  appearance: none;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 13px;
  border-radius: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
  transition: background 0.18s, color 0.18s, transform 0.1s, opacity 0.18s;
  white-space: nowrap;
}
.lv-btn:hover { background: rgba(255, 255, 255, 0.13); }
.lv-btn:active { transform: scale(0.97); }
.lv-btn svg { width: 16px; height: 16px; }
.lv-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.lv-btn.primary {
  background: #CFF008;
  color: #131313;
}
.lv-btn.primary:hover { background: #d9f72b; }
.lv-btn.icon { padding: 9px; }
.lv-btn .lv-count {
  background: #131313;
  color: #CFF008;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 6px;
  min-width: 16px;
  text-align: center;
}
.lv-btn.primary .lv-count { background: rgba(19,19,19,0.18); color: #131313; }

.lv-lang {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #CFF008;
  border: 1px solid rgba(207,240,8,0.4);
  border-radius: 999px;
  padding: 4px 8px;
}

.lv-toast {
  background: rgba(19, 19, 19, 0.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.14);
  border-left: 3px solid #CFF008;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  max-width: 280px;
}
.lv-toast.show { opacity: 1; transform: translateY(0); }

/* ---------- Resaltado de elementos editables ---------- */
body.lv-editing [data-lv-editable] {
  outline: 1.5px dashed rgba(207, 240, 8, 0.55);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: text;
  transition: outline-color .15s, background .15s;
}
body.lv-editing [data-lv-editable]:hover {
  outline-color: #CFF008;
  background: rgba(207, 240, 8, 0.06);
}
body.lv-editing [data-lv-editable][data-lv-kind="image"] { cursor: pointer; }
body.lv-editing [contenteditable="true"]:focus {
  outline: 2px solid #CFF008;
  outline-offset: 3px;
  background: rgba(207, 240, 8, 0.08);
}
body.lv-editing [data-lv-editable].lv-dirty {
  outline-style: solid;
  outline-color: #CFF008;
}
/* Evitar que clicks de edición naveguen */
body.lv-editing a[data-lv-editable],
body.lv-editing a [data-lv-editable] { pointer-events: auto; }

/* ---------- Popover de imagen ---------- */
.lv-imgpop {
  position: fixed;
  z-index: 100000;
  width: 300px;
  background: rgba(19, 19, 19, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 14px;
  color: #fff;
  font-family: "Urbanist", system-ui, sans-serif;
}
.lv-imgpop h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.lv-imgpop label { font-size: 11px; color: #c6c6c6; display: block; margin: 8px 0 4px; }
.lv-input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 9px 10px;
  border-radius: 10px;
  box-sizing: border-box;
}
.lv-imgpop .lv-row { display: flex; gap: 8px; margin-top: 12px; }
.lv-imgpop .lv-row .lv-btn { flex: 1; justify-content: center; }

/* ---------- Modal de login ---------- */
.lv-modal-scrim {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(8, 8, 8, 0.66);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.lv-modal-scrim.show { opacity: 1; pointer-events: auto; }
.lv-modal {
  width: min(380px, 92vw);
  background: #1b1b1b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 22px;
  padding: 28px;
  color: #fff;
  font-family: "Urbanist", system-ui, sans-serif;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5);
  transform: translateY(10px) scale(0.98);
  transition: transform .25s;
}
.lv-modal-scrim.show .lv-modal { transform: none; }
.lv-modal h3 { margin: 0 0 4px; font-size: 20px; font-weight: 800; }
.lv-modal p.sub { margin: 0 0 18px; font-size: 13px; color: #b2b2b2; }
.lv-modal .lv-err {
  display: none; color: #ff7a7a; font-size: 12px; margin-top: 8px;
}
.lv-modal .lv-err.show { display: block; }
.lv-modal .lv-btn.primary { width: 100%; justify-content: center; margin-top: 16px; padding: 12px; }
.lv-modal .lv-hint { margin-top: 14px; font-size: 11px; color: #8F8F8F; text-align: center; }

@media (max-width: 640px) {
  .lv-panel { flex-wrap: wrap; max-width: calc(100vw - 32px); justify-content: flex-end; }
  .lv-bar { right: 12px; bottom: 12px; }
}
