/* Social Guanxi - mini-profilo overlay nella mappa 3D (user-card). */

.gx-usercard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 25, 35, 0.45);
    backdrop-filter: blur(3px);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: gx-usercard-fade 0.15s ease;
}
@keyframes gx-usercard-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gx-usercard {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    padding: 24px;
    width: 100%;
    max-width: 340px;
    text-align: center;
    position: relative;
    animation: gx-usercard-pop 0.18s ease;
}
@keyframes gx-usercard-pop {
    from { transform: scale(0.94); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.gx-usercard-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
}
.gx-usercard-close:hover { background: #f3f4f6; color: #111827; }

.gx-usercard .gx-social-avatar {
    width: 72px;
    height: 72px;
    font-size: 30px;
    margin: 0 auto 12px;
}

.gx-usercard-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.gx-usercard-username {
    color: var(--gx-social-muted, #6b7280);
    font-size: 14px;
    margin: 0 0 10px;
}
.gx-usercard-bio {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 84px;
    overflow: hidden;
}
.gx-usercard-bio.is-empty { color: var(--gx-social-muted, #6b7280); font-style: italic; }

.gx-usercard-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 10px 0;
    border-top: 1px solid var(--gx-social-border, #e5e7eb);
    border-bottom: 1px solid var(--gx-social-border, #e5e7eb);
    margin-bottom: 16px;
}

.gx-usercard-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gx-usercard-actions .gx-btn { width: 100%; }

.gx-usercard-loading,
.gx-usercard-error {
    padding: 24px 0;
    color: var(--gx-social-muted, #6b7280);
    font-size: 14px;
}

@media (max-width: 480px) {
    .gx-usercard { max-width: 100%; }
}
