:root {
    --wlsm-chat-primary: #007bff;
    --wlsm-chat-bg: #fdfdfd;
    --wlsm-chat-border: #e1e5e9;
    --wlsm-chat-header-bg: var(--wlsm-chat-primary);
    --wlsm-chat-header-text: #ffffff;
}

/* Student Dashboard Overrides */
.wlsm-student-chat {
    --wlsm-chat-header-bg: #404040;
    --wlsm-chat-primary: #404040; /* Changed from blue to slate */
}

.wlsm-chat-container {
    border: 1px solid var(--wlsm-chat-border);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.wlsm-chat-header {
    padding: 14px 20px;
    background-color: var(--wlsm-chat-header-bg) !important;
    color: var(--wlsm-chat-header-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.wlsm-chat-header-info {
    display: flex;
    flex-direction: column;
}

.wlsm-chat-header h5 {
    margin: 0;
    color: #fff !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.wlsm-presence-status {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    opacity: 0.9;
}

.wlsm-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e0e0e0;
    display: inline-block;
}

.wlsm-status-online .wlsm-status-dot {
    background: #2ecc71;
}

.wlsm-chat-messages {
    height: 450px;
    overflow-y: auto;
    padding: 20px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
}

.wlsm-message {
    margin-bottom: 15px;
    max-width: 85%;
    display: flex;
    flex-direction: column;
}

.wlsm-message-sent {
    align-self: flex-end;
    align-items: flex-end;
}

.wlsm-message-received {
    align-self: flex-start;
    align-items: flex-start;
}

.wlsm-message-content {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.wlsm-message-sent .wlsm-message-content {
    background-color: var(--wlsm-chat-primary);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.wlsm-message-received .wlsm-message-content {
    background-color: #f0f2f5;
    color: #333;
    border-bottom-left-radius: 2px;
}

.wlsm-message-info {
    font-size: 11px;
    margin-top: 4px;
    color: #6c757d;
}

.wlsm-typing-indicator {
    padding: 8px 20px;
    font-size: 12px;
    color: #6c757d;
    background: #fdfdfd;
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
}

.wlsm-typing-dots {
    display: flex;
    gap: 2px;
}

.wlsm-typing-dots span {
    width: 3px;
    height: 3px;
    background: #6c757d;
    border-radius: 50%;
    display: block;
    animation: wlsmTyping 1.4s infinite ease-in-out;
}

.wlsm-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.wlsm-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes wlsmTyping {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.wlsm-chat-footer {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid var(--wlsm-chat-border);
}

.wlsm-chat-footer .wlsm-input-group {
    background: #f0f2f5;
    padding: 6px 6px 6px 15px;
    border-radius: 24px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wlsm-chat-footer .wlsm-input-group:focus-within {
    background: #fff;
    border-color: var(--wlsm-chat-primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

#wlsm-chat-input {
    border: none !important;
    background: transparent !important;
    padding: 8px 0;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px;
    flex: 1;
    resize: none;
    min-width: 0;
    width: 100%;
    color: #333;
}

#wlsm-send-message-btn {
    background-color: var(--wlsm-chat-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    flex-shrink: 0;
    padding: 0;
}

#wlsm-send-message-btn:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

#wlsm-send-message-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.wlsm-back-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.wlsm-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

.wlsm-loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid var(--wlsm-chat-primary);
    width: 25px;
    height: 25px;
    animation: wlsmSpin 1s linear infinite;
    margin: 0 auto;
}

@keyframes wlsmSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
.wlsm-seen {
    color: #34b7f1 !important;
}

.wlsm-message-info i {
    margin-left: 4px;
}
