/* The liquid renderer and its CSS fallback share the website's blue/silver material. */
.copilot-presence {
  position: relative;
  flex: 0 0 auto;
  width: 104px;
  height: 116px;
  margin: 0 auto 8px;
  pointer-events: none;
  transition: width 520ms cubic-bezier(.22,1,.36,1), height 520ms cubic-bezier(.22,1,.36,1);
  animation: orb-arrive 600ms ease both;
}
.copilot-presence::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 18%;
  width: 64%;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(31 58 94 / 14%), transparent 70%);
  filter: blur(3px);
  opacity: .75;
  transform: scaleX(1);
  transition: transform 900ms cubic-bezier(.22,1,.36,1), opacity 900ms ease;
}
.copilot-orb {
  position: absolute;
  top: 5px;
  left: 8%;
  width: 84%;
  aspect-ratio: 1;
  overflow: hidden;
  isolation: isolate;
  border-radius: 50%;
  background: linear-gradient(155deg, #eef2fc 4%, #c7d0e8 39%, #8f9cc2 57%, #2880df 78%, #245b9e 100%);
  box-shadow: 0 4px 10px rgb(47 64 91 / 9%), inset 0 1px 2px rgb(255 255 255 / 70%);
  /* Keep moving colour layers inside a perfectly round edge in Safari too. */
  transform: translate3d(0, 0, 0) scale(1);
  transition: transform 900ms cubic-bezier(.22,1,.36,1);
}
.copilot-orb > span { position: absolute; pointer-events: none; }
.orb-colour {
  inset: -30%;
  background:
    radial-gradient(ellipse at 25% 28%, #f5f7ff 0%, #dde4f5 19%, transparent 48%),
    radial-gradient(ellipse at 77% 38%, #bbc7e4 8%, #9aaad3 20%, transparent 48%),
    radial-gradient(ellipse at 48% 83%, #006eff 10%, #78b4ef 29%, transparent 55%);
  animation: orb-colour-flow 22s linear infinite;
  will-change: transform;
}
.orb-current {
  inset: -28%;
  background:
    radial-gradient(ellipse at 25% 43%, #edf1fc 6%, rgb(220 230 249 / 65%) 20%, transparent 46%),
    radial-gradient(ellipse at 70% 72%, #4194ee 5%, rgb(118 179 240 / 70%) 24%, transparent 48%),
    radial-gradient(ellipse at 65% 25%, #c0cbe7 4%, transparent 44%);
  opacity: .44;
  animation: orb-current-flow 14s linear infinite;
  transition: opacity 900ms ease;
  will-change: transform;
}
.orb-depth {
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 36% 24%, transparent 37%, rgb(30 51 85 / 7%) 65%, rgb(20 38 69 / 27%) 100%);
  box-shadow: inset -3px -5px 8px rgb(22 51 91 / 15%), inset 2px 2px 5px rgb(239 244 255 / 45%);
}
.orb-light {
  inset: 0;
  background: radial-gradient(ellipse at 40% 34%, rgb(238 244 255 / 65%), transparent 70%);
  opacity: .08;
  transition: opacity 700ms ease;
}
.orb-reflection {
  inset: 1px;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 33% 17%, rgb(250 252 255 / 76%) 0%, rgb(235 243 255 / 26%) 12%, transparent 30%),
    linear-gradient(150deg, rgb(255 255 255 / 22%), transparent 44%, rgb(193 220 255 / 9%) 80%, transparent);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 13%);
}
.phone.has-conversation .copilot-presence { width: 80px; height: 92px; }
.copilot-presence[data-state="composing"] .orb-current { opacity: .68; }
.copilot-presence[data-state="composing"] .orb-light { opacity: .2; }
.copilot-presence[data-state="responding"] .orb-current { opacity: .84; }
.copilot-presence[data-state="responding"] .orb-light { opacity: .32; }
.phone.is-thinking .copilot-orb { transform: translate3d(0, -3px, 0) scale(1.075); }
.phone.is-thinking .copilot-presence::after { transform: scaleX(.84); opacity: .46; }
.phone.is-thinking .orb-current { opacity: .92; }
.phone.is-thinking .orb-light { opacity: .55; }
.copilot-motion-paused :is(.orb-colour, .orb-current) { animation-play-state: paused; }
@keyframes orb-colour-flow {
  from { transform: rotate(-18deg); }
  to { transform: rotate(342deg); }
}
@keyframes orb-current-flow {
  from { transform: rotate(24deg); }
  to { transform: rotate(-336deg); }
}
@keyframes orb-arrive { from { opacity: 0; } to { opacity: 1; } }

/* The shader's sphere fills 86% of its canvas. The extra canvas space keeps
   the approved orb diameter while allowing its liquid edge to move freely. */
.orb-liquid-canvas {
  position: absolute;
  left: -8.139535%;
  top: -8.139535%;
  width: 116.27907%;
  height: 116.27907%;
  max-width: none;
  display: block;
  opacity: 0;
  pointer-events: none;
  animation: orb-liquid-float 10500ms ease-in-out infinite;
}
.copilot-presence .copilot-orb.has-liquid-orb,
.copilot-presence[data-state] .copilot-orb.has-liquid-orb {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
}
.copilot-orb.has-liquid-orb > span { display: none; }
.copilot-orb.has-liquid-orb > .orb-liquid-canvas { opacity: 1; }
.orb-presence-paused :is(.orb-liquid-canvas, .orb-colour, .orb-current, .orb-voice),
.copilot-motion-paused .orb-liquid-canvas { animation-play-state: paused; }
@keyframes orb-liquid-float {
  0%, 100% { transform: translate3d(0, .925926%, 0); }
  50% { transform: translate3d(0, -1.851852%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .copilot-presence, .copilot-presence::after, .copilot-orb, .copilot-orb > span, .orb-liquid-canvas { animation: none !important; transition: none !important; }
  .phone.is-thinking .copilot-orb { transform: none; }
  .phone.is-thinking .copilot-presence::after { transform: none; }
}
