/* ===== MESAJLAR PANELİ ===== */

.dm-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dm-conversation-item {
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    border-left: 3px solid transparent;
    position: relative;
}

.dm-conversation-item:hover {
    background: var(--bg-tertiary);
}

.dm-conversation-item.active {
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.1) 0%, transparent 100%);
    border-left-color: var(--primary);
}

.dm-conv-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.dm-conv-content {
    flex: 1;
    min-width: 0;
}

.dm-conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.dm-conv-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-conv-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 8px;
}

.dm-conv-message {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===== DM PENCERESI ===== */

.dm-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    height: 520px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 500;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dm-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px 12px 0 0;
}

.dm-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.dm-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.dm-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.dm-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.dm-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 24px 12px;
}

.dm-loading {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 12px;
}

.dm-message {
    display: flex;
    margin-bottom: 4px;
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dm-message.sent {
    justify-content: flex-end;
}

.dm-message.received {
    justify-content: flex-start;
}

.dm-message-content {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 8px;
    word-wrap: break-word;
}

.dm-message.sent .dm-message-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.dm-message.received .dm-message-content {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dm-message-text {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.dm-message-time {
    font-size: 11px;
    opacity: 0.7;
    text-align: right;
}

.dm-input {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--bg-tertiary);
    border-radius: 0 0 12px 12px;
}

.dm-input-field {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.dm-input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.1);
}

.dm-input-field::placeholder {
    color: var(--text-muted);
}

.dm-send {
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dm-send:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.dm-send:active {
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .dm-window {
        width: 320px;
        height: 480px;
        right: 10px;
        bottom: 10px;
    }
}

@media (max-width: 768px) {
    .dm-window {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }
}