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

427 lines
7.5 KiB
CSS
Raw Normal View History

.container {
width: 100%;
}
/* Header Section */
.header {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1.25rem 1.5rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.headerContent {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 1.5rem;
}
.titleSection {
flex: 1;
}
.schoolName {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
margin-bottom: 0.5rem;
line-height: 1.2;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.meta {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-bottom: 0.5rem;
}
.metaItem {
font-size: 0.8125rem;
color: var(--text-secondary, #5c564d);
padding: 0.125rem 0.5rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 3px;
}
.address {
font-size: 0.875rem;
color: var(--text-muted, #8a847a);
margin: 0;
}
.actions {
display: flex;
gap: 0.5rem;
flex-shrink: 0;
}
.btnAdd,
.btnRemove {
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 600;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
white-space: nowrap;
}
.btnAdd {
background: var(--accent-coral, #e07256);
color: white;
}
.btnAdd:hover {
background: var(--accent-coral-dark, #c45a3f);
transform: translateY(-1px);
}
.btnRemove {
background: var(--accent-teal, #2d7d7d);
color: white;
}
.btnRemove:hover {
opacity: 0.9;
}
/* Section Title */
.sectionTitle {
font-size: 1.125rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
margin-bottom: 0.875rem;
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--border-color, #e5dfd5);
font-family: var(--font-playfair), 'Playfair Display', serif;
display: flex;
align-items: center;
gap: 0.375rem;
}
.sectionTitle::before {
content: '';
display: inline-block;
width: 3px;
height: 1em;
background: var(--accent-coral, #e07256);
border-radius: 2px;
}
/* Summary Section */
.summary {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.metricsGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 0.75rem;
}
.metricCard {
background: var(--bg-secondary, #f3ede4);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 6px;
padding: 0.75rem;
text-align: center;
}
.metricLabel {
font-size: 0.6875rem;
color: var(--text-muted, #8a847a);
margin-bottom: 0.25rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.metricValue {
font-size: 1.25rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
display: flex;
align-items: center;
justify-content: center;
gap: 0.25rem;
}
.metricTrend {
font-size: 1rem;
color: var(--accent-teal, #2d7d7d);
}
/* Charts Section */
.chartsSection {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.chartContainer {
width: 100%;
height: 280px;
position: relative;
}
/* Detailed Metrics - Compact Grid Layout */
.detailedMetrics {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.metricGroupsGrid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
}
.metricGroup {
margin-bottom: 0;
}
.metricGroupTitle {
font-size: 0.875rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
margin-bottom: 0.5rem;
padding-bottom: 0.375rem;
border-bottom: 1px solid var(--border-color, #e5dfd5);
display: flex;
align-items: center;
gap: 0.375rem;
}
.metricTable {
display: flex;
flex-direction: column;
gap: 0.375rem;
}
.metricRow {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.375rem 0.625rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 4px;
}
.metricName {
font-size: 0.75rem;
color: var(--text-secondary, #5c564d);
}
.metricRow .metricValue {
font-size: 0.875rem;
font-weight: 600;
color: var(--accent-teal, #2d7d7d);
}
/* Absence Section */
.absenceSection {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.absenceGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 0.75rem;
}
.absenceCard {
background: var(--bg-secondary, #f3ede4);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 6px;
padding: 0.75rem 1rem;
text-align: center;
}
.absenceLabel {
font-size: 0.75rem;
color: var(--text-muted, #8a847a);
margin-bottom: 0.25rem;
font-weight: 500;
}
.absenceValue {
font-size: 1.125rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
}
/* Map Section */
.mapSection {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.mapContainer {
width: 100%;
height: 250px;
border-radius: 8px;
overflow: hidden;
border: 1px solid var(--border-color, #e5dfd5);
}
/* History Section */
.historySection {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 10px;
padding: 1rem 1.25rem;
margin-bottom: 1rem;
box-shadow: var(--shadow-soft);
}
.tableWrapper {
overflow-x: auto;
margin-top: 0.5rem;
}
.dataTable {
width: 100%;
border-collapse: collapse;
font-size: 0.8125rem;
}
.dataTable thead {
background: var(--bg-secondary, #f3ede4);
}
.dataTable th {
padding: 0.625rem 0.75rem;
text-align: left;
font-weight: 600;
font-size: 0.6875rem;
text-transform: uppercase;
letter-spacing: 0.03em;
color: var(--text-primary, #1a1612);
border-bottom: 2px solid var(--border-color, #e5dfd5);
}
.dataTable td {
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--border-color, #e5dfd5);
color: var(--text-secondary, #5c564d);
}
.dataTable tbody tr:last-child td {
border-bottom: none;
}
.dataTable tbody tr:hover {
background: var(--bg-secondary, #f3ede4);
}
.yearCell {
font-weight: 600;
color: var(--accent-gold, #c9a227);
}
/* Responsive Design */
@media (max-width: 768px) {
.headerContent {
flex-direction: column;
gap: 1rem;
}
.actions {
width: 100%;
}
.btnAdd,
.btnRemove {
flex: 1;
}
.schoolName {
font-size: 1.25rem;
}
.meta {
flex-direction: column;
gap: 0.375rem;
}
.metricsGrid {
grid-template-columns: repeat(2, 1fr);
}
.metricGroupsGrid {
grid-template-columns: 1fr;
}
.chartContainer {
height: 220px;
}
.mapContainer {
height: 200px;
}
.dataTable {
font-size: 0.75rem;
}
.dataTable th,
.dataTable td {
padding: 0.5rem 0.375rem;
}
}
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
.backNav {
padding: 1rem var(--page-padding, 2rem);
padding-bottom: 0;
}
.backButton {
background: none;
border: none;
color: var(--text-secondary);
font-size: 0.875rem;
cursor: pointer;
padding: 0.375rem 0;
display: inline-flex;
align-items: center;
gap: 0.25rem;
transition: color var(--transition);
}
.backButton:hover {
color: var(--text-primary);
}
.progressNote {
margin-top: 0.75rem;
font-size: 0.8rem;
color: var(--text-muted);
font-style: italic;
}