/* Balance popover — compact layout */
.jet-header__balance-wrap {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  overflow: visible;
}

.jet-balance-popover.jbal {
  --jbal-text: rgba(255, 255, 255, 0.94);
  --jbal-muted: rgba(255, 255, 255, 0.52);
  --jbal-faint: rgba(255, 255, 255, 0.35);
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(280px, calc(100vw - 24px));
  min-width: 0;
  max-width: min(280px, calc(100vw - 24px));
  z-index: 10060;
  padding: 14px;
  overflow: hidden;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #141414;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, -8px, 0) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.jet-header__balance-wrap.is-open .jet-balance-popover.jbal {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .jet-balance-popover.jbal {
    transition-duration: 0.01ms;
  }
}

.jbal__close,
.jet-balance-popover.jbal .jet-balance-popover__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--jbal-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s ease, background 0.15s ease;
}
.jbal__close:hover,
.jet-balance-popover.jbal .jet-balance-popover__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.jbal__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.jbal__user-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  font-weight: 800;
  font-size: 14px;
  color: #04140a;
  background: var(--global-brand, #00b352);
}
.jbal__user-meta { min-width: 0; }
.jbal__user-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbal__user-id {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--jbal-faint);
}

.jbal__hero {
  position: relative;
  padding: 4px 24px 10px 0;
  text-align: left;
}
.jbal__hero::before { display: none; }
.jbal__eyebrow {
  position: relative;
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--jbal-faint);
}
.jbal__figure {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}
.jet-balance-popover.jbal .jet-balance-modal__amount,
.jbal__amount {
  font-family: inherit;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1;
  color: #fff;
}
.jet-balance-popover.jbal .jet-balance-modal__amount-suffix,
.jbal__suffix {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--global-lime, #7dff9a);
}
.jbal__account-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 0;
  border-radius: 0;
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--jbal-muted);
}
.jbal__account-tag strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
}

.jbal__currency {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.jbal__currency-caption {
  font-size: 12px;
  font-weight: 600;
  color: var(--jbal-muted);
  white-space: nowrap;
}
.jet-balance-popover.jbal .jet-balance-modal__currency-inner,
.jbal__currency-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 0;
}
.jet-balance-popover.jbal .jet-balance-modal__flag {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(180deg, #fff 0%, #fff 33%, #0039a6 33%, #0039a6 66%, #d52b1e 66%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.jet-balance-popover.jbal .jet-balance-modal__select {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  border: none;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 0 16px 0 0;
  cursor: pointer;
  line-height: 1.2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a0a6b4' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* Compact action row */
.jbal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0;
}

.jet-balance-popover.jbal .jet-balance-promo-trigger,
.jbal__tile {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  text-decoration: none !important;
  appearance: none;
  -webkit-appearance: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.jet-balance-popover.jbal .jet-balance-promo-trigger:hover,
.jbal__tile:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.jbal__tile-ico {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--global-lime, #7dff9a);
  background: rgba(0, 179, 82, 0.14);
  font-size: 12px;
  flex-shrink: 0;
}
.jbal__tile-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.jbal__tile-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  color: #fff;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbal__tile-hint {
  font-size: 10px;
  font-weight: 500;
  color: var(--jbal-faint);
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jet-balance-popover.jbal .jet-balance-promo-trigger__icon,
.jet-balance-popover.jbal .jet-balance-promo-trigger__field,
.jet-balance-popover.jbal .jet-balance-promo-trigger__action {
  display: none !important;
}

.jet-balance-popover.jbal .jet-balance-modal__cta,
.jbal__tile--wallet {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  background: var(--global-brand, #00b352) !important;
  border-color: transparent !important;
  color: #04140a !important;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}
.jet-balance-popover.jbal .jet-balance-modal__cta:hover,
.jbal__tile--wallet:hover {
  background: var(--global-lime, #7dff9a) !important;
  color: #04140a !important;
  filter: none;
}
.jbal__tile--wallet .jbal__tile-ico {
  background: rgba(0, 0, 0, 0.16);
  color: #04140a;
}
.jbal__tile--wallet .jbal__tile-label,
.jbal__tile--wallet .jbal__tile-hint {
  color: #04140a;
}
.jbal__tile--wallet .jbal__tile-hint {
  opacity: 0.72;
}

.sidebar-profile-popover-wrap {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
}
#sidebarProfilePopoverWrap .sidebar-profile-popover.jet-balance-popover.jbal {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  transform-origin: top left;
}
#sidebarProfilePopoverWrap.is-open .sidebar-profile-popover.jet-balance-popover.jbal {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

@media (max-width: 900px) {
  .jet-header__actions,
  .jet-header .header__right {
    overflow: visible;
  }
  #jetBalancePopoverWrap .jet-balance-popover.jbal {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 54px);
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    width: auto;
    min-width: 0;
    max-width: none;
    transform-origin: top center;
  }
  #jetBalancePopoverWrap.is-open .jet-balance-popover.jbal {
    transform: translate3d(0, 0, 0) scale(1);
  }
  .jet-balance-popover.jbal .jet-balance-modal__amount,
  .jbal__amount {
    font-size: 24px;
  }
}
