Files
school_compare/nextjs-app/components/RankingsView.module.css

359 lines
6.3 KiB
CSS
Raw Normal View History

.container {
width: 100%;
}
/* Header */
.header {
margin-bottom: 2rem;
}
.header h1 {
font-size: 2.25rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
margin-bottom: 0.5rem;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.subtitle {
font-size: 1rem;
color: var(--text-secondary, #5c564d);
margin: 0;
line-height: 1.6;
}
/* Filters */
.filters {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 12px;
padding: 1.5rem;
margin-bottom: 2rem;
display: flex;
flex-wrap: wrap;
gap: 1.5rem;
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}
.filterGroup {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1;
min-width: 200px;
}
.filterLabel {
font-size: 0.9375rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
white-space: nowrap;
}
.filterSelect {
flex: 1;
padding: 0.625rem 1rem;
font-size: 0.9375rem;
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 8px;
background: var(--bg-card, white);
color: var(--text-primary, #1a1612);
cursor: pointer;
transition: all 0.2s ease;
}
.filterSelect:hover {
border-color: var(--accent-coral, #e07256);
}
.filterSelect:focus {
outline: none;
border-color: var(--accent-coral, #e07256);
box-shadow: 0 0 0 3px var(--accent-coral-bg);
}
.filterSelect optgroup {
font-weight: 700;
color: var(--text-primary, #1a1612);
background: var(--bg-secondary, #f3ede4);
padding: 0.5rem 0;
}
.filterSelect option {
font-weight: 400;
color: var(--text-secondary, #5c564d);
padding: 0.375rem 1rem;
}
/* Rankings Section */
.rankingsSection {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 12px;
padding: 2rem;
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}
.tableWrapper {
overflow-x: auto;
}
.rankingsTable {
width: 100%;
border-collapse: collapse;
font-size: 0.9375rem;
}
.rankingsTable thead {
background: var(--bg-secondary, #f3ede4);
}
.rankingsTable th {
padding: 1rem;
text-align: left;
font-weight: 600;
color: var(--text-primary, #1a1612);
border-bottom: 2px solid var(--border-color, #e5dfd5);
white-space: nowrap;
text-transform: uppercase;
font-size: 0.75rem;
letter-spacing: 0.05em;
}
.rankHeader {
width: 80px;
}
.schoolHeader {
min-width: 250px;
}
.areaHeader {
min-width: 150px;
}
.typeHeader {
min-width: 120px;
}
.valueHeader {
width: 120px;
text-align: center;
}
.actionHeader {
width: 120px;
text-align: center;
}
.rankingsTable td {
padding: 1rem;
border-bottom: 1px solid var(--border-color, #e5dfd5);
color: var(--text-secondary, #5c564d);
}
.rankingsTable tbody tr:last-child td {
border-bottom: none;
}
/* Alternating row backgrounds for visual rhythm */
.rankingsTable tbody tr:nth-child(even) {
background: rgba(243, 237, 228, 0.5);
}
.rankingsTable tbody tr:hover {
background: var(--bg-secondary, #f3ede4);
}
/* Top 3 Highlighting with Gold */
.rank1 {
background: linear-gradient(90deg, rgba(201, 162, 39, 0.15) 0%, transparent 100%) !important;
}
.rank2 {
background: linear-gradient(90deg, rgba(192, 192, 192, 0.15) 0%, transparent 100%) !important;
}
.rank3 {
background: linear-gradient(90deg, rgba(205, 127, 50, 0.15) 0%, transparent 100%) !important;
}
.rankCell {
display: flex;
align-items: center;
gap: 0.5rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
}
/* Styled rank badges for top 3 */
.rankBadge {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
font-size: 1rem;
font-weight: 700;
color: white;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
position: relative;
}
.rankBadge::before {
content: '';
position: absolute;
inset: -2px;
border-radius: 50%;
border: 2px solid transparent;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent) border-box;
mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
mask-composite: exclude;
-webkit-mask-composite: xor;
}
.rankBadge1 {
background: linear-gradient(135deg, #c9a227 0%, #e8c547 50%, #c9a227 100%);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.rankBadge2 {
background: linear-gradient(135deg, #8c8c8c 0%, #c0c0c0 50%, #8c8c8c 100%);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.rankBadge3 {
background: linear-gradient(135deg, #a5673f 0%, #cd7f32 50%, #a5673f 100%);
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.rankNumber {
font-size: 1rem;
color: var(--text-secondary, #5c564d);
}
.schoolCell {
font-weight: 500;
}
.schoolLink {
color: var(--text-primary, #1a1612);
text-decoration: none;
transition: color 0.2s ease;
}
.schoolLink:hover {
color: var(--accent-coral, #e07256);
}
.areaCell,
.typeCell {
color: var(--text-secondary, #5c564d);
}
.valueCell {
text-align: center;
font-size: 1rem;
}
.valueCell strong {
color: var(--accent-teal, #2d7d7d);
font-weight: 700;
}
.actionCell {
text-align: center;
}
/* Equalise <a> and <button> rendering */
.actionCell > * {
height: 2rem;
line-height: 1;
font-family: inherit;
box-sizing: border-box;
vertical-align: middle;
}
/* No Results */
.noResults {
text-align: center;
padding: 4rem 2rem;
color: var(--text-secondary, #5c564d);
}
.noResults p {
font-size: 1rem;
margin: 0;
}
/* Responsive Design */
@media (max-width: 768px) {
.header h1 {
font-size: 1.75rem;
}
.filters {
flex-direction: column;
gap: 1rem;
padding: 1rem;
border-radius: 8px;
}
.filterGroup {
flex-direction: column;
align-items: stretch;
min-width: 100%;
}
.rankingsSection {
padding: 1rem;
border-radius: 8px;
}
.rankingsTable {
font-size: 0.875rem;
}
.rankingsTable th,
.rankingsTable td {
padding: 0.75rem 0.5rem;
}
.rankBadge {
width: 30px;
height: 30px;
font-size: 0.875rem;
}
.schoolHeader {
min-width: 180px;
}
.areaHeader,
.typeHeader {
min-width: 100px;
}
}
feat(ux): implement comprehensive UX audit fixes across all pages Addresses 28 issues identified in UX audit (P0–P3 severity): P0 — Critical: - Fix compare URL sharing: seed ComparisonContext from SSR initialData when localStorage is empty, making /compare?urns=... links shareable - Remove permanently broken "Avg. Scaled Score" column from school detail historical data table P1 — High priority: - Add radius selector (0.5–10 mi) to postcode search in FilterBar - Make Add to Compare a toggle (remove) on SchoolCards - Hide hero title/description once a search is active - Show school count + quick-search prompts on empty landing page - Compare empty state opens in-page school search modal directly - Remove URN from school detail header (irrelevant to end users) - Move map above performance chart in school detail page - Add ← Back navigation to school detail page - Add sort controls to search results (RWM%, distance, A–Z) - Show metric descriptions below metric selector - Expand ComparisonToast to list school names with per-school remove - Add progress score explainer (0 = national average) throughout P2 — Medium: - Remove console.log statements from ComparisonView - Colour-code comparison school cards to match chart line colours - Replace plain loading text with LoadingSkeleton in ComparisonView - Rankings empty state uses shared EmptyState component - Rankings year filter shows actual year e.g. "2023 (Latest)" - Rankings subtitle shows top-N count - Add View link alongside Add button in rankings table - Remove placeholder Privacy Policy / Terms links from footer - Replace untappable 10px info icons with visible metric hint text - Show active filter chips in search results header P3 — Polish: - Remove redundant "Home" nav link (logo already links home) - Add / and Ctrl+K keyboard shortcut to focus search input - Add Share button to compare page (copies URL to clipboard) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 21:31:28 +00:00
.limitNote {
color: var(--text-muted);
font-weight: 400;
}
.metricDescription {
font-size: 0.875rem;
color: var(--text-secondary);
margin: -1rem 0 1.5rem;
max-width: 700px;
}
.progressHint {
font-size: 0.8rem;
color: var(--text-muted);
margin: -1rem 0 1.5rem;
font-style: italic;
}