Files
pdga-rating/public/css/players.css
T
Samuel Enocsson b51c47dc4c fix: address mobile UI review findings (#16)
- Hide desktop .card-section on mobile, add .m-search-input with same
  HTMX attrs for mobile course search (fixes horizontal overflow)
- Remove dead layoutCount var and .m-layouts-pill block in course-cards
- Remove dead 768px breakpoints from players.css (table hidden at 880px)
- Move .mobile-section-head inside else-block for empty state in both
  ratings-cards and course-cards (fixes section head showing on empty)
- Add tabindex, role=button, aria-expanded, onkeydown to .m-card and
  .m-course-card; toggle aria-expanded in JS toggle functions
- Fix data-history attribute to use <%=  (HTML-escaped) instead of <%-
- Convert var to const/let in all new/changed JS blocks
2026-05-22 21:27:05 +02:00

361 lines
7.5 KiB
CSS

/* ═══════════════════════════════════════════════════
Players Page
═══════════════════════════════════════════════════ */
/* ── (Add player now uses .btn-primary from shared.css) ── */
/* ── Mobile helpers ───────────────────────────── */
.mobile-only {
display: none;
}
/* ── Rating values ────────────────────────────── */
.rating-value {
font-variant-numeric: tabular-nums;
}
.pdga-number {
color: var(--text-muted);
font-size: 13px;
font-variant-numeric: tabular-nums;
}
.positive {
color: var(--green);
}
.negative {
color: var(--red);
}
.neutral {
color: var(--text-muted);
}
.rating-change {
font-weight: 600;
font-size: 13px;
font-variant-numeric: tabular-nums;
}
.predicted-value {
position: relative;
display: inline-block;
font-variant-numeric: tabular-nums;
}
.difference {
font-weight: 600;
}
/* ── Chart ────────────────────────────────────── */
.chart-container {
width: 100%;
height: 300px;
margin: 10px 0;
border: 1px solid var(--border);
border-radius: var(--radius-md);
background: var(--surface-1);
overflow: hidden;
}
.chart-title {
text-align: center;
font-weight: 600;
font-size: 14px;
margin-bottom: 10px;
color: var(--text-primary);
}
.loading-chart {
display: flex;
justify-content: center;
align-items: center;
height: 200px;
color: var(--text-muted);
font-size: 13px;
}
.chart-tooltip {
position: fixed;
background: var(--navy-900);
color: var(--text-inverse);
padding: 8px 12px;
border-radius: var(--radius-sm);
font-size: 12px;
font-family: var(--font-mono);
pointer-events: none;
z-index: 10000;
display: none;
white-space: nowrap;
box-shadow: var(--shadow-lg);
}
/* ── Tooltips ─────────────────────────────────── */
.std-dev-tooltip {
position: absolute;
background: var(--navy-900);
color: var(--text-inverse);
padding: 6px 10px;
border-radius: var(--radius-sm);
font-size: 12px;
font-family: var(--font-mono);
pointer-events: none;
z-index: 10000;
display: none;
white-space: nowrap;
box-shadow: var(--shadow-lg);
font-weight: 400;
}
/* ── Debug Icon ───────────────────────────────── */
.debug-icon:hover {
opacity: 1 !important;
color: var(--accent) !important;
}
/* ── Debug Modal ──────────────────────────────── */
.debug-modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(15, 23, 42, 0.5);
backdrop-filter: blur(4px);
z-index: 10001;
display: none;
justify-content: center;
align-items: center;
}
.debug-content {
background: var(--surface-1);
border-radius: var(--radius-lg);
padding: 24px;
max-width: 640px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
box-shadow: var(--shadow-overlay);
position: relative;
}
.debug-header {
font-weight: 700;
font-size: 16px;
margin-bottom: 16px;
color: var(--text-primary);
padding-bottom: 12px;
border-bottom: 1px solid var(--border);
}
.debug-log {
font-family: var(--font-mono);
background: var(--surface-2);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 16px;
font-size: 12px;
line-height: 1.6;
white-space: pre-line;
color: var(--text-primary);
}
.debug-close {
position: absolute;
top: 12px;
right: 16px;
font-size: 22px;
color: var(--text-muted);
cursor: pointer;
background: none;
border: none;
padding: 4px;
border-radius: var(--radius-sm);
transition: color var(--transition), background var(--transition);
line-height: 1;
}
.debug-close:hover {
color: var(--text-primary);
background: var(--surface-3);
}
/* ── Add Player Modal ─────────────────────────── */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(15, 23, 42, 0.5);
backdrop-filter: blur(4px);
z-index: 10001;
display: none;
justify-content: center;
align-items: center;
}
.modal-content {
background: var(--surface-1);
border-radius: var(--radius-lg);
padding: 0;
max-width: 480px;
width: 90%;
box-shadow: var(--shadow-overlay);
position: relative;
overflow: hidden;
}
.modal-header {
font-weight: 700;
font-size: 17px;
padding: 20px 24px;
color: var(--text-primary);
border-bottom: 1px solid var(--border);
}
.modal-body {
padding: 24px;
font-size: 14px;
color: var(--text-secondary);
line-height: 1.6;
}
.modal-footer {
padding: 16px 24px;
border-top: 1px solid var(--border);
display: flex;
justify-content: flex-end;
gap: 8px;
background: var(--surface-2);
}
.modal-close {
position: absolute;
top: 12px;
right: 16px;
font-size: 24px;
color: var(--text-muted);
cursor: pointer;
background: none;
border: none;
line-height: 1;
padding: 4px;
border-radius: var(--radius-sm);
transition: color var(--transition), background var(--transition);
}
.modal-close:hover {
color: var(--text-primary);
background: var(--surface-3);
}
.btn-cancel {
background: var(--surface-3);
color: var(--text-primary);
}
.btn-cancel:hover {
background: var(--border);
}
.btn-confirm {
background: var(--green);
}
.btn-confirm:hover {
background: #059669;
}
/* ── Target Rating Calculator ─────────────────── */
.target-rating-icon {
color: var(--accent);
}
#target-rating-form .form-row {
display: flex;
flex-direction: column;
gap: 4px;
margin-bottom: 12px;
}
#target-rating-form .form-row label {
font-size: 0.9em;
}
#target-rating-form .form-row input {
padding: 6px 8px;
}
#target-rating-form .form-actions {
display: flex;
justify-content: flex-end;
margin-top: 8px;
}
.target-rating-result {
margin-top: 16px;
padding-top: 12px;
border-top: 1px solid var(--border);
}
.target-rating-result .target-summary div {
margin-bottom: 6px;
}
.target-rating-result .warning {
color: var(--down);
margin-top: 8px;
}
.target-rating-result .error {
color: var(--red);
}
.target-rating-result .muted {
color: var(--text-muted);
font-size: 0.9em;
}
.target-rating-result .loading {
color: var(--text-muted);
}
.target-rating-result .no-history-prompt {
display: flex;
flex-direction: column;
gap: 12px;
align-items: flex-start;
}
.target-rating-result .sensitivity {
margin-top: 12px;
padding-top: 12px;
border-top: 1px dashed var(--border);
}
.target-rating-result .sensitivity-heading {
font-size: 0.9em;
color: var(--text-muted);
margin-bottom: 4px;
}
.target-rating-result .sensitivity-row {
font-variant-numeric: tabular-nums;
padding-left: 12px;
}
.target-rating-result .sensitivity-row.is-target {
font-weight: 600;
}