/* Un mismo ritmo para las respuestas de la interfaz, desde la portada hasta el panel. */
@media (prefers-reduced-motion: no-preference) {
  :root {
    --amenia-touch: 120ms;
    --amenia-enter: 190ms;
    --amenia-ease: cubic-bezier(.2, .7, .3, 1);
  }

  :where(button, a.button, input, select, textarea, summary) {
    transition-property: background-color, border-color, color, box-shadow;
    transition-duration: var(--amenia-touch);
    transition-timing-function: ease-out;
  }

  :where(button, a.button) {
    transition-property: background-color, border-color, color, box-shadow, translate;
  }

  :where(button, a.button):active:not(:disabled) {
    translate: 0 1px;
  }

  .unread-dot {
    position: relative;
    animation: amenia-dot 3.4s ease-in-out infinite;
  }
  .unread-dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    pointer-events: none;
    animation: amenia-ring 3.4s ease-out infinite;
  }

  .hero-copy, .access-panel, .workspace-view.section-entry,
  dialog[open].amenia-dialog, #account-panel:popover-open,
  .message-arrival, .ok:not(:empty), .err:not(:empty), #fr:not(:empty) {
    animation: amenia-appear var(--amenia-enter) var(--amenia-ease);
  }

  @media (max-width: 920px) {
    .app-shell nav.expanded {
      animation: amenia-appear var(--amenia-enter) var(--amenia-ease);
    }
  }

  @keyframes amenia-dot {
    0%, 42%, 100% { opacity: 1; }
    20% { opacity: .76; }
  }

  @keyframes amenia-ring {
    0% { opacity: .30; transform: scale(1); }
    45%, 100% { opacity: 0; transform: scale(1.85); }
  }

  @keyframes amenia-appear {
    from { opacity: .70; translate: 0 3px; }
    to { opacity: 1; translate: 0 0; }
  }
}
@media (forced-colors: active) {
  .unread-dot { background: CanvasText; }
  .unread-dot::after { display: none; }
}
