/* Mesajlar Sayfası CSS */

body {
    background: #1a1a2e;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header'ı düzelt */
.navbar {
    background: #343a40 !important;
    border-bottom: 1px solid #495057;
}

.navbar-brand {
    color: #ffffff !important;
}

.navbar-nav .nav-link {
    color: #ffffff !important;
}

.navbar-nav .nav-link:hover {
    color: #667eea !important;
}

.chat-container {
    height: calc(100vh - 80px);
    display: flex;
    background: #1a1a2e;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Sol Panel - Sohbet Listesi */
.conversations-sidebar {
    width: 350px;
    background: #16213e;
    border-right: 1px solid #2c3e50;
    display: flex;
    flex-direction: column;
}

.chats-header {
    padding: 20px;
    border-bottom: 1px solid #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chats-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.chats-actions {
    display: flex;
    gap: 10px;
}

.chats-actions button {
    background: none;
    border: none;
    color: #667eea;
    font-size: 16px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.chats-actions button:hover {
    background: rgba(102, 126, 234, 0.1);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 15px 20px;
    border-bottom: 1px solid #2c3e50;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.conversation-item:hover {
    background: #2c3e50;
}

.conversation-item.active {
    background: #667eea;
}

.conversation-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 16px;
    position: relative;
}

.unread-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.conversation-content {
    flex: 1;
    min-width: 0;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.conversation-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 11px;
    color: #95a5a6;
}

.conversation-preview {
    font-size: 12px;
    color: #95a5a6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Orta Panel - Chat Alanı */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a2e;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #2c3e50;
    background: #16213e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.chat-user-info:hover {
    opacity: 0.8;
}

.chat-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.chat-user-details h6 {
    margin: 0;
    font-weight: 600;
    color: #ffffff;
}

.chat-user-status {
    font-size: 12px;
    color: #95a5a6;
}

.chat-actions button {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.chat-actions button:hover {
    background: rgba(149, 165, 166, 0.1);
    color: #ffffff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #1a1a2e;
}

.message {
    margin-bottom: 8px;
    padding: 4px 0;
    display: inline-block;
    max-width: 60%;
    word-wrap: break-word;
    line-height: 1.3;
    font-size: 14px;
    color: #ffffff;
}

.message.sent {
    text-align: right;
    float: right;
    clear: both;
}

.message.received {
    text-align: left;
    float: left;
    clear: both;
}

.message-time {
    font-size: 11px;
    color: #95a5a6;
    margin-left: 8px;
    display: inline-block;
}

.chat-input {
    padding: 20px;
    border-top: 1px solid #2c3e50;
    background: #16213e;
}

.chat-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #2c3e50;
    border-radius: 25px;
    padding: 8px 16px;
}

.chat-input-container input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.chat-input-container input::placeholder {
    color: #95a5a6;
}

.chat-input-actions {
    display: flex;
    gap: 8px;
}

.chat-input-actions button {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
}

.chat-input-actions button:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.chat-input-actions .send-btn {
    background: #667eea;
    color: white;
}

.chat-input-actions .send-btn:hover {
    background: #5a6fd8;
    transform: scale(1.1);
}

/* Sağ Panel - Kullanıcı Bilgileri */
.user-info-sidebar {
    width: 300px;
    background: #16213e;
    border-left: 1px solid #2c3e50;
    display: flex;
    flex-direction: column;
}

.user-info-header {
    padding: 20px;
    border-bottom: 1px solid #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.user-info-actions button {
    background: none;
    border: none;
    color: #95a5a6;
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.user-info-actions button:hover {
    background: rgba(149, 165, 166, 0.1);
    color: #ffffff;
}

.user-info-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.user-info-section {
    text-align: center;
    margin-bottom: 30px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin: 0 auto 15px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.user-username {
    font-size: 14px;
    color: #95a5a6;
    margin-bottom: 10px;
}

.user-status {
    font-size: 12px;
    color: #95a5a6;
    background: #2c3e50;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
}

.user-actions {
    margin-top: 20px;
}

.user-actions .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 1200px) {
    .user-info-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
        background: #ffffff;
        color: #333333;
    }

    .chat-container {
        flex-direction: column;
        height: 100vh;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }
    
    /* Mobil Header */
    .chats-header {
        background: #ffffff;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .chats-title {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
    }

    .chats-actions {
        display: flex;
        gap: 15px;
    }

    .chats-actions button {
        background: none;
        border: none;
        color: #666666;
        font-size: 18px;
        padding: 8px;
        border-radius: 50%;
        transition: background-color 0.3s;
    }

    .chats-actions button:hover {
        background: #f0f0f0;
    }

    /* Mobil Sohbet Listesi */
    .conversations-sidebar {
        width: 100%;
        height: 100vh;
        background: #ffffff;
        border: none;
        display: flex;
        flex-direction: column;
    }

    .conversations-list {
        flex: 1;
        overflow-y: auto;
        background: #ffffff;
    }

    .conversation-item {
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        background: #ffffff;
        transition: background-color 0.3s;
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .conversation-item:hover {
        background: #f8f9fa;
    }

    .conversation-item.active {
        background: #e3f2fd;
    }

    .conversation-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: white;
        font-size: 18px;
        position: relative;
    }

    .unread-badge {
        position: absolute;
        top: -2px;
        right: -2px;
        background: #e74c3c;
        color: white;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        font-size: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }

    .conversation-content {
        flex: 1;
        min-width: 0;
    }

    .conversation-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 4px;
    }

    .conversation-name {
        font-weight: 600;
        font-size: 16px;
        color: #333333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .conversation-time {
        font-size: 12px;
        color: #999999;
        font-weight: 400;
    }

    .conversation-preview {
        font-size: 14px;
        color: #666666;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    /* Chat Area - Mobilde gizli */
    .chat-area {
        display: none;
    }

    .user-info-sidebar {
        display: none;
    }

    /* Mobil scrollbar */
    .conversations-list::-webkit-scrollbar {
        width: 4px;
    }

    .conversations-list::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .conversations-list::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }

    .conversations-list::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}

@media (max-width: 480px) {
    .chat-container {
        height: 100vh;
    }

    .conversations-sidebar {
        height: 35vh;
        min-height: 200px;
    }

    .conversations-list {
        height: calc(35vh - 60px);
        min-height: 140px;
    }

    .chat-area {
        height: 65vh;
        min-height: 300px;
    }

    .chat-messages {
        height: calc(65vh - 140px);
        min-height: 160px;
    }

    .conversation-item {
        padding: 10px 12px;
    }

    .conversation-avatar {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    .conversation-name {
        font-size: 12px;
    }

    .conversation-preview {
        font-size: 10px;
    }

    .chats-header,
    .chat-header,
    .chat-input {
        padding: 12px;
    }
}

/* Landscape mobil */
@media (max-width: 768px) and (orientation: landscape) {
    .conversations-sidebar {
        height: 30vh;
        min-height: 180px;
    }

    .conversations-list {
        height: calc(30vh - 60px);
        min-height: 120px;
    }

    .chat-area {
        height: 70vh;
        min-height: 320px;
    }

    .chat-messages {
        height: calc(70vh - 140px);
        min-height: 180px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #16213e;
}

::-webkit-scrollbar-thumb {
    background: #2c3e50;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #34495e;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
}

.no-conversation {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #95a5a6;
    text-align: center;
}

.no-conversation i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
} 