/* ============================================================================
   JAG Pulse — Mobile-only enhancements.  Loaded AFTER styles.css.

   RULES OF THE ROAD (do not break these):
   • DESKTOP IS UNTOUCHED. Every rule here is either inside a
     `@media (max-width: 767px)` block, or targets an element that is
     `display:none` by default (the mobile bottom nav) — so nothing changes
     on desktop.
   • THE STAFF PORTAL STAYS EXACTLY THE SAME. We never restyle anything inside
     `#tab-staff-portal`; while it is the active tab we even hide the bottom
     bar so nothing overlays or reflows it.
   ============================================================================ */

/* The bottom launcher is hidden everywhere by default (desktop included). */
#jag-mobile-bottom-nav { display: none; }

@media (max-width: 767px) {

  /* ── Bottom launcher bar ─────────────────────────────────────────────────
     Two thumb-reachable destinations only, by request:
       1. Staff Portal  (primary — the easiest thing to find & use)
       2. Opportunities
     Everything else remains reachable from the existing top navigation. */
  #jag-mobile-bottom-nav {
    display: flex;
    gap: 10px;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1200;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(15, 21, 37, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(200, 214, 237, 0.14);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35);
  }

  .jmb-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 6px 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text, #edf1ff);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    line-height: 1.1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .15s, border-color .15s, transform .1s;
  }
  .jmb-btn:active { transform: scale(0.97); }
  .jmb-btn .jmb-ico { font-size: 20px; line-height: 1; }

  /* Staff Portal = primary: wider, gold-accented, boldest — most prominent. */
  .jmb-btn.jmb-primary {
    flex: 1.5 1 0;
    background: linear-gradient(180deg, rgba(217, 183, 95, 0.22), rgba(217, 183, 95, 0.10));
    border-color: rgba(217, 183, 95, 0.45);
    color: #f4e6bf;
    font-weight: 800;
    font-size: 13px;
  }

  /* Active (currently-open) state. */
  .jmb-btn.active {
    background: rgba(112, 160, 255, 0.18);
    border-color: rgba(112, 160, 255, 0.5);
    color: #fff;
  }
  .jmb-btn.jmb-primary.active {
    background: linear-gradient(180deg, rgba(217, 183, 95, 0.36), rgba(217, 183, 95, 0.18));
    border-color: var(--gold, #d9b75f);
    color: #fff;
  }

  /* Reserve space so the fixed bar (~70px + safe area) never covers content.
     Applied to the primary content surfaces; the Staff Portal is excluded
     (the bar is hidden there, so its layout is unchanged). */
  #cover-screen,
  .main-content,
  .sol-tab-shell {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Keep the Staff Portal pixel-identical: hide the bar while it is active. */
  body[data-active-tab="staff-portal"] #jag-mobile-bottom-nav { display: none; }
}
