/* ODI's thinking gesture and its thought form a single quiet composition.
   No timed progression, fake percentage, imported shop/children runtime or UI
   blocking layer: the actual request owns whether this status is mounted. */
.odi-loading {
  --odi-loading-ink: var(--color-ink, #2b3566);
  --odi-loading-soft: var(--color-ink-soft, #4c4f8f);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-width: 0;
  min-height: 340px;
  width: 100%;
  padding: 28px 18px 34px;
  text-align: center;
  color: var(--odi-loading-ink);
}
.odi-loading-art {
  position: relative;
  width: 216px;
  height: 184px;
  flex: none;
  isolation: isolate;
}
.odi-loading-art > img {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 180px;
  height: 180px;
  max-width: none;
  object-fit: contain;
  user-select: none;
  animation: odi-loader-breathe 3.8s ease-in-out infinite;
}
.odi-loading-thought {
  position: absolute;
  top: 4px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 70px;
  height: 40px;
  border: 1px solid #ffffff;
  border-radius: 18px 18px 18px 12px;
  background: linear-gradient(145deg, #fcfaff, #ece7ff);
  box-shadow: 0 3px 8px #42337315, inset 0 -1px #bfb0ef40;
}
.odi-loading-thought::before,
.odi-loading-thought::after {
  position: absolute;
  content: '';
  display: block;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #f0ebff;
  box-shadow: 0 2px 4px #42337310;
}
.odi-loading-thought::before { left: -8px; bottom: -8px; width: 9px; height: 9px; }
.odi-loading-thought::after { left: -15px; bottom: -15px; width: 5px; height: 5px; }
.odi-loading-thought > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6156d8;
  opacity: .5;
  animation: odi-loader-thought 1.65s ease-in-out infinite;
}
.odi-loading-thought > i:nth-child(2) { background: #528ed8; animation-delay: .16s; }
.odi-loading-thought > i:nth-child(3) { background: #37b6ce; animation-delay: .32s; }
.odi-loading-copy { min-width: 0; max-width: 28rem; }
.odi-loading-title {
  margin: 0;
  color: var(--odi-loading-ink);
  font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.odi-loading-message {
  margin: 7px 0 0;
  color: var(--odi-loading-soft);
  font-size: .94rem;
  font-weight: 650;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.odi-loading--compact {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  min-height: 88px;
  padding: 5px 8px;
  text-align: left;
}
.odi-loading--compact .odi-loading-art { width: 88px; height: 80px; }
.odi-loading--compact .odi-loading-art > img { width: 76px; height: 76px; }
.odi-loading--compact .odi-loading-thought { top: 0; right: 0; width: 34px; height: 21px; gap: 3px; border-radius: 11px 11px 11px 7px; }
.odi-loading--compact .odi-loading-thought::before { left: -3px; bottom: -5px; width: 5px; height: 5px; }
.odi-loading--compact .odi-loading-thought::after { left: -7px; bottom: -9px; width: 3px; height: 3px; }
.odi-loading--compact .odi-loading-thought > i { width: 4px; height: 4px; }
.odi-loading--compact .odi-loading-title { font-size: .96rem; letter-spacing: -.015em; }
.odi-loading--compact .odi-loading-message { margin-top: 4px; font-size: .79rem; line-height: 1.4; }
.odi-loading.odi-loading--toast {
  width: min(24rem, calc(100vw - 2rem));
  padding: 8px 14px 8px 8px;
  border: 1px solid #ffffffd9;
  border-radius: 24px;
  background: linear-gradient(140deg, #fff, #f1edfc);
  box-shadow: 0 12px 36px #2b356627, inset 0 1px #fff;
}

/* Keep the waiting screen focused on ODI. The footer returns with the loaded
   section or its error state. The adult floating toast is outside this frame
   and must not change the surrounding page or legal-document footers. */
[data-trainer-shell]:has([data-trainer-frame] .odi-loading) > footer {
  display: none;
}

/* The same component inherits its surrounding study surface without creating a
   second panel or unreadable dark text inside Onyx's dark contexts. */
.diamond-shop .odi-loading,
.brilliant-mode[data-brilliant-design="onyx"] .odi-loading,
.panteon .odi-loading {
  --odi-loading-ink: #f3ecff;
  --odi-loading-soft: #d0c5df;
}
@keyframes odi-loader-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes odi-loader-thought {
  0%, 65%, 100% { opacity: .45; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
@media (max-width: 390px) {
  .odi-loading:not(.odi-loading--compact) { min-height: 320px; padding-inline: 12px; gap: 13px; }
  .odi-loading:not(.odi-loading--compact) .odi-loading-art { width: 200px; height: 172px; }
  .odi-loading:not(.odi-loading--compact) .odi-loading-art > img { width: 166px; height: 166px; }
  .odi-loading:not(.odi-loading--compact) .odi-loading-thought { width: 65px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .odi-loading-art > img,
  .odi-loading-thought > i { animation: none; transform: none; }
  .odi-loading-thought > i { opacity: .8; }
}
