/* ./css/bar-panels.css */
/* Fully isolated overlay panels (Stats / Inventory). */

.barPanelHost{
  display: none;
  width: 100%;
  padding: 14px 14px 16px;
  box-sizing: border-box;
}

.barOverlay.isPanel .barPanelHost{
  display: block;
}

.barOverlay.isPanel .barBottom{
  display: none;
}


/* Player header above KPI */
.barProfileHeader {
  margin: 2px 0 10px;
}

.barProfileName {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.95);
}

.barProfileTitle {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.72;
}

/* KPI lines (compact, safe for huge numbers) */
.barKpiLines{
  display: grid;
  gap: 6px;
  margin: 6px 0 16px;
}

.barKpiLine{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
}

.barKpiKey{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  opacity: 0.75;
  text-transform: uppercase;
  white-space: nowrap;
}

.barKpiNum{
  font-size: 12px;
  font-weight: 900;
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 56%;
  text-align: right;
}

/* Wallet single line */
.barWalletLine{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 12px;
  font-size: 8px;
  font-weight: 600;
}

.barWalletItem{
  opacity: 0.9;
}

.barWalletSep{
  opacity: 0.25;
}

/* Color-coded numbers */
.barNumTsuunami{ color: #86fbff; }
.barNumTara{ color: #46ff7a; }
.barNumBlackbull{ color: #ff3b3b; }
.barNumAtomoz{ color: #c653ff; }
/* Tighten section spacing a bit */
.barSectionTitle{
  margin: 10px 0 8px;
}

/* Section titles: more breathing + divider */
.barSectionTitle{
  margin: 16px 0 10px;           /* more space ABOVE */
  padding-top: 10px;             /* pushes title down from divider */
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* First title in panel shouldn’t have a divider */
.barPanel .barSectionTitle:first-of-type{
  border-top: 0;
  padding-top: 0;
  margin-top: 10px;
}

/* Neon section titles (match BAR pink vibe) */
.barSectionTitle,
.barKpiKey,
.barInvGroupTitle {
  color: rgba(250, 250, 250, 0.99);
  text-shadow: 0 0 1px rgba(25, 120, 160, 0.08);
}

/* Optional: smaller close button on mobile */
.barPanelClose{
  padding: 7px 11px;
  font-size: 12px;
}

/* Optional: make progress rows slightly tighter */
.barProgRow{
  grid-template-columns: 88px 1fr 56px;
}
.barProgTrack2{ height: 10px; }

/* Panel card */
.barPanel{
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  padding: 14px;
  box-sizing: border-box;
  font-family: Montserrat, Arial, sans-serif;
  color: rgba(196, 202, 206, 0.98);
}

.barPanelTop{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.barPanelTitle{
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.barPanelClose{
  appearance: none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #fff;
  border-radius: 14px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

/* KPI row */
.barKpis{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.barKpi{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  padding: 10px 12px;
}

.barKpiLabel{
  font-size: 11px;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.barKpiVal{
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
}

/* Token list */
.barTokenGrid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.barTokenPill{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.22);
  padding: 8px 8px;
  text-align: center;
}

.barTokenKey{
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.barTokenVal{
  margin-top: 4px;
  font-size: 14px;
  font-weight: 800;
}

/* Progress bars */
.barSectionTitle{
  margin: 10px 0 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  opacity: 0.8;
  text-transform: uppercase;
  color: rgba(196, 252, 256, 0.98);
}

.barProgList{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.barProgRow{
  display: grid;
  grid-template-columns: 85px 1fr 22px;
  align-items: center;
  gap: 8px;
}

.barProgName{
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.barProgTrack2{
  height: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.25);
  overflow: hidden;
}

.barProgFill2{
  height: 100%;
  width: 0%;
  border-radius: 999px;
}

.barProgNum{
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  opacity: 0.9;
}

/* Brand colors */
.barFillTsuunami{ background: #86fbff; }
.barFillTara{ background: #46ff7a; }
.barFillBlackbull{ background: #ff3b3b; }
.barFillAtomoz{ background: #c653ff; }
.barFillTotal{ background: #ffb84d; }

/* =========================
   LIST MODE (RUN / etc.)
   ========================= */

/* When group is list, the items container MUST be single-column */
.barInvGroup.isList .barInvItems {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* List row: label … dots … value */
.barInvGroup.isList .barInvItem {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 6px;
  
  padding: 2px 0;
  border: 0;
  background: transparent;
  border-radius: 0;
}

.barInvGroup.isList .barInvItem+.barInvItem {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* label */
.barInvGroup.isList .barInvItemName {
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  opacity: 0.90;
  line-height: 1.15;
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  
  /* IMPORTANT: kill the tile clamp in list mode */
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
}

/* value */
.barInvGroup.isList .barInvItemVal {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.95;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}


  
  



@media (min-width: 560px){
  .barInvItems{ grid-template-columns: repeat(3, 1fr); }
}

/* Make panel area scrollable (mobile-safe) */


/* Optional: if you want the panel card itself to scroll (not the host) */
.barPanelHost{
  /* keep your existing padding */
  max-height: calc(100vh - 84px); /* leaves room for overlay top row */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Player header */
.barProfileHeader {
  margin: 2px 0 10px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.18);
}

.barProfileName {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.barProfileTitle {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.75;
}

/* List dots column (reliable, no pseudo-element hacks) */
.barInvDots {
  height: 1px;
  align-self: center;
  opacity: 0.28;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 1px, transparent 1px);
  background-size: 6px 2px;
  background-repeat: repeat-x;
  background-position: left center;
}

/* Inventory tiles (for the Items group in Inventory) */
.barInvItemTile {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  padding: 7px 9px;
}

.barInvTileName {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.8;
  letter-spacing: 0.04em;
}

.barInvTileVal {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  opacity: 0.95;
}

/* Make Audio logs tile feel clickable */
#barOpenBlackbox{
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
#barOpenBlackbox:active{
  transform: translateY(1px);
}
#barOpenBlackbox::after{
  content:"";
  position:absolute;
  inset:-2px;
  border-radius: 12px;
  border: 1px solid rgba(134,251,255,0.0);
  transition: border-color .18s ease, box-shadow .18s ease;
  pointer-events:none;
}
#barOpenBlackbox:hover::after{
  border-color: rgba(134,251,255,0.28);
  box-shadow: 0 0 0 1px rgba(134,251,255,0.10) inset;
}

/* --- Audio logs clickable hint --- */
#barOpenBlackbox{
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(134,251,255,.18);
}

#barOpenBlackbox:active{
  transform: translateY(1px);
}

#barOpenBlackbox .barHintIco{
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  opacity: .75;
  transform: translateY(-1px);
}

/* subtle shimmer sweep */
#barOpenBlackbox::before{
  content:"";
  position:absolute;
  inset:-40% -60%;
  background: linear-gradient(120deg,
    transparent 40%,
    rgba(134,251,255,.12) 50%,
    transparent 60%);
  transform: translateX(-40%) rotate(6deg);
  opacity: 0;
  pointer-events:none;
}

/* pulse class toggled by JS */
#barOpenBlackbox.isHintPulse::before{
  animation: bbSweep 900ms ease-out 1;
  opacity: 1;
}

#barOpenBlackbox.isHintPulse{
  box-shadow: 0 0 0 1px rgba(134,251,255,.10), 0 0 18px rgba(134,251,255,.10);
}

@keyframes bbSweep{
  0%   { transform: translateX(-55%) rotate(6deg); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translateX(55%) rotate(6deg); opacity: 0; }
}

/* accessibility: keyboard focus */
#barOpenBlackbox:focus-visible{
  outline: 2px solid rgba(134,251,255,.65);
  outline-offset: 3px;
  border-color: rgba(134,251,255,.55);
}