Files
teach_sys_Demo/src/pages/ExpertSupportPage/index.css

847 lines
13 KiB
CSS
Raw Normal View History

2025-08-15 16:16:41 +08:00
/* 专家支持中心页面样式 - 重新设计 */
.expert-support-page {
display: grid;
grid-template-columns: 360px 1fr;
height: calc(100vh - 80px);
background: #f5f7fa;
gap: 1px;
overflow: hidden;
}
/* ===================
左侧对话记录区域
=================== */
.conversation-sidebar {
background: white;
border-right: 1px solid #e5e7eb;
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-header {
padding: 24px 20px;
border-bottom: 1px solid #f0f1f3;
background: #fafbfc;
flex-shrink: 0;
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
}
.sidebar-title {
font-size: 18px;
font-weight: 600;
color: #111827;
margin: 0;
line-height: 1.4;
flex: 1;
}
/* 新建对话按钮 */
.new-conversation-btn {
display: flex;
align-items: center;
gap: 6px;
background: #3b82f6;
color: white;
border: none;
padding: 8px 12px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease;
flex-shrink: 0;
}
.new-conversation-btn:hover {
background: #2563eb;
transform: translateY(-1px);
}
.new-conversation-btn .btn-icon {
font-size: 14px;
}
.new-conversation-btn .btn-text {
white-space: nowrap;
}
/* 对话分组 */
.conversation-groups {
flex: 1;
overflow-y: auto;
}
.conversation-group {
border-bottom: 1px solid #f3f4f6;
}
.conversation-group:last-child {
border-bottom: none;
}
.group-header {
padding: 16px 20px 8px 20px;
background: #fafbfc;
border-bottom: 1px solid #f0f1f3;
}
.group-title {
font-size: 14px;
font-weight: 600;
color: #6b7280;
margin: 0;
line-height: 1.4;
}
/* 对话列表 */
.conversation-list {
padding: 0;
}
.conversation-item {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px 20px;
cursor: pointer;
transition: all 150ms ease;
border-bottom: 1px solid #f3f4f6;
position: relative;
}
.conversation-item:hover {
background: #f8fafc;
}
.conversation-item.selected {
background: #eff6ff;
border-left: 4px solid #3b82f6;
}
.conversation-content {
flex: 1;
min-width: 0;
}
/* 对话标题行 */
.conversation-title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
margin-bottom: 6px;
}
.conversation-title {
font-size: 14px;
font-weight: 600;
color: #111827;
margin: 0;
line-height: 1.3;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
/* 非活跃提醒 */
.inactivity-alert {
flex-shrink: 0;
}
.alert-dot {
display: inline-block;
width: 8px;
height: 8px;
background: #ef4444;
border-radius: 50%;
animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
0%, 100% {
opacity: 1;
transform: scale(1);
}
50% {
opacity: 0.5;
transform: scale(1.2);
}
}
.conversation-item.has-alert {
border-left: 4px solid #ef4444;
}
.conversation-item.has-alert:hover {
background: #fef2f2;
}
.conversation-preview {
font-size: 13px;
color: #6b7280;
margin: 0 0 8px 0;
line-height: 1.4;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.conversation-meta {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
margin-top: 4px;
}
.conversation-time {
font-size: 11px;
color: #9ca3af;
flex-shrink: 0;
}
.conversation-status {
font-size: 10px;
padding: 4px 8px;
border-radius: 12px;
font-weight: 500;
flex-shrink: 0;
text-align: center;
}
.status-resolved {
background: #f0fdf4;
color: #166534;
}
.status-in-progress {
background: #fffbeb;
color: #92400e;
}
.status-pending {
background: #fef2f2;
color: #991b1b;
}
/* ===================
右侧问答界面
=================== */
.chat-interface {
background: white;
display: flex;
flex-direction: column;
overflow: hidden;
}
/* 顶部信息栏 */
.chat-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 24px 32px;
flex-shrink: 0;
}
.header-info {
margin-bottom: 16px;
}
.service-badge {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(255, 255, 255, 0.2);
padding: 8px 16px;
border-radius: 20px;
margin-bottom: 12px;
backdrop-filter: blur(8px);
}
.badge-icon {
font-size: 16px;
}
.badge-text {
font-size: 13px;
font-weight: 500;
}
.service-title {
font-size: 24px;
font-weight: 600;
margin-bottom: 4px;
line-height: 1.3;
}
.service-subtitle {
font-size: 14px;
opacity: 0.9;
line-height: 1.4;
}
.service-actions {
display: flex;
gap: 12px;
flex-wrap: wrap;
}
.service-tag {
background: rgba(255, 255, 255, 0.15);
padding: 6px 12px;
border-radius: 16px;
font-size: 12px;
font-weight: 500;
backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 对话内容区域 */
.chat-content {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.chat-title-bar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 32px;
border-bottom: 1px solid #e5e7eb;
background: #fafbfc;
flex-shrink: 0;
}
.active-conversation-title {
font-size: 16px;
font-weight: 600;
color: #111827;
margin: 0;
line-height: 1.4;
}
.transfer-expert-btn {
background: #3b82f6;
color: white;
border: none;
padding: 8px 16px;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease;
}
.transfer-expert-btn:hover {
background: #2563eb;
transform: translateY(-1px);
}
/* 消息容器 */
.messages-container {
flex: 1;
overflow-y: auto;
padding: 24px 32px;
display: flex;
flex-direction: column;
gap: 20px;
}
.message {
display: flex;
align-items: flex-start;
gap: 12px;
}
.user-message {
flex-direction: row-reverse;
}
.message-avatar {
flex-shrink: 0;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-size: 20px;
background: #f3f4f6;
border-radius: 50%;
border: 2px solid white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.message-bubble {
max-width: 70%;
padding: 12px 16px;
border-radius: 16px;
position: relative;
}
.user-message .message-bubble {
background: #3b82f6;
color: white;
border-bottom-right-radius: 4px;
}
.expert-message .message-bubble {
background: #f8fafc;
color: #111827;
border: 1px solid #e5e7eb;
border-bottom-left-radius: 4px;
}
.expert-name {
font-size: 12px;
font-weight: 600;
color: #6b7280;
margin-bottom: 4px;
}
.user-message .expert-name {
color: rgba(255, 255, 255, 0.8);
}
.message-text {
font-size: 14px;
line-height: 1.5;
margin-bottom: 4px;
}
.user-message .message-text {
color: white;
}
.message-time {
font-size: 11px;
opacity: 0.7;
text-align: right;
}
.user-message .message-time {
color: rgba(255, 255, 255, 0.8);
}
.expert-message .message-time {
color: #9ca3af;
}
/* 空状态 */
.no-conversation-selected {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
color: #6b7280;
padding: 40px;
}
.placeholder-icon {
font-size: 48px;
margin-bottom: 16px;
opacity: 0.5;
}
.placeholder-text {
font-size: 16px;
font-weight: 500;
margin-bottom: 8px;
color: #374151;
}
.placeholder-subtitle {
font-size: 14px;
color: #9ca3af;
}
/* 输入区域 */
.chat-input-area {
border-top: 1px solid #e5e7eb;
background: #fafbfc;
padding: 20px 32px;
flex-shrink: 0;
}
.input-container {
display: flex;
gap: 12px;
align-items: flex-end;
}
.message-input {
flex: 1;
background: white;
border: 1px solid #d1d5db;
border-radius: 12px;
padding: 12px 16px;
font-size: 14px;
line-height: 1.5;
resize: none;
transition: all 150ms ease;
min-height: 48px;
}
.message-input:focus {
outline: none;
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.send-button {
background: #3b82f6;
color: white;
border: none;
padding: 12px 24px;
border-radius: 12px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 150ms ease;
height: 48px;
flex-shrink: 0;
}
.send-button:hover:not(:disabled) {
background: #2563eb;
transform: translateY(-1px);
}
.send-button:disabled {
background: #d1d5db;
color: #9ca3af;
cursor: not-allowed;
transform: none;
}
.input-tips {
margin-top: 8px;
text-align: center;
}
.tip-text {
font-size: 12px;
color: #9ca3af;
}
/* ===================
响应式设计
=================== */
@media (max-width: 1024px) {
.expert-support-page {
grid-template-columns: 300px 1fr;
}
.conversation-sidebar {
width: 300px;
}
.sidebar-header {
padding: 20px 16px;
}
.new-conversation-btn .btn-text {
display: none;
}
.new-conversation-btn {
padding: 8px;
border-radius: 6px;
}
.chat-header {
padding: 20px 24px;
}
.messages-container {
padding: 20px 24px;
}
.chat-input-area {
padding: 16px 24px;
}
}
@media (max-width: 768px) {
.expert-support-page {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}
.conversation-sidebar {
height: 200px;
width: 100%;
border-right: none;
border-bottom: 1px solid #e5e7eb;
}
.sidebar-header {
padding: 16px;
flex-direction: column;
gap: 8px;
align-items: stretch;
}
.new-conversation-btn {
width: 100%;
justify-content: center;
}
.new-conversation-btn .btn-text {
display: inline;
}
.conversation-groups {
overflow-x: auto;
}
.conversation-list {
display: flex;
gap: 8px;
padding: 8px 16px;
}
.conversation-item {
min-width: 280px;
flex-shrink: 0;
border-bottom: none;
border-radius: 8px;
border: 1px solid #e5e7eb;
margin-bottom: 0;
}
.chat-header {
padding: 16px 20px;
}
.service-title {
font-size: 20px;
}
.messages-container {
padding: 16px 20px;
}
.chat-input-area {
padding: 16px 20px;
}
.message-bubble {
max-width: 85%;
}
.chat-title-bar {
padding: 16px 20px;
flex-direction: column;
gap: 12px;
align-items: flex-start;
}
}
@media (max-width: 480px) {
.chat-header {
padding: 12px 16px;
}
.service-title {
font-size: 18px;
}
.service-subtitle {
font-size: 13px;
}
.messages-container {
padding: 12px 16px;
}
.chat-input-area {
padding: 12px 16px;
}
.input-container {
flex-direction: column;
gap: 8px;
}
.send-button {
width: 100%;
}
}
/* ===================
问题解决确认模态框
=================== */
.resolution-modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
backdrop-filter: blur(4px);
}
.resolution-modal {
background: white;
border-radius: 12px;
width: 90%;
max-width: 480px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
overflow: hidden;
animation: modalAppear 0.2s ease-out;
}
@keyframes modalAppear {
from {
opacity: 0;
transform: scale(0.95) translateY(-10px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 24px;
border-bottom: 1px solid #e5e7eb;
background: #fafbfc;
}
.modal-title {
font-size: 18px;
font-weight: 600;
color: #111827;
margin: 0;
}
.modal-close {
background: none;
border: none;
font-size: 24px;
color: #6b7280;
cursor: pointer;
padding: 4px;
border-radius: 4px;
transition: all 150ms ease;
}
.modal-close:hover {
background: #f3f4f6;
color: #374151;
}
.modal-content {
padding: 24px;
text-align: center;
}
.modal-icon {
font-size: 48px;
margin-bottom: 16px;
}
.modal-text {
font-size: 16px;
line-height: 1.6;
color: #374151;
margin: 0;
}
.modal-actions {
display: flex;
gap: 12px;
padding: 20px 24px;
border-top: 1px solid #e5e7eb;
background: #fafbfc;
}
.btn-secondary {
flex: 1;
background: white;
color: #374151;
border: 1px solid #d1d5db;
padding: 12px 24px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.btn-secondary:hover {
background: #f9fafb;
border-color: #9ca3af;
}
.btn-primary {
flex: 1;
background: #3b82f6;
color: white;
border: none;
padding: 12px 24px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 150ms ease;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.btn-primary:hover {
background: #2563eb;
transform: translateY(-1px);
}
/* 响应式模态框 */
@media (max-width: 768px) {
.resolution-modal {
width: 95%;
margin: 0 10px;
}
.modal-header {
padding: 16px 20px;
}
.modal-content {
padding: 20px;
}
.modal-actions {
padding: 16px 20px;
flex-direction: column;
}
.btn-secondary,
.btn-primary {
width: 100%;
}
}