/* 0551gs Site Quality v0.1.0: shared mobile usability fixes. */

.nav-toggle:focus-visible,
.fab:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  /* The current header is white; the previous white icon was not discoverable. */
  .nav-toggle {
    width: 44px !important;
    height: 44px !important;
    color: #1f2937 !important;
    border-radius: 4px;
  }

  /* Reserve space so the persistent action bar never covers page content. */
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .fab-stack {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999;
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    gap: 8px !important;
    padding: 8px max(12px, env(safe-area-inset-right))
      calc(8px + env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.10);
  }

  .fab {
    flex: 1 1 0;
    width: auto !important;
    max-width: 112px;
    height: 48px !important;
    min-height: 48px;
    border-radius: 4px !important;
    gap: 6px;
    box-shadow: none !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
  }

  .fab::after {
    content: attr(aria-label);
    white-space: nowrap;
  }

  .fab svg {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 auto;
  }

  .chat-modal {
    right: 12px !important;
    bottom: calc(72px + env(safe-area-inset-bottom)) !important;
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 96px);
  }
}

