/* Copyright (c) 2026 Brownie, LLC. All rights reserved. */

/*
 * The Awards view (views/awards.ts): end-of-season awards for girls and
 * boys, on screen and printed. Also the rail's Awards link, indented under
 * Progress. Builds on the shared pieces in styles.css, team.css,
 * team-roster.css and app.css.
 */

.rail-link.is-sub {
  min-height: 34px;
  padding-left: 28px;
  font-size: 0.92rem;
}

/* The header and each gender's section, with the same space between as other pages. */
.awards-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.awards-scope {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-weight: 600;
}

.awards-choices {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 20px;
  margin-block: 12px;
}

.awards-choices .form-field {
  margin: 0;
}

.awards-choice-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Each award is a card; two or three side by side on a wide screen. */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 16px;
}

.awards-card {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-surface);
}

.awards-card h3 {
  margin: 0;
}

.awards-rule {
  margin: 4px 0 10px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
}

.awards-table {
  width: 100%;
}

.awards-table tr.is-first > * {
  background: var(--color-ten-soft);
}

.awards-place {
  white-space: nowrap;
}

/* Shown only on paper, above each gender's page. */
.awards-print-heading {
  display: none;
}

/*
 * Printing: the awards alone, one page per gender when it fits, with the
 * group, season, format and kind at the top of each. No rail, tabs, bars,
 * choices or buttons.
 */
@media print {
  body.app:has(.awards-view) {
    display: block;
    background: #fff;
    color: #000;
  }

  body.app:has(.awards-view) [data-shell],
  body.app:has(.awards-view) .demo-banner,
  body.app:has(.awards-view) .page-footer,
  body.app:has(.awards-view) .toast,
  .awards-view .awards-header {
    display: none !important;
  }

  body.app:has(.awards-view) .app-content,
  .awards-view {
    display: block;
    padding: 0;
  }

  .awards-view .panel {
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: none;
  }

  .awards-print-heading {
    display: block;
    margin: 0 0 4px;
    font-weight: 600;
  }

  .awards-gender + .awards-gender {
    break-before: page;
  }

  .awards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .awards-card {
    break-inside: avoid;
    padding: 8px 10px;
    border-color: #999;
    background: none;
  }

  .awards-table tr.is-first > * {
    background: none;
    font-weight: 700;
  }

  /* Black on white whatever the screen's theme, so dark mode never prints. */
  .awards-view,
  .awards-view * {
    border-color: #999 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #000 !important;
  }

  .awards-view a {
    text-decoration: none;
  }

  .awards-view .table-scroller {
    overflow: visible;
  }
}
