/* dashboard-v2-mobile-account.css — mobile (<=899px) account bar + sheets.
 *
 * Loaded LAST on BOTH dashboard-v2.html (home shell) and dashboard-v2-page.html
 * (real app), so it wins the cascade on both without fighting the monolith or the
 * modular css/*.css. Pairs with dashboard-v2-mobile-account.js. Desktop/laptop
 * untouched — everything here is inside @media (max-width:899px) except the
 * base "hide the bar" rule. */

.side-mbar { display: none; }                 /* desktop: never show the mobile bar */

@media (max-width: 899px) {
  /* ---- brand: bigger logo + wordmark ---- */
  #dash-side .side-brand { padding: 20px 18px 8px; gap: 9px; }
  #dash-side .bs-logo-mark { width: 20px; height: 20px; }
  #dash-side .bs-logo-mark > svg { width: 20px; height: 20px; }
  #dash-side .side-brand-name { font-size: 15px; font-weight: 600; }
  #dash-side .side-toggle { display: none; }      /* desktop collapse — pointless on a phone */

  /* ---- nav polish: crisper labels, bigger tap targets, soft active pill ---- */
  #dash-side .side-nav { padding: 4px 12px 10px; }
  #dash-side .side-link {
    padding: 10px 13px; border-radius: 10px; font-size: 13.5px; gap: 12px;
    color: var(--ink); font-weight: 500;
  }
  #dash-side .side-link > svg { width: 18px; height: 18px; color: var(--ink-2, #2c241d); }
  #dash-side .side-link.is-active { background: #ECEAE5; color: var(--ink); font-weight: 600; }
  #dash-side .side-link.is-active > svg { color: var(--ink); }
  #dash-side .side-link-kbd { display: none; }                 /* no keyboard on a phone */
  #dash-side .side-nav-section { margin: 11px 10px; }

  /* ---- Search → a field at the TOP of the nav (order:-1 floats it above Home) ---- */
  #dash-side .side-link--search {
    order: -1; margin: 2px 2px 10px; padding: 12px 14px;
    background: #fff; border: 1px solid var(--hairline, rgba(31,22,17,0.08));
    border-radius: 12px; color: var(--ink-mute, #6a5d52); font-weight: 500;
  }
  #dash-side .side-link--search:hover { background: #fff; }
  #dash-side .side-link--search > svg { color: var(--ink-faint, #9b8d80); }

  /* ---- fold Settings + Need a hand into the account sheet (hide rows + their divider) ---- */
  #dash-side .side-link[href="/dashboard-v2/settings"],
  #dash-side .side-link[href="/dashboard-v2/help"],
  #dash-side .side-nav-section:has(+ .side-link[href="/dashboard-v2/settings"]) { display: none; }

  /* ---- retire the old text footer on mobile (replaced by the bar) ---- */
  #dash-side .side-foot { display: none !important; }

  /* ---- the new account bar: profile icon (left) + View plan pill (right) ---- */
  .side-mbar {
    display: flex; align-items: center; gap: 11px; margin-top: auto;
    padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--hairline, rgba(31,22,17,0.08));   /* anchors it as a footer */
  }
  .side-mbar-prof {
    flex: 0 0 auto; width: 46px; height: 46px; border: 0; padding: 0; cursor: pointer;
    background: transparent; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    -webkit-tap-highlight-color: transparent;
  }
  .side-mbar-av {
    width: 44px; height: 44px; border-radius: 50%; background: var(--cream-3, #E5E3DD);
    color: var(--ink); display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 17px;
  }
  .side-mbar-plan {
    flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 42px; border-radius: 21px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600;
    color: var(--ink);
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
    border: 1px solid rgba(31, 22, 17, 0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), inset 0 -1px 0 rgba(31,22,17,0.04),
                0 1px 2px rgba(31,22,17,0.06), 0 2px 6px -2px rgba(31,22,17,0.08);
    -webkit-tap-highlight-color: transparent;
  }
  .side-mbar-plan svg { color: var(--orange, #C8511E); }
  .side-mbar-plan:active { transform: translateY(0.5px); }

  /* ---- scrim + bottom sheets ---- */
  .msheet-scrim {
    position: fixed; inset: 0; z-index: 200; background: rgba(20, 14, 10, 0.34);
    opacity: 0; transition: opacity 0.26s cubic-bezier(0.2, 0, 0, 1);
  }
  .msheet-scrim.is-in { opacity: 1; }
  .msheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 201;
    background: #fff; border-radius: 26px 26px 0 0;
    padding: 6px 8px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 44px -10px rgba(0,0,0,0.42), 0 0 0 1px rgba(0,0,0,0.06);
    transform: translateY(110%); transition: transform 0.30s cubic-bezier(0.2, 0, 0, 1);
    max-height: 90vh; overflow: auto; -webkit-overflow-scrolling: touch;
  }
  .msheet.is-in { transform: translateY(0); }
  .msheet-grab { width: 38px; height: 5px; border-radius: 3px; background: #E0DDD6; margin: 6px auto 2px; }
  .msheet-acct, .msheet-plan-head { display: flex; align-items: center; gap: 13px; padding: 10px 16px 12px; }
  .msheet-av { width: 46px; height: 46px; border-radius: 50%; background: var(--cream-3, #E5E3DD); color: var(--ink);
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 17px; flex: 0 0 auto; }
  .msheet-acct-meta { min-width: 0; }
  .msheet-acct-meta b { display: block; font-size: 16.5px; font-weight: 600; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .msheet-acct-meta span { display: block; font-size: 13px; color: var(--ink-faint, #9b8d80);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .msheet-body { padding: 2px 10px 6px; }
  .msheet-row { display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 12px;
    color: var(--ink); font-size: 16px; font-weight: 500; text-decoration: none; width: 100%;
    background: transparent; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
  .msheet-row > svg { width: 21px; height: 21px; color: var(--ink-2, #2c241d); flex: 0 0 auto; }
  .msheet-row-l { flex: 1 1 auto; }
  .msheet-row-v { font-size: 14px; color: var(--ink-faint, #9b8d80); }
  .msheet-row-chev { display: inline-flex; color: var(--ink-faint, #9b8d80); }
  .msheet-row-chev svg { width: 18px; height: 18px; }
  .msheet-row:active { background: rgba(31, 22, 17, 0.05); }
  .msheet-row--danger { color: #b23b1e; }
  .msheet-row--danger > svg { color: #b23b1e; }
  .msheet-gap { height: 1px; background: var(--hairline, rgba(31,22,17,0.08)); margin: 8px 12px; }

  /* ---- plan sheet ---- */
  /* Brand mark, no chip: the black BookingSprint logo fills the old box's
     footprint (founder 2026-07-02: "get rid of the black box, add my black
     logo icon bigger to fit the original size"). */
  /* Sized to match the vertical height of the two text lines beside it
     (title 17px + sub 13px ≈ 38px combined). */
  .msheet-plan-ic { width: 38px; height: 38px; border-radius: 0; background: transparent; color: var(--ink);
    display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .msheet-plan-ic svg { width: 38px; height: 38px; }
  .msheet-plan-meta b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
  .msheet-plan-meta span { display: block; font-size: 13px; color: var(--ink-faint, #9b8d80); line-height: 1.25; }
  .msheet-credits { margin: 4px 14px 12px; padding: 15px; border-radius: 16px; background: #F6F5F2;
    border: 1px solid var(--hairline, rgba(31,22,17,0.08)); }
  .msheet-credits-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
  .msheet-credits-l { font-size: 16px; font-weight: 600; }
  .msheet-credits-r { font-size: 14px; color: var(--ink-mute, #6a5d52); }
  .msheet-credits-r b { color: var(--ink); }
  .msheet-credits-bar { height: 7px; border-radius: 4px; background: #E5E3DD; overflow: hidden; }
  .msheet-credits-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #1F1611, #3B82F6); }
  .msheet-credits-help { margin-top: 10px; font-size: 12px; color: var(--ink-faint, #9b8d80); }
  .msheet-plan-cta { display: block; margin: 4px 14px 12px; padding: 14px; border-radius: 16px; text-decoration: none;
    background: linear-gradient(180deg, #FFF7F0 0%, #FDEFE3 100%); border: 1px solid rgba(200, 81, 30, 0.18); }
  .msheet-plan-cta b { display: block; font-size: 14.5px; font-weight: 600; color: #8a3a14; }
  /* Scope the muted sub-copy so it never wins the cascade over the button text
     below (the button is ALSO a direct span child — without :not() its
     (0,1,1) specificity beat the button's (0,1,0) and painted the label
     muted-orange on orange = unreadable). */
  .msheet-plan-cta > span:not(.msheet-plan-cta-btn) { display: block; font-size: 12.5px; color: #b86a45; line-height: 1.45; margin: 3px 0 12px; }
  .msheet-plan-cta > .msheet-plan-cta-btn { display: flex !important; align-items: center; justify-content: center; height: 44px;
    border-radius: 12px; background: linear-gradient(180deg, #D9601F 0%, #B8431A 100%); color: #fff !important;
    font-size: 14.5px; font-weight: 700; letter-spacing: 0.1px; text-shadow: 0 1px 1px rgba(120,40,10,0.35);
    box-shadow: 0 6px 14px -5px rgba(200,81,30,0.5), inset 0 1px 0 rgba(255,255,255,0.22); }

  body.msheet-open { overflow: hidden; }

  /* ---- settings pages: standalone view, 3D-gradient back button ---- */
  .mob-topbar-back {
    flex: 0 0 auto; width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(31, 22, 17, 0.13); border-bottom-color: rgba(31, 22, 17, 0.19);
    border-radius: 50%; padding: 0; color: var(--ink); cursor: pointer;
    background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
    box-shadow: 0 1px 3px rgba(31,22,17,0.07), 0 2px 1px -1px rgba(31,22,17,0.04), inset 0 1px 0 rgba(255,255,255,0.9);
    position: relative; z-index: 71; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  }
  .mob-topbar-back:active { transform: translateY(0.5px); }
  /* drop the horizontal settings tab "slider" — each section stands alone */
  body.is-settings-detail .set-rail { display: none !important; }
}
