#sswc-chat-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    text-align: right;
}

#sswc-chat-float.hidden {
    display: none;
}

#sswc-chat-float .sswc-bubble {
    background: #00b894;
    color: #fff;
    padding: 10px 15px;
    border-radius: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    max-width: 250px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
}

#sswc-chat-float button {
    width: 60px;
    height: 60px;
    background: #00b894;
    color: white;
    border-radius: 50%;
    border: none;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* מיכל כללי */
#sswc-chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: min(350px, 90vw);
    height: min(550px, 70vh);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.2);
    overflow: hidden;
    font-family: "Segoe UI", sans-serif;
    direction: rtl;
    z-index: 99999;
    display: flex;
    flex-direction: column;
}

#sswc-chat-window.hidden {
    display: none;
}

/* כותרת */
.sswc-header {
    background: #0073aa;
    color: white;
    padding: 10px 15px;
    font-size: 16px;
    position: relative;
    padding-right: 50px;
}

.sswc-header h2 {
    margin: 0;
    font-size: 16px;
}

/* כפתור חזור */
#sswc-close-btn,
#sswc-back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* רשימת צ’אטים */
#sswc-chat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: 440px;
}

.sswc-chat-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.sswc-chat-item:hover {
    background: #f9f9f9;
}

.sswc-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.sswc-preview {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* תצוגת צ’אט */
#sswc-chat-conversation-view {
    display: flex;
    flex-direction: column;
    height: 500px;
}

#sswc-chat-conversation-view.hidden {
    display: none;
}

/* אזור הודעות */
#sswc-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #f1f1f1;
    display: flex;
    flex-direction: column;
}

    /* תאריך */
.sswc-msg-group-date {
    text-align: center;
    margin: 10px 0;
    font-size: 12px;
    color: #777;
}

/* הודעה כללית */
.sswc-msg {
    max-width: 80%;
    margin: 4px 0;
    padding: 8px 12px;
    border-radius: 16px;
    position: relative;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.sswc-me {
    align-self: flex-end;
    background: #dcf8c6;
    border-bottom-left-radius: 4px;
}

.sswc-them {
    align-self: flex-start;
    background: #fff;
    border-bottom-right-radius: 4px;
}

/* מטא – שעה + סטטוס */
.sswc-meta {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sswc-meta .sswc-status {
    margin-right: 5px;
    font-size: 13px;
}

/* סטטוס שליחת הודעה */
.sswc-status:before {
    content: "✓";
    color: gray;
}

.sswc-status.delivered:before {
    content: "✓✓";
    color: gray;
}

.sswc-status.read:before {
    content: "✓✓";
    color: #2196f3;
}

/* אינפוט לשליחה */
.sswc-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background: white;
}

#sswc-msg-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    height: 35px;
    min-height: auto;
}

#sswc-send-btn {
    margin-right: 8px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: auto;
}

#sswc-send-btn:hover {
    background: #005f8c;
}

#sswc-chat-list-view,
#sswc-chat-conversation-view {
    transition: all 0.3s ease-in-out;
}

#sswc-chat-list-view.hidden {
    display: none;
}