/* Driver mobile bottom nav — full-width fixed bar, mobile only */
.driver-mobile-bottom-nav {
  display: none;
}

body.has-driver-mobile-nav {
  --driver-nav-height: 96px;
  --driver-chat-fab-offset: calc(var(--driver-nav-height) + 16px);
  --driver-chat-panel-offset: calc(var(--driver-nav-height) + 80px);
}

#driverProfileHero {
  scroll-margin-top: 84px;
}

#home {
  scroll-margin-top: 0;
}

@media (max-width: 768px) {
  body.has-driver-mobile-nav {
    padding-bottom: calc(var(--driver-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  body.has-driver-mobile-nav.driver-dashboard-page .dashboard-workspace,
  body.has-driver-mobile-nav.driver-docs-page .auth-shell,
  body.has-driver-mobile-nav.driver-docs-page .auth-hero-shell {
    padding-bottom: calc(var(--driver-nav-height) + 20px + env(safe-area-inset-bottom, 0px));
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav,
  body.premium-dashboard-page.has-driver-mobile-nav .mobile-bottom-nav.driver-mobile-bottom-nav {
    position: fixed;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 120 !important;
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    justify-items: center;
    gap: 2px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0;
    background: #fff;
    backdrop-filter: blur(20px);
    box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.1);
    box-sizing: border-box;
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav a,
  body.premium-dashboard-page.has-driver-mobile-nav .driver-mobile-bottom-nav a {
    width: 100%;
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 14px;
    color: #64748b;
    background: transparent;
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    text-align: center;
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav i {
    font-size: 18px;
    line-height: 1;
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav .active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
  }

  body.has-driver-mobile-nav .easy-chat-fab {
    right: max(14px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--driver-chat-fab-offset) + env(safe-area-inset-bottom, 0px));
    z-index: 130;
    width: 48px;
    height: 48px;
  }

  body.has-driver-mobile-nav .easy-chat-fab.is-open {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.92);
  }

  body.has-driver-mobile-nav .easy-chat-panel {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--driver-chat-panel-offset) + env(safe-area-inset-bottom, 0px));
    width: auto;
    z-index: 129;
    max-height: min(48dvh, calc(100dvh - var(--driver-chat-panel-offset) - 24px - env(safe-area-inset-bottom, 0px)));
  }

  body.has-driver-mobile-nav .easy-chat-messages {
    max-height: min(160px, calc(100dvh - var(--driver-chat-panel-offset) - 140px - env(safe-area-inset-bottom, 0px)));
  }

  body.has-driver-mobile-nav .easy-chat-compose input {
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  body.has-driver-mobile-nav {
    --driver-nav-height: 88px;
  }

  body.has-driver-mobile-nav .driver-mobile-bottom-nav span {
    font-size: 9px;
  }
}
