Files
school_compare/nextjs-app/components/SchoolCard.module.css
Tudor 8b193c830e
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m7s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
fix(buttons): use inline-flex on all buttons so <a> and <button> render same height
<a> tags are display:inline by default and don't respect vertical padding,
while <button> is inline-block. Mixed anchor/button pairs (View/Add) rendered
at different heights despite identical padding. Apply display:inline-flex +
align-items:center to every button-styled element across SchoolRow, RankingsView,
and SchoolCard. Add border:1px solid transparent to borderless buttons so total
box size matches bordered siblings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 09:15:33 +00:00

241 lines
4.5 KiB
CSS

.card {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-left: 3px solid transparent;
border-radius: 10px;
padding: 1rem 1.125rem;
transition: all 0.3s ease;
}
.card.cardInCompare {
border-color: var(--accent-teal, #2d7d7d);
box-shadow: 0 0 0 1px var(--accent-teal, #2d7d7d);
}
.card:hover {
border-left-color: var(--accent-coral, #e07256);
box-shadow: var(--shadow-medium, 0 4px 20px rgba(26, 22, 18, 0.1));
transform: translateY(-1px);
}
.header {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 0.75rem;
margin-bottom: 0.375rem;
}
.title {
margin: 0;
font-size: 1rem;
font-weight: 600;
line-height: 1.35;
font-family: var(--font-playfair), 'Playfair Display', serif;
}
.title a {
color: var(--text-primary, #1a1612);
text-decoration: none;
transition: color 0.2s ease;
}
.title a:hover {
color: var(--accent-coral, #e07256);
}
.distance {
font-size: 0.75rem;
color: var(--accent-teal, #2d7d7d);
white-space: nowrap;
background: rgba(45, 125, 125, 0.1);
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-weight: 500;
}
.meta {
display: flex;
flex-wrap: wrap;
gap: 0.375rem;
margin-bottom: 0.625rem;
}
.metaItem {
font-size: 0.75rem;
color: var(--text-secondary, #5c564d);
padding: 0.125rem 0.5rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 3px;
}
.metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 0.625rem;
margin-bottom: 0.875rem;
padding: 0.625rem 0.75rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 6px;
border: 1px solid var(--border-color, #e5dfd5);
}
.metric {
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.metricLabel {
font-size: 0.6875rem;
color: var(--text-muted, #8a847a);
text-transform: uppercase;
letter-spacing: 0.05em;
}
.metricValue {
display: flex;
align-items: center;
gap: 0.375rem;
}
.metricValue strong {
font-size: 1rem;
color: var(--text-primary, #1a1612);
font-weight: 700;
}
.trend {
display: inline-flex;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 4px;
cursor: help;
transition: transform 0.2s ease;
}
.trend:hover {
transform: scale(1.15);
}
.trendIcon {
width: 12px;
height: 12px;
}
.trendUp {
color: var(--accent-teal, #2d7d7d);
background: rgba(45, 125, 125, 0.15);
}
.trendDown {
color: var(--accent-coral, #e07256);
background: rgba(224, 114, 86, 0.15);
}
.trendStable {
color: var(--text-muted, #8a847a);
background: rgba(138, 132, 122, 0.15);
}
.actions {
display: flex;
gap: 0.5rem;
}
.btnSecondary,
.btnPrimary {
flex: 1;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 600;
border-radius: 6px;
border: 1px solid transparent;
cursor: pointer;
text-decoration: none;
transition: all 0.2s ease;
box-sizing: border-box;
}
.btnSecondary {
background: var(--bg-card, white);
color: var(--accent-teal, #2d7d7d);
border: 1.5px solid var(--accent-teal, #2d7d7d);
}
.btnSecondary:hover {
background: var(--accent-teal, #2d7d7d);
color: white;
transform: translateY(-1px);
box-shadow: 0 3px 8px rgba(45, 125, 125, 0.25);
}
.btnPrimary {
background: var(--accent-coral, #e07256);
color: white;
}
.btnPrimary:hover:not(:disabled) {
background: var(--accent-coral-dark, #c45a3f);
transform: translateY(-1px);
box-shadow: 0 3px 8px rgba(224, 114, 86, 0.25);
}
.btnPrimary:active:not(:disabled) {
transform: translateY(0);
}
.btnRemove {
flex: 1;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 600;
border-radius: 6px;
cursor: pointer;
text-decoration: none;
transition: all 0.2s ease;
box-sizing: border-box;
background: var(--bg-secondary, #f3ede4);
color: var(--text-secondary, #5c564d);
border: 1px solid var(--border-color, #e0ddd8);
}
.btnRemove:hover {
background: var(--border-color, #e0ddd8);
color: var(--text-primary, #1a1612);
transform: translateY(-1px);
}
.metricHint {
font-size: 0.7rem;
color: var(--text-muted, #8a847a);
display: block;
margin-top: 1px;
font-weight: 400;
}
@media (max-width: 640px) {
.card {
padding: 0.875rem;
border-radius: 8px;
}
.metrics {
grid-template-columns: 1fr;
gap: 0.5rem;
}
.actions {
flex-direction: column;
}
}