:root {
    --chat-width: 320px;
    --chat-height: 420px;
    --primary: #2563eb;
    --bg: #ffffff;
}

body {
    font-family:  sans-serif;
}


.chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgb(254, 193, 9);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    z-index: 1000;
}

.chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: var(--chat-width);
    height: var(--chat-height);
    background: var(--bg);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.chat-window.open {
    display: flex;
}

.chat-header {
    padding: 12px 16px;
    background: rgb(254, 193, 9);
    color: #fff;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8fafc;
}

.message {
    margin-bottom: 8px;
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message.user {
    background: #dbeafe;
    margin-left: auto;
}

.message.bot {
    background: #e5e7eb;
}

.chat-input {
    display: flex;
    border-top: 1px solid #e5e7eb;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: none;
    outline: none;
    font-size: 14px;
}

.chat-input button {
    padding: 12px 16px;
    border: none;
    background: rgb(254, 193, 9);
    color: #fff;
    cursor: pointer;
}

.message {
    position: relative;
}

.message-meta {
    display: flex;
    gap: 6px;
    font-size: 11px;
    opacity: 0.6;
    position: absolute;
    right: 6px;
    bottom: 4px;
}


.read {
    opacity: 0.3;
}

.read.read {
    opacity: 1;
}

#messageInput {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

#messages {
    pointer-events: auto;
}

.chatWindow {
    overflow: hidden;
}

/* === INPUT AREA === */
.chat-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* === ATTACH BUTTON === */
.attach-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #555;
    padding: 4px;
}

.attach-btn:hover {
    color: #000;
}

/* === FILE PREVIEW === */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 6px 0;
}

.file-chip {
    background: #f1f1f1;
    border-radius: 12px;
    padding: 4px 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-chip span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-chip button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: #888;
}

.file-chip button:hover {
    color: red;
}

#fileBtn {
    background: rgb(254, 193, 9);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;

}

#fileInput {
    display: none;
}

.rating-box {
    padding: 12px;
    border-top: 1px solid #eee;
    text-align: center;
}

.rating-title {
    margin-bottom: 6px;
    font-size: 14px;
}

.rating-stars span {
    font-size: 22px;
    cursor: pointer;
    color: #ccc;
    transition: color 0.2s;
}

.rating-stars span.active {
    color: #f5b301;
}
