/*
 * Hickory Chair · Bottom tab bar (mobile only, ≤720px)
 *
 * Persistent native-feeling navigation. Hidden on tablet/desktop where the
 * top-nav of each page is the primary navigation.
 *
 * Pages opt in by including this stylesheet + tabbar.js. Pages with flowing
 * content add `body.hc-has-tabbar` to reserve 56px + safe-area at the bottom.
 */

.hc-tabbar {
  display: none;
}

@media (max-width: 720px) {
  .hc-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(251, 248, 241, 0.92);
    -webkit-backdrop-filter: blur(20px) saturate(1.05);
    backdrop-filter: blur(20px) saturate(1.05);
    border-top: 1px solid rgba(20, 17, 13, 0.10);
    box-shadow: 0 -2px 16px rgba(28, 22, 14, 0.06);
    display: flex;
    align-items: stretch;
    z-index: 70;
    pointer-events: auto;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  }

  .hc-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #786d5f;
    padding-top: 6px;
    font-size: 9.5px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 1;
    position: relative;
    transition: color 120ms ease;
    -webkit-tap-highlight-color: transparent;
  }

  .hc-tabbar__item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .hc-tabbar__item.is-active {
    color: #14110d;
  }

  .hc-tabbar__item.is-active::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #97774a;
    transform: translateX(-50%);
  }

  .hc-tabbar__item:active {
    color: #14110d;
    transform: scale(0.96);
  }

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

  /* Push the studio's floating "Add Furniture" pill above the tab bar. */
  body #m-add-btn {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
  body #m-action-bar {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
