html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* The wordmark in the navbar scales by height. */
.navbar-brand img {
  height: 28px;
  width: auto;
}

/* A validation summary with nothing in it is still an .alert — Bootstrap gives it padding, a border and a
   background, so the page opens with a bar of alarm colour and a live region announcing nothing. The
   Backoffice bundle has carried this rule from the start; these two are the stylesheets the Client sites read. */
.validation-summary-valid,
.field-validation-valid:empty {
  display: none;
}

/* The athlete in the account menu and on the profile page (#1505): their photograph, or their initials on a
   flat circle while they have none. */
.account-avatar {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

.account-initials {
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  color: var(--bs-emphasis-color);
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
}

.account-initials {
  font-size: 10px;
}

/* Every picture an athlete or a club's manager can change (_ImagePicker): the picture in its frame beside one
   button that picks a file and sends it, with the remove as a quiet text action. The file input stays in the
   page, visually hidden, so it takes the keyboard; the save button only shows, with no script, once a file is
   chosen. A photograph sits on a circle, a logo whole on a square, a main image across the section's width;
   while there is none, initials stand in on a flat tint. */
.image-picker {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas: "frame head" "frame actions";
  align-items: center;
  gap: .75rem 1.5rem;
  margin-bottom: 1.5rem;
}

/* A banner reads top to bottom: heading, picture, buttons. */
.image-picker-cover {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "frame" "actions";
  gap: 1rem;
}

.image-picker-frame {
  grid-area: frame;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  overflow: hidden;
  background: var(--bs-secondary-bg);
}

.image-picker-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-picker-placeholder {
  color: var(--bs-emphasis-color);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1;
  text-align: center;
}

.image-picker-avatar .image-picker-frame {
  border-radius: 50%;
}

.image-picker-logo .image-picker-frame {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.image-picker-logo .image-picker-frame img {
  padding: .5rem;
  object-fit: contain;
}

.image-picker-cover .image-picker-frame {
  width: 100%;
  max-width: 480px;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.image-picker-cover .image-picker-placeholder {
  color: var(--bs-secondary-color);
  font-size: .875rem;
  letter-spacing: 0;
}

.image-picker-head {
  grid-area: head;
  align-self: end;
  min-width: 0;
}

.image-picker-head > :last-child,
.image-picker-head > :nth-last-child(2):has(+ [hidden]) {
  margin-bottom: 0;
}

.image-picker-actions {
  grid-area: actions;
  align-self: start;
  min-width: 0;
}

.image-picker-title {
  margin: 0 0 .25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.image-picker-hint {
  margin: 0 0 .5rem;
  font-size: .875rem;
  color: var(--bs-secondary-color);
}

.image-picker-status {
  margin: 0 0 .5rem;
  font-weight: 600;
}

.image-picker-error {
  color: var(--bs-danger);
}

.image-picker-actions,
.image-picker-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.25rem;
}

.image-picker-actions form {
  margin: 0;
}

.image-picker-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.image-picker-upload label.btn {
  margin: 0;
}

.image-picker-input:focus-visible + label {
  outline: 3px solid var(--bs-primary);
  outline-offset: 3px;
}

form.image-picker-upload :is(.btn.image-picker-save, .image-picker-cancel, .image-picker-extra) {
  display: none;
}

.image-picker-extra {
  flex: 1 0 100%;
  order: -1;
}

.image-picker-cover .image-picker-extra {
  max-width: 480px;
}

.image-picker-extra .image-picker-hint {
  margin: .25rem 0 0;
}

form.image-picker-upload:has(.image-picker-input:valid) :is(.btn.image-picker-save, .image-picker-cancel) {
  display: inline-block;
}

form.image-picker-upload:has(.image-picker-input:valid) .image-picker-extra {
  display: block;
}

.image-picker-upload:has(.image-picker-input:valid) label.btn {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-border-color: var(--bs-border-color);
}

.image-picker-quiet {
  padding: 0;
  background: none;
  border: 0;
  color: var(--bs-secondary-color);
  font-weight: 600;
}

.image-picker-cancel:hover {
  color: var(--bs-body-color);
}

.image-picker-remove:hover {
  color: var(--bs-danger);
}

/* A club's public profile: one form, its fields in titled groups divided by a rule. */
.club-profile-title {
  margin: 0 0 .25rem;
  font-size: 1.375rem;
  font-weight: 600;
}

.club-profile-hint {
  margin: 0 0 1rem;
  font-size: .875rem;
  color: var(--bs-secondary-color);
}

.club-profile-group {
  min-width: 0;
  margin: 0 0 .5rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--bs-border-color);
}

.club-profile-group-title {
  float: left;
  width: 100%;
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.club-profile-group-title + * {
  clear: both;
}

.club-profile-subtitle {
  margin: .5rem 0 .75rem;
  font-size: .875rem;
  font-weight: 600;
}

.club-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bs-border-color);
}

/* A club's roster: its heading and season, search and export on one bar, then the table and its pager. */
.club-members-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .25rem 1rem;
  margin-bottom: 1rem;
}

.club-members-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
}

.club-members-count,
.club-members-season,
.club-members-date,
.club-members-none,
.club-members-export-help,
.club-members-range,
.club-members-gap {
  color: var(--bs-secondary-color);
}

.club-members-season {
  margin: 0;
  font-size: .875rem;
}

.club-members-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: .5rem;
}

.club-members-search {
  flex: 1 1 320px;
  max-width: 520px;
}

.club-members-search-row,
.club-members-export,
.club-members-pages,
.club-members-pages .page-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.club-members-search-row {
  flex-wrap: nowrap;
}

.club-members-export-help,
.club-members-date {
  font-size: .875rem;
}

.club-members-date {
  display: block;
}

.club-members-table .athlete-cell-label {
  display: none;
}

.club-member-name {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.club-member-avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.club-member-initials {
  background: var(--bs-secondary-bg);
  color: var(--bs-emphasis-color);
  font-size: .875rem;
  font-weight: 600;
}

.club-members-pages {
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.club-members-range {
  margin: 0;
}

.club-members-gap {
  align-self: center;
}

.club-members-pages .btn-outline-gray {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-bg: var(--bs-secondary-bg);
  --bs-btn-hover-border-color: var(--bs-border-color);
}

/* A numbered marker, and the same number beside its row in the list under the map, which is that map's key. */
.youspotit-map-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font: 600 13px/1 var(--bs-body-font-family);
}

.leaflet-marker-icon .youspotit-map-mark {
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

.map-legend {
  display: grid;
  gap: .75rem;
  padding: 0;
  list-style: none;
}

.map-legend-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: .75rem;
  align-items: start;
}

a.map-legend-row { color: inherit; text-decoration: none; }
a.map-legend-row .fw-semibold { color: var(--bs-link-color); }
a.map-legend-row:hover .fw-semibold { text-decoration: underline; }
