/* Loyalsnap mobile layout (< 760px). Works with mobile.js. */
@media (max-width: 759.98px) {
  html, body { overflow-x: clip; }
  /* hide the page until the mobile layout is applied (fallback after 1.2s) */
  html:not(.ls-mready) body { opacity: 0; animation: ls-mshow 0s linear 1.2s forwards; }
  @keyframes ls-mshow { to { opacity: 1; } }

  /* Header */
  header nav, header .lsr { display: none !important; }
  header a[href*="portal.loyalsnap.com/login"], header a[href="/get-started"] { display: none !important; }
  header > div { padding-left: 16px !important; padding-right: 16px !important; gap: 8px !important; }
  header img.ls-logo-light, header img.ls-logo-dark { height: 32px !important; }
  .ls-mbtn { all: unset; box-sizing: border-box; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text-primary); cursor: pointer; }
  .ls-mbtn:focus-visible, .ls-mclose:focus-visible { box-shadow: 0 0 0 2px var(--border-focus-ring, #3255B859); }

  .ls-mnav { position: fixed; inset: 0; z-index: 6000; background: var(--bg-canvas); overflow-y: auto; padding: 12px 16px 32px; display: flex; flex-direction: column; gap: 8px;
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s ease, transform .25s cubic-bezier(.16,1,.3,1), visibility 0s linear .25s; }
  .ls-mnav.on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .25s cubic-bezier(.16,1,.3,1); }
  .ls-mnav-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 8px; }
  .ls-mnav .ls-mnav-top img { height: 32px !important; }
  .ls-mclose { all: unset; box-sizing: border-box; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--text-primary); cursor: pointer; }
  .ls-mnav-main, .ls-mnav-res { display: flex; flex-direction: column; }
  .ls-mnav-main a { padding: 14px 4px; font: 700 20px/28px var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-default); }
  .ls-mnav-res a { padding: 10px 4px; font: 600 16px/24px var(--font-body); color: var(--text-primary); text-decoration: none; }
  .ls-mnav a[aria-current="page"] { color: var(--text-brand); }
  .ls-mnav-lbl { margin-top: 16px; padding: 0 4px; font: 700 12px/16px var(--font-body); color: var(--text-secondary); }
  .ls-mnav-cta { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
  .ls-mnav-cta a { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 12px; font: 700 16px/24px var(--font-body); text-decoration: none; }
  .ls-mnav-login { background: var(--action-tinted); color: var(--text-brand); }
  .ls-mnav-go { background: #3255B8; color: #fff; }

  /* General */
  img { max-width: 100%; }
  .ls-mzoom { transform-origin: top left; }
  input, select, textarea { font-size: 16px !important; } /* no zoom-in on focus in iOS */
}
@media (min-width: 760px) { .ls-mbtn, .ls-mnav { display: none !important; } }
@media (max-width: 759.98px) {
  .ls-marquee, .ls-marquee * { zoom: normal !important; }
  .ls-m .fx-text { order: -1; }
}
@media (max-width: 759.98px) {
  /* Tab bars scroll sideways instead of wrapping */
  .wb-tabs, .bl-tabs, .rp-tabs, .ck-tabs, .hw-jt, .ls-mtabs { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wb-tabs::-webkit-scrollbar, .bl-tabs::-webkit-scrollbar, .rp-tabs::-webkit-scrollbar, .ck-tabs::-webkit-scrollbar, .hw-jt::-webkit-scrollbar, .ls-mtabs::-webkit-scrollbar { display: none; }
  .wb-tabs > *, .bl-tabs > *, .rp-tabs > *, .ck-tabs > *, .hw-jt > *, .ls-mtabs > * { flex: 0 0 auto !important; white-space: nowrap; }
}
@media (max-width: 759.98px) {
  /* Features Auto Send: connector only makes sense side by side */
  .ls-m .m-auto.two .m-con { display: none !important; }
  .ls-m .m-auto.two .m-out { padding-top: 16px !important; }
}
@media (max-width: 759.98px) {
  /* Header always stays one row: logo left, search and menu right */
  header > div { flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: space-between !important; }

  /* Menu: Resources opens and closes */
  .ls-mnav-rbtn { all: unset; box-sizing: border-box; width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 14px 4px; font: 700 20px/28px var(--font-display); letter-spacing: -0.01em; color: var(--text-primary); border-bottom: 1px solid var(--border-default); cursor: pointer; }
  .ls-mnav-rbtn svg { color: var(--text-secondary); transition: transform .25s ease; }
  .ls-mnav-rbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .ls-mnav-rbtn:focus-visible { box-shadow: 0 0 0 2px var(--border-focus-ring, #3255B859); border-radius: 8px; }
  .ls-mnav-res { padding: 4px 0 8px 12px; border-bottom: 1px solid var(--border-default); }
  .ls-mnav-res[hidden] { display: none !important; }

  /* Side menus and tables of contents scroll with the page instead of sticking over it */
  .fq-nav, .bp-toc, .wd-side, .ck-intro { position: static !important; }

  /* Blog: search field full width */
  .bl-search { width: 100% !important; margin-left: 0 !important; }

  /* Video player */
  .vd-lb { padding: 16px !important; }
  .vd-lb-x { top: 16px !important; right: 16px !important; width: 40px !important; height: 40px !important; }

  /* Features: less empty space around each animation */
  .fx-art { min-height: 0 !important; padding: 0 !important; }

  /* Integrations: step text first, then its animation */
  .c3-card .c3-vis { order: 9; height: auto !important; min-height: 0; margin: 8px 0 0 !important; }
  .ia { padding-left: 0 !important; padding-right: 0 !important; }

  /* Home journey: animation sits under the open step, no extra space */
  .hw .hw-stage { order: 0 !important; margin: 4px 0 12px; }
  .hw .sc { padding: 12px 0 !important; }
  .hw .hw-stage { transition: height .35s ease; }
  .hw .hw-sub { margin-bottom: 20px !important; }

  /* Testimonials: list with the story open under the chosen person; no auto-advance */
  .hm-rail, .fh-tm-rail { flex-direction: column !important; overflow: visible !important; padding: 0 !important; scroll-snap-type: none !important; }
  .hm-tab, .fh-tm-tab { width: auto !important; flex: 0 0 auto !important; transform: none !important; }
  .hm-ring, .fh-tm-ring { display: none !important; }
  #hm-panel, .fh-tm-panel { margin: 4px 0 12px; min-height: 0 !important; }
}
@media (max-width: 759.98px) {
  .ls-mnav-res .ls-mnav-lbl:first-child { margin-top: 8px; }
  .ls-mnav-res .ls-mnav-lbl { padding: 0; margin-bottom: 4px; }
  /* FIT testimonials: room for the quote mark under the photo */
  .fh-tq-body { padding-top: 64px !important; }
}
@media (max-width: 759.98px) {
  /* Home testimonials: photo fits the card width */
  #hm-panel .hm-ph { min-height: 0 !important; width: 100% !important; aspect-ratio: 9 / 10 !important; }
}
@media (max-width: 759.98px) {
  /* Pill tabs: all options visible on one line */
  .ls-m .ls-pilltabs { display: flex !important; width: 100% !important; max-width: 100% !important; overflow: visible !important; gap: 2px !important; box-sizing: border-box; }
  .ls-m .ls-pilltabs > * { flex: 1 1 auto !important; min-width: 0; white-space: nowrap !important; padding: 8px 10px !important; font-size: 13px !important; line-height: 20px !important; text-align: center !important; justify-content: center; }
  /* Loyalsnap Intelligence chat: table rows stay on one line */
  .ai-tr { grid-template-columns: minmax(0, 1fr) auto auto !important; gap: 10px !important; padding: 8px 10px !important; font-size: 13px !important; }
  .ai-tr > * { white-space: nowrap; }
  .ai-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 379.98px) {
  .ai-tr { gap: 6px !important; padding: 8px !important; font-size: 12px !important; }
  .ai-who { gap: 6px !important; }
}
@media (max-width: 759.98px) {
  /* Buttons keep their label on one line; the row wraps instead */
  .ls-m :is(.ls-bp, .ls-bs, .ls-bw, .ls-tl) { white-space: nowrap; }
}
