/* JDRC_ECONOMY_CREDITS_V2 */
.jdrc-credits-panel{overflow:hidden}.jdrc-credit-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}.jdrc-credit-balance{font-size:clamp(2rem,8vw,3.4rem);line-height:1;font-weight:900;letter-spacing:-.04em;margin:.35rem 0}.jdrc-credit-balance small{font-size:.9rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.68}.jdrc-credit-subcopy{margin:.25rem 0 0;opacity:.78}.jdrc-credit-reload{margin-top:18px;padding-top:18px;border-top:1px solid rgba(255,255,255,.12)}.jdrc-credit-reload-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}.jdrc-credit-reload-grid button{min-height:46px}.jdrc-credit-custom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}.jdrc-credit-custom label{margin:0}.jdrc-credit-custom input{width:100%}.jdrc-credit-notice{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:rgba(255,255,255,.08)}.jdrc-credit-notice.success{outline:1px solid rgba(130,255,175,.45)}.jdrc-credit-notice.error{outline:1px solid rgba(255,120,120,.5)}.jdrc-credit-recent{margin-top:18px}.jdrc-credit-entry{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid rgba(255,255,255,.08)}.jdrc-credit-entry:first-child{border-top:0}.jdrc-credit-entry strong[data-direction="debit"]{opacity:.8}.jdrc-credit-meta{font-size:0.875rem;opacity:.7}.driver-stat-row strong[data-credit-balance]{font-variant-numeric:tabular-nums}@media(max-width:620px){.jdrc-credit-reload-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.jdrc-credit-custom{grid-template-columns:1fr}.jdrc-credit-custom .button{width:100%;min-height:48px}}


/* JDRC_MOBILE_WALLET_STABILITY_V1_2_6
   Stabilize Driver Pit wallet/collapse behavior on mobile without changing desktop. */
@media (max-width: 820px) {
  /* Mobile browser chrome changes the visual viewport while scrolling.
     Do not pin an open Driver Pit summary to top:0 on phones/tablets. */
  #driverDashboard .driver-dashboard-collapse[open] > summary {
    position: static;
    top: auto;
    z-index: auto;
  }

  /* Prevent the wallet itself from being selected as a scroll-anchor source
     while its live values/notice content update. */
  #driverCreditsPanel,
  #driverCreditsPanel * {
    box-sizing: border-box;
  }

  #driverCreditsPanel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-anchor: none;
    animation: none !important;
  }

  #driverCreditsPanel .jdrc-credit-head {
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr);
    gap: 10px;
  }

  #driverCreditsPanel .jdrc-credit-head > div,
  #driverCreditsPanel .jdrc-credit-reload,
  #driverCreditsPanel .jdrc-credit-recent,
  #driverCreditsPanel .jdrc-credit-custom,
  #driverCreditsPanel .jdrc-credit-reload-grid {
    min-width: 0;
    max-width: 100%;
  }

  #driverCreditsPanel .jdrc-credit-head > div:last-child {
    justify-self: start;
  }

  #driverCreditsPanel .jdrc-credit-balance {
    width: 100%;
    min-height: 1.05em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  #driverCreditsPanel .jdrc-credit-entry {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  #driverCreditsPanel .jdrc-credit-entry > div,
  #driverCreditsPanel .jdrc-credit-entry strong {
    min-width: 0;
  }

  #driverCreditsPanel .jdrc-credit-entry strong {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  #driverCreditsPanel .jdrc-credit-reload-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  #driverCreditsPanel .jdrc-credit-custom {
    grid-template-columns: minmax(0,1fr);
  }

  #driverCreditsPanel .jdrc-credit-custom .button {
    width: 100%;
  }
}

