/* ===================================================================
   MOBILE BOTTOM NAVIGATION
   Drop-in component — visible only on mobile (≤ 768 px).
   Paste the .mob-nav block from index.html + this CSS into any project.
   =================================================================== */

:root {
  --mob-nav-height: 64px;
  --mob-nav-bg: #ffffff; 
  --mob-nav-border: #f0f2f2;
  --mob-nav-color: #5f5d5d;
  --mob-nav-active: #543ee8;
  --mob-nav-icon-size: 22px;
  --mob-nav-label-size: 10px;
  --mob-nav-radius: 16px 16px 0 0;
  --mob-nav-shadow: 0 -1px 0 0 var(--mob-nav-border),
                    0 -4px 16px rgba(84,62,232,.08);
  --mob-nav-transition: color .18s ease, transform .18s ease;
}

/* Hidden on desktop — only render on mobile */
.mob-nav {
  display: none;
}

@media (max-width: 768px) {
  /* Push page content up so it isn't hidden behind the bar */
  body {
    padding-bottom: var(--mob-nav-height);
  }

  .mob-nav {
    display: flex;
    align-items: stretch;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--mob-nav-height);
    overflow: visible;
    background: var(--mob-nav-bg);
    border-radius: var(--mob-nav-radius);
    box-shadow: var(--mob-nav-shadow);
    z-index: 1000;

    /* Safe-area support (notched phones) */
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .mob-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 4px;
    color: var(--mob-nav-color);
    text-decoration: none;
    transition: var(--mob-nav-transition);
    -webkit-tap-highlight-color: transparent;
    outline-offset: 4px;
  }

  .mob-nav__item:active {
    transform: scale(.92);
  }

  .mob-nav__item--active,
  .mob-nav__item[aria-current="page"] {
    color: var(--mob-nav-active);
  }

  .mob-nav__icon {
    width: var(--mob-nav-icon-size);
    height: var(--mob-nav-icon-size);
    fill: currentColor;
    flex-shrink: 0;
  }

  /* ── FAB slot: placeholder in the flex row ──────────── */
  .mob-nav__item--fab-slot {
    pointer-events: none;
  }

  /* invisible spacer, same size as the icon — keeps label aligned with others */
  .mob-nav__item--fab-slot::before {
    content: '';
    display: block;
    width: var(--mob-nav-icon-size);
    height: var(--mob-nav-icon-size);
    flex-shrink: 0;
  }

  .mob-nav__item--fab-slot .mob-nav__label {
    pointer-events: none;
  }

  /* ── FAB circle: floats above the nav bar ────────────── */
  .mob-nav__fab {
    position: absolute;
    bottom: calc(var(--mob-nav-height) - 27px); /* center sits on top edge */
    left: 50%;
    transform: translateX(-50%);
    width: 54px;
    height: 54px;
    background: var(--mob-nav-active);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(84,62,232,.45);
    /* outline: 3px solid #fff; */
    outline-offset: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform .18s ease, box-shadow .18s ease;
    z-index: 1;
  }

  .mob-nav__fab:active {
    transform: translateX(-50%) scale(.92);
    box-shadow: 0 2px 8px rgba(84,62,232,.3);
  }

  .mob-nav__fab .mob-nav__icon {
    width: 26px;
    height: 26px;
    fill: #fff;
  }

  .mob-nav__label {
    font-size: var(--mob-nav-label-size);
    font-weight: 500;
    letter-spacing: .2px;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 100%;
  }
}
