/* Agent visual — matches xima-support-final-v2.html (green → Datis red). */

.xima-after-page .xima-after-hero__visual.support-visual {
  --active: 0;
  --motion: running;
  --fx-ring-idle: rgb(120 85 85 / 16%);
  --fx-ring-active: rgb(191 24 34 / 58%);
  --fx-particle-idle: #b8a0a0;
  --fx-particle-active: #e84d5a;
  --fx-halo-idle: rgb(191 24 34 / 7%);
  --fx-halo-active: rgb(210 40 50 / 22%);
  --fx-ring: var(--fx-ring-idle);
  --fx-particle: var(--fx-particle-idle);
  --fx-halo: var(--fx-halo-idle);
  position: relative;
  display: flex;
  min-width: 0;
  min-height: min(492px, 100%);
  height: 100%;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  overflow: hidden;
  padding: 40px 14px 20px;
  border: 1px solid #f0dede;
  border-radius: 20px;
  background: linear-gradient(155deg, #fff8f8 0%, #fdeeee 58%, #fce8e8 100%);
  box-shadow: none;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.xima-after-page .xima-after-hero__visual.support-visual:active {
  --active: 1;
  --fx-ring: var(--fx-ring-active);
  --fx-particle: var(--fx-particle-active);
  --fx-halo: var(--fx-halo-active);
}

.xima-after-page .support-visual .icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.xima-after-page .support-visual .visual-online {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid rgb(191 24 34 / 20%);
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  box-shadow: 0 6px 22px rgb(80 25 30 / 8%);
  color: #5c3030;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35px;
  line-height: 1;
  direction: ltr;
  backdrop-filter: blur(8px);
}

.xima-after-page .support-visual .online-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #bf1822;
  box-shadow:
    0 0 0 4px rgb(191 24 34 / 11%),
    0 0 11px rgb(191 24 34 / 40%);
  animation: xima-datis-online-pulse 2.2s ease-in-out infinite;
  animation-play-state: var(--motion);
}

.xima-after-page .support-visual .visual-corner {
  position: absolute;
  top: 21px;
  right: 22px;
  color: #c99292;
}

.xima-after-page .support-visual .visual-corner .icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.2;
}

.xima-after-page .support-visual .character-scene {
  position: relative;
  display: block;
  width: min(100%, 390px);
  aspect-ratio: 1;
  direction: ltr;
}

.xima-after-page .support-visual .character-orbit {
  position: absolute;
  inset: 11%;
  z-index: 0;
  border: 1px solid var(--fx-ring);
  border-radius: 50%;
  animation: xima-datis-orbit-breathe 5.6s ease-in-out infinite;
  animation-play-state: var(--motion);
  transition: border-color 500ms ease, filter 500ms ease;
  filter: drop-shadow(0 0 calc(var(--active) * 10px) rgb(191 24 34 / 30%));
}

.xima-after-page .support-visual .character-orbit::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid color-mix(in srgb, var(--fx-ring) 72%, transparent);
  border-radius: inherit;
  background: rgb(255 255 255 / 10%);
  animation: xima-datis-orbit-inner-drift 7.4s ease-in-out infinite reverse;
  animation-play-state: var(--motion);
  transition: border-color 500ms ease, background-color 500ms ease;
}

.xima-after-page .support-visual .character-orbit::after {
  content: "";
  position: absolute;
  top: 49%;
  left: -9%;
  width: 118%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0 7%,
    var(--fx-ring) 28% 72%,
    transparent 93% 100%
  );
  transform-origin: 50% 50%;
  animation: xima-datis-orbit-line-sweep 8.6s ease-in-out infinite;
  animation-play-state: var(--motion);
  transition: background 500ms ease;
}

.xima-after-page .support-visual .character-halo {
  position: absolute;
  inset: 4%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 39%, var(--fx-halo), transparent 65%);
  opacity: calc(0.65 + var(--active) * 0.35);
  transition: opacity 650ms ease, background 550ms ease;
}

.xima-after-page .support-visual .character-shadow {
  position: absolute;
  bottom: 4%;
  left: 17%;
  z-index: 0;
  width: 66%;
  height: 6%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(60 25 28 / 20%), transparent 70%);
  opacity: calc(0.8 - var(--active) * 0.18);
  transition: opacity 550ms ease;
}

.xima-after-page .support-visual .character-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
}

.xima-after-page .support-visual .character-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  overflow: visible;
  pointer-events: none;
  user-select: none;
}

.xima-after-page .support-visual .headset-active,
.xima-after-page .support-visual .headset-glow {
  opacity: var(--active);
  transition: opacity 550ms ease;
  pointer-events: none;
}

.xima-after-page .support-visual .headset-glow {
  opacity: calc(var(--active) * 0.3);
}

.xima-after-page .support-visual .signal-effects {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  pointer-events: none;
}

.xima-after-page .support-visual .signal-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid var(--fx-ring);
  border-radius: 50%;
  opacity: 0;
  filter: drop-shadow(0 0 calc(var(--active) * 7px) rgb(191 24 34 / 32%));
  animation: xima-datis-signal-expand 3.6s ease-out infinite;
  animation-play-state: var(--motion);
  transition: border-color 500ms ease, filter 500ms ease;
}

.xima-after-page .support-visual .signal-ring--second {
  animation-delay: 1.8s;
}

.xima-after-page .support-visual .light-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--fx-particle);
  box-shadow: 0 0 calc(5px + var(--active) * 8px)
    color-mix(in srgb, var(--fx-particle) 52%, transparent);
  animation: xima-datis-particle-drift 3.8s ease-in-out infinite;
  animation-play-state: var(--motion);
  transition: background-color 500ms ease, box-shadow 500ms ease, transform 500ms ease;
}

.xima-after-page .support-visual .light-particle:nth-of-type(3) {
  top: 26%;
  left: 15%;
}

.xima-after-page .support-visual .light-particle:nth-of-type(4) {
  top: 19%;
  right: 23%;
  animation-delay: -0.9s;
  width: 3px;
  height: 3px;
}

.xima-after-page .support-visual .light-particle:nth-of-type(5) {
  top: 58%;
  right: 12%;
  animation-delay: -1.8s;
}

.xima-after-page .support-visual .shirt-logo {
  position: absolute;
  top: 73%;
  left: 24%;
  z-index: 4;
  width: 12%;
  height: auto;
  opacity: 0.94;
  transform: rotate(-2deg);
  transform-origin: center;
  filter: drop-shadow(0 1px 1px rgb(0 0 0 / 18%));
  pointer-events: none;
  user-select: none;
}

@keyframes xima-datis-signal-expand {
  0% {
    transform: scale(0.86);
    opacity: 0;
  }
  18% {
    opacity: 0.6;
  }
  100% {
    transform: scale(1.09);
    opacity: 0;
  }
}

@keyframes xima-datis-particle-drift {
  0%,
  100% {
    transform: translateY(2px);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-6px);
    opacity: 0.85;
  }
}

@keyframes xima-datis-orbit-breathe {
  0%,
  100% {
    transform: scale(0.985) rotate(-1.2deg);
  }
  50% {
    transform: scale(1.015) rotate(1.2deg);
  }
}

@keyframes xima-datis-orbit-inner-drift {
  0%,
  100% {
    transform: scale(0.97) rotate(-2deg);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.025) rotate(2deg);
    opacity: 1;
  }
}

@keyframes xima-datis-orbit-line-sweep {
  0%,
  100% {
    transform: rotate(-8deg) scaleX(0.94);
    opacity: 0.38;
  }
  50% {
    transform: rotate(8deg) scaleX(1.04);
    opacity: 0.78;
  }
}

@keyframes xima-datis-online-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 4px rgb(191 24 34 / 11%),
      0 0 11px rgb(191 24 34 / 38%);
  }
  50% {
    transform: scale(1.08);
    box-shadow:
      0 0 0 6px rgb(191 24 34 / 7%),
      0 0 16px rgb(191 24 34 / 50%);
  }
}

@media (hover: hover) and (pointer: fine) {
  .xima-after-page .xima-after-hero__visual.support-visual:hover {
    --active: 1;
    --fx-ring: var(--fx-ring-active);
    --fx-particle: var(--fx-particle-active);
    --fx-halo: var(--fx-halo-active);
  }
}

@media (max-width: 980px) {
  .xima-after-page .xima-after-hero__visual.support-visual {
    min-height: 470px;
  }
}

@media (max-width: 760px) {
  .xima-after-page .xima-after-hero__visual.support-visual {
    min-height: 0;
    padding: 35px 12px 22px;
  }

  .xima-after-page .support-visual .character-scene {
    width: min(100%, 350px);
  }
}

@media (max-width: 420px) {
  .xima-after-page .xima-after-hero__visual.support-visual {
    border-radius: 16px;
  }

  .xima-after-page .support-visual .visual-online {
    left: 14px;
    top: 14px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .xima-after-page .support-visual *,
  .xima-after-page .support-visual *::before,
  .xima-after-page .support-visual *::after {
    animation: none !important;
    transition: none !important;
  }

  .xima-after-page .support-visual .signal-ring {
    opacity: 0;
  }

  .xima-after-page .support-visual .light-particle {
    opacity: 0.45;
  }
}
