/* Training attendance of TTC WPAE (training.ttc-wpae.at), on top of main.css */
.tr-brand { color: #fff; text-decoration: none; font-size: 1.2rem; display: flex; gap: 0.4rem; align-items: baseline; }
.tr-brand span { color: #9cc0ff; font-weight: 600; }
.muted { color: var(--color-muted); }
.small { font-size: 0.88rem; }

.tr-sessions { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.5rem; }
.tr-session { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: center; padding: 0.85rem 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-small); color: var(--color-text); text-decoration: none; }
.tr-session:hover { border-color: var(--color-primary); }
.tr-when { font-variant-numeric: tabular-nums; color: var(--color-muted); min-width: 9.5rem; }
.tr-what { flex: 1; }
.tr-count { font-weight: 700; color: var(--color-success); }
.tr-cancelled { opacity: 0.6; }
.tr-cancelled .tr-count { color: var(--color-warning); }

.tr-summary { font-size: 1.1rem; margin: 0.5rem 0 0.2rem; }
.tr-attendance { list-style: none; padding: 0; margin: 0.8rem 0; display: grid; gap: 0.4rem; }
.tr-person { display: flex; align-items: center; gap: 0.75rem; padding: 0.45rem 0.6rem 0.45rem 1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-small); }
.tr-person.is-present { background: #eaf7ef; border-color: #b7e0c6; }
.tr-person.is-excused { background: #fff6ea; border-color: #f6d7ab; }
.tr-name { flex: 1; font-weight: 600; }
.tr-name .badge { margin-left: 0.3rem; vertical-align: middle; }
.tr-buttons { display: flex; gap: 0.4rem; margin: 0; }
.tr-btn { min-width: 4.2rem; height: 44px; border-radius: var(--radius-small); border: 1px solid var(--color-border-strong); background: #fff; font: inherit; font-weight: 700; cursor: pointer; color: var(--color-muted); }
.tr-btn.tr-present.active { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.tr-btn.tr-excused.active { background: var(--color-warning); border-color: var(--color-warning); color: #fff; }
.tr-btn:disabled { opacity: 0.6; }
.tr-candidates { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.8rem; }

.tr-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tr-tabs a { padding: 0.45rem 0.9rem; border-radius: 999px; border: 1px solid var(--color-border-strong); text-decoration: none; color: var(--color-text); background: #fff; }
.tr-tabs a.active { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }

.tr-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.tr-column { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0.8rem; }
.tr-column.tr-unassigned { background: #f8fafc; border-style: dashed; }
.tr-column h2 { font-size: 1.05rem; margin: 0 0 0.6rem; display: flex; justify-content: space-between; }
.tr-col-count { color: var(--color-muted); font-weight: 600; }
.tr-cards { list-style: none; padding: 0; margin: 0; min-height: 3rem; display: grid; gap: 0.35rem; border-radius: var(--radius-small); }
.tr-cards.drag-over { outline: 2px dashed var(--color-primary); outline-offset: 3px; background: var(--color-primary-soft); }
.tr-card { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; padding: 0.45rem 0.6rem; border: 1px solid var(--color-border); border-radius: var(--radius-small); background: #fff; cursor: grab; user-select: none; }
.tr-handle { touch-action: none; color: var(--color-muted); font-size: 1.2rem; padding: 0.2rem 0.4rem 0.2rem 0; cursor: grab; }
.tr-card-name { flex: 1; }
.tr-card.dragging { opacity: 0.4; }
.tr-card.saving { opacity: 0.6; }
.tr-ghost { position: fixed; pointer-events: none; z-index: 1000; box-shadow: 0 8px 24px rgba(0,0,0,.18); transform: rotate(2deg); }

.tr-filter { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.tr-filter label { display: flex; gap: 0.4rem; align-items: center; }
.tr-filter input, .tr-filter select { width: auto; }
.tr-stats td:nth-child(2) { color: var(--color-muted); font-size: 0.88rem; }
.tr-open { color: var(--color-warning); font-weight: 700; }
.training-site .inline-form input, .training-site .inline-form select, .tr-filter input, .tr-filter select {
  min-height: var(--control-height); padding: 0.5rem 0.75rem; font: inherit; font-size: 16px; color: var(--color-text);
  background-color: #fff; border: 1px solid var(--color-border-strong); border-radius: var(--radius-small);
}
.training-site .inline-form { align-items: center; margin: 0.6rem 0; }
.training-site .inline-form input { flex: 1 1 180px; }
.training-site .data-list { list-style: none; padding: 0; margin: 0.5rem 0; }
.training-site .data-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.nowrap { white-space: nowrap; }

/* Week overview (like the training plan on the club website) */
.tr-today { margin-bottom: 1.5rem; }
.tr-today h1 { margin-bottom: 0.6rem; }
.tr-today-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.75rem; }
.tr-today-card { display: grid; gap: 0.15rem; padding: 1rem 1.1rem; background: var(--color-surface); border: 1px solid var(--color-border); border-left: 5px solid var(--color-border-strong); border-radius: var(--radius); text-decoration: none; color: var(--color-text); }
.tr-today-card strong { font-size: 1.2rem; }
.tr-today-card .tr-state { margin-top: 0.4rem; font-weight: 700; color: var(--color-primary); }
.tr-week-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 0.5rem 0; }
.tr-week-title { margin: 0; }
.tr-week-nav { display: flex; gap: 0.4rem; }
.tr-open-note { color: var(--color-warning); font-weight: 600; margin: 0.2rem 0 0.8rem; }
.tr-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; align-items: start; }
.tr-day { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 0.75rem; display: grid; gap: 0.5rem; }
.tr-day.is-today { border: 2px solid var(--color-primary); }
.tr-day h3 { margin: 0 0 0.2rem; font-size: 1rem; color: var(--color-muted); font-weight: 600; border-bottom: 1px solid var(--color-border); padding-bottom: 0.4rem; }
.tr-day h3 span { font-size: 1.35rem; font-weight: 900; color: var(--color-navy); text-transform: uppercase; margin-right: 0.2rem; }
.tr-day.is-today h3 span { color: var(--color-primary); }
.tr-slot { display: grid; gap: 0.05rem; padding: 0.55rem 0.65rem; border-radius: var(--radius-small); background: #f3f5f8; border-left: 4px solid var(--color-border-strong); text-decoration: none; color: var(--color-text); line-height: 1.3; }
.tr-slot:hover { background: var(--color-primary-soft); }
.tr-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.tr-group { font-weight: 600; }
.tr-hall { color: var(--color-muted); font-size: 0.88rem; }
.tr-badge { justify-self: start; margin-top: 0.25rem; font-size: 0.78rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; }
.tr-badge-ok { background: #e3f4ea; color: var(--color-success); }
.tr-badge-open { background: #fff1de; color: var(--color-warning); }
.tr-badge-off { background: #eceff3; color: var(--color-muted); }
.tr-none { color: #b8c0cc; margin: 0; }
.tr-day.is-past .tr-slot:not(:hover) { opacity: 0.85; }
@media (max-width: 700px) {
  .tr-week { grid-template-columns: 1fr; }
  .tr-day:not(.is-today):has(.tr-none) { display: none; }
}
.tr-session-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.6rem; }
.tr-list-title { font-size: 1.05rem; margin: 1.4rem 0 0.3rem; }
.tr-add h3 { font-size: 1rem; margin: 1.2rem 0 0.2rem; }
.tr-guest { border-bottom: 1px solid var(--color-border); padding: 0.4rem 0 0.6rem; display: flex; flex-wrap: wrap; gap: 0 1rem; align-items: center; }
.tr-guest .inline-form { margin: 0.3rem 0; }
.tr-group-form { border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
.tr-group-form label { display: flex; gap: 0.3rem; align-items: center; }
.training-site .inline-form input[type=checkbox] { flex: none; min-height: 0; }
.tr-bulk { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tr-groups input:not([type=checkbox]) { width: 100%; min-width: 9rem; min-height: 38px; padding: 0.35rem 0.6rem; font: inherit; border: 1px solid var(--color-border-strong); border-radius: var(--radius-small); background: #fff; }
.tr-groups td { vertical-align: middle; }
.tr-groups input[type=checkbox] { width: 1.1rem; height: 1.1rem; }

/* Board: compact name chips, tap opens the group choice */
.tr-unassigned .tr-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tr-chips .tr-card { padding: 0.25rem 0.55rem; }
.tr-card { position: relative; }
.tr-pick { flex: 1; min-width: 0; }
.tr-pick summary { list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-pick summary::-webkit-details-marker { display: none; }
.tr-pick[open] summary { font-weight: 700; color: var(--color-primary); }
.tr-pick-menu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 12rem; display: grid; gap: 2px; padding: 0.35rem; margin: 0; background: #fff; border: 1px solid var(--color-border-strong); border-radius: var(--radius-small); box-shadow: 0 8px 24px rgba(16,24,40,.15); }
.tr-pick-menu button { text-align: left; font: inherit; padding: 0.45rem 0.6rem; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--color-text); }
.tr-pick-menu button:hover { background: var(--color-primary-soft); }
.tr-pick-menu button.active { font-weight: 700; color: var(--color-primary); }
.tr-column .tr-cards { min-height: 2.5rem; }
.tr-entered-by { margin: 0.2rem 0; color: var(--color-muted); }
.tr-staff { margin: 0; flex: 1; }
.tr-staff input { flex: 0 1 14rem; }
.tr-group-actions { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.tr-staff-table select { min-height: 38px; padding: 0.3rem 1.8rem 0.3rem 0.5rem; font: inherit; border: 1px solid var(--color-border-strong); border-radius: var(--radius-small); background-color: #fff; }
