Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
| /* 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; | |
| } | |
| /* The horizontal row containing ONLY bubble and copy button */ | |
| .bubble-row { | |
| display: flex; | |
| align-items: flex-end; /* Keeps button at the bottom of the bubble height TODO */ | |
| gap: 8px; | |
| } | |
| /* USER: Bubble on right, Copy on left */ | |
| .message-container.user { | |
| align-items: flex-end; | |
| } | |
| .message-container.user .bubble-row { | |
| flex-direction: row-reverse; /* Flips the copy button to the left */ | |
| } | |
| /* ASSISTANT: Bubble on left, Copy on right */ | |
| .message-container.assistant { | |
| align-items: flex-start; | |
| } | |
| .message-container.assistant .bubble-row { | |
| flex-direction: row; /* Copy button stays on the right */ | |
| justify-content: flex-start; | |
| } | |
| /* Copy Button Styling */ | |
| .copy-btn { | |
| opacity: 0; | |
| transition: opacity 0.2s ease; | |
| border: none; | |
| background: transparent; | |
| padding: 5px; | |
| cursor: pointer; | |
| height: fit-content; | |
| } | |
| .message-container:hover .copy-btn { | |
| opacity: 1; | |
| } | |
| /* A slight lift and a subtle background glow */ | |
| .copy-btn:hover { | |
| background: rgba(255, 255, 255, 0.08); | |
| border-color: rgba(255, 255, 255, 0.3); | |
| color: #ffffff; | |
| box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); | |
| } | |
| /* The button "sinks" into the page and glows blue/green */ | |
| .copy-btn:active { | |
| transform: scale(0.9); /* Noticeable "squish" effect */ | |
| background: rgba(76, 111, 255, 0.2); /* Tint of your brand color */ | |
| border-color: #4c6fff; | |
| transition: transform 0.05s; /* Make the click feel instant */ | |
| } | |
| /* 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; | |
| } | |
| /* 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%; | |
| } | |
| } |