/* ----- profile modal (CodyChat's structure): cover, pills top-left, icon buttons top-right, bordered avatar + state dot,
   rank / name / mood over the cover, tab strip, two-column info rows ----- */
.pf { color: var(--text); }
.pf-top { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; padding: 5px 15px 15px 15px; background: #262626; }
.pf-top::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.62) 100%); pointer-events: none; }
.pf-top > * { position: relative; }

.pf-bar { display: flex; align-items: flex-start; justify-content: space-between; margin: 5px -5px 0 0; }
.pf-pills { display: flex; gap: 6px; padding: 5px 0 0 0; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px 3px 5px; border-radius: 100px; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: default; }
.pill img { width: 24px; height: 24px; border-radius: 50%; display: block; }
.pill b { font-size: 12px; font-weight: 700; color: #fff; }
.pf-actions { display: flex; }
.pf-btn { width: 40px; height: 40px; border: 0; background: none; color: #fff; font-size: 20px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.pf-btn:hover { transform: scale(1.12); }

.pf-id { display: flex; align-items: flex-end; gap: 12px; padding-top: 22px; }
.pf-avatar { position: relative; flex: none; width: 130px; height: 130px; }
.pf-av { display: block; width: 130px; height: 130px; border-radius: 5px; object-fit: cover; border: 2px solid #fff; background: #ccc; }
.pf-state { position: absolute; right: 5px; bottom: 5px; width: 16px; height: 16px; border: 2px solid #fff; border-radius: 50%; background: #fff; }
.pf-text { flex: 1; min-width: 0; padding: 0 0 2px 0; text-shadow: 0 1px 5px rgba(0,0,0,.85); }
.pf-rank { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; margin-bottom: -2px; }
.pf-rank-ico { height: 14px; width: auto; }
.pf-name { font-size: 25px; font-weight: 700; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-mood { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pf-menu { background: var(--strip); padding: 10px 15px; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.pf-tab { padding: 8px 12px; border: 0; border-radius: 5px; background: none; color: var(--text); font-size: 13px; font-weight: 700; }
.pf-tab:hover { background: var(--strip); }
.pf-tab.on { background: var(--pill-on); }

.pf-zone { padding: 15px 25px 25px 25px; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--row-line); }
.pf-row:last-child { border-bottom: 0; }
.pf-row:hover { background: var(--row-hover); }
.pf-label { font-weight: 700; }
.pf-label i { display: inline-block; width: 26px; color: var(--text-muted); }
.pf-value { color: var(--text); overflow-wrap: anywhere; }
.pf-about { color: #bdbdbd; line-height: 1.6; overflow-wrap: anywhere; padding: 4px 12px; }

/* camera and remove buttons on my own avatar (CodyChat puts them along the bottom of the picture) */
.pf-av-tools { position: absolute; left: 2px; right: 2px; bottom: 2px; display: flex; justify-content: center; gap: 4px; padding: 14px 0 4px 0; border-radius: 0 0 3px 3px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.65)); }
.pf-av-btn { width: 30px; height: 26px; border: 0; background: none; color: #fff; font-size: 15px; text-shadow: 0 1px 3px rgba(0,0,0,.8); cursor: pointer; }
.pf-av-btn:hover { transform: scale(1.18); }
/* while a picture is being sent: it dims, a small ring turns in the middle (only the ring), a thin bar fills along the bottom */
.pf-av { transition: filter .2s ease; }
.pf-avatar.is-busy .pf-av { filter: brightness(.55); }
.pf-avatar.is-busy .pf-av-tools { visibility: hidden; }
.pf-spin { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(255,255,255,.28); border-top-color: #fff; border-radius: 50%; opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.pf-avatar.is-busy .pf-spin { opacity: 1; animation: cb-spin .8s linear infinite; }
.pf-prog { position: absolute; left: 2px; right: 2px; bottom: 2px; height: 4px; border-radius: 0 0 3px 3px; background: rgba(0,0,0,.4); overflow: hidden; opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.pf-avatar.is-busy .pf-prog { opacity: 1; }
.pf-prog i { display: block; width: 0; height: 100%; background: var(--accent); transition: width .15s linear; }

/* default cover until a person uploads one: a calm gradient picked from their name */
.cv-0  { background: linear-gradient(135deg, #3a2b52, #6a3d7a); }
.cv-1  { background: linear-gradient(135deg, #2b3a52, #3d5f8f); }
.cv-2  { background: linear-gradient(135deg, #2b4a52, #2f8a8f); }
.cv-3  { background: linear-gradient(135deg, #2b523f, #3a8a62); }
.cv-4  { background: linear-gradient(135deg, #3f522b, #6f8f3a); }
.cv-5  { background: linear-gradient(135deg, #52492b, #9a823a); }
.cv-6  { background: linear-gradient(135deg, #523a2b, #a0603a); }
.cv-7  { background: linear-gradient(135deg, #522b2b, #9a3a3f); }
.cv-8  { background: linear-gradient(135deg, #522b44, #9a3a78); }
.cv-9  { background: linear-gradient(135deg, #2b2b52, #4a3a9a); }
.cv-10 { background: linear-gradient(135deg, #2b4552, #3a7a9a); }
.cv-11 { background: linear-gradient(135deg, #3a3a3a, #666666); }

@media (max-width: 480px) {
  .pf-avatar, .pf-av { width: 100px; height: 100px; }
  .pf-name { font-size: 21px; }
  .pf-zone { padding: 10px 12px 18px 12px; }
  .pf-row { grid-template-columns: 1fr; gap: 2px; }
}
