running-dashboard / src /components /WeeklySummary.css
lewtun's picture
lewtun HF Staff
Add week navigation to weekly summary section
7b6976e
.week-nav {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
}
.week-nav h2 {
margin: 0;
font-size: 1.25rem;
flex: 1;
text-align: center;
}
.week-nav-btn {
background: none;
border: 1px solid var(--color-border);
border-radius: var(--radius);
font-size: 1.25rem;
line-height: 1;
padding: 0.25rem 0.5rem;
cursor: pointer;
color: var(--color-text);
transition: background 0.15s, color 0.15s;
}
.week-nav-btn:hover:not(:disabled) {
background: var(--color-primary);
color: #fff;
border-color: var(--color-primary);
}
.week-nav-btn:disabled {
opacity: 0.3;
cursor: default;
}
.week-label {
font-size: 0.875rem;
font-weight: 400;
color: var(--color-text-muted);
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.75rem;
margin-bottom: 1.25rem;
}
.stat-card {
background: var(--color-bg);
border-radius: var(--radius);
padding: 0.75rem;
text-align: center;
}
.stat-value {
display: block;
font-size: 1.5rem;
font-weight: 700;
color: var(--color-primary);
}
.stat-label {
display: block;
font-size: 0.75rem;
color: var(--color-text-muted);
margin-top: 0.125rem;
}
.longest-run {
border-top: 1px solid var(--color-border);
padding-top: 1rem;
margin-bottom: 1rem;
}
.longest-run h3 {
margin: 0 0 0.75rem;
font-size: 1rem;
color: var(--color-text);
}
.threshold-value {
color: #ef4444 !important;
}
/* Info tooltip */
.info-tip-wrapper {
position: relative;
display: inline-block;
margin-left: 0.35rem;
vertical-align: middle;
}
.info-icon {
font-size: 0.9rem;
color: var(--color-text-muted);
cursor: help;
transition: color 0.15s;
}
.info-icon:hover {
color: var(--color-primary);
}
.info-tooltip {
display: none;
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
width: 260px;
padding: 0.75rem;
background: var(--color-text);
color: #fff;
font-size: 0.8rem;
font-weight: 400;
line-height: 1.45;
border-radius: var(--radius);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
z-index: 10;
pointer-events: auto;
}
.info-tooltip::after {
content: '';
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border: 6px solid transparent;
border-top-color: var(--color-text);
}
.info-tip-wrapper:hover .info-tooltip {
display: block;
}
.info-tooltip a {
display: inline-block;
margin-top: 0.35rem;
color: #93c5fd;
text-decoration: none;
font-weight: 600;
}
.info-tooltip a:hover {
text-decoration: underline;
}
.recommendation {
border-top: 1px solid var(--color-border);
padding-top: 1rem;
}
.recommendation h3 {
margin: 0 0 0.75rem;
font-size: 1rem;
color: var(--color-text);
}
.rec-method {
font-size: 0.75rem;
font-weight: 400;
color: var(--color-text-muted);
}
.rec-row {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.375rem 0;
}
.rec-label {
font-size: 0.875rem;
color: var(--color-text-muted);
}
.rec-value {
font-weight: 600;
font-size: 0.95rem;
color: var(--color-secondary);
}
.empty-message {
color: var(--color-text-muted);
font-size: 0.95rem;
line-height: 1.5;
}