.chat-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 500px;
    background-color: #f8f9fa;
}

.chat-header {
    background-color: #0d6efd;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-break: break-word;
    margin-bottom: 8px;
}

.message-sender {
    font-size: 0.8rem;
    margin-bottom: 4px;
    color: #6c757d;
}

.message-user .message-sender {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
}

.message-admin .message-sender {
    text-align: left;
}

.message-content {
    margin-bottom: 4px;
}

.message-time {
    font-size: 0.7rem;
    margin-top: 5px;
    color: #6c757d;
    text-align: right;
}

.message-user {
    align-self: flex-end;
    background-color: #0d6efd;
    color: white;
    border-bottom-right-radius: 5px;
}

.message-admin {
    align-self: flex-start;
    background-color: #e9ecef;
    color: #212529;
    border-bottom-left-radius: 5px;
}

.chat-input {
    display: flex;
    padding: 10px;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    margin-right: 10px;
}

.chat-input button {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-input button:hover {
    background-color: #0b5ed7;
}

.chat-input button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Status badge */
.chat-status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 10px;
}

.status-active {
    background-color: #198754;
}

.status-closed {
    background-color: #6c757d;
}

/* Chat list style for admin */
.chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chat-list-item {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-list-item:hover {
    background-color: #f8f9fa;
}

.chat-list-item.active {
    background-color: #e9ecef;
    border-left: 4px solid #0d6efd;
}

.chat-list-item .chat-info {
    display: flex;
    justify-content: space-between;
}

.chat-list-item .chat-name {
    font-weight: bold;
}

.chat-list-item .chat-preview {
    margin-top: 5px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.unread-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: #dc3545;
    border-radius: 50%;
    margin-left: 5px;
}

/* Chat empty state */
.chat-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #6c757d;
}

.chat-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 200px);
    }
    
    .message {
        max-width: 90%;
    }
}