qyle's picture
deployment
2d42370 verified
/* styles/components/feedback.css - Message feedback buttons and modal */
/* Message container to hold bubble + feedback buttons */
.message-container {
display: flex;
flex-direction: column;
margin-bottom: 8px;
}
.message-container .msg-bubble {
margin-bottom: 4px;
}
/* Feedback buttons */
.feedback-buttons {
display: flex;
gap: 4px;
opacity: 0;
transition: opacity 0.2s ease;
margin-left: 8px;
align-self: flex-start;
}
/* Show feedback buttons on hover of the message container */
.message-container:hover .feedback-buttons {
opacity: 1;
}
/* Always show if a button is active (rated) */
.feedback-buttons:has(.feedback-btn.active) {
opacity: 1;
}
.feedback-btn {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
padding: 4px 8px;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.2s ease;
color: #c0c6e0;
width: 20px;
display: flex;
align-items: center;
justify-content: center;
box-sizing: content-box;
}
.feedback-btn:hover {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.2);
transform: scale(1.1);
}
.feedback-btn.active {
background: rgba(76, 111, 255, 0.2);
border-color: #4c6fff;
color: #4c6fff;
}
/* Copy button */
.copy-btn.copied {
background: rgba(40, 167, 69, 0.2);
border-color: #28a745;
color: #28a745;
}
.copy-btn.copied:hover {
transform: scale(1);
cursor: default;
}
/* Feedback modal */
.feedback-modal {
position: relative;
width: 90%;
}
.feedback-modal h2 {
margin-bottom: 1rem;
color: #f5f5f5;
font-size: 1.3rem;
}
.feedback-message-preview {
background: rgba(13, 19, 36, 0.5);
border: 1px solid #2c3554;
border-radius: 8px;
margin-bottom: 1rem;
padding: 8px;
margin-top: 16px;
}
.feedback-label {
font-size: 0.85rem;
color: #c0c6e0;
margin-top: 0;
margin-bottom: 6px;
font-weight: 500;
}
.message-preview-text {
font-size: 0.9rem;
color: #f5f5f5;
line-height: 1.4;
max-height: 100px;
overflow-y: auto;
}
.feedback-modal .form-group {
margin-bottom: 1rem;
}
.feedback-modal label {
display: block;
margin-bottom: 8px;
color: #c0c6e0;
font-weight: 500;
}
.feedback-modal textarea {
width: 100%;
background: #0d1324;
border: 1px solid #2c3554;
border-radius: 8px;
padding: 10px;
color: #f5f5f5;
font-family: inherit;
font-size: 0.95rem;
resize: vertical;
min-height: 80px;
box-sizing: border-box;
}
.feedback-modal textarea:focus {
outline: none;
border-color: #4c6fff;
}
.form-hint {
display: block;
margin-top: 6px;
font-size: 0.8rem;
color: #c0c6e0;
font-style: italic;
}
.feedback-modal .button-group {
display: flex;
gap: 12px;
margin: auto;
}
.feedback-modal .ok-button,
.feedback-modal .cancelBtn {
padding: 10px 20px;
border-radius: 8px;
font-weight: 500;
}
.feedback-modal .ok-button {
background: #4c6fff;
color: white;
border: none;
}
.feedback-modal .ok-button:hover {
background: #3d5ae6;
}
.feedback-modal .cancelBtn {
background: transparent;
border: 1px solid #2c3554;
color: #c0c6e0;
}
.feedback-modal .cancelBtn:hover {
background: rgba(255, 255, 255, 0.05);
}
/* Responsive */
@media (max-width: 768px) {
.feedback-modal {
min-width: unset;
width: 95%;
}
.feedback-buttons {
opacity: 1; /* Always show on mobile */
}
.feedback-modal .button-group button {
width: 100%;
}
}