|
| 1 | +/* ============================================= |
| 2 | + CHAT CARD LAYOUT - Flex container with sticky compose |
| 3 | + ============================================= */ |
| 4 | + |
| 5 | +/* Main chat card - flex column layout, transparent background */ |
| 6 | +.chat { |
| 7 | + position: relative; |
| 8 | + display: flex; |
| 9 | + flex-direction: column; |
| 10 | + flex: 1 1 0; |
| 11 | + height: 100%; |
| 12 | + min-height: 0; /* Allow flex shrinking */ |
| 13 | + overflow: hidden; |
| 14 | + background: transparent !important; |
| 15 | + border: none !important; |
| 16 | + box-shadow: none !important; |
| 17 | +} |
| 18 | + |
| 19 | +/* Chat header - fixed at top, transparent */ |
| 20 | +.chat-header { |
| 21 | + display: flex; |
| 22 | + justify-content: space-between; |
| 23 | + align-items: center; |
| 24 | + gap: 12px; |
| 25 | + flex-wrap: nowrap; |
| 26 | + flex-shrink: 0; |
| 27 | + padding-bottom: 12px; |
| 28 | + margin-bottom: 12px; |
| 29 | + background: transparent; |
| 30 | +} |
| 31 | + |
| 32 | +.chat-header__left { |
| 33 | + display: flex; |
| 34 | + align-items: center; |
| 35 | + gap: 12px; |
| 36 | + flex-wrap: wrap; |
| 37 | + min-width: 0; |
| 38 | +} |
| 39 | + |
| 40 | +.chat-header__right { |
| 41 | + display: flex; |
| 42 | + align-items: center; |
| 43 | + gap: 8px; |
| 44 | +} |
| 45 | + |
| 46 | +.chat-session { |
| 47 | + min-width: 180px; |
| 48 | +} |
| 49 | + |
| 50 | +/* Chat thread - scrollable middle section, transparent */ |
| 51 | +.chat-thread { |
| 52 | + flex: 1 1 0; /* Grow, shrink, and use 0 base for proper scrolling */ |
| 53 | + overflow-y: auto; |
| 54 | + overflow-x: hidden; |
| 55 | + padding: 12px; |
| 56 | + margin: 0 -12px; |
| 57 | + min-height: 0; /* Allow shrinking for flex scroll behavior */ |
| 58 | + border-radius: 12px; |
| 59 | + background: transparent; |
| 60 | +} |
| 61 | + |
| 62 | +/* Focus mode exit button */ |
| 63 | +.chat-focus-exit { |
| 64 | + position: absolute; |
| 65 | + top: 12px; |
| 66 | + right: 12px; |
| 67 | + z-index: 100; |
| 68 | + width: 32px; |
| 69 | + height: 32px; |
| 70 | + border-radius: 50%; |
| 71 | + border: 1px solid var(--border); |
| 72 | + background: var(--panel); |
| 73 | + color: var(--muted); |
| 74 | + font-size: 20px; |
| 75 | + line-height: 1; |
| 76 | + cursor: pointer; |
| 77 | + display: flex; |
| 78 | + align-items: center; |
| 79 | + justify-content: center; |
| 80 | + transition: background 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out; |
| 81 | + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); |
| 82 | +} |
| 83 | + |
| 84 | +.chat-focus-exit:hover { |
| 85 | + background: var(--panel-strong); |
| 86 | + color: var(--text); |
| 87 | + border-color: var(--accent); |
| 88 | +} |
| 89 | + |
| 90 | +/* Chat compose - sticky at bottom */ |
| 91 | +.chat-compose { |
| 92 | + position: sticky; |
| 93 | + bottom: 0; |
| 94 | + flex-shrink: 0; |
| 95 | + display: flex; |
| 96 | + align-items: flex-end; |
| 97 | + gap: 12px; |
| 98 | + margin-top: auto; /* Push to bottom of flex container */ |
| 99 | + padding: 16px 0 4px; |
| 100 | + background: linear-gradient(to bottom, transparent, var(--bg) 20%); |
| 101 | + z-index: 10; |
| 102 | +} |
| 103 | + |
| 104 | +.chat-compose__field { |
| 105 | + flex: 1 1 auto; |
| 106 | + min-width: 0; |
| 107 | +} |
| 108 | + |
| 109 | +/* Hide the "Message" label - keep textarea only */ |
| 110 | +.chat-compose__field > span { |
| 111 | + display: none; |
| 112 | +} |
| 113 | + |
| 114 | +/* Override .field textarea min-height (180px) from components.css */ |
| 115 | +.chat-compose .chat-compose__field textarea { |
| 116 | + width: 100%; |
| 117 | + min-height: 36px; |
| 118 | + max-height: 150px; |
| 119 | + padding: 8px 12px; |
| 120 | + border-radius: 10px; |
| 121 | + resize: vertical; |
| 122 | + white-space: pre-wrap; |
| 123 | + font-family: var(--font-body); |
| 124 | + font-size: 14px; |
| 125 | + line-height: 1.45; |
| 126 | +} |
| 127 | + |
| 128 | +.chat-compose__field textarea:disabled { |
| 129 | + opacity: 0.7; |
| 130 | + cursor: not-allowed; |
| 131 | +} |
| 132 | + |
| 133 | +.chat-compose__actions { |
| 134 | + flex-shrink: 0; |
| 135 | + display: flex; |
| 136 | + align-items: stretch; |
| 137 | +} |
| 138 | + |
| 139 | +.chat-compose .chat-compose__actions .btn { |
| 140 | + padding: 8px 16px; |
| 141 | + font-size: 13px; |
| 142 | + min-height: 36px; |
| 143 | + white-space: nowrap; |
| 144 | +} |
| 145 | + |
| 146 | +/* Chat controls - moved to content-header area, left aligned */ |
| 147 | +.chat-controls { |
| 148 | + display: flex; |
| 149 | + align-items: center; |
| 150 | + justify-content: flex-start; |
| 151 | + gap: 12px; |
| 152 | + flex-wrap: wrap; |
| 153 | +} |
| 154 | + |
| 155 | +.chat-controls__session { |
| 156 | + min-width: 140px; |
| 157 | +} |
| 158 | + |
| 159 | +.chat-controls__thinking { |
| 160 | + display: flex; |
| 161 | + align-items: center; |
| 162 | + gap: 6px; |
| 163 | + font-size: 13px; |
| 164 | +} |
| 165 | + |
| 166 | +/* Icon button style */ |
| 167 | +.btn--icon { |
| 168 | + padding: 8px !important; |
| 169 | + min-width: 36px; |
| 170 | + height: 36px; |
| 171 | + display: inline-flex; |
| 172 | + align-items: center; |
| 173 | + justify-content: center; |
| 174 | + border: 1px solid var(--border); |
| 175 | + background: rgba(255, 255, 255, 0.06); |
| 176 | +} |
| 177 | + |
| 178 | +/* Controls separator */ |
| 179 | +.chat-controls__separator { |
| 180 | + color: rgba(255, 255, 255, 0.4); |
| 181 | + font-size: 18px; |
| 182 | + margin: 0 8px; |
| 183 | + font-weight: 300; |
| 184 | +} |
| 185 | + |
| 186 | +:root[data-theme="light"] .chat-controls__separator { |
| 187 | + color: rgba(16, 24, 40, 0.3); |
| 188 | +} |
| 189 | + |
| 190 | +.btn--icon:hover { |
| 191 | + background: rgba(255, 255, 255, 0.12); |
| 192 | + border-color: rgba(255, 255, 255, 0.2); |
| 193 | +} |
| 194 | + |
| 195 | +/* Light theme icon button overrides */ |
| 196 | +:root[data-theme="light"] .btn--icon { |
| 197 | + background: rgba(255, 255, 255, 0.9); |
| 198 | + border-color: rgba(16, 24, 40, 0.2); |
| 199 | + box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); |
| 200 | + color: rgba(16, 24, 40, 0.7); |
| 201 | +} |
| 202 | + |
| 203 | +:root[data-theme="light"] .btn--icon:hover { |
| 204 | + background: rgba(255, 255, 255, 1); |
| 205 | + border-color: rgba(16, 24, 40, 0.3); |
| 206 | + color: rgba(16, 24, 40, 0.9); |
| 207 | +} |
| 208 | + |
| 209 | +.btn--icon svg { |
| 210 | + display: block; |
| 211 | +} |
| 212 | + |
| 213 | +.chat-controls__session select { |
| 214 | + padding: 6px 10px; |
| 215 | + font-size: 13px; |
| 216 | +} |
| 217 | + |
| 218 | +.chat-controls__thinking { |
| 219 | + display: flex; |
| 220 | + align-items: center; |
| 221 | + gap: 4px; |
| 222 | + font-size: 12px; |
| 223 | + padding: 4px 10px; |
| 224 | + background: rgba(255, 255, 255, 0.04); |
| 225 | + border-radius: 6px; |
| 226 | + border: 1px solid var(--border); |
| 227 | +} |
| 228 | + |
| 229 | +/* Light theme thinking indicator override */ |
| 230 | +:root[data-theme="light"] .chat-controls__thinking { |
| 231 | + background: rgba(255, 255, 255, 0.9); |
| 232 | + border-color: rgba(16, 24, 40, 0.15); |
| 233 | +} |
| 234 | + |
| 235 | +@media (max-width: 640px) { |
| 236 | + .chat-session { |
| 237 | + min-width: 140px; |
| 238 | + } |
| 239 | + |
| 240 | + .chat-compose { |
| 241 | + grid-template-columns: 1fr; |
| 242 | + } |
| 243 | + |
| 244 | + .chat-controls { |
| 245 | + flex-wrap: wrap; |
| 246 | + gap: 8px; |
| 247 | + } |
| 248 | + |
| 249 | + .chat-controls__session { |
| 250 | + min-width: 120px; |
| 251 | + } |
| 252 | +} |
| 253 | + |
0 commit comments