#chat-unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-modal-overlay {
    position: fixed;
    top: 70px;
    right: 20px;
    width: 400px;
    height: 600px;
    background-color: white;
    z-index: 1001;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.chat-modal-header {
    background-color: #075E54;
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-modal-title {
    font-weight: bold;
}

.chat-modal-close {
    cursor: pointer;
    font-size: 20px;
}

.chat-modal-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #ECE5DD;
    display: flex;
    flex-direction: column;
}

.chat-message {
    max-width: 80%;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-radius: 7.5px;
    font-size: 14px;
    position: relative;
    word-wrap: break-word;
}

.chat-message.sent {
    align-self: flex-end;
    background-color: #DCF8C6;
    color: black;
}

.chat-message.received {
    align-self: flex-start;
    background-color: white;
    color: black;
}

.chat-timestamp {
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 2px;
}

.chat-sender-name {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-msg-sent .chat-sender-name {
    color: #128C7E;
}

.chat-msg-received .chat-sender-name {
    color: #075E54;
}

.chat-modal-footer {
    padding: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
}

#chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
}

#chat-send-btn {
    margin-left: 10px;
    background-color: #075E54;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#chat-send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .chat-modal-overlay {
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

.chat-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    font-size: 14px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #075E54;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}