/*
 * js/pages/profile/profile.css: what /profile adds on top of pons.css. The frame is pons's own profile
 * (.profile-page, .profile-portfolio-overview, .profile-page-stats, .profile-workspace with the line tabs,
 * .profile-position cards, .profile-launch-row); this file adds the per-id table, the actions row, the owed banner,
 * the hand over row and the phone rules.
 */
.profile-page-shell { width: min(100%, 1040px); }
.profile-page-avatar .ui-icon { opacity: .8; }
.ponduo-profile-signin { justify-items: start; }
.ponduo-profile-signin .ui-btn { max-width: 420px; }

/* line tabs: pons's indicator is a 2px bar under the active tab */
.profile-workspace .tabs-list { position: relative; }
.profile-workspace .tabs-indicator { position: absolute; top: auto !important; bottom: 0; height: 2px !important; transform-origin: left; }
.profile-workspace .tabs-list:not(.is-measured) .tabs-tab.is-active { box-shadow: inset 0 -2px 0 var(--text-primary); }

.profile-page-stats > div { min-height: 104px; }
.profile-page-stats strong { font-size: clamp(24px, 3vw, 32px); }

.ponduo-profile-list { display: grid; gap: 12px; }
.ponduo-profile-row-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ponduo-profile-row-head > .profile-position-head { flex: 1; min-width: 0; }
.ponduo-profile-row-head .profile-position-pnl { flex: none; max-width: 50%; }
.ponduo-profile-row-head .profile-position-pnl strong { display: block; max-width: 100%; }
.profile-position-head:hover .profile-position-identity-copy strong { text-decoration: underline; }
.profile-position-metrics > div { min-width: 0; }
.profile-position-metrics > div strong { overflow-wrap: anywhere; font-weight: 400; }
.ponduo-profile-badges { display: flex; gap: 6px; align-items: center; flex: none; }
.ponduo-chip { font-size: 11px; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap; background: #d4fc5024; color: var(--text-primary); }
html:not([data-theme="dark"]) .ponduo-chip { background: #d4fc5080; }

/* the ids a wallet holds in one launch */
.ponduo-id-table { display: grid; gap: 2px; border-top: 1px solid var(--divider); padding-top: 8px; }
.ponduo-id-row { display: grid; grid-template-columns: minmax(64px, .6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 6px 4px; font-size: 13px; font-variant-numeric: tabular-nums; }
.ponduo-id-row > span:not(:first-child) { text-align: right; }
.ponduo-id-row.is-head { color: var(--text-muted); font-size: 12px; }

.ponduo-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ponduo-profile-actions .ui-btn { width: auto; padding: 0 18px; }
.ponduo-profile-notes { display: grid; gap: 4px; }
.ponduo-profile-notes .profile-page-caveat { margin: 0; }
.profile-page-caveat.is-error { color: var(--accent-red); }
.ponduo-token-value { display: grid; justify-items: end; gap: 2px; text-align: right; font-variant-numeric: tabular-nums; }
.ponduo-token-value strong { font-size: 14px; font-weight: 400; }
.ponduo-token-value small { color: var(--text-muted); font-size: 12px; }

/* hand over the creator role */
.ponduo-handover { display: grid; gap: 8px; border-top: 1px solid var(--divider); padding-top: 12px; }
.ponduo-handover-row { display: flex; gap: 8px; align-items: center; }
.ponduo-handover-row .launchpad-input { flex: 1; min-width: 0; }
.ponduo-handover-row .ui-btn { width: auto; padding: 0 18px; flex: none; }
.ponduo-handover a { color: var(--text-primary); text-decoration: underline; }

/* a payout this wallet could not receive (the launch page's banner) */
.ponduo-owed-list { display: grid; gap: 8px; }
.ponduo-owed { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 20px; border: 1px solid #ff453a55; background: #ff453a14; }
.ponduo-owed p { flex: 1; margin: 0; font-size: 13px; line-height: 1.5; }
.ponduo-owed .ui-btn { width: auto; padding: 0 16px; }

.profile-launches-empty .ui-btn { width: auto; padding: 0 18px; }

@media (max-width: 720px) {
  .profile-page-stats { grid-template-columns: minmax(0, 1fr); }
  .profile-page-stats > div { border-right: 0; border-bottom: 1px solid var(--divider); min-height: 0; }
  .profile-page-stats > div:last-child { border-bottom: 0; }
}
@media (max-width: 560px) {
  .ponduo-profile-row-head { flex-wrap: wrap; }
  .ponduo-profile-row-head .profile-position-pnl { max-width: 100%; margin-left: 0; justify-items: start; text-align: left; }
  .ponduo-handover-row { flex-wrap: wrap; }
  .ponduo-handover-row .launchpad-input { flex-basis: 100%; }
  .ponduo-owed { flex-wrap: wrap; }
  .profile-page-hero-actions { margin-left: 0; }
}
@media (max-width: 768px) {
  .ponduo-profile-actions .ui-btn, .ponduo-handover .ui-btn, .ponduo-owed .ui-btn, .profile-page-action, .profile-launches-empty .ui-btn { min-height: 44px; }
}

/* pons's grids size their one column to the widest child; minmax(0, 1fr) keeps long lines inside a phone */
.profile-page, .profile-workspace, .profile-workspace .tabs, .profile-tab-content { grid-template-columns: minmax(0, 1fr); }
.profile-workspace .tabs-panel-shell, .profile-workspace .tabs-panel { min-width: 0; }
.profile-portfolio-balance > strong { line-height: 1.12; padding-bottom: 2px; }
/* the position cards are pons's auto-sized grids: one minmax(0, 1fr) column keeps a long release line inside a phone */
.ponduo-profile-list, .ponduo-profile-list > .profile-position { grid-template-columns: minmax(0, 1fr); }
.ponduo-profile-list > .profile-position { min-width: 0; }
.profile-position-metrics > div strong { white-space: normal; }
.ponduo-id-table { min-width: 0; }
@media (max-width: 560px) { .ponduo-profile-row-head > .profile-position-head { flex-basis: 100%; } .ponduo-profile-row-head .profile-position-pnl { display: grid; gap: 2px; } }
.profile-position-head > .profile-position-arrow { margin-left: auto; flex: none; }
/* a dual v2 launch: both pairs in one badge (the same look as the launch page) */
.ponduo-pair-badges { gap: 6px; }
.ponduo-pair-badges .pair-badge-symbol + .pair-badge-symbol { padding-left: 6px; border-left: 1px solid var(--divider); }
