/* --- 1. მცურავი ჩატის ფანჯარა (Floating Window) --- */
.private-chat-window {
    position: fixed;
    bottom: 0;
    right: 80px;
    width: 330px;
    height: 450px;
    background: #1e293b;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    display: flex; /* JS-ით იმართება */
    flex-direction: column;
    z-index: 10005;
    font-family: 'Poppins', sans-serif;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- 2. ჩატის ჰედერი --- */
.pm-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    padding: 12px 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0f172a; /* მუქი ტექსტი ცისფერ ფონზე უკეთ ჩანს */
}

.pm-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.8);
}

.pm-username {
    font-weight: 600;
    font-size: 0.95em;
}

.pm-close-btn {
    background: none;
    border: none;
    color: #0f172a;
    font-size: 1.4em;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
    line-height: 1;
}
.pm-close-btn:hover { opacity: 1; transform: scale(1.2); }

/* --- 3. მესიჯების არე --- */
.pm-body {
    flex: 1;
    background: #0f172a;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* მესიჯის ბაბლები */
.pm-msg {
    max-width: 80%;
    padding: 8px 14px;
    border-radius: 18px;
    font-size: 0.9em;
    line-height: 1.4;
    word-wrap: break-word;
}

.pm-msg.them {
    align-self: flex-start;
    background: #334155;
    color: white;
    border-bottom-left-radius: 4px;
}

.pm-msg.me {
    align-self: flex-end;
    background: var(--primary);
    color: #0f172a;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

/* Typing... */
.pm-typing {
    font-size: 0.7em;
    color: #0f172a;
    background: rgba(255,255,255,0.5);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* --- 4. ინპუტი და ფუტერი --- */
.pm-footer {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    background: #1e293b;
    display: flex;
    gap: 8px;
    align-items: center;
}

.pm-input {
    flex: 1;
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-radius: 20px !important;
    padding: 8px 15px !important;
    color: white !important;
    margin-bottom: 0 !important;
}

.pm-send-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.pm-send-btn:hover { transform: scale(1.1); color: white; }

/* --- 5. ღილაკი პროფილზე (Message Button) --- */
.btn-msg {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
.btn-msg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

/* --- 6. მესენჯერის ჩამოსაშლელი სია (Dropdown) --- */
.msg-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: 0.2s;
}
.msg-dropdown-item:hover { background: rgba(0, 210, 255, 0.1); }

.msg-dropdown-item img, .msg-dropdown-item .avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.unread-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: auto;
    box-shadow: 0 0 8px var(--primary);
}
/* ===== Mention Styles ===== */
.mention-highlight {
    color: #00d2ff;
    font-weight: 600;
    background: rgba(0, 210, 255, 0.15);
    padding: 1px 4px;
    border-radius: 4px;
    cursor: pointer;
}

.mention-highlight:hover {
    background: rgba(0, 210, 255, 0.3);
}

.chat-bubble .author:hover {
    text-decoration: underline;
}

@keyframes highlight-mention {
    0% { background: rgba(0, 210, 255, 0.3); transform: scale(1.02); }
    100% { background: transparent; transform: scale(1); }
}

.mention-notif {
    background: rgba(0, 210, 255, 0.08) !important;
    border-left: 3px solid #00d2ff;
}

.mention-notif:hover {
    background: rgba(0, 210, 255, 0.15) !important;
}

/* Mention Autocomplete Dropdown */
.mention-dropdown {
    position: absolute;
    bottom: 100%;
    left: 10px;
    right: 10px;
    background: #1e293b;
    border: 1px solid rgba(0, 210, 255, 0.3);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);
    margin-bottom: 5px;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: 0.2s;
}

.mention-item:hover {
    background: rgba(0, 210, 255, 0.15);
}

.mention-item:first-child { border-radius: 12px 12px 0 0; }
.mention-item:last-child { border-radius: 0 0 12px 12px; }
.mention-item:only-child { border-radius: 12px; }

.mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.mention-name {
    font-size: 14px;
    font-weight: 500;
    color: white;
}