Files

403 lines
7.1 KiB
CSS

/* doctor_chat.css */
.doctor-chat-panel {
display: flex;
flex-direction: column;
height: 300px;
/* Default height, can be expanded */
min-height: 200px;
max-height: 80vh;
resize: both;
background: #1e1e1e;
border: 1px solid #444;
border-radius: 6px;
margin-top: 10px;
overflow: auto;
position: relative;
}
.doctor-chat-panel.expanded {
height: 600px;
}
.doctor-chat-header {
background: #2d2d2d;
padding: 8px 12px;
border-bottom: 1px solid #444;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 13px;
color: #eee;
}
.doctor-chat-controls button {
background: transparent;
border: none;
color: #aaa;
cursor: pointer;
font-size: 14px;
padding: 2px 6px;
}
.doctor-chat-controls button:hover {
color: #fff;
}
.doctor-chat-messages {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 10px;
display: flex;
flex-direction: column;
gap: 12px;
background: #1e1e1e;
}
.doctor-chat-message {
max-width: 90%;
padding: 8px 12px;
border-radius: 8px;
font-size: 13px;
line-height: 1.5;
position: relative;
word-wrap: break-word;
}
.doctor-chat-message.user {
align-self: flex-end;
background: #2b5c92;
/* Muted blue */
color: #fff;
border-bottom-right-radius: 2px;
}
.doctor-chat-message.assistant {
align-self: flex-start;
background: #333;
color: #eee;
border-bottom-left-radius: 2px;
border: 1px solid #444;
}
.doctor-chat-message.system {
align-self: center;
background: transparent;
color: #888;
font-size: 11px;
font-style: italic;
border: none;
padding: 4px;
}
.doctor-chat-input-area {
padding: 10px;
background: #252525;
border-top: 1px solid #444;
display: flex;
gap: 8px;
align-items: flex-end;
flex-shrink: 0;
min-height: 60px;
}
.doctor-chat-input {
flex: 1;
background: #111;
border: 1px solid #444;
border-radius: 4px;
color: #eee;
padding: 8px;
font-family: inherit;
font-size: 13px;
resize: none;
min-height: 36px;
max-height: 120px;
line-height: 1.4;
}
.doctor-chat-input:focus {
outline: none;
border-color: #666;
}
.doctor-chat-send-btn {
background: #4caf50;
color: #fff;
border: none;
border-radius: 4px;
padding: 0 12px;
height: 36px;
cursor: pointer;
font-weight: bold;
transition: background 0.2s;
}
.doctor-chat-send-btn:hover {
background: #45a049;
}
.doctor-chat-send-btn:disabled {
background: #333;
color: #666;
cursor: not-allowed;
}
/* Markdown Styles */
.doctor-chat-message code {
background: rgba(0, 0, 0, 0.3);
padding: 2px 4px;
border-radius: 3px;
font-family: monospace;
font-size: 0.9em;
}
.doctor-chat-message pre {
background: #111;
padding: 8px;
border-radius: 4px;
overflow-x: auto;
margin: 8px 0;
border: 1px solid #444;
}
.doctor-chat-message pre code {
background: transparent;
padding: 0;
color: inherit;
font-size: 12px;
}
.doctor-chat-message ul,
.doctor-chat-message ol {
margin: 8px 0;
padding-left: 20px;
}
.doctor-chat-message p {
margin: 0 0 8px 0;
}
.doctor-chat-message p:last-child {
margin-bottom: 0;
}
/* Typing Indicator */
.typing-indicator {
display: flex;
gap: 4px;
padding: 4px 8px;
}
.typing-dot {
width: 6px;
height: 6px;
background: #888;
border-radius: 50%;
animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(1) {
animation-delay: 0s;
}
.typing-dot:nth-child(2) {
animation-delay: 0.2s;
}
.typing-dot:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes typing {
0%,
100% {
transform: scale(1);
opacity: 0.5;
}
50% {
transform: scale(1.2);
opacity: 1;
}
}
/* Code Copy Button */
.copy-btn {
position: absolute;
top: 5px;
right: 5px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #ccc;
border-radius: 4px;
padding: 2px 6px;
font-size: 12px;
cursor: pointer;
transition: all 0.2s;
}
.copy-btn:hover {
background: rgba(255, 255, 255, 0.2);
color: #fff;
}
/* --- Updated Header Layout --- */
.header-main {
display: flex;
align-items: center;
gap: 8px;
}
/* --- Context Badge --- */
.doctor-context-badge {
background: #3a5aa0;
color: white;
font-size: 10px;
padding: 2px 6px;
border-radius: 10px;
vertical-align: middle;
}
/* --- Context Actions (Quick Pills) --- */
.doctor-context-actions {
padding: 5px 10px;
display: flex;
gap: 5px;
flex-wrap: wrap;
background: #1e1e1e;
border-bottom: 1px solid #333;
min-height: 0;
}
.context-pill {
background: #2d2d2d;
border: 1px solid #444;
color: #ccc;
font-size: 11px;
padding: 3px 8px;
border-radius: 12px;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
transition: background 0.2s;
}
.context-pill:hover {
background: #3d3d3d;
border-color: #666;
color: white;
}
/* --- Input Area Wrapper --- */
.doctor-input-wrapper {
flex: 1;
display: flex;
flex-direction: column;
gap: 0;
}
.doctor-input-actions {
display: flex;
align-items: center;
gap: 5px;
}
/* --- Toolbar & Controls --- */
.doctor-chat-toolbar {
display: flex;
justify-content: flex-end;
gap: 5px;
padding: 2px 5px;
background: #2a2a2a;
border-top: 1px solid #333;
}
.tool-btn {
background: transparent;
border: none;
cursor: pointer;
font-size: 14px;
padding: 2px 6px;
border-radius: 4px;
opacity: 0.7;
transition: all 0.2s;
}
.tool-btn:hover {
background: rgba(255, 255, 255, 0.1);
opacity: 1;
}
.tool-btn.dangerous:hover {
background: rgba(220, 50, 50, 0.3);
}
/* Resize Handle Styling */
.doctor-chat-panel::after {
content: '⋮⋮';
position: absolute;
bottom: 2px;
right: 2px;
width: 16px;
height: 16px;
color: #666;
font-size: 10px;
line-height: 8px;
text-align: center;
pointer-events: none;
opacity: 0.5;
}
.doctor-chat-panel:hover::after {
opacity: 1;
}
/* F7: Smart Parameter Injection - Fix Button Styles */
.doctor-fix-container {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 12px;
padding: 12px;
background: rgba(37, 99, 235, 0.1);
border: 1px solid #2563eb;
border-radius: 6px;
}
.doctor-fix-btn {
padding: 8px 12px;
background: #2563eb;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
transition: all 0.2s;
text-align: left;
font-family: inherit;
}
.doctor-fix-btn:hover:not(:disabled) {
background: #1d4ed8;
transform: translateY(-1px);
box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}
.doctor-fix-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
.doctor-fix-btn.applied {
background: #10b981;
pointer-events: none;
}
.doctor-fix-btn.error {
background: #ef4444;
font-size: 12px;
}