/* Esclabot Operaciones: agente interno del panel /admin (celeste). */
.ops {
  --ops-deep: #06283d;
  --ops-cyan: #0ea5c9;
  --ops-cyan-deep: #0b7f9c;
  --ops-sky: #e6f6fb;
  --ops-mist: #f4f8fa;
  --ops-border: #dbe8ee;
  --ops-muted: #5b6c77;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  color: var(--ops-deep);
}
.ops *, .ops *::before, .ops *::after { box-sizing: border-box; }

/* Burbuja: el doble del tamaño del asistente publico (56 px -> 112 px) */
.ops-bubble {
  position: fixed; right: 18px; bottom: 24px; z-index: 70;
  width: 104px; height: 92px; padding: 0; border: 0; background: transparent; cursor: pointer;
  font: inherit;
}
@media (min-width: 768px) { .ops-bubble { width: 112px; height: 100px; right: 26px; bottom: 18px; } }
.ops-face {
  position: relative; display: block; width: 100%; height: 100%;
  filter: drop-shadow(0 8px 10px rgba(6, 40, 61, 0.35));
  animation: ops-float 3.2s ease-in-out infinite;
  transition: scale .2s;
}
.ops-bubble:hover .ops-face { scale: 1.06; }
.ops-bubble:focus-visible { outline: 3px solid var(--ops-cyan); outline-offset: 4px; border-radius: 16px; }
.ops-face img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; }
@keyframes ops-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Luz blanca intermitente en el cerebro del holograma */
.ops-brain {
  position: absolute; left: 39%; top: 5%; width: 21%; height: 19%;
  pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, rgba(255,255,255,.85) 28%, rgba(255,255,255,.35) 55%, rgba(255,255,255,0) 72%);
  mix-blend-mode: screen;
  animation: ops-brain 1.6s ease-in-out infinite;
}
.ops-brain::after {
  content: ""; position: absolute; inset: -30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 65%);
}
@keyframes ops-brain {
  0%, 100% { opacity: .12; transform: scale(.7); }
  50% { opacity: 1; transform: scale(1.25); }
}
@media (prefers-reduced-motion: reduce) { .ops-face { animation: none; } .ops-brain { animation-duration: 3s; } }

.ops-badge {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); white-space: nowrap; padding: 3px 9px; border-radius: 9999px;
  background: var(--ops-cyan-deep); color: #fff; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 2px 6px rgba(6,40,61,.3);
}

.ops-panel {
  position: fixed; z-index: 80; left: 10px; right: 10px; bottom: 10px;
  height: min(640px, calc(100dvh - 24px));
  display: none; flex-direction: column; background: #fff; overflow: hidden;
  border: 1px solid var(--ops-border); border-radius: 16px;
  box-shadow: 0 24px 60px -16px rgba(6, 40, 61, 0.5);
}
.ops-open .ops-panel { display: flex; animation: ops-in .25s ease-out; }
.ops-open .ops-bubble { display: none; }
@keyframes ops-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (min-width: 768px) {
  .ops-panel { left: auto; right: 26px; bottom: 22px; width: 470px; height: min(680px, calc(100vh - 44px)); border-radius: 14px; }
}

.ops-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: linear-gradient(135deg, var(--ops-deep), var(--ops-cyan-deep)); color: #fff; }
.ops-head .ops-av { position: relative; width: 56px; height: 50px; flex: none; }
.ops-head .ops-av img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ops .ops-head h2 { color: #fff; margin: 0; font-family: "Marcellus", "Times New Roman", serif; font-size: 19px; font-weight: 400; line-height: 1.2; }
.ops-head p { margin: 2px 0 0; font-size: 11px; color: rgba(255,255,255,.78); letter-spacing: .04em; }
.ops .ops-close {
  margin-left: auto; box-sizing: border-box; width: 48px; height: 48px; min-width: 48px; min-height: 48px; flex: 0 0 48px; padding: 0;
  display: grid; place-items: center; border: 2px solid #fff; border-radius: 12px;
  background: transparent; color: #fff; cursor: pointer; appearance: none; -webkit-appearance: none;
}
.ops .ops-close svg { width: 22px; height: 22px; display: block; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.ops .ops-close:hover { background: rgba(255,255,255,.18); }
.ops .ops-close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.ops-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--ops-mist); display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ops-msg { max-width: 90%; padding: 10px 13px; border-radius: 14px; font-size: 14.5px; line-height: 1.55; word-wrap: break-word; }
.ops-msg ul { margin: 6px 0 2px; padding-left: 18px; }
.ops-bot { align-self: flex-start; background: #fff; border: 1px solid var(--ops-border); border-bottom-left-radius: 4px; }
.ops-user { align-self: flex-end; background: var(--ops-cyan-deep); color: #fff; border-bottom-right-radius: 4px; }
.ops-note { align-self: center; max-width: 94%; font-size: 11.5px; color: var(--ops-muted); text-align: center; }
.ops-typing { display: inline-flex; gap: 4px; }
.ops-typing i { width: 6px; height: 6px; border-radius: 9999px; background: var(--ops-muted); opacity: .4; animation: ops-dot 1s infinite; }
.ops-typing i:nth-child(2) { animation-delay: .15s; } .ops-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ops-dot { 50% { opacity: 1; } }

.ops-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: var(--ops-mist); }
.ops-chip { padding: 8px 13px; border: 1px solid var(--ops-cyan-deep); border-radius: 9999px; background: #fff; color: var(--ops-cyan-deep); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.ops-chip:hover { background: var(--ops-sky); }

.ops-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--ops-border); background: #fff; }
.ops-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 10px 12px; border: 1px solid var(--ops-border); border-radius: 12px; font: inherit; font-size: 16px; color: var(--ops-deep); }
.ops-form textarea:focus { outline: 2px solid var(--ops-cyan); border-color: transparent; }
.ops-send { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9999px; background: var(--ops-cyan-deep); color: #fff; cursor: pointer; }
.ops-send:disabled { opacity: .5; cursor: default; }
.ops-send svg { width: 20px; height: 20px; fill: currentColor; }
