.content-wrapper {
    margin: 0 auto;
    padding-top: 80px;
    max-width: 900px;
}

.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    padding: 0 24px;
    box-sizing: border-box;
}

.chat-doc {
    flex: none;
    max-height: 160px;
    overflow-y: auto;
    margin: 12px 0 0;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    line-height: 1.8;
}

.chat-doc-body h1, .chat-doc-body h2, .chat-doc-body h3 {
    font-size: 14px;
    color: #333;
    margin: 8px 0 4px;
}

.chat-doc-body p {
    margin: 4px 0;
}

.chat-doc-body table {
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 12px;
}

.chat-doc-body table th,
.chat-doc-body table td {
    border: 1px solid #e6e6e6;
    padding: 4px 8px;
}

.chat-doc-body table th {
    background: #f2f2f2;
}

.chat-toolbar {
    flex: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    background: #f8f8f8;
}

.chat-user-info {
    font-size: 13px;
    color: #666;
}

.chat-stream-switch {
    display: inline-flex;
    align-items: center;
}

.chat-stream-switch .layui-form-switch {
    margin: 0;
}

.chat-score + .chat-free-times {
    margin-left: 16px;
}

#btn-refresh-score {
    margin-left: 8px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
}

#btn-refresh-score:hover {
    color: #1E9FFF;
}

.chat-user-info .layui-icon {
    color: #FFB800;
}

.chat-score .layui-icon {
    color: #1E9FFF;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 4px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.chat-msg .chat-name {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.chat-msg.chat-user {
    align-items: flex-end;
}

.chat-msg.chat-user .chat-bubble {
    background: #1E9FFF;
    color: #fff;
    border-radius: 10px 10px 2px 10px;
    max-width: 70%;
    padding: 10px 14px;
    line-height: 1.7;
    font-size: 14px;
    word-break: break-all;
    white-space: pre-wrap;
}

.chat-msg.chat-tpdog {
    align-items: flex-start;
}

.chat-msg.chat-tpdog .chat-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #e6e6e6;
    border-radius: 10px 10px 10px 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
    max-width: 85%;
    padding: 12px 14px;
    line-height: 1.7;
    font-size: 14px;
    word-break: break-all;
    text-align: left;
}

.chat-thinking {
    display: inline-block;
}

.chat-thinking .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 4px;
    border-radius: 50%;
    background: #1E9FFF;
    animation: chat-dot-bounce 1.2s infinite ease-in-out;
}

.chat-thinking .dot:nth-child(2) {
    animation-delay: .2s;
}

.chat-thinking .dot:nth-child(3) {
    animation-delay: .4s;
    margin-right: 0;
}

.chat-thinking .thinking-text {
    margin-left: 6px;
    color: #999;
}

.chat-thinking .chat-elapsed {
    margin-left: 6px;
    color: #bbb;
    font-size: 12px;
}

@keyframes chat-dot-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: .5;
    }
    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.chat-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 14px;
    margin-left: 2px;
    vertical-align: -2px;
    background: #1E9FFF;
    animation: chat-cursor-blink .8s step-end infinite;
}

@keyframes chat-cursor-blink {
    50% {
        opacity: 0;
    }
}

.chat-raw-text {
    white-space: pre-wrap;
}

.chat-bubble h1, .chat-bubble h2 {
    margin: 12px 0 8px;
    line-height: 1.4;
}

.chat-bubble h1 {
    font-size: 16px;
    padding-left: 8px;
    border-left: 3px solid #1E9FFF;
}

.chat-bubble h2 {
    font-size: 15px;
}

.chat-bubble > :first-child, .chat-bubble .chat-md > :first-child {
    margin-top: 0;
}

.chat-bubble p {
    margin: 8px 0;
}

.chat-bubble .chat-md-quote {
    margin: 8px 0;
    padding: 8px 12px;
    background: #f8f8f8;
    border-left: 3px solid #d2d2d2;
    color: #666;
    font-size: 13px;
}

.chat-bubble .chat-md-quote.chat-md-warn {
    border-left-color: #FF5722;
    color: #FF5722;
}

.chat-bubble table {
    border-collapse: collapse;
    margin: 8px 0;
    width: 100%;
    font-size: 13px;
    background: #fff;
}

.chat-bubble table th,
.chat-bubble table td {
    border: 1px solid #e6e6e6;
    padding: 5px 8px;
    text-align: left;
}

.chat-bubble table th {
    background: #f2f2f2;
    font-weight: 600;
}

.chat-inputbar {
    flex: none;
    padding: 12px 0 16px;
    background: #f8f8f8;
    border-top: 1px solid #eee;
}

.chat-input-wrap {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    padding: 8px 12px 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.chat-input-wrap .layui-textarea {
    border: none;
    padding: 0;
    min-height: 66px;
    resize: none;
    box-shadow: none;
    background: transparent;
}

.chat-input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
}

.chat-char-count {
    font-size: 12px;
    color: #999;
}

.chat-char-count.chat-char-over {
    color: #FF5722;
}

.doc-quesions-wrap {
    display: none;
}

.layui-layer-demo .layui-layer-content {
    overflow: hidden;
}

.layui-layer-content > .doc-quesions-view {
    padding: 15px 20px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    background-color: #FAFBFC;
}

.doc-quesions-view .doc-quesions-group {
    margin-bottom: 18px;
}

.doc-quesions-view .doc-quesions-type {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: bold;
    color: #1F2733;
}
