/* ChrisEmm Connect – Benutzerkarte 0.9.9 */

.online-user,
.message-avatar,
.message-meta strong,
.chat-profile-link,
.online-profile-link {
    cursor: pointer;
}

.chat-user-card {
    position: fixed;
    z-index: 7000;
    width: min(340px, calc(100vw - 24px));
    padding: 18px;
    border: 1px solid rgba(129, 148, 255, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(
            155deg,
            rgba(24, 39, 70, 0.99),
            rgba(10, 21, 41, 0.99)
        );
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(16px);
}

.chat-user-card[hidden] {
    display: none;
}

.chat-user-card-close {
    position: absolute;
    top: 9px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--muted, #a8b5cc);
    background: transparent;
    cursor: pointer;
    font-size: 1.3rem;
}

.chat-user-card-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.chat-user-card-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding-right: 22px;
}

.chat-user-card-avatar {
    width: 58px;
    height: 58px;
    overflow: hidden;
    border: 2px solid rgba(108, 126, 255, 0.58);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.05);
}

.chat-user-card-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-user-card-identity {
    min-width: 0;
}

.chat-user-card-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-user-card-role {
    display: inline-flex;
    margin-top: 5px;
    padding: 3px 7px;
    border-radius: 999px;
    color: #bdc7ff;
    background: rgba(109, 124, 255, 0.13);
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
}

.chat-user-card-details {
    display: block;
    margin-top: 5px;
    color: var(--muted, #a8b5cc);
    font-size: 0.72rem;
}

.chat-user-card-online {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #72e1b2;
    font-size: 0.7rem;
    font-weight: 800;
}

.chat-user-card-online i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #56d9a3;
    box-shadow: 0 0 0 4px rgba(86, 217, 163, 0.12);
}

.chat-user-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 17px;
}

.chat-user-card-actions .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 42px;
    margin: 0;
    text-align: center;
}

.chat-user-card-actions > :only-child {
    grid-column: 1 / -1;
}

.chat-user-card-note,
.chat-user-card-loading,
.chat-user-card-error {
    margin: 0;
    color: var(--muted, #a8b5cc);
    font-size: 0.78rem;
    line-height: 1.55;
}

.chat-user-card-error {
    color: #ff9ca6;
}

@media (max-width: 560px) {
    .chat-user-card {
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
        top: auto !important;
        width: auto;
    }
}
