#hashe-chat-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 70px;
    height: 70px;
    background: #f15a24;
    border-radius: 50%;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 3px 10px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
#hashe-chat-bubble:hover { transform: translateY(-2px); }
#hashe-chat-bubble .hashe-agent-avatar {
    width: 64px; height: 64px; border-radius: 50%;
}

/* Chat window (docked) */
#hashe-chat-window {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 340px;
    max-height: 520px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 99999;
    transition: all .25s ease;
}
#hashe-chat-window.hidden { display: none; }

/* Centered modal mode */
#hashe-chat-window.centered {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: min(680px, 92vw);
    height: min(80vh, 720px);
    transform: translate(-50%, -50%);
    max-height: none;
}

/* Header */
.chat-header {
    background: #f15a24;
    color: #fff;
    display: flex;
    align-items: center;
    padding: 10px;
    position: relative;
}
.chat-header .chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-right: 10px;
}
.chat-header .chat-title { flex: 1; line-height: 1.1; }
.chat-header .chat-title strong { font-weight: 700; }
.chat-header .chat-status { opacity: .75; font-size: 12px; }

.chat-header .chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-header .chat-actions .chat-expand,
.chat-header .chat-actions .chat-end {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
}
.chat-header .chat-actions .chat-expand:hover,
.chat-header .chat-actions .chat-end:hover { background: rgba(255,255,255,.2); }
.chat-header .chat-actions .chat-close {
    font-size: 20px;
    cursor: pointer;
    opacity: 0.9;
}
.chat-header .chat-actions .chat-close:hover { opacity: 1; }

/* Body */
.chat-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
    background: #f9f9f9;
}
.msg { display: flex; margin-bottom: 10px; gap: 8px; }
.msg .msg-avatar img { width: 28px; height: 28px; border-radius: 50%; }
.msg .msg-text {
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    max-width: 82%;
    line-height: 1.35;
    word-break: break-word;
}
.msg .msg-text a { text-decoration: underline; }
.msg.user { justify-content: flex-end; }
.msg.user .msg-text { background: #e6f2ff; }
.msg.bot .msg-text { background: #fff; }

/* Footer */
.chat-footer {
    display: flex;
    border-top: 1px solid #eee;
    padding: 8px;
    background: #fff;
}
#chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    outline: none;
}
#chat-input:focus { border-color: #f15a24 }
#chat-send {
    background: #f15a24;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-left: 6px;
    padding: 0 12px;
    cursor: pointer;
}
#chat-send:hover {background: #f15a24d1;}

/* typing dots */
.typing .msg-text {
    background: #e5e5e5;
    display: flex;
    align-items: center;
    gap: 4px;
}
.dot {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: blink 1s infinite alternate;
}
.dot:nth-child(2) { animation-delay: .2s; }
.dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink {
    from { opacity: 0.2; transform: translateY(0); }
    to { opacity: 1; transform: translateY(-2px); }
}

/* Rating UI */
.rating-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin-top: 6px;
}
.rating-title { font-weight: 600; margin-bottom: 6px; }
.rating-stars { font-size: 20px; user-select: none; margin-bottom: 6px; }
.rating-stars .star { cursor: pointer; color: #cbd5e1; margin-right: 2px; }
.rating-stars .star.on { color: #f59e0b; }
.rating-feedback {
    width: 100%;
    min-height: 50px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
}
.rating-actions { display: flex; gap: 8px; }
.rating-actions .rating-submit,
.rating-actions .rating-cancel {
    background: #0f172a; color: #fff; border: none; padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.rating-actions .rating-cancel { background: #64748b; }
.rating-actions .rating-submit:hover { opacity: .92; }
