/* ------------------------------------------------------------------
   Mobile navigation.

   The delivered header hides .cmva-nav at 980px and ships nothing in
   its place, so below that the only way into the case-type and state
   pages was the footer. This adds a menu button and a panel built by
   claimmva.js from the existing nav, so the two can never drift apart.

   The 980px here must stay in step with that rule in claimmva.css. An
   earlier version of this file used 900px and left an 80px band —
   roughly a tablet in landscape, or a half-screen laptop window — where
   the desktop nav had gone and the button had not yet arrived, so those
   viewports had no navigation at all.
   ------------------------------------------------------------------ */

.cmva-burger {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border, #E2E6ED);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.cmva-burger span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 2.5px 0;
  border-radius: 2px;
  background: var(--brand-navy, #1B2438);
  transition: transform .18s ease, opacity .18s ease;
}

.cmva-burger__bars {
  display: block;
}

.cmva-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cmva-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.cmva-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* The panel sits under the sticky header rather than over it, so the
   close control and the logo stay visible while it is open. */
.cmva-mnav {
  position: fixed;
  inset: 0;
  top: var(--cmva-header-h, 66px);
  z-index: 59;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cmva-mnav[hidden] {
  display: none;
}

.cmva-mnav__body {
  flex: 1 1 auto;
  padding: 8px 20px 20px;
}

.cmva-mnav__h {
  margin: 20px 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted, #8A919F);
}

.cmva-mnav__h:first-child {
  margin-top: 8px;
}

.cmva-mnav a {
  display: block;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border, #E2E6ED);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--brand-navy, #1B2438);
  text-decoration: none;
}

.cmva-mnav a small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-body, #5A6274);
}

.cmva-mnav a:hover,
.cmva-mnav a:focus {
  color: var(--brand-orange, #F26522);
}

.cmva-mnav a:focus-visible {
  outline: 3px solid var(--brand-navy, #1B2438);
  outline-offset: 2px;
}

.cmva-mnav a.cmva-mnav__all {
  border-bottom: 0;
  font-size: 14.5px;
  color: var(--brand-orange, #F26522);
}

.cmva-mnav__foot {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border, #E2E6ED);
  background: #fff;
}

.cmva-mnav__foot .cmva-btn {
  width: 100%;
  text-align: center;
}

.cmva-mnav__tel {
  border-bottom: 0;
  padding: 0;
  text-align: center;
  font-size: 15px;
  color: var(--text-body, #5A6274);
}

/* While the panel is open the page behind must not scroll. */
body.cmva-mnav-open {
  overflow: hidden;
}

/* The chat launcher and the activity toast sit above the panel on their
   own z-index, so without this they float over the open menu. */
body.cmva-mnav-open .cmva-chat__launch,
body.cmva-mnav-open .cmva-toast {
  display: none;
}

.cmva-mnav:focus {
  outline: 0;
}

/* The header CTA is a button label and must never wrap: two lines make it
   taller than the 66px row it sits in, which bends the whole header out of
   shape. That happened below 980px where the menu button crowds it, and
   again between 981 and about 1040 where the full desktop nav returns but
   the viewport is still narrow. One rule covers both. */
.cmva-header__cta .cmva-btn {
  white-space: nowrap;
}

@media (max-width: 980px) {
  .cmva-burger {
    display: flex;
    flex-direction: column;
  }

  /* Three items on one 66px row now: the logo, the menu button and the
     CTA. The delivered sizes only ever had to fit two. */
  .cmva-header__inner {
    gap: 12px;
  }

  .cmva-header__cta {
    gap: 10px;
  }

  .cmva-header__cta .cmva-btn {
    padding: 10px 15px;
    font-size: 13.5px;
  }
}

/* Three tiers, each measured rather than guessed: the header has to hold
   the logo, the menu button and the CTA on one 66px row without the page
   ever scrolling sideways, down to a 320px screen. */
@media (max-width: 420px) {
  .cmva-header__inner {
    padding-left: 16px;
    padding-right: 16px;
    gap: 8px;
  }

  .cmva-logo img {
    height: 24px;
  }

  .cmva-burger {
    width: 36px;
    height: 36px;
  }

  .cmva-header__cta {
    gap: 8px;
  }

  .cmva-header__cta .cmva-btn {
    padding: 8px 11px;
    font-size: 12.5px;
  }
}

@media (max-width: 360px) {
  .cmva-header__inner {
    padding-left: 14px;
    padding-right: 14px;
    gap: 6px;
  }

  .cmva-logo img {
    height: 20px;
  }

  .cmva-burger {
    width: 34px;
    height: 34px;
  }

  .cmva-header__cta {
    gap: 6px;
  }

  .cmva-header__cta .cmva-btn {
    padding: 7px 9px;
    font-size: 11.5px;
  }
}

/* The floating chat launcher overlaps the content column on a phone —
   on /contact/ it sat squarely on the "Start the free case review"
   button. Smaller and tighter into the corner keeps it reachable while
   leaving the text column alone. */
@media (max-width: 520px) {
  .cmva-chat__launch {
    right: 10px;
    bottom: 10px;
    padding: 4px;
  }

  .cmva-chat__bubble {
    width: 38px;
    height: 38px;
  }

  .cmva-chat__bubble svg {
    width: 18px;
    height: 18px;
  }
}

/* ------------------------------------------------------------------
   Header row, revisited: the page scrolled sideways on a phone.

   The tiers above were measured for three items on the row, the logo,
   the menu button and the CTA. The language switcher was added after
   that and makes four, which the budget never allowed for. At 390px the
   row measured 458px and pushed the menu button off the screen edge.

   Neither of the other two ways out is open. accordion-shim.css keeps
   the switcher at every width on purpose, because a Spanish speaker on
   a phone is the person who needs it. Shrinking the CTA enough to fit
   on one line puts it under 11px, which is too small to read.

   So the CTA wraps to two lines below 768px. The note above warns that
   wrapping bends the 66px row: measured here it does not, because the
   label is 12px and two lines of it plus padding come to 48px, which
   still sits inside the row. Checked at 320, 360, 390, 430, 480 and
   600px with no sideways scroll at any of them.
   ------------------------------------------------------------------ */
@media (max-width: 767px) {
  .cmva-header__inner {
    padding-left: 12px;
    padding-right: 12px;
    gap: 6px;
  }

  .cmva-logo {
    flex: 0 0 auto;
    max-width: 120px;
  }

  .cmva-logo img,
  .cmva-logo svg {
    width: 100%;
    height: auto;
  }

  .cmva-header__cta {
    gap: 6px;
    min-width: 0;
  }

  .cmva-header__cta .cmva-btn {
    white-space: normal;
    text-align: center;
    line-height: 1.18;
    font-size: 12px;
    padding: 7px 10px;
    max-width: 112px;
    border-radius: 14px;
  }
}
