/*
 * playerprofile.css — shared "view another player's profile" popup
 * (js/playerProfile.js). A read-only card overlay opened from leaderboard
 * rows, Outpost map pins, station-detail owner rows, etc. Reuses the
 * /profile page's amber/cream language, scoped `pp-*`.
 */

.pp-overlay {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(15,8,3,.62);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    opacity: 0; transition: opacity .16s ease;
}
.pp-overlay.show { opacity: 1; }

.pp-modal {
    position: relative; width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto;
    scrollbar-width: thin;
    background: linear-gradient(165deg, #3a2410, #241608 72%);
    border: 1px solid rgba(255,216,138,.24); border-radius: 18px;
    padding: 16px 16px 8px; color: #fff4e2;
    box-shadow: 0 30px 70px rgba(0,0,0,.5);
    transform: translateY(8px) scale(.98); transition: transform .16s ease;
}
.pp-overlay.show .pp-modal { transform: none; }
.pp-modal::-webkit-scrollbar { width: 8px; }
.pp-modal::-webkit-scrollbar-thumb { background: rgba(255,216,138,.25); border-radius: 8px; }

.pp-state { text-align: center; padding: 48px 20px; font-size: 12px; color: rgba(255,235,210,.7); }
.pp-err { color: #ffb0a0; }

.pp-x {
    position: absolute; top: 10px; right: 12px; z-index: 3;
    width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(255,216,138,.25); background: rgba(0,0,0,.3); color: #ffd88a;
    font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.pp-x:hover { background: rgba(0,0,0,.55); }

/* Header */
.pp-head { display: flex; gap: 12px; align-items: center; margin: 2px 0 12px; padding-right: 28px; }
.pp-avatar { position: relative; width: 66px; height: 66px; flex-shrink: 0; border-radius: 15px; border: 2px solid rgba(255,216,138,.4); }
.pp-avatar-img, .pp-avatar-fallback { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; display: flex; align-items: center; justify-content: center; }
.pp-avatar-fallback { background: rgba(240,136,62,.2); color: #ffd88a; font-size: 28px; font-weight: 800; }
.pp-lvl {
    position: absolute; left: -6px; bottom: -6px; min-width: 22px; height: 19px; padding: 0 5px;
    border-radius: 999px; background: linear-gradient(180deg,#ffd54a,#f0883e); color: #3a2410;
    font-size: 11.5px; font-weight: 900; display: flex; align-items: center; justify-content: center;
    border: 1.5px solid #241608; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.pp-head-main { min-width: 0; flex: 1; }
.pp-name { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-you { font-size: 9px; font-weight: 800; background: #c8641a; color: #fff8ec; padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.pp-title {
    display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .5px; color: #ffd88a;
    background: rgba(255,216,138,.12); border: 1px solid rgba(255,216,138,.25); border-radius: 999px; padding: 2px 8px;
}
.pp-sub { margin-top: 6px; font-size: 11.5px; color: rgba(255,235,210,.6); font-family: var(--font-mono); }

.pp-xp { margin: 4px 0 10px; }
.pp-xp-track { height: 6px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.pp-xp-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg,#f0883e,#ffd88a); }
.pp-xp-lbl { margin-top: 4px; font-size: 10px; font-family: var(--font-mono); color: rgba(255,235,210,.6); text-align: right; }

.pp-motto {
    font-size: 12px; font-style: italic; line-height: 1.5; color: rgba(255,235,210,.78);
    text-align: center; padding: 8px 10px; margin-bottom: 12px;
    background: rgba(0,0,0,.22); border-radius: 10px; border: 1px solid rgba(255,216,138,.14);
}

/* Body sections */
.pp-body { display: flex; flex-direction: column; gap: 10px; }
.pp-sec { background: rgba(0,0,0,.22); border: 1px solid rgba(255,216,138,.14); border-radius: 12px; padding: 10px 12px; }
.pp-sec-h { font-size: 9px; letter-spacing: 1.5px; font-weight: 800; color: rgba(255,216,138,.6); margin-bottom: 8px; }

.pp-power { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pp-power-ic { font-size: 15px; }
.pp-power-v { font-size: 20px; font-weight: 900; font-family: var(--font-mono); color: #ffd88a; }
.pp-power-l { font-size: 10.5px; font-weight: 800; letter-spacing: 1px; color: rgba(255,235,210,.5); }
.pp-weapon {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 7px 9px; border-radius: 9px;
    background: color-mix(in srgb, var(--gc,#8a6a48) 14%, rgba(0,0,0,.2));
    border: 1px solid color-mix(in srgb, var(--gc,#8a6a48) 45%, transparent);
}
.pp-weapon-empty { background: rgba(255,255,255,.04); border-color: rgba(255,216,138,.14); }
.pp-weapon-ic { font-size: 18px; flex-shrink: 0; }
.pp-weapon-txt { font-size: 11.5px; color: rgba(255,235,210,.85); min-width: 0; }
.pp-weapon-txt b { font-weight: 800; }
.pp-weapon-txt i { font-style: normal; }

.pp-chips { display: flex; gap: 6px; }
.pp-chip {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px;
    background: rgba(255,255,255,.05); border: 1px solid rgba(255,216,138,.14); border-radius: 8px; padding: 6px 2px;
}
.pp-chip span { font-size: 13px; }
.pp-chip b { font-size: 12px; font-weight: 900; font-family: var(--font-mono); color: #fff4e2; }
.pp-chip i { font-size: 8.5px; font-style: normal; letter-spacing: .5px; color: rgba(255,235,210,.5); font-weight: 700; }

.pp-cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pp-cell {
    text-align: center; padding: 8px 3px; border-radius: 9px;
    background: rgba(255,216,138,.08); border: 1px solid rgba(255,216,138,.16);
}
.pp-cell-ic { font-size: 15px; }
.pp-cell-v { font-size: 14px; font-weight: 900; font-family: var(--font-mono); color: #ffd88a; }
.pp-cell-v.sm { font-size: 12.5px; margin-top: 2px; }
.pp-cell-l { font-size: 8.5px; letter-spacing: .3px; color: rgba(255,235,210,.55); margin-top: 2px; font-weight: 700; }

.pp-best {
    display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; margin-bottom: 8px;
    background: linear-gradient(110deg, rgba(0,0,0,.3), rgba(200,100,26,.35));
}
.pp-best-badge { font-size: 19px; font-weight: 900; font-family: var(--font-mono); color: #ffd88a; }
.pp-best-txt { display: flex; flex-direction: column; min-width: 0; }
.pp-best-txt i { font-size: 8.5px; letter-spacing: 1.5px; opacity: .7; font-style: normal; font-weight: 800; }
.pp-best-txt b { font-size: 12.5px; font-weight: 800; }
.pp-best-none { justify-content: center; font-size: 11.5px; color: rgba(255,235,210,.6); }

.pp-rank-list { display: flex; flex-direction: column; gap: 3px; }
.pp-rank-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; background: rgba(255,255,255,.03); }
.pp-rank-cat { flex: 1; min-width: 0; font-size: 11px; font-weight: 700; color: rgba(255,235,210,.85); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-rank-pos { flex-shrink: 0; font-size: 11.5px; font-weight: 900; font-family: var(--font-mono); color: #ffd88a; }
.pp-rank-pos.none { color: rgba(255,235,210,.35); }
.pp-rank-val { flex-shrink: 0; font-size: 10px; font-family: var(--font-mono); color: rgba(255,235,210,.55); }
.pp-rank-val i { font-style: normal; opacity: .7; }

.pp-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.pp-badge {
    display: flex; flex-direction: column; align-items: center; gap: 3px; width: 52px; padding: 7px 3px 5px;
    border-radius: 10px; border: 2px solid color-mix(in srgb, var(--accent,#c8641a) 60%, transparent);
    background: linear-gradient(180deg, rgba(255,255,255,.06), color-mix(in srgb, var(--accent,#c8641a) 14%, transparent));
}
.pp-badge.maxed { border-color: #ffd54a; box-shadow: 0 0 10px rgba(255,213,74,.3); }
.pp-badge-ic { font-size: 18px; }
.pp-badge-lv { font-size: 8px; font-weight: 800; font-family: var(--font-mono); color: #ffd88a; }
.pp-badges-empty { font-size: 11px; color: rgba(255,235,210,.5); text-align: center; padding: 6px; }

.pp-foot { text-align: center; font-size: 9px; color: rgba(255,235,210,.4); font-family: var(--font-mono); padding: 8px 0 4px; letter-spacing: .5px; }

@container (max-width: 460px) {
    .pp-cells { grid-template-columns: repeat(2, 1fr); }
}
