/* Chat System CSS */
:root {
    --chat-bg: #eceff1;
    --msg-incoming: #ffffff;
    --msg-outgoing: #2874f0;
    /* Gletra Secondary Blue */
    --msg-outgoing-text: #ffffff;
    --chat-header: #2874f0;
}

/* For Gletra branding, let's use Gletra blue/orange instead of WhatsApp green if needed, 
   but user asked for "WhatsApp-style layout feel". 
   I'll stick to a clean modern version of it. */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--chat-bg);
}

.chat-header {
    background: #0084ff;
    /* Gletra blueish */
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chat-header .back-btn {
    font-size: 20px;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ccc;
}

.chat-header .info {
    flex: 1;
}

.chat-header .info h4 {
    font-size: 16px;
    margin: 0;
}

.chat-header .info span {
    font-size: 12px;
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    position: relative;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.message.incoming {
    align-self: flex-start;
    background: var(--msg-incoming);
}

.message.outgoing {
    align-self: flex-end;
    background: var(--msg-outgoing);
    color: var(--msg-outgoing-text);
}

.message .time {
    font-size: 10px;
    margin-top: 4px;
    text-align: right;
    display: block;
    opacity: 0.7;
}

.chat-input-bar {
    background: #f0f0f0;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input-bar input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
}

.chat-input-bar .icon-btn {
    font-size: 20px;
    color: #666;
    cursor: pointer;
}

.chat-input-bar .send-btn {
    color: #0084ff;
}

/* Desktop Popup Styling */
@media (min-width: 992px) {
    .chat-widget-desktop {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 350px;
        height: 500px;
        border-radius: 10px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
        z-index: 2000;
    }
}