/* Frontend and admin chat styles */
.wp-real-time-chat-container,
.wp-real-time-chat-conversation {
    display: flex;
    flex-direction: column;
    height: 500px;
    max-width: 600px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
}

.wp-real-time-chat-header {
    padding: 15px;
    background: #075e54;
    color: white;
    text-align: center;
}

.wp-real-time-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #e5ddd5;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AkEEjIZJ4WqFQAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAANElEQVQ4y2NgGAWjYBSMglEwCkbBKBgFgwkwUFK4ZcsWBkqMZWRkZKS4kUOGgQwjQeQoGAWjYBSMAgAAXWQH5YqP0h4AAAAASUVORK5CYII=');
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 8px 12px;
    border-radius: 7.5px;
    position: relative;
    word-wrap: break-word;
}

.message.user {
    background: #dcf8c6;
    margin-left: auto;
    margin-right: 0;
}

.message.admin {
    background: white;
    margin-left: 0;
    margin-right: auto;
}

.message-content {
    margin-bottom: 5px;
}

.message-time {
    font-size: 11px;
    color: #666;
    text-align: right;
}

.wp-real-time-chat-input {
    display: flex;
    padding: 10px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
}

.wp-real-time-chat-input textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    resize: none;
    outline: none;
    height: 40px;
    max-height: 100px;
}

.wp-real-time-chat-input button {
    margin-left: 10px;
    padding: 0 15px;
    background: #075e54;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
}

.wp-real-time-chat-input button:hover {
    background: #128c7e;
}

/* Admin specific styles */
.wp-real-time-chat-admin-container {
    display: flex;
    height: calc(100vh - 100px);
}

.wp-real-time-chat-conversations-list {
    width: 300px;
    border-right: 1px solid #ddd;
    overflow-y: auto;
}

.wp-real-time-chat-conversations-list h2 {
    padding: 10px 15px;
    margin: 0;
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

.wp-real-time-chat-conversations-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wp-real-time-chat-conversations-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.wp-real-time-chat-conversations-list li:hover {
    background: #f9f9f9;
}

.wp-real-time-chat-conversations-list li.active {
    background: #e5f5fb;
}

.wp-real-time-chat-conversations-list li.unread {
    font-weight: bold;
}

.user-name {
    display: block;
    margin-bottom: 5px;
}

.unread-count {
    display: inline-block;
    background: #075e54;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-left: 5px;
}

.last-activity {
    display: block;
    font-size: 11px;
    color: #999;
    font-weight: normal;
}

.wp-real-time-chat-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.wp-real-time-chat-no-conversation {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}





















/* ----------------------------------- */


/* Improved message bubbles */
.message {
    max-width: 75%;
    margin-bottom: 12px;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.message.user {
    background: #dcf8c6;
    margin-left: auto;
    margin-right: 10px;
    border-bottom-right-radius: 4px;
}

.message.admin {
    background: white;
    margin-left: 10px;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.sender-name {
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 4px;
    color: rgba(0,0,0,0.6);
}

.message-time {
    font-size: 11px;
    color: rgba(0,0,0,0.4);
    text-align: right;
    margin-top: 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    padding: 10px 15px;
    background: white;
    border-radius: 18px;
    margin-left: 10px;
    margin-bottom: 12px;
    width: fit-content;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}