/* Performance layer: keep the UI quieter and cheaper to paint. */
:root {
  --shadow: none;
  --liquid-shadow: none;
  --shadow-soft: none;
}

html {
  scroll-behavior: auto;
}

body {
  background:
    linear-gradient(145deg, #020807 0%, #082019 52%, #03110d 100%);
  background-attachment: scroll;
  animation: none !important;
}

.bg-grid,
.cursor-glow {
  display: none !important;
}

*,
*::before,
*::after {
  animation: none !important;
  transition-duration: 80ms !important;
  transition-delay: 0ms !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  text-shadow: none !important;
}

:where(
  .app-root,
  .topbar,
  .panel,
  .modal,
  .toast,
  .message,
  .conversation-card,
  .settings-section,
  .dashboard-panel,
  .metric-card,
  .clients-summary-card,
  .quotation-summary-card,
  .art-card,
  .subscription-current-card,
  .subscription-plan-card,
  .composer-attachment-card,
  .media-history-panel,
  .admin-ai-panel,
  .business-phone-switcher,
  .sticker-library-panel
) {
  box-shadow: none !important;
}

:where(
  button,
  .nav-btn,
  .conversation-card,
  .message,
  .toast,
  .modal,
  .view.active > *,
  .panel,
  .settings-section,
  .dashboard-panel,
  .metric-card,
  .clients-summary-card,
  .quotation-summary-card,
  .art-card,
  .subscription-current-card,
  .subscription-plan-card
):hover {
  transform: none !important;
}

.message.outbound.message-sending::after,
.unread-badge,
.record-audio-btn.is-recording,
.audio-recording-dot,
.media-fallback-spinner,
.toast::after {
  animation: none !important;
}

.message.outbound.message-sending::after {
  display: none !important;
}

.message.message-jump-highlight {
  animation: performanceMessageJumpNudge 1.45s cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
  border-color: color-mix(in srgb, #facc15 80%, var(--accent, #25d366)) !important;
  contain: layout !important;
}

.message.message-jump-highlight::before {
  content: "";
  position: absolute;
  inset: -0.125rem;
  border: 0.125rem solid color-mix(in srgb, #facc15 86%, white);
  border-radius: inherit;
  background: color-mix(in srgb, #facc15 18%, transparent);
  pointer-events: none;
  z-index: 4;
  animation: performanceMessageJumpRing 1.45s ease-out both !important;
}

@keyframes performanceMessageJumpNudge {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  18% {
    transform: translateY(-0.125rem) scale(1.015);
  }

  38% {
    transform: translateY(0) scale(1);
  }
}

@keyframes performanceMessageJumpRing {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }

  16% {
    opacity: 1;
    transform: scale(1);
  }

  58% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
    transform: scale(1.035);
  }
}

.message,
.conversation-card,
.clients-table tr,
.quotation-row,
.team-chat-message {
  contain: layout paint;
}

@media (prefers-reduced-motion: no-preference) {
  :focus-visible {
    transition-duration: 60ms !important;
  }
}
