/* assets/css/awards.css — trophies.php and the Awards section of player-profile.php. ADDITIVE: theme.css and archive.css are not touched and win
   for everything they already style. The pages use the site's native building blocks as they are:
     tabs / pills .... archive_subnav (theme.css section 3), .arc-seasonbar / .arc-seasonform (archive.css)
     tables .......... .divTablesorter > table.sortable.arc-table (sticky head + first column, stripes, sort arrow, .lnvhv-reset-sort)
     buttons ......... .SubmitButtonSmall, .STHSSelect
   This file only adds what those have no class for: the trophy card, its drawn icon, the winner / finalist badges, the award index and the
   per-level headings of the profile section. Every class is prefixed awd-. Colours are the site's team-colour variables (RGB triplets set by
   inc-header.php), used exactly as theme.css / archive.css do; the trophy icons are inline SVG coloured here (no image file to lose). */

.awd-page, .awd-profile {
  --awd-accent: rgb(var(--teamcolorprimary));
  --awd-line: rgb(210, 210, 210);
  --awd-soft: #F0F1F2;
  --awd-muted: rgb(111, 111, 111);
  --awd-gold: #B8860B;
  --awd-gold-hi: #E0B21E;
  --awd-silver: #7A8590;
  --awd-silver-hi: #B4BDC6;
}
.awd-page *, .awd-page *::before, .awd-page *::after,
.awd-profile *, .awd-profile *::before, .awd-profile *::after { box-sizing: border-box; }
.awd-page a:focus-visible, .awd-profile a:focus-visible, .awd-page button:focus-visible, .awd-page select:focus-visible,
.awd-page summary:focus-visible { outline: 3px solid var(--awd-accent); outline-offset: 2px; }

.awd-intro { margin: 12px 10px 0; color: var(--awd-muted); max-width: 70ch; }
.awd-back { margin: 14px 10px 0; }
.awd-note { margin: 10px 10px 0; font-size: .9rem; }

/* filters ------------------------------------------------------------------------------ */
.awd-bar { row-gap: 10px; }
.awd-filters { flex-wrap: wrap; row-gap: 8px; }
.awd-filters .STHSSelect { min-width: 130px; max-width: 100%; }

/* groups + cards ----------------------------------------------------------------------- */
.awd-cards { margin: 6px 0 0; }
/* card grid: AT MOST 3 cards per row. A track is never narrower than 350 px (what a card's table needs: who, team, four stat columns) nor than a third of the row (minus a pixel of rounding slack),
   so a wide row holds three, a narrower one two, a phone one; an incomplete last row keeps the same track width (auto-fill, not auto-fit). */
.awd-grid { display: grid; gap: 16px; margin: 8px 10px 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(350px, calc((100% - 32px) / 3 - 1px))), 1fr)); }
.awd-grid > .awd-card { margin: 0; min-width: 0; }
.awd-grid .awd-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 6px 12px; align-items: center; padding: 10px 12px; }
.awd-grid .awd-card__head > .awd-icon { grid-column: 1; grid-row: 1 / span 2; }
.awd-grid .awd-card__title { grid-column: 2; grid-row: 1; }
.awd-grid .awd-card__count { grid-column: 3; grid-row: 1; }
.awd-grid .awd-more { grid-column: 2 / -1; grid-row: 2; justify-self: start; }
.awd-grid .awd-table th, .awd-grid .awd-table td { padding-left: 5px; padding-right: 5px; }
/* Winner / Finalist badge above the first cell of its row (season cards have no Result column). It keeps real room above the headshot / name. */
.awd-rowtag { display: block; margin: 0 0 10px; }
/* season-card rows: vertical room around the headshot, so it never touches the row border, the badge or the text beside it.
   Every rule is prefixed .awd-card so it wins over the plain table rules further down (32 px headshot of the all-time tables). */
.awd-card .awd-table--card tbody td { padding-top: 10px; padding-bottom: 12px; vertical-align: middle; }
/* headshot beside the name; when the column is too narrow for both, the name drops UNDER the headshot instead of widening the table */
.awd-card .awd-table--card td.arc-name .awd-person { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 4px 0; }
.awd-card .awd-table--card td.arc-name img.awd-mug { width: 48px; height: 48px; margin: 2px 0; }
/* the recipient's name is the point of the card: larger and heavier than the figures beside it */
.awd-card .awd-table--card td.arc-name a, .awd-card .awd-table--card td.arc-name .awd-name { font-size: 1.1rem; font-weight: 700; line-height: 1.2; min-width: 0; white-space: normal; }   /* archive.css makes links nowrap; a long name must be able to wrap so the column can shrink instead of widening the table */
/* full team name (team trophies): wraps onto two lines rather than pushing the stat columns */
.awd-card .awd-table--card td.arc-team { line-height: 1.25; }
.awd-table--card td.arc-name, .awd-table--card td.arc-team { white-space: normal; }
.awd-table--card td.arc-name { min-width: 96px; }
.awd-group { margin: 0 0 6px; }
.lnvhv-contentmain .awd-group__title { margin: 0; padding: 20px 10px 6px; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: var(--awd-muted); }
.awd-card {
  margin: 12px 10px 16px; border: 1px solid var(--awd-line); border-radius: 6px; background: #fff; overflow: hidden;
}
.awd-card--farm { border-top: 3px solid var(--awd-silver); }
.awd-card--pro  { border-top: 3px solid var(--awd-gold); }
.awd-card--full { margin-top: 8px; }
.awd-card__head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--awd-soft); border-bottom: 1px solid var(--awd-line); }
.awd-card__title { flex: 1 1 auto; min-width: 0; }
.lnvhv-contentmain .awd-card__name { margin: 0; padding: 0; font-size: 1.05rem; line-height: 1.25; text-transform: none; color: inherit; }
.awd-card__desc { margin: 2px 0 0; color: var(--awd-muted); font-size: .9rem; }
.awd-card__count { flex: none; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--awd-line); font-weight: 700; font-variant-numeric: tabular-nums; }
.awd-more { flex: none; white-space: nowrap; text-decoration: none; }
.awd-card__empty { margin: 12px 14px; }
.awd-card .arc-tablewrap { margin: 0; }
.awd-card .arc-tabletools { margin: 8px 14px 4px; }
.lnvhv-contentmain .awd-sub { margin: 10px 14px 0; padding: 0; font-size: .95rem; color: var(--awd-muted); text-transform: uppercase; letter-spacing: .04em; }

/* trophy icon -------------------------------------------------------------------------- */
.awd-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 1px solid var(--awd-line); }
.awd-icon svg { display: block; }
.awd-icon--pro  { color: var(--awd-gold); }
.awd-icon--farm { color: var(--awd-silver); }
.awd-icon__cut { fill: #fff; }
.awd-icon--pro .awd-icon__ribbon, .awd-icon--farm .awd-icon__ribbon { opacity: .6; }
.awd-icon__handle { stroke: currentColor; }
/* real trophy photo (images/awards/{award_id}.jpg): the photos are JPGs on a SOLID BLACK background, so the tile is black too — no border, no padding,
   no white margin; the image fills the tile edge to edge (object-fit keeps it undistorted; a non-square photo is letter-boxed in the same black) */
.awd-icon--photo { width: 72px; height: 72px; padding: 0; border: 0; border-radius: 8px; background: #000; overflow: hidden; }
.awd-icon--photo img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }

/* result badges ------------------------------------------------------------------------ */
.awd-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.awd-badge--winner { background: var(--awd-gold-hi); color: #3a2b00; }
.awd-card--farm .awd-badge--winner { background: var(--awd-silver-hi); color: #1f272e; }
.awd-badge--finalist { background: var(--awd-soft); color: var(--awd-muted); border: 1px solid var(--awd-line); }
.awd-row--finalist td { color: rgb(70, 70, 70); }
.awd-table td.awd-result, .awd-table th.awd-result { white-space: nowrap; text-align: left; }
.awd-table td.arc-name { white-space: nowrap; }
.awd-table td.arc-team .arc-logo, .awd-table td.arc-team img { max-width: none; width: 24px; height: 24px; flex: none; margin: 0 6px 0 0; }
.awd-table th.arc-team, .awd-table td.arc-team { min-width: 70px; padding-left: 8px; padding-right: 8px; }
.awd-name { font-weight: 600; }
/* player headshot beside the recipient's name (trophies.php) */
.awd-person { display: inline-flex; align-items: center; gap: 8px; }
.awd-table td.arc-name img.awd-mug { flex: none; width: 32px; height: 32px; max-width: none; border-radius: 50%; object-fit: cover; object-position: center top; background: var(--awd-soft); border: 1px solid var(--awd-line); }

/* finalists block / award index -------------------------------------------------------- */
.awd-finalists { margin: 12px 14px 14px; }
.awd-finalists > summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.awd-finalists .arc-tablewrap { margin-top: 4px; }
.awd-index { margin: 4px 10px 20px; }
.awd-index ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.awd-index a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--awd-line); border-radius: 999px; background: #fff; text-decoration: none; }
.awd-index a:hover { border-color: var(--awd-accent); }
.awd-index .awd-icon { width: 30px; height: 30px; border: 0; background: transparent; }
.awd-index .awd-icon--photo { width: 30px; height: 30px; border-radius: 5px; background: #000; }

/* player profile ----------------------------------------------------------------------- */
.awd-profile .awd-level { margin: 8px 0 0; }
.lnvhv-contentmain .awd-level__title { margin: 14px 10px 0; padding: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; }
.awd-level__tag { display: inline-block; margin-right: 6px; padding: 1px 10px; border-radius: 999px; font-size: .8rem; color: #fff; background: var(--awd-gold); }
.awd-level--farm .awd-level__tag { background: var(--awd-silver); }
.awd-level__n { color: var(--awd-muted); font-weight: 400; }
.awd-profile .awd-note { margin: 10px 10px 0; }

/* small screens ------------------------------------------------------------------------ */
@media (max-width: 600px) {
  .awd-card { margin-left: 6px; margin-right: 6px; }
  .awd-card__head { flex-wrap: wrap; gap: 10px 12px; padding: 10px; }
  .awd-icon { width: 46px; height: 46px; }
  .awd-icon svg { width: 36px; height: 36px; }
  .awd-icon--photo { width: 56px; height: 56px; }
  .awd-grid { margin-left: 6px; margin-right: 6px; gap: 12px; }
  .awd-table td.arc-name img.awd-mug { width: 28px; height: 28px; }
  .awd-card .awd-table--card td.arc-name img.awd-mug { width: 40px; height: 40px; }
  .awd-card .awd-table--card td.arc-name .awd-person { gap: 4px 8px; }
  .awd-card .awd-table--card td.arc-name a, .awd-card .awd-table--card td.arc-name .awd-name { font-size: 1rem; }
  .awd-person { gap: 6px; }
  .awd-card__title { flex: 1 1 calc(100% - 70px); }
  .awd-more { margin-left: auto; }
  .awd-filters .STHSSelect { flex: 1 1 140px; }
  .awd-index a { padding-right: 10px; }
  .awd-badge { padding: 0 6px; font-size: .68rem; }
  .awd-page .awd-table th, .awd-page .awd-table td, .awd-profile .awd-table th, .awd-profile .awd-table td { padding-left: 4px; padding-right: 4px; }
  .awd-table td.awd-result, .awd-table th.awd-result { width: 1%; }
  /* Team column [logo] ABBR: its own breathing room on both sides, so the abbreviation never runs into the stat column beside it;
     long names wrap onto two lines instead of pushing the stat columns off the screen */
  .awd-page .awd-table th.arc-team, .awd-page .awd-table td.arc-team,
  .awd-profile .awd-table th.arc-team, .awd-profile .awd-table td.arc-team { min-width: 68px; padding-left: 8px; padding-right: 10px; }
  .awd-table td.arc-team .arc-logo, .awd-table td.arc-team img { width: 22px; height: 22px; margin-right: 5px; }
  .awd-page .awd-table td.arc-name { white-space: normal; min-width: 76px; }
  .awd-page .awd-table td.arc-team, .awd-page .awd-table td.arc-team a { white-space: normal; }   /* full team names (Round 14) wrap onto two lines in the history tables instead of widening them */
  .awd-table td.awd-result .awd-badge { font-size: .62rem; padding: 0 5px; }
}

@media (max-width: 380px) {
  .awd-card .awd-table--card td.arc-name img.awd-mug { width: 36px; height: 36px; }
  .awd-card .awd-table--card td.arc-name .awd-person { gap: 4px 6px; }
  .awd-card .awd-table--card td.arc-name a, .awd-card .awd-table--card td.arc-name .awd-name { font-size: .95rem; }
  .awd-page .awd-table th, .awd-page .awd-table td, .awd-profile .awd-table th, .awd-profile .awd-table td { padding-left: 3px; padding-right: 3px; }
  .awd-page .awd-table th.arc-team, .awd-page .awd-table td.arc-team,
  .awd-profile .awd-table th.arc-team, .awd-profile .awd-table td.arc-team { min-width: 60px; padding-left: 6px; padding-right: 8px; }
  .awd-table td.arc-team .arc-logo, .awd-table td.arc-team img { width: 20px; height: 20px; margin-right: 4px; }
  .awd-page .awd-table td.arc-name { min-width: 62px; }
  .awd-table td.awd-result .awd-badge { white-space: normal; text-align: center; line-height: 1.15; padding-top: 1px; padding-bottom: 1px; border-radius: 10px; }   /* "Finaliste n° 1" wraps instead of widening the column */
}
