:root {
  --tiki-mobile-nav-height: 72px;
  --tiki-mobile-green: #078f55;
  --tiki-mobile-ink: #52605a;
}

#tikitax-mobile-nav {
  display: none;
}

/* Keep every Radix expense/category list inside the viewport and make touch
   scrolling explicit. This also improves other long selects in the app. */
[role="listbox"] {
  max-height: min(48vh, 20rem) !important;
}

[data-radix-select-viewport] {
  overflow-y: auto !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin !important;
}

[data-radix-select-viewport]::-webkit-scrollbar {
  display: block !important;
  width: 6px;
}

[data-radix-select-viewport]::-webkit-scrollbar-thumb {
  background: #a9b8b0;
  border-radius: 999px;
}

@media (max-width: 767px) {
  body.tikitax-mobile-signed-in {
    padding-bottom: calc(var(--tiki-mobile-nav-height) + env(safe-area-inset-bottom));
  }

  #tikitax-mobile-nav {
    position: fixed;
    z-index: 10000;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--tiki-mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 7px 7px max(7px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    background: rgba(255, 255, 255, .98);
    border-top: 1px solid #dce6e0;
    box-shadow: 0 -8px 28px rgba(13, 54, 35, .12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  body.tikitax-mobile-signed-in #tikitax-mobile-nav {
    display: grid;
  }

  .tiki-mobile-nav-item {
    min-width: 0;
    height: 55px;
    padding: 5px 2px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--tiki-mobile-ink);
    text-decoration: none;
    font: 650 10px/1.15 Inter, ui-sans-serif, system-ui, sans-serif;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .tiki-mobile-nav-item svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .tiki-mobile-nav-item.active {
    color: var(--tiki-mobile-green);
    background: #eff9f4;
  }

  .tiki-mobile-scan {
    position: relative;
    top: -14px;
    gap: 4px;
    overflow: visible;
    color: var(--tiki-mobile-green);
    font-weight: 800;
  }

  .tiki-mobile-scan-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 5px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #11ae6b, #057b48);
    color: #fff;
    box-shadow: 0 7px 20px rgba(7, 143, 85, .34);
  }

  .tiki-mobile-scan-icon svg {
    width: 27px;
    height: 27px;
    stroke-width: 2.25;
  }

  /* The centre navigation action replaces the older floating scan button. */
  #tikitax-quick-scan {
    display: none !important;
  }

  /* The bottom Mileage tab replaces the older floating quick-tracker button.
     Mileage tracking remains available on the full Mileage page. */
  .fixed.bottom-20.right-4 {
    display: none !important;
  }

  #tikitax-install-app {
    bottom: calc(var(--tiki-mobile-nav-height) + env(safe-area-inset-bottom) + 12px) !important;
  }

  .fixed.bottom-6.right-6 {
    bottom: calc(var(--tiki-mobile-nav-height) + env(safe-area-inset-bottom) + 12px) !important;
  }

  main {
    padding-bottom: 14px;
  }
}
