/* "My account" page (profile.js) + Binance-style home header. Uses the site's theme colours (theme-pro.css --pb-*). */

/* ---------- home header: only on the Home page, picture only (name/ID live in the account page now) ---------- */
.dashboard-content-col:has(.page.active):not(:has(#pageDashboard.active)) .dashboard-header { display: none !important; }
.dashboard-header .user-greeting { display: none !important; }
#profileTrigger .avatar-circle, .pro-acct-user .pro-acct-av { position: relative; overflow: visible !important; }
/* the frame must stay overflow:visible for the status ring, so pin the picture inside it instead of letting it size itself */
#profileTrigger .avatar-circle img, .pro-acct-user .pro-acct-av img, .top-bar .tb-avatar .avatar-circle img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; border-radius: 50%; display: block; }
/* status ring around the picture (no separate tick): verified = green half, pro = gold half; one status = full ring in its colour */
.pf-is-verified .avatar-circle, .pf-is-verified .pro-acct-av { --pf-ring: #0ecb81; }
.pf-is-pro .avatar-circle, .pf-is-pro .pro-acct-av { --pf-ring: #F0B90B; }
.pf-is-verified.pf-is-pro .avatar-circle, .pf-is-verified.pf-is-pro .pro-acct-av { --pf-ring: conic-gradient(from 0deg, #0ecb81 0 50%, #F0B90B 50% 100%); }
.pf-is-verified .avatar-circle::before, .pf-is-pro .avatar-circle::before,
.pf-is-verified .pro-acct-av::before, .pf-is-pro .pro-acct-av::before {
  content: ''; position: absolute; inset: -3px; border-radius: 50%; padding: 2.5px; background: var(--pf-ring); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
/* ---------- phone top bar: picture at the start, no "0.00" wallet chip, bell moved down next to support/share ---------- */
#walletDisplay { display: none !important; }
.top-bar .tb-avatar { flex: none; order: -1; margin-inline-end: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.top-bar .tb-avatar .avatar-circle { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; position: relative; overflow: visible !important; margin: 3px; }
.top-bar .logo-area { margin-inline-end: auto; }
.auth-page-active .top-bar .tb-avatar,
.app-container:has(.page.active):not(:has(#pageDashboard.active)) .top-bar .tb-avatar { display: none; }
@media (min-width: 1100px) { .top-bar .tb-avatar { display: none !important; } }
/* the home row keeps only the round action buttons (support, share, notifications) — the picture is in the top bar now */
@media (max-width: 1099px) {
  .dashboard-header #profileTrigger { display: none !important; }
  .dashboard-header { justify-content: flex-end !important; }
}
.header-actions .pf-bell { position: relative; width: 34px; height: 34px; border-radius: 50%; color: var(--pb-t2, #848e9c) !important; }
.header-actions .pf-bell .notif-bell-badge { position: absolute; top: -4px; inset-inline-end: -4px; }
@media (min-width: 768px) { .header-actions .pf-bell { width: 44px; height: 44px; } }

/* logout lives in the account page only */
html body .dashboard-sidebar-col .sidebar-logout-btn, html body #pageMenu .pro-logout { display: none !important; }   /* beats desktop-pro.css "html body .sidebar-logout-btn" */
html.bf-logging-out body { pointer-events: none; opacity: .6; transition: opacity .2s; }

/* ---------- the page ---------- */
#profilePage .pf { padding-bottom: 40px; }
#profilePage .pf > * { flex-shrink: 0; }   /* the site's full-page content is a flex column: never squeeze (and clip) the groups */
/* compact account card: picture on the side, details next to it */
#profilePage .pf-hero { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 14px; margin-bottom: 12px;
  background: linear-gradient(180deg, var(--pb-card2, #1e2329), var(--pb-card, #161a1e)); border: 1px solid var(--pb-line, rgba(255,255,255,.06)); border-radius: 18px; }
#profilePage .pf-av-wrap { position: relative; width: 68px; height: 68px; flex: none; }
#profilePage .pf-info { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#profilePage .pf-av { width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; cursor: pointer;
  background: var(--pb-card2, #1e2329); border: 2px solid var(--pb-line2, rgba(255,255,255,.1)); color: var(--pb-t2, #848e9c); font-size: 1.7rem; }
#profilePage .pf-av img { width: 100%; height: 100%; object-fit: cover; }
#profilePage .pf-av-wrap.is-verified { --pf-ring: #0ecb81; }
#profilePage .pf-av-wrap.is-pro { --pf-ring: #F0B90B; }
#profilePage .pf-av-wrap.is-verified.is-pro { --pf-ring: conic-gradient(from 0deg, #0ecb81 0 50%, #F0B90B 50% 100%); }
#profilePage .pf-av-wrap.is-verified::before, #profilePage .pf-av-wrap.is-pro::before {
  content: ''; position: absolute; inset: -4px; border-radius: 50%; padding: 3px; background: var(--pf-ring); pointer-events: none; z-index: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
#profilePage .pf-av-wrap.is-pro .pf-av, #profilePage .pf-av-wrap.is-verified .pf-av { border-color: transparent; }
#profilePage .pf-av-wrap.busy .pf-av { opacity: .45; }
#profilePage .pf-av-wrap.busy::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--pb-acc, #0ecb81); animation: pfSpin .8s linear infinite; }
@keyframes pfSpin { to { transform: rotate(360deg); } }
#profilePage .pf-name { max-width: 100%; }
#profilePage .pf-name b { display: block; font-size: 1.05rem; color: var(--pb-t1, #eaecef); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#profilePage .pf-id { border: 1px solid var(--pb-line2, rgba(255,255,255,.1)); background: transparent; color: var(--pb-t2, #848e9c); border-radius: 20px;
  padding: 4px 12px; font-size: .78rem; cursor: pointer; font-family: var(--pb-num, monospace); direction: ltr; }
#profilePage .pf-id i { font-size: .72rem; margin-inline-start: 4px; }
#profilePage .pf-badges { display: flex; gap: 6px; flex-wrap: wrap; }
#profilePage .pf-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; padding: 4px 11px; font-size: .74rem; font-weight: 700;
  border: 1px solid var(--pb-line2, rgba(255,255,255,.1)); color: var(--pb-t2, #848e9c); }
#profilePage .pf-badge.verified { color: var(--pb-acc, #0ecb81); border-color: rgba(14,203,129,.45); background: rgba(14,203,129,.1); }
#profilePage .pf-badge.review { color: #60A5FA; border-color: rgba(96,165,250,.45); background: rgba(96,165,250,.1); }
#profilePage .pf-badge.pending { color: var(--pb-warn, #f0b90b); border-color: rgba(240,185,11,.45); background: rgba(240,185,11,.08); }
#profilePage .pf-badge.rejected { color: var(--pb-dn, #f6465d); border-color: rgba(246,70,93,.45); background: rgba(246,70,93,.08); }
#profilePage .pf-badge.tier.pro { color: #F0B90B; border-color: rgba(240,185,11,.6); background: linear-gradient(135deg, rgba(240,185,11,.18), rgba(240,185,11,.05)); }
#profilePage .pf-remove { display: block; width: 100%; border: 0; border-top: 1px solid var(--pb-line, rgba(255,255,255,.06)); background: transparent;
  color: var(--pb-dn, #f6465d); font-size: .78rem; padding: 10px 14px; cursor: pointer; text-align: start; font-family: inherit; }

#profilePage .pf-group { background: var(--pb-card, #161a1e); border: 1px solid var(--pb-line, rgba(255,255,255,.06)); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
#profilePage .pf-gt { padding: 10px 14px 4px; color: var(--pb-t3, #5e6673); font-size: .7rem; font-weight: 700; }
#profilePage .pf-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: transparent; border: 0;
  border-top: 1px solid var(--pb-line, rgba(255,255,255,.06)); color: var(--pb-t1, #eaecef); font-size: .88rem; cursor: pointer; text-align: start; font-family: inherit; }
#profilePage .pf-gt + .pf-row { border-top: 0; }
#profilePage .pf-row:active { background: rgba(255,255,255,.03); }
#profilePage .pf-row .pf-ic { width: 20px; color: var(--pb-t2, #848e9c); text-align: center; }
#profilePage .pf-row span { flex: 1; }
#profilePage .pf-row em { font-style: normal; color: var(--pb-t2, #848e9c); font-size: .74rem; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; }
#profilePage .pf-row em.verified { color: var(--pb-acc, #0ecb81); }
#profilePage .pf-row em.pending { color: var(--pb-warn, #f0b90b); }
#profilePage .pf-row em.review { color: #60A5FA; }
#profilePage .pf-row em.rejected { color: var(--pb-dn, #f6465d); }
#profilePage .pf-row .pf-chev { color: var(--pb-t3, #5e6673); font-size: .72rem; transition: transform .2s; }
[dir="ltr"] #profilePage .pf-row .pf-chev { transform: rotate(180deg); }
#profilePage .pf-row.open .pf-chev { transform: rotate(-90deg); }
#profilePage .pf-panel { display: none; padding: 4px 14px 14px; }
#profilePage .pf-panel.open { display: block; }
#profilePage .pf-panel input:not([type=hidden]) { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
#profilePage .pf-panel .btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
#profilePage .pf-panel .btn-group button { flex: 1; }

#profilePage .pf-logout { width: 100%; padding: 14px; border-radius: 14px; border: 1px solid rgba(246,70,93,.35); background: rgba(246,70,93,.08);
  color: var(--pb-dn, #f6465d); font-size: .92rem; font-weight: 700; cursor: pointer; font-family: inherit; }

#profilePage .pf-confirm { position: fixed; inset: 0; z-index: 10001; display: none; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.6); padding: 16px; }
#profilePage .pf-confirm.open { display: flex; }
#profilePage .pf-confirm-box { width: 100%; max-width: 420px; background: var(--pb-card2, #1e2329); border-radius: 18px; padding: 18px; text-align: center;
  margin-bottom: env(safe-area-inset-bottom, 0px); }
#profilePage .pf-confirm-box p { color: var(--pb-t1, #eaecef); font-size: .95rem; margin: 4px 0 16px; }
#profilePage .pf-confirm-box div { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#profilePage .pf-confirm-box button { padding: 12px; border-radius: 12px; border: 1px solid var(--pb-line2, rgba(255,255,255,.1)); background: transparent;
  color: var(--pb-t1, #eaecef); font-weight: 700; cursor: pointer; font-family: inherit; }
#profilePage .pf-confirm-box .pf-yes { background: var(--pb-dn, #f6465d); border-color: var(--pb-dn, #f6465d); color: #fff; }
@media (min-width: 768px) { #profilePage .pf-confirm { align-items: center; } }
@media (min-width: 1100px) { #profilePage .full-page-content.pf { max-width: 640px; margin: 0 auto; width: 100%; } }

/* forms moved in from the old settings page (name / email / password) — dark inputs and buttons that match the theme */
#profilePage .pf-panel .settings-label { display: block; color: var(--pb-t2, #848e9c); font-size: .74rem; margin: 2px 0 6px; }
#profilePage .pf-panel input:not([type=hidden]) { background: var(--pb-bg2, #0f1317); border: 1px solid var(--pb-line2, rgba(255,255,255,.1)); color: var(--pb-t1, #eaecef);
  border-radius: 12px; padding: 11px 12px; font-size: .9rem; font-family: inherit; outline: none; }
#profilePage .pf-panel input:focus { border-color: var(--pb-acc, #0ecb81); }
#profilePage .pf-panel .btn-save, #profilePage .pf-panel .btn-close-profile { border: 0; border-radius: 12px; padding: 11px; font-weight: 700; font-size: .85rem; cursor: pointer; font-family: inherit; }
#profilePage .pf-panel .btn-save { background: var(--pb-acc, #0ecb81); color: var(--pb-on-acc, #06140d); }
#profilePage .pf-panel .btn-save:disabled { opacity: .5; }
#profilePage .pf-panel .btn-close-profile { background: var(--pb-card2, #1e2329); color: var(--pb-t1, #eaecef); border: 1px solid var(--pb-line2, rgba(255,255,255,.1)); }
#profilePage .pf-panel .settings-msg { font-size: .75rem; margin-top: 6px; }

/* ---------- card "Edit profile" button + the edit screen ---------- */
#profilePage .pf-hero { flex-wrap: wrap; }
#profilePage .pf-edit-btn { flex: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--pb-line2, rgba(255,255,255,.1));
  background: var(--pb-card2, #1e2329); color: var(--pb-t1, #eaecef); border-radius: 10px; padding: 7px 12px; font-size: .78rem; font-weight: 700; cursor: pointer; font-family: inherit; }
#profilePage .pf-edit-btn i { color: var(--pb-acc, #0ecb81); font-size: .72rem; }
#profilePage .pf-av { cursor: pointer; }
#profilePage .pf-edit-photo { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 14px; margin-bottom: 12px;
  background: var(--pb-card, #161a1e); border: 1px solid var(--pb-line, rgba(255,255,255,.06)); border-radius: 16px; }
#profilePage .pf-av-wrap.big { width: 108px; height: 108px; }
#profilePage .pf-av-wrap.big .pf-av { font-size: 2.6rem; }
#profilePage .pf-av-wrap.big.busy::after { inset: 36px; }
#profilePage .pf-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#profilePage .pf-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; padding: 10px 16px; font-size: .84rem; font-weight: 700; cursor: pointer; font-family: inherit; }
#profilePage .pf-btn.primary { border: 0; background: var(--pb-acc, #0ecb81); color: var(--pb-on-acc, #06140d); }
#profilePage .pf-btn.danger { border: 1px solid rgba(246,70,93,.4); background: rgba(246,70,93,.08); color: var(--pb-dn, #f6465d); }
#profilePage .pf-hint { color: var(--pb-t3, #5e6673); font-size: .7rem; }
#profilePage .pf-edit-name .pf-panel { display: block !important; padding-top: 6px; }   /* always open on the edit screen */
#profilePage [hidden] { display: none !important; }
#profilePage .pf-edit-name .pf-panel .settings-label { display: none; }   /* the group title already says "Display name" */
#profilePage .pf-hero .pf-edit-btn { order: 3; flex-basis: 100%; justify-content: center; padding: 9px 12px; }   /* own line under the card, so the name keeps the full width */
