/* ═══════════════════════════════════════════════════════════
   LIQUID ORB (WebGPU Engine) — Estilos y Presentación
   Laboratorio Virtual de Física — Núcleo Óptico y Cognitivo
   ═══════════════════════════════════════════════════════════ */

/* ── HERO ORB CONTAINER ── */
.hero-orb-container {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 320px;
  margin: 12px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

@media (min-width: 1400px) {
  .hero-orb-container {
    max-width: 360px;
    height: 360px;
    margin: 16px auto 20px;
  }
}

@media (max-width: 768px) {
  .hero-orb-container {
    max-width: 260px;
    height: 260px;
    margin: 10px auto 14px;
  }
}

@media (max-width: 480px) {
  .hero-orb-container {
    max-width: 220px;
    height: 220px;
    margin: 8px auto 12px;
  }
}

/* Ambient Backlight Glow */
.hero-orb-glow {
  position: absolute;
  inset: 15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.35) 0%, rgba(181, 123, 238, 0.25) 45%, rgba(255, 60, 110, 0.12) 70%, transparent 80%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: orb-ambient-breathe 6s ease-in-out infinite alternate;
  transition: opacity 0.5s ease;
}

[data-theme="light"] .hero-orb-glow {
  background: radial-gradient(circle, rgba(0, 131, 143, 0.28) 0%, rgba(109, 40, 217, 0.18) 45%, rgba(216, 27, 96, 0.1) 70%, transparent 80%);
  filter: blur(35px);
}

@keyframes orb-ambient-breathe {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* Canvas */
.hero-orb-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  z-index: 1;
  cursor: grab;
  filter: drop-shadow(0 12px 36px rgba(0, 0, 0, 0.45));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.hero-orb-canvas:active {
  cursor: grabbing;
}

.hero-orb-canvas:hover {
  filter: drop-shadow(0 16px 48px rgba(0, 229, 255, 0.35));
}

/* ── PRESET SELECTOR & STATE CONTROLS ── */
.hero-orb-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-orb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 600px;
}

.orb-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

[data-theme="light"] .orb-pill {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
  color: #64748b;
}

.orb-pill:hover {
  color: var(--text);
  border-color: var(--accent1);
  background: rgba(0, 229, 255, 0.12);
  transform: translateY(-2px);
}

.orb-pill.active {
  color: #05070f;
  background: var(--accent1);
  border-color: var(--accent1);
  font-weight: 700;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.45);
}

[data-theme="light"] .orb-pill.active {
  color: #ffffff;
  background: var(--accent1);
  box-shadow: 0 2px 12px rgba(0, 131, 143, 0.35);
}

/* State Toggle (Idle / Thinking) */
.orb-state-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(13, 17, 32, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 5px 14px;
  border-radius: 30px;
  font-family: 'Space Mono', monospace;
  font-size: 0.68rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}

[data-theme="light"] .orb-state-toggle {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 131, 143, 0.25);
}

.orb-state-toggle:hover {
  border-color: var(--accent1);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
  transform: scale(1.02);
}

.orb-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a3ff6b;
  box-shadow: 0 0 8px #a3ff6b;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.orb-state-toggle[data-state="thinking"] .orb-state-dot {
  background: #ff3c6e;
  box-shadow: 0 0 12px #ff3c6e;
  animation: orb-thinking-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes orb-thinking-pulse {
  from { transform: scale(0.9); opacity: 0.8; }
  to { transform: scale(1.3); opacity: 1; }
}

/* ── CHATBOT MINI ORB AVATAR ── */

/* Floating FAB with Mini Orb */
.chatbot-fab-orb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.chatbot-fab-orb canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Header Avatar Orb */
.chatbot-header-orb {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
  flex-shrink: 0;
}

.chatbot-header-orb canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Status Indicator next to header orb */
.chatbot-header-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.62rem;
  font-family: 'Space Mono', monospace;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chatbot-header-status-badge.thinking {
  color: #ff3c6e;
  font-weight: 700;
}
