|
89 | 89 | padding: 0; |
90 | 90 | } |
91 | 91 |
|
| 92 | +/* Smooth core animation and hover transitions for interactive elements */ |
| 93 | +button, |
| 94 | +input, |
| 95 | +select, |
| 96 | +textarea, |
| 97 | +.search-input, |
| 98 | +.action-btn, |
| 99 | +.suggestion-btn, |
| 100 | +.send-btn, |
| 101 | +.btn-primary, |
| 102 | +.close-modal-btn, |
| 103 | +.close-genre-modal, |
| 104 | +.genre-card, |
| 105 | +.book-rec-item { |
| 106 | + transition: |
| 107 | + background-color 0.25s ease, |
| 108 | + color 0.25s ease, |
| 109 | + border-color 0.25s ease, |
| 110 | + box-shadow 0.25s ease, |
| 111 | + transform 0.25s ease, |
| 112 | + opacity 0.2s ease; |
| 113 | +} |
| 114 | + |
92 | 115 | html { |
93 | 116 | scroll-behavior: smooth; |
94 | 117 | transition: background-color 0.4s ease, color 0.4s ease; |
@@ -201,10 +224,15 @@ header { |
201 | 224 | color: var(--text-main); |
202 | 225 | } |
203 | 226 |
|
| 227 | +.search-input:hover, |
204 | 228 | .search-input:focus { |
205 | 229 | background: var(--book-bg); |
| 230 | + border-color: rgba(212, 175, 55, 0.35); |
| 231 | +} |
| 232 | + |
| 233 | +.search-input:focus { |
206 | 234 | width: 300px; |
207 | | - box-shadow: var(--shadow-soft); |
| 235 | + box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.14); |
208 | 236 | } |
209 | 237 |
|
210 | 238 | .search-icon { |
@@ -306,6 +334,37 @@ main { |
306 | 334 | overflow-x: hidden; |
307 | 335 | } |
308 | 336 |
|
| 337 | +/* Strong accessible focus states for keyboard navigation */ |
| 338 | +button:focus-visible, |
| 339 | +.search-input:focus-visible, |
| 340 | +input:focus-visible, |
| 341 | +textarea:focus-visible, |
| 342 | +select:focus-visible, |
| 343 | +.action-btn:focus-visible, |
| 344 | +.suggestion-btn:focus-visible, |
| 345 | +.send-btn:focus-visible, |
| 346 | +.btn-primary:focus-visible, |
| 347 | +.close-modal-btn:focus-visible, |
| 348 | +.close-genre-modal:focus-visible, |
| 349 | +.genre-card:focus-visible, |
| 350 | +.book-rec-item:focus-visible { |
| 351 | + outline: 3px solid rgba(212, 175, 55, 0.35); |
| 352 | + outline-offset: 2px; |
| 353 | +} |
| 354 | + |
| 355 | +select, |
| 356 | +.dropdown { |
| 357 | + transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, color 0.28s ease; |
| 358 | +} |
| 359 | + |
| 360 | +select:focus, |
| 361 | +.dropdown:focus, |
| 362 | +input:focus, |
| 363 | +textarea:focus { |
| 364 | + box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12); |
| 365 | + border-color: rgba(212, 175, 55, 0.35); |
| 366 | +} |
| 367 | + |
309 | 368 | /* --- Hero --- */ |
310 | 369 | .hero { |
311 | 370 | text-align: center; |
|
0 commit comments