/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Maturation stage indicator: a small triangle filling the top-right corner
   of an athlete's avatar (right angle on the corner itself), reflecting their latest maturation assessment.
   Sized in em so it scales with the avatar (avatar-sm, avatar-xl, ...).
   A slightly bigger white triangle behind it (::before) outlines the
   diagonal edge, so the colour still stands out over a photo — same idea
   as the white ring around the app's maturation dot. */
.avatar-maturation-below,
.avatar-maturation-within,
.avatar-maturation-above {
  position: relative;
  overflow: hidden;
}

.avatar-maturation-below::after,
.avatar-maturation-within::after,
.avatar-maturation-above::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0.9em 0.9em 0;
  border-color: transparent;
}

.avatar-maturation-below::before,
.avatar-maturation-within::before,
.avatar-maturation-above::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 calc(0.9em + 3px) calc(0.9em + 3px) 0;
  border-color: transparent #FFFFFF transparent transparent;
}

.avatar-maturation-below::after { border-right-color: #D63939; }
.avatar-maturation-within::after { border-right-color: #206BC4; }
.avatar-maturation-above::after { border-right-color: #2FB344; }

/* Weekly training board (training_session_batches#index): one row per
   category, one column per weekday, each cell holding the day's lançamentos. */
.board-table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; }
.board-table th, .board-table td { border: 1px solid var(--tblr-border-color); vertical-align: top; }
.board-table thead th {
  background: var(--tblr-bg-surface-secondary); text-align: center; padding: .5rem; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .02em; color: var(--tblr-secondary-color);
}
.board-table thead th.today { background: #e8f1fc; color: var(--tblr-primary); }
.board-category-cell {
  background: var(--tblr-bg-surface-secondary); font-weight: 600; padding: .6rem .75rem; width: 130px;
  white-space: nowrap;
}
.board-cell { padding: 6px; }
.board-cell-inner { display: flex; flex-direction: column; gap: 6px; min-height: 64px; }

.board-entry {
  border-radius: 6px; padding: 6px 8px; font-size: .8rem; line-height: 1.25;
  border: 1px solid var(--tblr-border-color); background: var(--tblr-bg-surface); text-decoration: none;
  display: block; color: inherit;
}
.board-entry:hover { border-color: var(--tblr-primary); }
.board-entry-training { border-left: 3px solid #206bc4; }
.board-entry-match { border-left: 3px solid #ae3ec9; }
.board-entry-cancelled { border-left: 3px solid #adb5bd; background: var(--tblr-bg-surface-secondary); opacity: .75; }
.board-entry-conflict { background: #fff4e6; }
.board-entry .entry-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.board-entry .entry-time { font-weight: 600; }
.board-entry .entry-local { color: var(--tblr-secondary-color); }
.board-entry .entry-strike { text-decoration: line-through; color: var(--tblr-secondary-color); }

.board-add {
  border: 1px dashed var(--tblr-border-color); border-radius: 6px; background: transparent;
  color: var(--tblr-secondary-color); font-size: .85rem; padding: 10px; width: 100%;
  display: flex; align-items: center; justify-content: center; min-height: 64px;
}
.board-add:hover { border-color: var(--tblr-primary); color: var(--tblr-primary); background: var(--tblr-bg-surface-secondary); }

/* A dashboard stat card that's also a link to wherever that number comes
   from — the whole card is the click target, not just its text. */
.stat-card { display: block; color: inherit; text-decoration: none; transition: border-color .1s ease, box-shadow .1s ease; }
.stat-card:hover { border-color: var(--tblr-primary); box-shadow: 0 1px 6px -2px rgba(0,0,0,.15); }
