
.uphc-card{
  position:fixed;
  width:390px !important;
  background:var(--uphc-bg);
  color:var(--uphc-text);
  border:1px solid var(--uphc-border);
  border-radius:10px;
  box-shadow:var(--uphc-ring);
  padding:12px;
  pointer-events:auto;
  opacity:0;
  transform:scale(.98);
  transition:opacity .12s ease, transform .12s ease;
}

.uphc-card.is-open{ opacity:1; transform:scale(1); }


/* avatar column stays tight */
.uphc-ava-col{ display:flex; flex-direction:column; align-items:center; }

/* exact 1px gap between level and points */
.hov-level-wrap{ display:grid; row-gap:1px; margin-top:2px; } /* adjust if you want a touch below avatar */

.uphc-head{ display:flex; gap:10px; align-items:center; }
.uphc-ava{ width:48px; height:48px; border-radius:999px; object-fit:cover; }
.uphc-names{ min-width:0; color:#222 !important;}
.uphc-name{ font-weight:800; line-height:1.1; color:#353535 !important; }
.uphc-sub{ color:var(--uphc-muted); font-size:12px; line-height:1.1; margin-top:2px; }
/* exact 1px gap between level and points */
.hov-level-wrap{ display:grid; row-gap:4px; margin-top:10px; } /* adjust if you want a touch below avatar */
.level-note-hov{ margin:0; text-align:center; font-size:15px; font-weight:600; line-height:1.1;}
.points-count-hov{ margin:0; font-size:11px; color:#565656; font-weight:400; line-height:1.1;}

.uphc-bio{width:100%;background:#f7f7f7;margin:8px 0 4px;padding:4px;border-radius:5px;font-size:13px;color:#222;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

.uphc-meta{ color:var(--uphc-muted); font-size:12px; display:flex; gap:10px; margin:4px 0 8px; }
.uphc-actions{ display:flex; gap:8px; }
.uphc-btn{
  background:var(--uphc-btn);
  color:var(--uphc-btn-text);
  border-radius:999px;
  padding:7px 12px;
  font-weight:700;
  font-size:13px;
  text-decoration:none;
}
.uphc-btn.uphc-secondary{ background:#e7f1ff; color:#0b5bd3; }

.uphc-arrow{
  position:absolute;
  width:12px; height:12px;
  background:var(--uphc-bg);
  border-left:1px solid var(--uphc-border);
  border-top:1px solid var(--uphc-border);
  transform:rotate(45deg);
  left:50%;
  margin-left:-6px;
}
.uphc-card[data-placement="top"] .uphc-arrow{ bottom:-6px; }
.uphc-card[data-placement="bottom"] .uphc-arrow{ top:-6px; transform:rotate(225deg); }



/* ====== Status rows under the name ====== */
.uphc-line{ display:flex; align-items:center; gap:0px; margin-top:6px; color:#1f2937;}
.uphc-line-status .uphc-status-text{ font-size:14px; line-height:1; margin-left:5px; !important;}
.uphc-line-location .uphc-location-text{ font-size:14px; line-height:1; margin-left:5px; !important;}
.uphc-loc {color:#656565;font-size:13px !important; margin:0px 0px 0px 5px !important;}
.uphc-user-status {color:#656565;font-size:12px !important; margin-left:3px !important; }

/* Icons + dots */
.uphc-ico{ width:14px; height:14px; display:inline-block; margin-right:5px !important;vertical-align:-2px; fill:#111; }
.uphc-dot{ width:8px; height:8px; border-radius:50%; background:#bbb; margin-right:0px !important; display:inline-block; box-shadow:0 0 0 2px #fff inset; }
.uphc-dot-online{font-size:16px !important; background:#22c55e;width:14px; height:14px; margin-left:3px !important;}

/* Avatar online dot overlay */
.uphc-ava-wrap{ position:relative; display:inline-block; }




/* ====== MBTI section ====== */

.uphc-sec .uphc-sec-head{
  font-weight:700;
  font-size:14px;
  color:#111;
  margin:10px 0 0 0 !important;          /* kill collapsing margins */
  padding:3px 0 3px 0 !important; /* use padding to guarantee 3px gap */
  line-height:1.1;              /* tighten header line box */
}

.uphc-sec .uphc-mbti-line{
  margin:0 !important;          /* ensure no extra top margin */
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1;                /* avoid extra leading on the row */
}

.uphc-sec .uphc-mbti-main{ white-space:nowrap; }
.uphc-sec .uphc-mbti-code{ font-weight:700; font-size:14px; }
.uphc-sec .uphc-mbti-title{ opacity:.9; font-size:14px; }



/* Info icon */
.uphc-tip-wrap{ position:relative; display:inline-flex; align-items:center; }
.uphc-info-ico{ font-size:14px; margin-left:5px;line-height:1; color:#111; }

/* ====== OUR tooltip (single definitive rule) ====== */
.uphc-tip{
  position:absolute; left:50%; bottom:125%;
  transform:translate(-50%, 6px);
  /* Wider, readable bubble */
  min-width:240px; max-width:480px;
  padding:12px 14px;
  background:rgba(17,17,17,.92); color:#fff;
  font-size:12.5px; line-height:1.45;
  border-radius:10px; box-shadow:0 6px 18px rgba(0,0,0,.25);
  opacity:0; pointer-events:none;
  transition:opacity .12s ease, transform .12s ease;
  z-index:999999; /* above the card shadow */
  white-space:normal; word-break:break-word;
}
.uphc-tip::after{
  content:""; position:absolute; left:50%; bottom:-6px; transform:translateX(-50%);
  border:6px solid transparent; border-top-color:rgba(17,17,17,.92);
}

/* Show tooltip on hover/focus */
.uphc-mbti-line:hover .uphc-tip,
.uphc-mbti-line:focus-within .uphc-tip{ opacity:1; transform:translate(-50%, 0); }

/* ====== (Optional) compact composite status row if you ever need it ====== */
.uphc-status{ margin-top:6px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:12.5px; color:#444; }
.uphc-presence{ display:inline-flex; align-items:center; gap:6px; }
.uphc-loc{ display:inline-flex; align-items:center; gap:6px; }
.uphc-sep{ opacity:.5; }










/* Make the action row fill the card and allocate columns */
.uphc-actions{
  display:grid;
  grid-template-columns: 1fr 1fr 40px; /* Message | Add friend | … */
  gap:8px;
  width:100%;
  min-width:0;
  margin-top:18px;
}

/* HoverCard Base buttons */
.uphc-btn{
  --fb-gray:#e5e5e9; --fb-text:#111; 
  --fb-gray-hover:#dedee0; 
  --fb-purple:#2d53cf; --fb-purple-hover:#2148c4;

  display:inline-flex; align-items:center; gap:8px;
  height:36px; padding:0 14px;
  border:0; border-radius:8px;
  font:600 14px/1 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  cursor:pointer; text-decoration:none; white-space:nowrap;
  transition:background .15s ease, filter .15s ease, transform .02s ease, color .15s ease;
  width:100%;              /* <<< stretch within the grid cell */
  justify-content:center;  /* center icon+label */
  min-width:0;
}
.uphc-btn svg{ width:16px; height:16px; flex:0 0 auto; }
.uphc-btn:active{ transform:translateY(1px); }

/* Left (gray) */
.uphc-msg{ background:var(--fb-gray); color:#333; }
.uphc-msg:hover{  background:var(--fb-gray-hover);color:#333; }

/* Middle (purple) */
.uphc-primary{ background:var(--fb-purple); color:#fff; }
.uphc-primary:hover{ background:var(--fb-purple-hover); }

/* Right icon-only: fixed width cell, button hugs center */
.uphc-icononly{
  padding:0;
  width:40px;              /* matches the 3rd column width */
  justify-content:center;
}



.level-note{font-weight:600;text-align:center;font-size:12px;line-height:1;white-space:nowrap;color:#2d53cf;}
.points-count{font-weight:400;text-align:center;margin-top:10px;font-size:11px;line-height:1;white-space:nowrap;color:#565656;}
.info-style { margin-left:3px;}

:root{ --uphc-accent:#2a66f5; }


/* bigger avatar with ring + badge */
.uphc-head{ display:flex; gap:14px; align-items:flex-start; }

.uphc-ava-wrap{
  position:relative; display:inline-block; line-height:0;
  border-radius:999px; background:#fff;
  padding:3px;                         /* inner white gap */
  border:6px solid var(--avatar-ring);            /* blue ring */
}

.uphc-ava{ width:100px; height:100px; border-radius:999px; object-fit:cover; display:block; }

.uphc-badge{
  position:absolute; right:-4px; bottom:-4px;
  min-width:28px; height:28px; padding:0 6px;
  border-radius:999px; background:var(--avatar-ring); color:#fff;
  font-weight:800; font-size:14px; display:flex; align-items:center; justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,.2), 0 0 0 3px #fff;
}


.uphc-name{ font-weight:800; font-size:18px; line-height:1.1; }
