/* FilmmakersWorld mobile foundation (shared) */

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(240, 192, 64, 0.28);
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

/* iOS zoom: 16px minimum on form controls */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
select,
textarea {
  font-size: 16px;
}

:focus-visible {
  outline: 2px solid #F0C040;
  outline-offset: 2px;
}

/* Long strings in cards and panels */
.center-card,
.auth-card,
.fw-glow-card,
.apply-panel,
.lead-modal,
.msg-grid,
.form-section,
.card,
.modal-panel,
.modal-inner,
.pitch-gate-box,
.login-box {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Horizontal scroll for wide tables */
.fw-table-scroll,
.table-wrap,
.bf-table-wrap,
#backfill-table-wrap,
#invite-mission-wrap,
.inbox-table-wrap,
.lead-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Tap target floor */
button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn,
a.btn,
.apply-close,
.modal-close,
.notif-close,
.msg-modal-close,
.msg-thread-back,
.shell-menu-btn,
.roster-add {
  min-height: 44px;
  min-width: 44px;
}

.fw-site-nav a,
.fw-footer a,
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.linkbtn,
.toggle-mode button {
  min-height: 44px;
  padding: 10px 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Standalone (Add to Home Screen). No service worker; see manifest.webmanifest _note. */
@media (display-mode: standalone) {
  .fw-site-header {
    padding-top: max(env(safe-area-inset-top), 20px);
  }
  .shell-mobile-header {
    padding-top: max(calc(8px + env(safe-area-inset-top, 0px)), 20px);
  }
  .bar {
    padding-top: max(calc(18px + env(safe-area-inset-top, 0px)), 20px);
  }
  #view-profiles.fm-editor-open {
    padding-top: max(calc(8px + env(safe-area-inset-top, 0px)), 20px);
  }
  .feed-panel.open .feed-panel-head {
    padding-top: max(12px, env(safe-area-inset-top, 0px));
  }
}
