#ast-scroll-top { display: none !important; }
#bruo-ai-widget { position: fixed; bottom: 15px; right: 24px; z-index: 99999; font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

#bruo-ai-btn {
    padding: 10px 18px; border-radius: 8px;
    background: #f59e0b; color: #1f2937; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    box-shadow: 0 4px 16px rgba(245,158,11,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit; font-size: 13px; font-weight: 700;
}
#bruo-ai-btn:hover { transform: scale(1.03); box-shadow: 0 6px 24px rgba(245,158,11,0.5); animation: none; }
#bruo-ai-btn.bruo-pulse { animation: bruo-btn-pulse 2.5s ease-in-out infinite; }
@keyframes bruo-btn-pulse { 0%,100% { box-shadow: 0 4px 16px rgba(245,158,11,0.4); } 50% { box-shadow: 0 4px 24px rgba(245,158,11,0.7); } }

#bruo-ai-chat {
    position: absolute; bottom: 70px; right: 0;
    width: 380px; max-height: 680px;
    background: #fff; border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    display: flex; flex-direction: column;
    overflow: hidden;
    animation: bruo-chat-open 0.3s ease-out;
    transform-origin: bottom right;
}
@keyframes bruo-chat-open { 0% { opacity: 0; transform: scale(0.8) translateY(20px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }

#bruo-ai-header {
    background: #003450; color: #fff; padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
#bruo-ai-header-info { display: flex; flex-direction: column; gap: 2px; }
#bruo-ai-header-info strong { font-size: 14px; font-weight: 600; }
#bruo-ai-header-info span { font-size: 11px; opacity: 0.7; }
#bruo-ai-end-header { font-family: inherit; transition: all 0.15s; }
#bruo-ai-end-header:hover { background: #003450 !important; color: #fff !important; border-color: #003450 !important; }
#bruo-ai-close {
    background: none; border: none; color: #fff; font-size: 22px;
    cursor: pointer; opacity: 0.7; transition: opacity 0.15s;
    line-height: 1; padding: 0 4px;
}
#bruo-ai-close:hover { opacity: 1; }

#bruo-ai-messages {
    flex: 1; overflow-y: auto; padding: 16px;
    display: flex; flex-direction: column; gap: 12px;
    min-height: 400px; max-height: 540px; background: #f8f9fa;
}

.bruo-ai-msg { display: flex; flex-direction: column; max-width: 85%; animation: bruo-msg-in 0.3s ease-out; }
.bruo-ai-msg-user { align-self: flex-end; }
.bruo-ai-msg-bot { align-self: flex-start; }
@keyframes bruo-msg-in { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }

.bruo-ai-msg-content {
    padding: 10px 14px; font-size: 13px; line-height: 1.6;
    border-radius: 12px; word-break: break-word;
}
.bruo-ai-msg-user .bruo-ai-msg-content {
    background: #003450; color: #fff; border-bottom-right-radius: 4px;
}
.bruo-ai-msg-bot .bruo-ai-msg-content {
    background: #fff; color: #1d2327; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px;
}

.bruo-ai-privacy { display: block; font-size: 10px; color: #9ca3af; line-height: 1.5; margin-top: 2px; }
.bruo-ai-privacy a { color: #787c82; font-weight: 500; }
.bruo-ai-msg-content strong { font-weight: 600; }
.bruo-ai-msg-content a { color: #003450; text-decoration: underline; }
.bruo-ai-msg-bot .bruo-ai-msg-content a { color: #003450; }
.bruo-ai-msg-user .bruo-ai-msg-content a { color: #93c5fd; }

.bruo-ai-msg-content ul, .bruo-ai-msg-content ol { margin: 4px 0; padding-left: 18px; }
.bruo-ai-msg-content li { margin: 2px 0; }
.bruo-ai-msg-content code { background: rgba(0,0,0,0.06); padding: 1px 4px; border-radius: 3px; font-size: 12px; }
.bruo-ai-msg-content table { border-collapse: collapse; margin: 6px 0; font-size: 12px; }
.bruo-ai-msg-content th, .bruo-ai-msg-content td { border: 1px solid #e5e7eb; padding: 4px 8px; }

.bruo-ai-msg-time { font-size: 10px; color: #9ca3af; margin-top: 4px; padding: 0 4px; }
.bruo-ai-msg-user .bruo-ai-msg-time { text-align: right; }

.bruo-ai-status { font-size: 12px; color: #9ca3af; font-style: italic; animation: bruo-status-fade 2s ease-in-out infinite; }
@keyframes bruo-status-fade { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.bruo-ai-cursor {
    display: inline-block; width: 2px; height: 13px;
    background: #003450; vertical-align: text-bottom; margin-left: 1px;
    animation: bruo-cursor-blink 0.8s step-end infinite;
}
@keyframes bruo-cursor-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

#bruo-ai-input-area {
    display: flex; gap: 8px; padding: 12px;
    border-top: 1px solid #e5e7eb; background: #fff; flex-shrink: 0;
}
#bruo-ai-input {
    flex: 1; border: 1px solid #e5e7eb; border-radius: 20px;
    padding: 8px 16px; font-size: 13px; font-family: inherit;
    outline: none; transition: border-color 0.15s;
}
#bruo-ai-input:focus { border-color: #003450; }
#bruo-ai-send {
    width: 38px; height: 38px; min-width: 38px; min-height: 38px;
    border-radius: 50%; background: #f59e0b; color: #fff;
    border: none; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0; box-shadow: 0 2px 6px rgba(245,158,11,0.3);
}
#bruo-ai-send svg { width: 18px; height: 18px; margin-left: 2px; }
#bruo-ai-send:hover { background: #d97706; transform: scale(1.05); }
#bruo-ai-send:active { transform: scale(0.95); }
#bruo-ai-send:disabled { background: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; }

.bruo-ai-end-btn-wrap { text-align: center; padding: 8px 0; }
.bruo-ai-end-btn {
    background: #fff; border: 1px solid #d1d5db; color: #787c82;
    padding: 6px 16px; border-radius: 20px; font-size: 12px;
    font-family: inherit; cursor: pointer; transition: all 0.15s;
}
.bruo-ai-end-btn:hover { background: #fef2f2; border-color: #fca5a5; color: #dc2626; }
.bruo-ai-rating-box { text-align: center; }
.bruo-ai-rating-text { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.bruo-ai-stars { display: flex; justify-content: center; gap: 6px; }
.bruo-ai-stars span {
    font-size: 28px; color: #d1d5db; cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}
.bruo-ai-stars span.active, .bruo-ai-stars span.hover { color: #f59e0b; transform: scale(1.15); }
.bruo-ai-rating-thanks { font-size: 12px; color: #059669; margin-top: 8px; }

@media (max-width: 480px) {
    #bruo-ai-chat { width: calc(100vw - 32px); right: -8px; bottom: 64px; max-height: 70vh; }
    #bruo-ai-messages { min-height: 200px; max-height: 50vh; }
}
