/* =========================================================
   ShamelessFest — PWA mobile styles (bottom nav + install)
   ========================================================= */

@media (max-width: 800px) {

  /* The fixed PWA navigation replaces the mobile hamburger menu. */
  #mobile-nav-toggle {
    display: none !important;
  }

  body {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)); /* floating glass nav */
  }

  /* ---------- Bottom Navigation Bar (liquid glass) ---------- */
  .pwa-nav {
    display: flex;
    align-items: stretch;
    gap: 2px;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 9999;
    padding: 7px 6px;
    border-radius: 24px;
    background:
      linear-gradient(180deg, rgba(40, 40, 56, 0.55), rgba(12, 12, 18, 0.72)),
      rgba(18, 18, 26, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow:
      0 12px 32px rgba(0, 0, 0, 0.55),
      0 2px 6px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
  }

  /* soft light reflection across the top of the glass */
  .pwa-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 48%);
    pointer-events: none;
  }

  .pwa-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 2px 4px;
    border-radius: 18px;
    color: #b8b8c8;
    text-decoration: none;
    font-family: 'Montserrat', var(--font, sans-serif);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 1;
    transition:
      color 0.25s ease,
      transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* fixed icon slot, so the active bubble never shifts the layout */
  .pwa-nav-ic {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 30px;
    border-radius: 999px;
    background: transparent;
    transform: scale(1);
    transition:
      background 0.3s ease,
      box-shadow 0.3s ease,
      transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .pwa-nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .pwa-nav-item .pwa-nav-label {
    line-height: 1.15;
    text-align: center;
    transition: color 0.25s ease;
  }

  .pwa-nav-item.active {
    color: #111;
  }

  /* yellow glass bubble behind the active icon */
  .pwa-nav-item.active .pwa-nav-ic {
    background:
      radial-gradient(circle at 32% 20%, #fff9b8 0%, #ffe500 48%, #f2c200 100%);
    box-shadow:
      0 6px 16px rgba(255, 229, 0, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.35) inset,
      0 1px 2px rgba(255, 255, 255, 0.8) inset;
    animation: navGlassPulse 2.6s ease-in-out infinite;
  }

  .pwa-nav-item.active svg {
    transform: scale(1.08);
  }

  .pwa-nav-item.active .pwa-nav-label {
    color: #ffe500;
  }

  /* tap feedback: the whole item squishes, the bubble springs back */
  .pwa-nav-item:active {
    transform: scale(0.9);
  }

  .pwa-nav-item:active .pwa-nav-ic {
    transform: scale(0.92);
    animation: none;
  }

  .pwa-nav-item:focus-visible {
    outline: 2px solid #ffe500;
    outline-offset: 2px;
  }

  @keyframes navGlassPulse {
    0%,
    100% {
      transform: scale(1.04);
      box-shadow:
        0 5px 14px rgba(255, 229, 0, 0.4),
        0 0 0 0 rgba(255, 229, 0, 0.32),
        0 1px 2px rgba(255, 255, 255, 0.8) inset;
    }
    50% {
      transform: scale(1.11);
      box-shadow:
        0 8px 22px rgba(255, 229, 0, 0.6),
        0 0 0 6px rgba(255, 229, 0, 0),
        0 1px 2px rgba(255, 255, 255, 0.8) inset;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .pwa-nav-item,
    .pwa-nav-ic,
    .pwa-nav-item svg {
      transition: none;
    }

    .pwa-nav-item.active .pwa-nav-ic {
      animation: none;
      transform: scale(1.06);
    }
  }

}

@media (min-width: 801px) {
  .pwa-nav { display: none !important; }
}
