/* =====================================================================
   TailCMS landing-page enhancements (lp-enhance.css)

   MINIMAL on purpose. The landing-page design comes entirely from the
   recreate (Webflow) files and is left untouched. This file only adds:
     1) the mobile navigation (hamburger menu)
     2) the api-demo block fitting on small screens
   Nothing else here changes the given design.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1) api-demo — fit on small screens (it used a fixed 780px width and a
      non-shrinking flex row, which pushed it off-screen on phones)
   --------------------------------------------------------------------- */
@media screen and (max-width: 1024px) {
  .how-to {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
    gap: 16px !important;
  }
  .how-to > *,
  .how-to .w-embed,
  .how-to .plan_content_top {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .api-demo {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .api-demo__code-wrapper {
    overflow-x: auto;
    max-width: 100%;
  }
}

/* ---------------------------------------------------------------------
   2) Mobile navigation (hamburger menu)
      Hidden on desktop; on <=991px the desktop nav is hidden and the
      hamburger + slide-down menu (injected in index.html) are shown.
   --------------------------------------------------------------------- */
#lpBurger,
#lpMenu {
  display: none;
}

@media screen and (max-width: 1024px) {
  /* hide the desktop nav — everything moves into the hamburger menu */
  .navibar-box,
  .menu,
  .verticle-bar,
  .navi-card,
  .nav-head,
  .header-grid .linkblock,
  .header-grid .navi-link {
    display: none !important;
  }

  #lpBurger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Sits inside .header-grid (flex, align-items:center) so it is always
       vertically centred with the logo, on any header height. */
    position: static;
    margin-left: auto;
    align-self: center;
    flex: 0 0 auto;
    z-index: 100000;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #e7e9f3;
    background: #fff;
    font-size: 20px;
    line-height: 1;
    color: #00005d;
    cursor: pointer;
    margin-right: 10px;
  }

  #lpMenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: fixed;
    top: 80px;
    left: 10px;
    right: 10px;
    z-index: 99999;
    background: #fff;
    border: 1px solid #e7e9f3;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(13, 16, 45, .18);
    padding: 12px;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }

  body.lp-menu-open #lpMenu {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  #lpMenu a {
    padding: 13px 14px;
    border-radius: 10px;
    color: #26283b;
    font-weight: 600;
    text-decoration: none;
  }
  #lpMenu a:hover {
    background: #f5f7fb;
  }
  #lpMenu .lp-menu-sep {
    height: 1px;
    background: #e7e9f3;
    margin: 8px 4px;
  }
  #lpMenu a.lp-cta {
    background: #293895;
    color: #fff !important;
    text-align: center;
    margin-top: 4px;
  }
  #lpMenu a.lp-cta-ghost {
    border: 1px solid #e7e9f3;
    text-align: center;
  }
}

/* =====================================================================
   3) Requested tweaks (pricing toggle, header alignment, plan buttons)
   ===================================================================== */

/* Pricing Monthly / Annually → tidy horizontal segmented control */
.plan-button-2 {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  padding: 6px;
  background: #eef0fb;
  border: 1px solid #e7e9f3;
  border-radius: 999px;
  width: auto;
  max-width: 100%;
}
.monthly-button,
.annually-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 10px 26px !important;
  border-radius: 999px !important;
  font-weight: 700;
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
  color: #6b6f86 !important;
  background: transparent !important;
}
.monthly-button.active,
.annually-button.active {
  background-color: #00005d !important;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(0, 0, 93, .25);
}

/* Plan CTA buttons: turn white text on hover (Starter / Enterprise match PRO) */
.button-2:hover,
.button-2:hover div,
.button-2:hover * {
  color: #fff !important;
}
.button-2:hover {
  background-color: #00005d !important;
}

/* Header: vertically align the hamburger with the logo (logo is centred in
   the ~71px header, so centre the burger too) */
@media screen and (max-width: 1024px) {
  #lpBurger { top: 13px; right: 16px; }
}

/* LP header on phones: drop the rigid CSS grid so the logo is not clipped */
@media screen and (max-width: 1024px) {
  .header-grid {
    display: flex !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 10px;
  }
  .header-icon { flex: 0 0 auto; }
}
