/* ═══════════════════════════════════════════
   OUWALA COMMS — CHAT COMPONENT STYLES
   ═══════════════════════════════════════════ */

.chat-fab {
    position: fixed !important;
    bottom: 30px !important;
    right: 25px !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DC714D 0%, #2D2D2D 100%);
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2) !important;
    cursor: pointer;
    z-index: 2005 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.chat-fab:hover {
    transform: scale(1.1) rotate(5deg);
}

.chat-drawer {
    position: fixed !important;
    bottom: 105px !important;
    right: 25px !important;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
    z-index: 2000 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: linear-gradient(135deg, #FF4500 0%, #3617A6 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chat-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

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

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

.chat-info {
    flex: 1;
    min-width: 0;
}

.chat-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
}

.chat-last-msg {
    font-size: 0.8rem;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f4f7f6;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.88rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.msg-received {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 2px;
}

.msg-sent {
    align-self: flex-end;
    background: #6f2c91;
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 12px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: none;
    background: #f0f2f5;
    padding: 8px 15px;
    border-radius: 20px;
    outline: none;
}

.chat-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #6f2c91;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsiveness for Chat Widget */
@media (max-width: 576px) {
    .chat-drawer {
        bottom: 85px !important;
        right: 12px !important;
        left: 12px !important;
        width: calc(100% - 24px) !important;
        height: calc(100% - 110px) !important;
        max-height: none !important;
    }

    .chat-fab {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
}