/* FileMakr site footer — white multi-column layout */
.fm-footer {
  --fm-brand: #2a47ff;
  --fm-accent: #f17f23;
  --fm-ink: #0e1220;
  --fm-muted: #64748b;
  --fm-line: #e8eaef;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--fm-ink);
  margin-top: 0;
  background: #ffffff;
}

.fm-footer *,
.fm-footer *::before,
.fm-footer *::after {
  box-sizing: border-box;
}

.fm-footer__main {
  padding: 40px 20px 28px;
  background: #ffffff;
}
.fm-footer__top {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 28px 32px;
  align-items: start;
}

.fm-footer__logo img {
  width: 140px;
  height: auto;
  display: block;
}

.fm-footer__brand-text {
  margin: 14px 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #4b5563;
}

.fm-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fm-footer__social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--fm-line);
  background: #ffffff;
  display: grid;
  place-items: center;
  color: #4b5563;
  font-size: 15px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
}

.fm-footer__social a:hover {
  border-color: rgba(42, 71, 255, 0.35);
  color: var(--fm-brand);
  transform: translateY(-1px);
}

.fm-footer__social img {
  width: 16px;
  height: 16px;
  display: block;
}

.fm-footer__cols {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 18px 16px;
}

.fm-footer__heading {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0e1220;
  line-height: 1.3;
}

.fm-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.fm-footer__links a {
  color: #4b5563;
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.fm-footer__links a:hover {
  color: var(--fm-brand);
}

.fm-footer__pay {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
  align-items: stretch;
  width: 100%;
  max-width: 180px;
}

.fm-footer__pay-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 0;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(14, 18, 32, 0.04);
  overflow: hidden;
}

.fm-footer__pay-badge img,
.fm-footer__pay-badge svg {
  display: block;
  height: 18px;
  width: auto;
  max-width: 100%;
  flex-shrink: 0;
}

.fm-footer__legal {
  border-top: 1px solid var(--fm-line);
  background: #ffffff;
  padding: 14px 0;
}

.fm-footer__legal-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}

.fm-footer__legal-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.fm-footer__legal-nav a {
  color: #6b7280;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.fm-footer__legal-nav a:hover {
  color: var(--fm-brand);
}

.fm-footer__copy {
  margin: 0;
  font-size: 12.5px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 1199px) {
  .fm-footer__cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .fm-footer__top {
    grid-template-columns: 1fr;
  }

  .fm-footer__cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .fm-footer__main {
    padding: 28px 20px 20px;
  }

  .fm-footer__cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
  }
}

@media (max-width: 420px) {
  .fm-footer__cols {
    grid-template-columns: 1fr;
  }
}

/* Legacy footer class compatibility */
.fm-footer.footer {
  background: #fff;
}

.fm-footer .footer-top {
  padding-top: 0;
}

/* Match homepage / pr-page gutters: full width, 20px sides on the section */
.fm-footer .container,
.fm-footer .fm-footer__legal-inner.container {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

.fm-footer__legal {
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 575.98px) {
  .fm-footer__main {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }

  .fm-footer__legal {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }
}

/* =========================================================
   Mobile bottom app navigation — full-width bar
   ========================================================= */
:root {
  --fm-app-nav-h: 68px;
  --fm-app-nav-float-gap: 0px;
  --fm-app-nav-orange: #f17f23;
  --fm-app-nav-blue: #2a47ff;
  --fm-app-nav-ink: #0e1220;
  --fm-app-nav-muted: #707070;
  --fm-app-nav-badge: #16a34a;
}

.app-nav {
  display: none;
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(var(--fm-app-nav-h) + var(--fm-app-nav-float-gap) + env(safe-area-inset-bottom, 0px) + 6px) !important;
  }

  .fm-footer {
    padding-bottom: 4px;
  }

  .app-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    z-index: 9998 !important;
    display: block !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
    margin: 0 !important;
    pointer-events: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .app-nav__dock {
    pointer-events: auto;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 0;
    width: 100%;
    min-height: calc(var(--fm-app-nav-h) + env(safe-area-inset-bottom, 0px));
    padding: 4px 0 calc(3px + env(safe-area-inset-bottom, 0px));
    border-radius: 18px 18px 0 0;
    background: #ffffff;
    border: 1px solid rgba(14, 18, 32, 0.06);
    border-bottom: 0;
    box-shadow: 0 -4px 16px rgba(14, 18, 32, 0.06);
    overflow: hidden;
    position: relative;
  }

  .app-nav__item {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 2px 8px;
    margin: 0;
    text-decoration: none !important;
    color: var(--fm-app-nav-muted);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
  }

  .app-nav__item::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: transparent;
    transform: translateX(-50%);
    transition: background 0.15s ease;
  }

  .app-nav__item:focus {
    outline: none;
  }

  .app-nav__item:focus-visible {
    outline: 2px solid var(--fm-app-nav-blue);
    outline-offset: 2px;
  }

  .app-nav__item:active {
    transform: scale(0.97);
  }

  .app-nav__item > i {
    font-size: 21px;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: color 0.15s ease;
  }

  .app-nav__label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: inherit;
  }

  .app-nav__item.is-active {
    color: var(--fm-app-nav-orange);
    font-weight: 700;
  }

  .app-nav__item.is-active::before {
    background: var(--fm-app-nav-orange);
  }

  .app-nav__item--code:not(.is-active) > i {
    color: var(--fm-app-nav-orange);
  }

  .app-nav__item--code:not(.is-active) {
    color: var(--fm-app-nav-muted);
  }

  .app-nav__item--report:not(.is-active) {
    justify-content: flex-end;
    padding: 2px 0 6px;
    gap: 1px;
    overflow: visible;
    z-index: 2;
  }

  .app-nav__item--report.is-active {
    justify-content: center;
  }

  .app-nav__item--chat > i {
    color: #25d366 !important;
    font-size: 22px;
  }

  .app-nav__item--chat.is-active .app-nav__label {
    color: var(--fm-app-nav-orange);
  }

  .app-nav__flag {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 10px 3px;
    margin: 0 0 1px;
    border-radius: 999px;
    border: 1px solid rgba(22, 163, 74, 0.35);
    background: #f0fdf4;
    color: var(--fm-app-nav-badge);
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    box-sizing: border-box;
    width: fit-content;
    max-width: none;
    flex-shrink: 0;
    min-width: auto;
    overflow: hidden;
  }

  .app-nav__flag i {
    font-size: 9px;
    width: auto;
    height: auto;
    margin-right: 1px;
    color: var(--fm-app-nav-badge);
    flex-shrink: 0;
  }

  .app-nav__item--report.is-active .app-nav__flag {
    display: none;
  }

  /* Legacy selectors */
  .app-nav__item.active,
  .app-nav a.active {
    color: var(--fm-app-nav-orange);
    font-weight: 700;
  }

  .app-nav__item.active::before,
  .app-nav a.active::before {
    background: var(--fm-app-nav-orange);
  }

  .app-nav .thumb-icon {
    font-size: 21px !important;
    line-height: 1 !important;
    color: #25d366 !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  .wa-fab {
    bottom: calc(var(--fm-app-nav-h) + var(--fm-app-nav-float-gap) + 14px + env(safe-area-inset-bottom, 0px));
  }

  .pr-list-sticky {
    bottom: calc(var(--fm-app-nav-h) + var(--fm-app-nav-float-gap) + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.pr-report-sticky-active {
    padding-bottom: calc(var(--fm-app-nav-h) + var(--fm-app-nav-float-gap) + var(--prStickyDockH, 56px) + env(safe-area-inset-bottom, 0px) + 6px) !important;
  }
}

@media (min-width: 992px) {
  .app-nav {
    display: none !important;
  }
}
