/* RouteIQ shared mobile navigation */

.routeiq-mobile-bar {
  display: none;
}

@media (max-width: 920px) {
  body > .site-header,
  body > header.topbar,
  body > header.shell,
  body > .app-header,
  body > header.app-header,
  .page-shell > header.topbar,
  .app-header {
    display: none !important;
  }

  .routeiq-mobile-bar {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    height: 60px;
    min-height: 60px;
    padding: 0 14px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: sticky;
    top: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(220, 224, 235, 0.96);
    box-shadow: none;
    backdrop-filter: blur(12px);
  }

  .routeiq-mobile-pill {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    background: #1f1f23;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
  }

  .routeiq-mobile-wordmark {
    justify-self: center;
    color: #111a52;
    text-decoration: none;
    font-size: 18px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
    white-space: nowrap;
  }

  .routeiq-mobile-login {
    justify-self: end;
    color: #111a52;
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
  }

  .routeiq-mobile-menu-button {
    justify-self: end;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111a52;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    margin: 0;
    box-shadow: none;
    cursor: pointer;
  }

  .routeiq-mobile-menu-button span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    display: block;
    transition: transform 0.16s ease, opacity 0.16s ease;
  }

  .routeiq-mobile-menu-button.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .routeiq-mobile-menu-button.is-open span:nth-child(2) {
    opacity: 0;
  }

  .routeiq-mobile-menu-button.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .routeiq-mobile-menu-panel {
    display: none;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 70px);
    right: 12px;
    width: min(280px, calc(100vw - 24px));
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(232, 231, 242, 0.96);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 22px 54px rgba(24, 36, 95, 0.18);
    backdrop-filter: blur(16px);
    z-index: 10001;
  }

  .routeiq-mobile-bar.is-open .routeiq-mobile-menu-panel {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .routeiq-mobile-menu-panel a,
  .routeiq-mobile-menu-panel button {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 9px 11px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #261f3f;
    text-align: left;
    text-decoration: none;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
  }

  .routeiq-mobile-menu-panel a:hover,
  .routeiq-mobile-menu-panel button:hover {
    background: rgba(108, 79, 212, 0.08);
  }

  .routeiq-mobile-menu-panel .logout {
    color: #b91c1c;
  }
}

@media (max-width: 380px) {
  .routeiq-mobile-bar {
    gap: 8px;
    padding: 0 10px;
  }

  .routeiq-mobile-pill {
    padding: 0 10px;
    font-size: 12px;
  }

  .routeiq-mobile-wordmark {
    font-size: 17px;
  }

  .routeiq-mobile-login {
    font-size: 12px;
  }
}


/* RouteIQ mobile hamburger click hardening */
@media (max-width: 920px) {
  .routeiq-mobile-bar {
    pointer-events: auto;
  }

  .routeiq-mobile-menu-button {
    position: relative;
    z-index: 10002;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .routeiq-mobile-menu-button * {
    pointer-events: none;
  }

  .routeiq-mobile-menu-panel {
    pointer-events: auto;
  }
}


/* RouteIQ support card for account menus */
.routeiq-support-card {
  margin: 8px 0;
  padding: 12px;
  border: 1px solid rgba(108, 79, 212, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(117, 173, 217, 0.14), transparent 9rem),
    linear-gradient(180deg, rgba(250, 248, 255, 0.98), rgba(255, 255, 255, 0.98));
}

.routeiq-support-title {
  color: #111a52;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  margin-bottom: 5px;
}

.routeiq-support-card a {
  color: #5a3a9b;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.routeiq-support-card a:hover {
  color: #111a52;
  text-decoration: underline;
}

.routeiq-mobile-menu-panel .routeiq-support-card {
  margin: 8px 0;
}

