/* Tamanho comum para ações textuais em telas e modais da Looply. */
:root body :is(
  .button:not(.icon-button),
  .file-button,
  .appbar-primary-action,
  .portal-primary-button,
  .portal-secondary-button,
  .portal-payment-button,
  .auth-link-button,
  .portal-resend-code-button,
  .action-menu-list button,
  .pagination-button,
  .staff-card button,
  .modal-actions > button
) {
  box-sizing: border-box !important;
  height: auto !important;
  min-height: var(--looply-button-height-emphasis, 40px) !important;
  padding: 8px 16px !important;
  line-height: 20px !important;
}

/* Controles de ícone mantêm o alvo de toque, sem virar botões emoldurados. */
:root body :is(.icon-button, .appbar-icon-button, #notificationToggle) {
  box-sizing: border-box !important;
  width: var(--looply-button-height-emphasis, 40px) !important;
  min-width: var(--looply-button-height-emphasis, 40px) !important;
  height: var(--looply-button-height-emphasis, 40px) !important;
  min-height: var(--looply-button-height-emphasis, 40px) !important;
}

:root body #appbarRefreshButton {
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--looply-color-text, #1f1f1f) !important;
}
:root body #appbarRefreshButton:hover,
:root body #appbarRefreshButton:focus-visible,
:root body #appbarRefreshButton:active {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--looply-color-text, #1f1f1f) !important;
}
:root body #appbarRefreshButton:focus-visible { outline: 2px solid var(--looply-color-brand, #e0115f) !important; outline-offset: 2px; }

/* Em mobile, só o modal rola. O backdrop fica preso e o scroll não encadeia
   para a página nem usa o efeito elástico do scroll nativo do iOS. */
@media (max-width: 760px) {
  :root body .modal-backdrop {
    overflow: hidden !important;
    overscroll-behavior: none !important;
  }
  :root body .modal-backdrop .modal {
    overscroll-behavior-y: none !important;
    -webkit-overflow-scrolling: auto !important;
  }
}
:root body #appbarRefreshButton i[data-lucide] { --icon-size: 20px; }
:root body #appbarRefreshButton[aria-busy="true"] svg { animation: looply-refresh-spin 900ms linear infinite; }
@keyframes looply-refresh-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  :root body #appbarRefreshButton[aria-busy="true"] svg { animation: none !important; }
}
