/* USFR mobile menu (owner 2026-10-06: "make it look like usforeclosureleads.com's mobile menu").
   Mirrors the USFL header drawer (right-side panel, 88% / max 384px, navy blurred backdrop,
   300ms fade + slide, staggered rows) in USFR colors: navy #09274c, red #d82221, white panel.
   Applies only at <=991px, where the Webflow nav collapses (data-collapse="medium"), so the
   desktop header (>=992px) is untouched. Values are hardcoded on purpose (no site CSS vars). */

.usfrmm-toggle, .usfrmm-root { display: none; }

@media screen and (max-width: 991px) {
  /* Webflow's hamburger and its dropdown overlay are replaced by ours below the breakpoint. */
  .navbar .w-nav-button { display: none !important; }
  .navbar .w-nav-overlay { display: none !important; }

  .usfrmm-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: 8px; padding: 0;
    border: 1px solid #e4e6f1; border-radius: 6px; background: #ffffff; color: #09274c;
    cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s;
  }
  .usfrmm-toggle:hover { background: #f3f5fb; }
  .usfrmm-toggle svg { width: 22px; height: 22px; display: block; }

  .usfrmm-root {
    display: block; position: fixed; inset: 0; z-index: 2147482000;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
    font-family: "Inter Tight", Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  }
  .usfrmm-root.usfrmm-open { opacity: 1; visibility: visible; }

  .usfrmm-backdrop {
    position: absolute; inset: 0; background: rgba(9, 39, 76, 0.8);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  }

  .usfrmm-panel {
    position: absolute; top: 0; right: 0; height: 100%; height: 100dvh;
    width: 88%; max-width: 384px; display: flex; flex-direction: column; overflow: hidden;
    background: #ffffff; border-left: 1px solid #e4e6f1;
    box-shadow: 0 25px 50px -12px rgba(5, 26, 83, 0.45);
    transform: translateX(100%); transition: transform .3s ease;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .usfrmm-open .usfrmm-panel { transform: translateX(0); }

  .usfrmm-head {
    position: relative; flex-shrink: 0; height: 68px; display: flex; align-items: center;
    justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e4e6f1;
  }
  .usfrmm-logo { display: flex; align-items: center; }
  .usfrmm-logo img { height: 40px; width: auto; max-width: 190px; display: block; }
  .usfrmm-close {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px;
    padding: 0; border: 1px solid #e4e6f1; border-radius: 6px; background: #ffffff; color: #09274c;
    cursor: pointer; transition: background-color .2s;
  }
  .usfrmm-close:hover { background: #f3f5fb; }
  .usfrmm-close svg { width: 20px; height: 20px; }

  .usfrmm-phone {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; background: #09274c; color: #ffffff !important; text-decoration: none !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  }
  .usfrmm-phone svg { width: 18px; height: 18px; color: #34d399; }

  .usfrmm-nav {
    flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain; display: flex; flex-direction: column; padding: 24px 20px;
  }

  .usfrmm-cta {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    height: 48px; margin-bottom: 12px; border-radius: 6px; text-decoration: none !important;
    background: linear-gradient(180deg, #e53a39 0%, #d82221 55%, #b81c1b 100%); color: #ffffff !important;
    font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 8px 24px -8px rgba(216,34,33,0.5);
  }
  .usfrmm-cta .usfrmm-arrow { width: 16px; height: 16px; transition: transform .2s; }
  .usfrmm-cta:hover .usfrmm-arrow { transform: translateX(2px); }

  .usfrmm-pill {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 20px; padding: 10px 16px; border-radius: 9999px; text-decoration: none !important;
    background: #09274c; color: #ffffff !important; text-align: center;
    font-size: 12px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.3;
  }
  .usfrmm-pill:hover { background: #051a53; }

  .usfrmm-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 0; border-bottom: 1px solid #eef0f6; text-decoration: none !important;
  }
  .usfrmm-row-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
  .usfrmm-ic {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 9999px; background: #f3f5fb;
    display: flex; align-items: center; justify-content: center;
  }
  .usfrmm-ic img, .usfrmm-ic .usfrmm-emo { width: 22px; height: 22px; object-fit: contain; font-size: 18px; line-height: 22px; text-align: center; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2)); }
  .usfrmm-label {
    font-size: 20px; font-weight: 700; letter-spacing: -0.01em; color: #09274c; transition: color .2s;
  }
  .usfrmm-row:hover .usfrmm-label, .usfrmm-row.usfrmm-cur .usfrmm-label { color: #d82221; }
  .usfrmm-go {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 9999px; border: 1px solid #e4e6f1;
    color: #6a718a; display: flex; align-items: center; justify-content: center; transition: all .2s;
  }
  .usfrmm-go svg { width: 16px; height: 16px; }
  .usfrmm-row:hover .usfrmm-go { border-color: rgba(216,34,33,0.4); color: #d82221; }

  .usfrmm-open .usfrmm-anim { animation: usfrmmSlideIn .4s ease-out both; }
  @keyframes usfrmmSlideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

  .usfrmm-foot {
    flex-shrink: 0; padding: 18px 20px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e4e6f1; background: #f8f9fc;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
  }
  .usfrmm-flags, .usfrmm-social { display: flex; align-items: center; justify-content: center; gap: 10px; }
  .usfrmm-flag {
    width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid #e4e6f1;
    background-size: cover; background-position: center; cursor: pointer; transition: all .2s;
  }
  .usfrmm-flag.usfrmm-on { border: 3px solid #d82221; box-shadow: 0 2px 8px rgba(9,39,76,0.25); }
  .usfrmm-soc {
    width: 36px; height: 36px; border-radius: 9999px; display: flex; align-items: center; justify-content: center;
    background: #09274c; color: #ffffff !important; text-decoration: none !important; transition: background-color .2s;
  }
  .usfrmm-soc:hover { background: #d82221; }
  .usfrmm-soc svg { width: 18px; height: 18px; }
  .usfrmm-legal {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: #6a718a; text-align: center;
  }

  @media (prefers-reduced-motion: reduce) {
    .usfrmm-root, .usfrmm-panel { transition: none; }
    .usfrmm-open .usfrmm-anim { animation: none; }
  }
}
