/* ======================================
   VoizzaChat - WhatsApp-style Chat UI
   ====================================== */

/* Chat Container Wrapper */
.voizza-chat-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    position: relative;
}

/* Chat Header */
.voizza-chat-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    flex-shrink: 0;
    width: 100%;
    position: relative;
    z-index: 10;
}

.voizza-chat-header-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    flex-shrink: 0;
}

.voizza-chat-header-btn.back {
    margin-right: 8px;
}

.voizza-chat-header-btn.delete {
    margin-left: 8px;
}

.voizza-chat-header-content {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

/* Avatar Circle */
.voizza-chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.voizza-chat-avatar-large {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
}

.voizza-chat-header-info {
    overflow: hidden;
    min-width: 0;
}

.voizza-chat-header-name {
    line-height: 1.3;
}

.voizza-chat-header-status {
    line-height: 1.2;
}

/* Chat Messages Area */
.voizza-chat-messages {
    background: #e5ddd5;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 16px;
}

/* Message Bubbles */
.voizza-chat-msg-wrapper {
    margin-bottom: 8px;
}

.voizza-chat-msg-wrapper.incoming {
    text-align: left;
}

.voizza-chat-msg-wrapper.outgoing {
    text-align: right;
}

.voizza-chat-msg-bubble {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    max-width: 70%;
    word-wrap: break-word;
}

.voizza-chat-msg-bubble.incoming {
    background: white;
}

.voizza-chat-msg-bubble.outgoing {
    background: #dcf8c6;
}

.voizza-chat-msg-time {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.voizza-chat-msg-status {
    font-size: 0.85rem;
    color: #999;
    opacity: 0.8;
}

/* Chat Input Area */
.voizza-chat-input {
    background: #f8f9fa;
    flex-shrink: 0;
    width: 100%;
    padding: 16px;
}

/* Conversation List */
.voizza-chat-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
}

.voizza-chat-list-body {
    height: calc(100% - 60px);
    overflow-y: auto;
}

.voizza-chat-conv-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.voizza-chat-conv-item:hover {
    background: #f8f9fa;
}

.voizza-chat-conv-content {
    flex-grow: 1;
    min-width: 0;
}

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

.voizza-chat-conv-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voizza-chat-conv-preview {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty State */
.voizza-chat-empty {
    text-align: center;
    padding: 48px 16px;
    color: #6c757d;
}

.voizza-chat-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

/* Scrollbar Styling */
.voizza-chat-messages::-webkit-scrollbar,
.voizza-chat-list-body::-webkit-scrollbar {
    width: 6px;
}

.voizza-chat-messages::-webkit-scrollbar-track,
.voizza-chat-list-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.voizza-chat-messages::-webkit-scrollbar-thumb,
.voizza-chat-list-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.voizza-chat-messages::-webkit-scrollbar-thumb:hover,
.voizza-chat-list-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.voizza-chat-avatar.lg {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
}

.voizza-chat-user-info {
    overflow: hidden;
    min-width: 0;
}

.voizza-chat-user-name {
    line-height: 1.3;
}

.voizza-chat-user-status {
    line-height: 1.2;
}

/* Chat Messages Area */
.voizza-chat-messages {
    background: #e5ddd5;
    flex: 1;
    overflow-y: auto;
    width: 100%;
    padding: 16px;
}

.voizza-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.voizza-chat-messages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.voizza-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.voizza-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

/* Message Bubbles */
.voizza-chat-message {
    margin-bottom: 12px;
}

.voizza-chat-message.incoming {
    text-align: left;
}

.voizza-chat-message.outgoing {
    text-align: right;
}

.voizza-chat-bubble {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 75%;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.voizza-chat-bubble.incoming {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top-left-radius: 2px;
}

.voizza-chat-bubble.outgoing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-top-right-radius: 2px;
}

.voizza-chat-message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}

/* Chat Input Area */
.voizza-chat-input {
    background: #f8f9fa;
    flex-shrink: 0;
    width: 100%;
    padding: 12px 16px;
}

/* Conversation List */
.voizza-chat-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

.voizza-chat-list-body {
    height: calc(100% - 60px);
    overflow-y: auto;
}

.voizza-chat-list-body::-webkit-scrollbar {
    width: 6px;
}

.voizza-chat-list-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.voizza-chat-list-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.voizza-chat-list-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.voizza-chat-conversation-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.voizza-chat-conversation-item .voizza-chat-avatar {
    margin-right: 12px;
}

.voizza-chat-conversation-content {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

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

.voizza-chat-conversation-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.voizza-chat-conversation-preview small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Empty State */
.voizza-chat-empty {
    text-align: center;
    padding: 48px 24px;
}

.voizza-chat-empty i {
    font-size: 3rem;
    opacity: 0.5;
}

.voizza-chat-empty p {
    margin-top: 16px;
    margin-bottom: 8px;
}

/* Footer Status */
.voizza-chat-footer {
    background: #f8f9fa;
    font-size: 0.75rem;
}

.voizza-chat-footer-status .text-success i,
.voizza-chat-footer-status .text-warning i {
    font-size: 0.5rem;
}
