/* Zandi Robot Widget — floating animated contact icon */
.zht-robot-fab {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  width: 72px;
  height: 72px;
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.zht-robot-fab:hover,
.zht-robot-fab:focus-visible {
  transform: translateY(-3px);
}

.zht-robot-fab-canvas {
  image-rendering: pixelated;
  width: 72px;
  height: 54px;
  display: block;
  background: transparent;
  filter: drop-shadow(0 6px 10px rgba(20, 25, 45, 0.3));
}

@media (max-width: 768px) {
  .zht-robot-fab {
    left: 14px;
    bottom: 14px;
    width: 60px;
    height: 60px;
  }
  .zht-robot-fab-canvas {
    width: 60px;
    height: 45px;
  }
}

/* ---- Pixel speech bubble next to the robot ---- */
.zht-robot-bubble {
  position: fixed;
  left: 100px;
  bottom: 40px;
  z-index: 9999;
  max-width: 250px;
  padding: 10px 12px;
  background: #171b2c;
  color: #e7ebf5;
  font-family: 'Press Start 2P', 'Courier New', monospace;
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0;
  cursor: pointer;
  image-rendering: pixelated;
  /* pixel-style stepped border */
  box-shadow:
    -3px 0 0 0 #c4cbe0,
    3px 0 0 0 #c4cbe0,
    0 -3px 0 0 #c4cbe0,
    0 3px 0 0 #c4cbe0,
    0 6px 0 0 rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.15s steps(3), transform 0.15s steps(3), visibility 0s linear 0.15s;
}

.zht-robot-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.15s steps(3), transform 0.15s steps(3), visibility 0s;
}

/* pixel tail pointing at the robot */
.zht-robot-bubble::before {
  content: '';
  position: absolute;
  left: -9px;
  bottom: 12px;
  width: 6px;
  height: 6px;
  background: #171b2c;
  box-shadow:
    -3px 0 0 0 #c4cbe0,
    0 -3px 0 0 #c4cbe0,
    0 3px 0 0 #c4cbe0;
}

.zht-robot-bubble-ghost {
  display: block;
  visibility: hidden;
  word-wrap: break-word;
}

.zht-robot-bubble-text {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  word-wrap: break-word;
}

/* blinking pixel cursor while text is shown */
.zht-robot-bubble.show .zht-robot-bubble-text::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 9px;
  margin-left: 3px;
  background: #e7ebf5;
  vertical-align: -1px;
  animation: zht-robot-cursor 0.8s steps(1) infinite;
}

@keyframes zht-robot-cursor {
  50% { opacity: 0; }
}

@media (max-width: 768px) {
  .zht-robot-bubble {
    left: 82px;
    bottom: 32px;
    max-width: calc(100vw - 110px);
    font-size: 8px;
    padding: 8px 10px;
  }
  .zht-robot-bubble-text { top: 8px; left: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .zht-robot-bubble, .zht-robot-bubble.show { transition: none; }
  .zht-robot-bubble.show .zht-robot-bubble-text::after { animation: none; }
}
