/* Motion is presentation-only; native navigation, forms and focus remain intact. */
@media (prefers-reduced-motion: no-preference) {
  :is(.nav-item, .topbar-shortcut, .account-menu-panel a, .account-menu-panel button,
      .el-workspace-tabs a, .dc-tabs a, [data-ranking-tab], .public-nav a, .contact-nav a) {
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  }
  :is(.admin-link, .dc-button, .small-action, .cookie-button, .pwa-close, .wa-send-button) {
    transition: background-color 150ms ease, color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  }
  :is(button, a)[aria-busy="true"], button:disabled { transition: opacity 150ms ease; }
  .menu-toggle span, .account-menu > summary::after { transition: transform 180ms ease, opacity 150ms ease; }
  .page, .login-form-panel, .account-panel, .contact-content { animation: ui-surface-in 160ms ease-out; }
  .account-menu[open] > .account-menu-panel { animation: ui-menu-in 160ms ease-out; transform-origin: top right; }
  .whatsapp-legal-dialog, .loading-card { animation: ui-menu-in 180ms ease-out; }

  @supports selector(details::details-content) {
    .account-menu::details-content { opacity: 0; transition: opacity 160ms ease, content-visibility 160ms allow-discrete; }
    .account-menu[open]::details-content { opacity: 1; }
  }

  @supports (interpolate-size: allow-keywords) and selector(details::details-content) {
    details:not(.account-menu):not([data-motion="off"]) { interpolate-size: allow-keywords; }
    details:not(.account-menu):not([data-motion="off"])::details-content {
      block-size: 0;
      opacity: 0;
      overflow: clip;
      transition: block-size 200ms ease, opacity 150ms ease, content-visibility 200ms allow-discrete;
    }
    details[open]:not(.account-menu):not([data-motion="off"])::details-content { block-size: auto; opacity: 1; }
  }
  @supports not (interpolate-size: allow-keywords) {
    details[open]:not(.account-menu):not([data-motion="off"]) > :not(summary) { animation: ui-surface-in 150ms ease-out; }
  }

  dialog {
    opacity: 0;
    transform: translateY(6px) scale(0.99);
    transition: opacity 180ms ease, transform 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete;
  }
  dialog[open] { opacity: 1; transform: none; }
  dialog::backdrop { opacity: 0; transition: opacity 180ms ease, display 180ms allow-discrete, overlay 180ms allow-discrete; }
  dialog[open]::backdrop { opacity: 1; }
  @starting-style {
    dialog[open] { opacity: 0; transform: translateY(6px) scale(0.99); }
    dialog[open]::backdrop { opacity: 0; }
  }
  @supports not (transition-behavior: allow-discrete) {
    dialog[open] { animation: ui-menu-in 180ms ease-out; }
  }
}

@media (max-width: 1020px) {
  .ui-v2 .nav-reveal { display: grid; grid-template-rows: 0fr; visibility: hidden; }
  .ui-v2 .nav-reveal > .nav-list { display: grid; min-height: 0; overflow: hidden; margin-top: 0; }
  .ui-v2 .sidebar.menu-open .nav-reveal { grid-template-rows: 1fr; visibility: visible; margin-top: 18px; }
}
@media (max-width: 1020px) and (prefers-reduced-motion: no-preference) {
  .ui-v2 .nav-reveal { transition: grid-template-rows 200ms ease, margin-top 200ms ease, visibility 200ms; }
  .ui-v2 .sidebar.menu-open .nav-reveal { transition: grid-template-rows 200ms ease, margin-top 200ms ease, visibility 0s; }
}

@keyframes ui-surface-in { from { opacity: 0.35; } to { opacity: 1; } }
@keyframes ui-menu-in { from { opacity: 0; transform: translateY(-4px) scale(0.99); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .nav-reveal, .menu-toggle span, .account-menu > summary::after, .account-menu-panel, dialog, dialog::backdrop { transition: none !important; }
  .page, .login-form-panel, .account-panel, .contact-content, .account-menu-panel, dialog { animation: none !important; }
}
@media print {
  .page, .login-form-panel, .account-panel, .contact-content { animation: none !important; }
}
