/* batch-20261009 (Rich via Greg 6:37 PM) */
/* 1) iPhone safe area (viewport-fit=cover + black-translucent status bar):
   the green header extends under the status bar / notch; side insets in landscape. */
.site-header {
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .nav-inner {
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
}
.bottom-nav {
  padding-left: env(safe-area-inset-left, 0px) !important;
  padding-right: env(safe-area-inset-right, 0px) !important;
}
/* 4) Touch devices: no smooth-scroll glide when iOS reveals a focused field,
   no tab-bar transition, and 16px fields so iOS never zooms. */
@media (pointer: coarse) {
  html { scroll-behavior: auto !important; }
  .bottom-nav { transition: none !important; }
  input[type="text"], input[type="search"], input[type="email"], input[type="url"],
  input[type="tel"], input[type="password"], input[type="number"], input:not([type]),
  textarea, select { font-size: max(16px, 1em) !important; }
}
/* Things positioned from the header's height must also clear the status-bar inset. */
.notif-panel { top: calc(var(--header-height) + 0.5rem + env(safe-area-inset-top, 0px)) !important; }
@media (max-width: 768px) {
  .site-nav { top: calc(var(--header-height) + env(safe-area-inset-top, 0px)) !important; }
}
/* Oct 10 (Rich, 1:15 AM via Greg): on phones the owner actions (Pin/Unpin, Edit, Delete) get their own row
   below Save/Report, with Delete on the right. Same layout pinned or not. Desktop unchanged. */
@media (max-width: 640px) {
  .post-actions:has(.pin-post-button, .edit-post-button, .delete-post-button)::after {
    content: ""; order: 1; flex-basis: 100%; height: 0;
  }
  .post-actions .pin-post-button,
  .post-actions .edit-post-button,
  .post-actions .delete-post-button { order: 2; margin-left: 0 !important; }
  .post-actions .delete-post-button { margin-left: auto !important; }
}
/* Oct 10 (Rich, 1:31 AM): on phones with the tab bar, the "?" was covering the right end of card buttons
   (Save). Smaller, a bit see-through, tucked closer to the corner; full strength when touched/focused.
   Hide-on-composer rules (help-fab-hidden, kb-open, DM thread) are untouched. Desktop unchanged. */
@media (max-width: 640px) {
  body.has-bottom-nav .help-chat-fab {
    width: 2.25rem; height: 2.25rem; font-size: 1.05rem;
    right: calc(0.4rem + env(safe-area-inset-right, 0px));
    bottom: calc(var(--bottom-nav-height, 64px) + 0.4rem + env(safe-area-inset-bottom, 0px));
    opacity: 0.72;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  body.has-bottom-nav .help-chat-fab:hover,
  body.has-bottom-nav .help-chat-fab:focus-visible,
  body.has-bottom-nav .help-chat-fab:active { opacity: 1; }
  /* Feed pages (For You, single post): a floating button will always land on some card's buttons while
     scrolling, so hide it there like on Me and Messages. Live Help stays in Menu > Help. */
  body.has-bottom-nav[data-home-page] .help-chat-fab,
  body.has-bottom-nav[data-post-page] .help-chat-fab { display: none !important; }
}
