.quick-replies-bar {
    display: none;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 10px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.quick-replies-bar.has-replies {
    display: flex;
}

.quick-reply-btn {
    padding: 3px 9px;
    border: 1px solid #2563eb;
    border-radius: 999px;
    background: #fff;
    color: #2563eb;
    font-size: 11.5px;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-reply-btn:hover {
    background: #eff6ff;
}

.bot-message-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 85%;
    margin-bottom: 8px;
}

.feedback-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 4px 0;
}

.feedback-label {
    font-size: 11px;
    color: #6b7280;
    margin-right: 4px;
}

.feedback-btn {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.4;
}

.feedback-btn:hover:not(:disabled) {
    background: #f3f4f6;
}

.feedback-btn.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.feedback-bar.feedback-done .feedback-label {
    color: #9ca3af;
}

.follow-up-form-wrap {
    margin: 8px 0 12px;
    max-width: 90%;
}

.follow-up-form {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    padding: 12px 14px;
}

.follow-up-title {
    margin: 0 0 10px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.follow-up-email,
.follow-up-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.follow-up-submit {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}

.follow-up-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.follow-up-status {
    margin: 8px 0 0;
    font-size: 12px;
}

.follow-up-status.success {
    color: #15803d;
}

.follow-up-status.error {
    color: #dc2626;
}

.citation-ref {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    padding: 0 4px;
    margin: 0 1px;
    border: 1px solid #93c5fd;
    border-radius: 4px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    vertical-align: super;
}

.citation-ref:hover {
    background: #dbeafe;
}

.message-sources {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 12px;
}

.source-item {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.source-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.source-item.source-highlight {
    background: #fffbeb;
    margin: 0 -8px;
    padding: 8px;
    border-radius: 6px;
}

.source-item-head {
    margin-bottom: 4px;
    color: #1f2937;
}

.source-ref {
    color: #1d4ed8;
    font-weight: 700;
}

.source-type {
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.source-label {
    color: #4b5563;
    margin-bottom: 4px;
}

.source-excerpt {
    color: #6b7280;
    line-height: 1.45;
    margin-bottom: 4px;
}

.source-link {
    color: #2563eb;
    text-decoration: underline;
    font-size: 11px;
}

.chat-msg.bot a,
.msg-bot a,
.pg-msg-bot a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.chat-msg.bot a:hover,
.msg-bot a:hover,
.pg-msg-bot a:hover {
    color: #1d4ed8;
}

@media (max-width: 480px) {
    .quick-replies-bar {
        padding: 6px 8px;
        gap: 5px;
    }

    .quick-reply-btn {
        font-size: 11px;
        padding: 3px 8px;
    }

    .bot-message-wrap {
        max-width: 92%;
    }
}
