/* ==========================================================================
   EIBO SERVICES PVT. LTD. — PERSISTENT CODED ANIMATED ROBOT COMPANION
   100% Pure Vector SVG Rig, CSS Keyframe Animations & Context Roaming Engine
   ========================================================================== */

/* Main Fixed Companion Container */
.eibo-robot-companion {
  position: fixed;
  right: 36px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none; /* Clicks pass through transparent space */
  transition: right 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              left 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              top 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              bottom 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s ease,
              opacity 0.3s ease;
  user-select: none;
}

/* Subtle dock mode when typing in forms */
.eibo-robot-companion.pos-subtle {
  transform: translateY(16px) scale(0.92);
  opacity: 0.92;
}

.eibo-robot-companion.docked-hidden {
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
}

/* Roaming Position: Left side */
.eibo-robot-companion.pos-left {
  right: auto !important;
  left: 36px !important;
  align-items: flex-start;
}

/* Roaming Position: Right side */
.eibo-robot-companion.pos-right {
  left: auto !important;
  right: 36px !important;
  align-items: flex-end;
}

.pos-left .robot-speech-bubble::after {
  right: auto;
  left: 52px;
}

.pos-left .robot-quick-menu {
  right: auto;
  left: 0;
}

/* ==========================================================================
   FRONT DESK RECEPTION CONCIERGE STATE (HERO SECTION)
   ========================================================================== */

@media (min-width: 992px) {
  .eibo-robot-companion.state-front-desk {
    top: 175px !important;
    bottom: auto !important;
    right: 48px !important;
    left: auto !important;
  }
}

.eibo-robot-companion.state-front-desk .robot-character-stage {
  width: 220px;
  height: 295px;
  filter: drop-shadow(0 22px 50px rgba(0, 240, 255, 0.28)) drop-shadow(0 16px 36px rgba(23, 49, 61, 0.22));
}

.eibo-robot-companion.state-front-desk .robot-hud-wrap {
  max-width: 325px;
}

.eibo-robot-companion.state-front-desk .robot-speech-bubble {
  border: 1.5px solid rgba(0, 240, 255, 0.55);
  box-shadow: 0 16px 48px rgba(23, 49, 61, 0.16), 0 0 25px rgba(0, 240, 255, 0.2);
}

.robot-front-desk-badge {
  display: none;
  align-items: center;
  gap: 6px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-primary, #205D6B);
  margin-bottom: 6px;
}

.state-front-desk .robot-front-desk-badge {
  display: inline-flex;
}

/* ==========================================================================
   SPEECH BUBBLE & INTERACTIVE HUD STATUS
   ========================================================================== */

.robot-hud-wrap {
  position: relative;
  margin-bottom: 8px;
  max-width: 300px;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.robot-speech-bubble {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(22, 140, 196, 0.35);
  border-radius: var(--radius-md, 16px);
  padding: 15px 18px 14px 18px;
  box-shadow: 0 14px 38px rgba(23, 49, 61, 0.15), 0 0 0 1px rgba(49, 184, 222, 0.2);
  position: relative;
  text-align: left;
}

/* Speech bubble arrow */
.robot-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -9px;
  right: 52px;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border-right: 1px solid rgba(22, 140, 196, 0.35);
  border-bottom: 1px solid rgba(22, 140, 196, 0.35);
  transform: rotate(45deg);
  transition: right 0.4s ease, left 0.4s ease;
}

.robot-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(220, 231, 237, 0.8);
}

.robot-hud-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading, sans-serif);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary, #205D6B);
}

.robot-pulse-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 8px #10B981;
  animation: pulseBeacon 2s infinite;
}

@keyframes pulseBeacon {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

.robot-hud-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.robot-btn-ctrl {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  color: var(--text-muted, #5A7184);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.robot-btn-ctrl:hover {
  color: var(--brand-blue, #168CC4);
  background: rgba(22, 140, 196, 0.08);
}

.robot-message-text {
  font-size: 0.88rem;
  line-height: 1.48;
  color: var(--text-primary, #17313D);
  margin-bottom: 10px;
  font-weight: 500;
  min-height: 38px;
  transition: opacity 0.2s ease;
}

.robot-hud-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.robot-action-link {
  font-size: 0.78rem;
  font-family: var(--font-heading, sans-serif);
  font-weight: 700;
  color: var(--brand-blue, #168CC4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
  text-decoration: none;
}

.robot-action-link:hover {
  color: var(--brand-primary, #205D6B);
  text-decoration: underline;
}

/* Roam Navigation Buttons in HUD */
.robot-roam-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.robot-roam-btn {
  background: rgba(242, 250, 253, 0.95);
  border: 1px solid rgba(22, 140, 196, 0.28);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary, #205D6B);
  cursor: pointer;
  transition: all 0.2s ease;
}

.robot-roam-btn:hover {
  background: var(--brand-blue, #168CC4);
  color: #FFFFFF;
  border-color: var(--brand-blue, #168CC4);
}

/* ==========================================================================
   ROBOT 3D VECTOR STAGE & CHARACTER
   ========================================================================== */

.robot-character-stage {
  position: relative;
  width: 195px;
  height: 265px;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              width 0.4s ease,
              height 0.4s ease;
}

.robot-character-stage:hover {
  transform: translateY(-8px) scale(1.04);
}

.robot-floating-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Pure Vector SVG Robot Rig */
.robot-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* Floating Anti-Gravity Hover Animation */
.robot-float-rig {
  animation: robotHover 4s ease-in-out infinite;
  transform-origin: 170px 240px;
}

@keyframes robotHover {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-11px) rotate(0.8deg);
  }
}

/* Base Holographic Ring Pulsing */
.holo-ring {
  animation: ringPulse 4s ease-in-out infinite;
  transform-origin: 170px 420px;
}

@keyframes ringPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(0.92);
    opacity: 0.6;
  }
}

/* Waving Hand Articulated Animation (Pose: Wave) */
.waving-arm-group {
  animation: waveHand 2.2s ease-in-out infinite;
  transform-origin: 116px 148px;
}

@keyframes waveHand {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-10deg);
  }
  50% {
    transform: rotate(6deg);
  }
  75% {
    transform: rotate(-8deg);
  }
}

/* Blinking Digital Eyes Animation */
.eye-blink {
  animation: blinkEye 3.8s infinite;
  transform-origin: 170px 65px;
}

@keyframes blinkEye {
  0%, 93%, 100% {
    transform: scaleY(1);
  }
  95%, 97% {
    transform: scaleY(0.1);
  }
}

/* Chest Core Pulse */
.chest-core-glow {
  animation: corePulse 2.5s ease-in-out infinite;
}

@keyframes corePulse {
  0%, 100% {
    opacity: 0.8;
    filter: drop-shadow(0 0 4px #00F0FF);
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 12px #00F0FF);
  }
}

/* ==========================================================================
   DYNAMIC ROBOT POSES (VIA CSS TRANSFORMS ON SVG RIG)
   ========================================================================== */

/* Arms baseline transition */
.articulated-arm-left,
.articulated-arm-right {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* POSE: POINTING (Displays & points at active website features) */
.pose-point .waving-arm-group {
  animation: none;
}

/* When on the Right, Left Arm points across to the left into the page */
.pos-right.pose-point .articulated-arm-left,
.eibo-robot-companion:not(.pos-left).pose-point .articulated-arm-left {
  transform: rotate(50deg) translate(-14px, -18px);
  transform-origin: 116px 148px;
}

/* When on the Left, Right Arm points across to the right into the page */
.pos-left.pose-point .articulated-arm-right {
  transform: rotate(-50deg) translate(14px, -18px);
  transform-origin: 224px 148px;
}

/* POSE: PRESENTING (Welcoming double-arm open presentation gesture) */
.pose-present .waving-arm-group {
  animation: none;
}

.pose-present .articulated-arm-left {
  transform: rotate(26deg) translateY(-6px);
  transform-origin: 116px 148px;
}

.pose-present .articulated-arm-right {
  transform: rotate(-26deg) translateY(-6px);
  transform-origin: 224px 148px;
}

/* POSE: THINKING / ANALYZING (Hand to chin, scanning mode) */
.pose-think .waving-arm-group {
  animation: none;
}

.pose-think .articulated-arm-right {
  transform: rotate(-80deg) translate(-16px, 6px);
  transform-origin: 224px 148px;
}

.pose-think #robotEyesGroup path {
  stroke: #00F0FF;
  filter: drop-shadow(0 0 8px #00F0FF);
}

/* ==========================================================================
   HOLOGRAPHIC PROJECTION BEAM (DISPLAYING THE WEBSITE)
   ========================================================================== */

.hologram-beam-group {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

/* Show beam when pointing or presenting to display features */
.pose-point .hologram-beam-group,
.pose-present .hologram-beam-group,
.is-projecting .hologram-beam-group {
  opacity: 1;
  animation: beamShimmer 3s ease-in-out infinite;
}

@keyframes beamShimmer {
  0%, 100% {
    opacity: 0.85;
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.6));
  }
  50% {
    opacity: 0.55;
    filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.3));
  }
}

/* Select direction based on screen side */
.beam-direction-left {
  display: block;
}
.beam-direction-right {
  display: none;
}

.pos-left .beam-direction-left {
  display: none !important;
}
.pos-left .beam-direction-right {
  display: block !important;
}

/* ==========================================================================
   INTERACTIVE QUICK MENU MODAL (ON CLICKING ROBOT)
   ========================================================================== */

.robot-quick-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 290px;
  background: #FFFFFF;
  border: 1px solid var(--border-color, #DCE7ED);
  border-radius: var(--radius-md, 16px);
  padding: 16px;
  box-shadow: 0 18px 45px rgba(23, 49, 61, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  pointer-events: auto;
}

.robot-quick-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.robot-menu-title {
  font-family: var(--font-heading, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand-primary, #205D6B);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light, #EAF2F6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.robot-menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.robot-menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary, #17313D);
  text-decoration: none;
  transition: all 0.2s ease;
}

.robot-menu-item a:hover {
  background: #F2FAFD;
  color: var(--brand-blue, #168CC4);
  padding-left: 14px;
}

/* ==========================================================================
   MINIMIZED DOCK AVATAR
   ========================================================================== */

.robot-dock-btn {
  display: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--brand-blue, #168CC4);
  box-shadow: 0 8px 24px rgba(22, 140, 196, 0.35);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
}

.robot-dock-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.45);
}

.robot-dock-btn svg {
  width: 32px;
  height: 32px;
}

.robot-dock-btn .pulse-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 6px #10B981;
}

/* Minimized state */
.eibo-robot-companion.minimized .robot-hud-wrap,
.eibo-robot-companion.minimized .robot-character-stage {
  display: none !important;
}

.eibo-robot-companion.minimized .robot-dock-btn {
  display: flex !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================================== */

@media (max-width: 991px) {
  .eibo-robot-companion {
    right: 20px;
    bottom: 20px;
  }
  .robot-character-stage {
    width: 160px;
    height: 220px;
  }
  .eibo-robot-companion.state-front-desk .robot-character-stage {
    width: 175px;
    height: 240px;
  }
}

@media (max-width: 767px) {
  .eibo-robot-companion {
    right: 14px;
    bottom: 14px;
  }
  .robot-character-stage {
    width: 135px;
    height: 185px;
  }
  .robot-hud-wrap {
    max-width: 260px;
  }
  .robot-message-text {
    font-size: 0.82rem;
  }
}
