rocket-chat-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    max-width: 480px;
    margin: 0 auto;
}
.rocket-chat-widget {
    min-width: 300px;
    width: 100%;
    max-width: 600px;
    height: 600px;
    border-radius: 16px 16px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-size: 14px;
    color: var(--color-accent-100);
    line-height: 1.5;
    position: relative;
    border: 1px solid var(--white-10);
    border-bottom: 0;
    background-color: var(--bg-body);
}
.rocket-chat-widget, .rocket-chat-widget * {
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.chat-header {
    background: var(--color-primary-400);
    padding: 8px 20px;
    position: relative;
    z-index: 10;
    border-bottom: none;
}
.rocket-chat-widget .chat-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rocket-chat-widget .chat-header .header-content .header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.bot-avatar {
    flex-shrink: 0;
}
.bot-avatar img {
    width: 100%;
    /* filter: brightness(0); */
    border-radius: 50%;
}
.bot-name {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
    color: var(--black-100);
    line-height: 1.2;
    display: flex;
    align-items: center;
}
.rocket-chat-widget .chat-header .header-content .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.avatar-circle, .bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transition: background 0.2s, border 0.2s;
}
.avatar-circle {
    background-color: var(--color-primary-400);
}
.avatar-circle i, .bot-avatar i {
    font-size: 12px;
    line-height: 1;
}
.bot-avatar {
    width: 40px;
    height: 40px;
}
.bot-avatar i {
    font-size: 18px;
}
.btn-icon {
    background: var(--black-10);
    color: var(--black-100);
    border-radius: 50%;
    padding: 0;
    margin: 0;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
}
.btn-icon:focus {
    outline: none;
}
.btn-icon i {
    font-size: 12px;
    line-height: 1;
    color: var(--black-100);
}
/* Messages Container - Sendbird exact styling */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    background: var(--color-accent-900);
    display: flex;
    flex-direction: column;
    min-height: 0;
    position: relative;
    z-index: 1;
}
.messages-container::-webkit-scrollbar {
    width: 4px;
}
.messages-container::-webkit-scrollbar-track {
    background: transparent;
}
.messages-container::-webkit-scrollbar-thumb {
    background: var(--color-primary-400);
    border-radius: 2px;
}
.messages-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
}
.message-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.message-item:last-child {
    margin-bottom: 0;
}
.message-item.message-user {
    align-items: flex-end;
}
.message-item.message-bot {
    align-items: flex-start;
}
.message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 85%;
    width: fit-content;
}
.message-item.message-user .message-wrapper {
    flex-direction: row-reverse;
    margin-left: auto;
}
.message-item.message-bot .message-wrapper {
    margin-right: auto;
}
.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--color-primary-400);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
}
.avatar-circle img {
    width: 100%;
    /* filter: brightness(0); */
}
.message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 100%;
    min-width: 0;
}
.message-bubble {
    border-radius: 16px;
    padding: 12px 16px;
    position: relative;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    max-width: 280px;
    width: fit-content;
    background-color: var(--white-10);
    color: var(--color-accent-100);
}
.bubble-user {
    background-color: var(--color-primary-400);
    color: var(--black-100);
    border-bottom-right-radius: 4px;
    margin-left: auto;
}
.bubble-bot {
    background-color: var(--white-10);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--white-10);
}
.message-text {
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
    display: block;
    min-height: 20px;
    font-size: 14px;
}
.message-time {
    font-size: 11px;
    color: var(--color-accent-100);
    opacity: 0.8;
    font-weight: 400;
    margin-top: 4px;
    padding: 0 4px;
    line-height: 1.2;
}
.message-item.message-user .message-time {
    text-align: right;
    margin-right: 8px;
}
.message-item.message-bot .message-time {
    text-align: left;
    margin-left: 8px;
}
/* Date Separator - Sendbird style */
.date-separator {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.date-text {
    background: var(--white-10);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    display: flex;
    align-items: center;
}
/* Suggested Questions - Sendbird style */
.suggested-actions {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: 8px;
    position: relative;
    z-index: 1;
}
.suggestion-btn {
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 16px;
    border: 1px solid var(--color-primary-400);
    background: transparent;
    color: var(--color-primary-400);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    width: fit-content;
    line-height: 1.2;
    display: flex;
    align-items: center;
    min-height: 32px;
    position: relative;
    z-index: 1;
}
.suggestion-btn:hover {
    background: var(--color-primary-400);
    color: var(--black-100);
}
/* Typing Indicator - Sendbird style */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 8px 0;
}
.typing-dots {
    display: flex;
    gap: 4px;
}
.rocket-chat-widget .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--white-20);
    animation: typing 1.4s infinite ease-in-out;
}
.rocket-chat-widget .dot:nth-child(1) {
    animation-delay: -0.32s;
}
.rocket-chat-widget .dot:nth-child(2) {
    animation-delay: -0.16s;
}
@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
/* Input Area - Sendbird exact style */
.input-container {
    background-color: var(--color-accent-900);
    padding: 8px;
    flex-shrink: 0;
    border-top: 1px solid var(--color-primary-30);
}
.input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    border-radius: 16px;
    padding: 8px 12px;
    transition: all 0.2s ease;
}
.input-wrapper:focus-within {
    border-color: transparent;
    box-shadow: none;
    background: none;
}
.input-wrapper .display-input {
    display: flex;
    flex: 1 1 auto !important;
    flex-direction: column;
}
.message-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    font-family: inherit;
    height: 28px;
    max-height: 80px;
    padding: 4px 0;
    color: var(--color-accent-100);
}
.message-input:focus {
    border: none;
    box-shadow: none;
    outline: none;
}
.message-input::placeholder {
    color: var(--color-accent-100);
    font-size: 14px;
    line-height: 1.4;
}
.file-input input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.send-button {
    border-radius: 50%;
    width: 32px;
    height: 32px;
    background-color: var(--color-primary-400);
    border: none;
    color: var(--black-100);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.send-button i {
    font-size: 12px;
    line-height: 1;
}
.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background-color: var(--color-primary-400);
}
/* Chat bubble HTML formatting fixes */
.message-text ol, .message-text ul {
    margin: 0.1em 0 0.2em 0.8em;
    padding-left: 0.8em;
}
.message-text li {
    margin-bottom: 0.2em;
    line-height: 1.4;
    word-break: break-word;
}
.message-text p {
    margin: 0 0 0.2em 0;
    line-height: 1.4;
    word-break: break-word;
}
.message-text strong {
    font-weight: 600;
}
.message-bubble, .message-text {
    max-width: 100%;
}
.message-text, .message-text p, .message-text li {
    text-align: left;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.message-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5em 0 0.3em 0;
}
.message-text h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0.5em 0 0.3em 0;
}
.message-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.5em 0 0.3em 0;
}
.message-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.5em 0 0.3em 0;
}
.message-text h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.5em 0 0.3em 0;
}
.message-text h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.5em 0 0.3em 0;
}
/* Responsive adjustments */
@media (max-width: 576px) {
    .message-bubble {
        max-width: 85%;
    }
    .dropdown-toggle {
        font-size: 11px;
        padding: 4px 8px;
    }
    .chat-header {
        padding: 10px 16px;
    }
    .bot-avatar {
        width: 30px;
        height: 30px;
    }
}
@media (max-width: 400px) {
    .chat-header, .input-container {
        padding-left: 16px;
        padding-right: 16px;
    }
    .messages-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}