/* Mobile bottom tab bar (C-02). Hidden from 768 px up. Values from hi-fi "TabBar" v1.1. */
.ec-tabbar { display: none; }

@media (max-width: 767px) {
  .ec-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    display: grid;
    grid-template-columns: repeat(var(--ec-tabbar-cols, 5), minmax(0, 1fr));
    box-sizing: border-box;
    height: calc(76px + env(safe-area-inset-bottom, 0px));
    padding: 6px 4px calc(14px + env(safe-area-inset-bottom, 0px));
    background: var(--ec-surface, #FFFFFF);
    border-top: 1px solid var(--ec-line-soft, #EDF0F0);
    box-shadow: 0 -6px 20px rgba(11, 16, 27, .06);
    font-family: Inter, "Noto Sans Gujarati", system-ui, sans-serif;
  }
  .ec-tabbar .ec-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    text-decoration: none !important;
    font-size: 12.5px;
    line-height: 1.2;
    font-weight: 500;
    color: var(--ec-ink-600, #575D6B) !important;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
  }
  .ec-tabbar .ec-tabbar__pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 30px;
    border-radius: 999px;
    transition: background-color .15s ease;
  }
  .ec-tabbar .ec-tabbar__label { white-space: nowrap; }
  .ec-tabbar .ec-tabbar__icon {
    width: 21px;
    height: 21px;
    color: var(--ec-ink-600, #575D6B);
  }
  .ec-tabbar .ec-tabbar__item.is-active { font-weight: 700; color: var(--ec-teal-600, #327B74) !important; }
  .ec-tabbar .ec-tabbar__item.is-active .ec-tabbar__pill { background: var(--ec-teal-100, #E6EFEE); }
  .ec-tabbar .ec-tabbar__item.is-active .ec-tabbar__icon { color: var(--ec-teal-600, #327B74); }

  .ec-tabbar .ec-tabbar__item--mock { font-weight: 700; color: var(--ec-teal-800, #1D4944) !important; }
  .ec-tabbar .ec-tabbar__item--mock .ec-tabbar__pill { background: var(--ec-teal-600, #327B74); box-shadow: 0 4px 10px rgba(50, 123, 116, .35); }
  .ec-tabbar .ec-tabbar__item--mock .ec-tabbar__icon { color: #FFFFFF; }

  .ec-tabbar .ec-tabbar__item:focus-visible { outline: 3px solid var(--ec-teal-500, #42A39A); outline-offset: -3px; }

  /* Keep page content and the footer clear of the fixed bar. */
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  /* Astra "scroll to top" button sits above the bar instead of behind it. */
  #ast-scroll-top { bottom: calc(76px + 16px + env(safe-area-inset-bottom, 0px)) !important; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .ec-tabbar .ec-tabbar__pill { transition: none; }
}
