/* Keep the app header and CRM actions reachable while the conversation list scrolls. */
@media (max-width: 767px) {
  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-app-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
  }

  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div.flex.gap-4:first-child {
    position: sticky !important;
    top: var(--crm-mobile-app-header-height, 73px) !important;
    z-index: 50 !important;
    overflow: visible !important;
    background: rgba(11, 11, 15, 0.97);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding-block: 0.5rem;
    row-gap: 0.75rem;
    transition: padding 240ms ease, row-gap 240ms ease;
  }

  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div:first-child > div:first-child {
    max-height: 3.25rem;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 240ms ease, opacity 180ms ease, transform 240ms ease, margin 240ms ease;
  }

  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div:first-child.crm-mobile-heading-collapsed {
    row-gap: 0;
  }

  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div:first-child.crm-mobile-heading-collapsed > div:first-child {
    max-height: 0;
    margin: 0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div:first-child,
  .mobile-dashboard-shell:has(.mobile-crm-shell) .mobile-crm-shell > div:first-child > div:first-child {
    transition-duration: 1ms;
  }
}
