/* GATE — Bottom Navigation Bar · Premium redesign v2 */

/* Override the floating pill from gate-mobile-app.min.css */
@media screen and (max-width: 768px) {
  .bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: calc(56px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
    /* Stronger glass with saturate for premium feel */
    background: rgba(10, 10, 14, 0.97) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border: none !important;
    border-top: 0.5px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
      0 -1px 0 rgba(255,255,255,0.03),
      0 -12px 40px rgba(0,0,0,0.5),
      0 -4px 20px rgba(168,85,247,0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-around !important;
    z-index: 9999 !important;
  }

  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px) + 16px) !important;
  }

  /* Nav items — both .nav-item and legacy .bottom-nav-item */
  .bottom-nav .nav-item,
  .bottom-nav .bottom-nav-item,
  .bottom-nav a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    flex: 1 !important;
    min-height: 44px !important;
    padding: 6px 4px !important;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.35) !important;
    font-size: 10px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    transition:
      color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    -webkit-tap-highlight-color: transparent !important;
    user-select: none !important;
    position: relative !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  /* Gradient indicator line on top of active tab — 3px, brand gradient */
  .bottom-nav .nav-item.active::before,
  .bottom-nav .bottom-nav-item.active::before,
  .bottom-nav a.active::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 32px !important;
    height: 3px !important;
    border-radius: 0 0 3px 3px !important;
    background: linear-gradient(90deg, #a855f7, #ec4899) !important;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.75), 0 0 4px rgba(236,72,153,0.5) !important;
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  .bottom-nav .nav-item svg,
  .bottom-nav .bottom-nav-item svg,
  .bottom-nav a svg {
    width: 24px !important;
    height: 24px !important;
    stroke-width: 1.8 !important;
    fill: none !important;
    transition:
      color 0.22s ease,
      stroke 0.22s ease,
      transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
      filter 0.22s ease !important;
    margin-bottom: 0 !important;
  }

  /* Active state label — gradient text */
  .bottom-nav .nav-item.active,
  .bottom-nav .bottom-nav-item.active,
  .bottom-nav a.active {
    /* Gradient text via clip on the label */
    color: transparent !important;
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }

  /* Active icon — 1.1x scale + purple glow */
  .bottom-nav .nav-item.active svg,
  .bottom-nav .bottom-nav-item.active svg,
  .bottom-nav a.active svg {
    stroke: #a855f7 !important;
    color: #a855f7 !important;
    transform: scale(1.1) translateY(-1px) !important;
    filter: drop-shadow(0 0 7px rgba(168, 85, 247, 0.6)) !important;
  }

  /* Dot indicator — gradient dot under active label */
  .bottom-nav .nav-item.active::after,
  .bottom-nav .bottom-nav-item.active::after,
  .bottom-nav a.active::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: 3px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #a855f7, #ec4899) !important;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.85) !important;
  }

  /* Press feedback — spring scale */
  .bottom-nav .nav-item:active,
  .bottom-nav .bottom-nav-item:active,
  .bottom-nav a:active {
    opacity: 0.55 !important;
    transform: scale(0.88) !important;
  }

  /* Hover state (for touch devices this won't fire, but helps desktop preview) */
  .bottom-nav .nav-item:hover:not(.active),
  .bottom-nav .bottom-nav-item:hover:not(.active),
  .bottom-nav a:hover:not(.active) {
    color: rgba(255, 255, 255, 0.65) !important;
  }
  .bottom-nav .nav-item:hover:not(.active) svg,
  .bottom-nav .bottom-nav-item:hover:not(.active) svg,
  .bottom-nav a:hover:not(.active) svg {
    stroke: rgba(255, 255, 255, 0.65) !important;
    transform: scale(1.05) !important;
  }
}

/* Hidden on desktop */
@media screen and (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }
}
