Files
school_compare/nextjs-app/components/ComparisonToast.module.css
Tudor 8aca0a7a53
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 35s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m10s
Build and Push Docker Images / Build Integrator (push) Successful in 57s
Build and Push Docker Images / Build Kestra Init (push) Successful in 31s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 0s
feat(ui): site-wide UX/UI audit — unified buttons, tokens, accessibility
- Add shared button system (.btn-primary/secondary/tertiary/active) in globals.css
- Replace 40+ hardcoded rgba() values with design tokens across all CSS modules
- Add skip link, :focus-visible indicators, and ARIA landmarks
- Standardise button labels ("+ Compare" / "✓ Comparing") across all components
- Add collapse/minimize toggle to ComparisonToast
- Fix heading hierarchy (h3→h2 in ComparisonView)
- Add aria-live on search results, aria-label on trend SVGs
- Add "Search" nav link, fix footer empty section, unify max-widths
- Darken --text-muted for WCAG AA compliance (4.6:1 contrast ratio)
- Net reduction of ~180 lines through button style deduplication

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 20:28:03 +00:00

182 lines
3.2 KiB
CSS

.toastContainer {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
z-index: 2000;
animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideUp {
from {
transform: translate(-50%, 150%);
opacity: 0;
}
to {
transform: translate(-50%, 0);
opacity: 1;
}
}
.toastContent {
display: flex;
flex-direction: column;
gap: 0;
padding: 1rem 1.25rem;
background: var(--bg-accent, #1a1612);
color: var(--text-inverse, #faf7f2);
border-radius: 16px;
box-shadow: 0 10px 30px rgba(26, 22, 18, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
min-width: 260px;
}
.toastInfo {
display: flex;
align-items: center;
gap: 0.75rem;
}
.toastBadge {
display: flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
background: var(--accent-coral, #e07256);
color: white;
border-radius: 50%;
font-weight: 700;
font-size: 0.9rem;
}
.toastText {
font-weight: 500;
font-size: 0.95rem;
white-space: nowrap;
}
.toastActions {
display: flex;
align-items: center;
gap: 0.75rem;
padding-top: 0.25rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.btnCompare {
background: white;
color: var(--bg-accent, #1a1612);
padding: 0.6rem 1.25rem;
border-radius: 25px;
font-weight: 600;
font-size: 0.9rem;
text-decoration: none;
transition: transform 0.2s ease, background-color 0.2s ease;
white-space: nowrap;
}
.btnCompare:hover {
transform: translateY(-1px);
background: var(--bg-secondary, #f3ede4);
}
.toastHeader {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 0.5rem;
}
.toastCollapsed .toastHeader {
margin-bottom: 0;
}
.collapseBtn {
background: none;
border: none;
color: rgba(250, 247, 242, 0.6);
cursor: pointer;
padding: 0.25rem;
line-height: 1;
display: flex;
align-items: center;
justify-content: center;
transition: color 0.2s ease;
}
.collapseBtn:hover {
color: var(--text-inverse, #faf7f2);
}
.toastTitle {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 600;
font-size: 0.875rem;
color: var(--text-inverse, #faf7f2);
}
.schoolList {
display: flex;
flex-direction: column;
gap: 0.25rem;
margin-bottom: 0.75rem;
max-height: 120px;
overflow-y: auto;
}
.schoolItem {
display: flex;
align-items: center;
justify-content: space-between;
gap: 0.5rem;
padding: 0.25rem 0.375rem;
background: rgba(255, 255, 255, 0.08);
border-radius: var(--radius-sm, 4px);
}
.schoolName {
font-size: 0.8rem;
color: var(--text-inverse, #faf7f2);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
flex: 1;
}
.removeSchoolBtn {
background: none;
border: none;
color: rgba(250, 247, 242, 0.5);
cursor: pointer;
font-size: 1rem;
padding: 0 0.25rem;
line-height: 1;
flex-shrink: 0;
transition: color 0.2s ease;
}
.removeSchoolBtn:hover {
color: var(--text-inverse, #faf7f2);
}
@media (max-width: 640px) {
.toastContainer {
bottom: 1.5rem;
width: calc(100% - 3rem);
}
.toastContent {
gap: 0;
border-radius: 16px;
padding: 1.25rem;
}
.toastActions {
width: 100%;
justify-content: space-between;
}
}