/* Club settings, the Clube and Pessoas e convites sections (A-Clube and
   A-Definicoes boards). Each section is grey headings over white lists; what
   a line changes opens in a dialog (.form-dialog). */

/* Two columns on a laptop, one on a phone. */
.setp-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; margin-top: 26px; }
.setp-stack { display: grid; gap: var(--space-5); min-width: 0; }
.setp-columns > section { min-width: 0; }
.setp-help { margin: 10px var(--space-1) 0; }

/* Only on a laptop, or only on a phone. */
.setp-narrow { display: none; }

/* The club's line: its crest on a navy tile, its name, and "Mudar emblema"
   (a button on a laptop; on a phone a link under the name, in the line's
   second grey line). */
.setp-crest-line { gap: 18px; padding: 18px 22px; }
.setp-crest { display: flex; flex: none; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: var(--radius-lg); background: var(--navy); color: var(--on-navy); }
.setp-crest .crest-image { width: 44px; height: 44px; object-fit: contain; }
.setp-crest-line .row-title { font-size: 1.0625rem; font-weight: 700; }
.setp-crest-line .row-main small:has(> .text-btn) { display: none; }
.setp-club .row-item:not(.setp-crest-line) { padding: 16px 22px; }
.setp-club .row-item .row-title { font-weight: 700; }
.setp-club .row-action .text-btn { min-height: 0; font-size: var(--text-label); font-weight: 600; }
.setp-from { color: var(--muted); font-size: var(--text-small); }

/* Who records live games: three choices on a white sheet, the chosen one
   pale blue with a blue edge, then the team note and Guardar. */
.setp-recording { padding: var(--space-2); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.setp-recording fieldset { display: grid; margin: 0; padding: 0; border: 0; }
.setp-choice { display: flex; flex-direction: row; align-items: flex-start; gap: var(--space-3); margin: 0; padding: 14px; border-radius: var(--radius); font-weight: 400; cursor: pointer; }
.setp-choice:has(input:checked) { background: var(--blue-soft); box-shadow: inset 0 0 0 1.5px var(--blue); }
.setp-choice input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--blue); }
.setp-choice span { display: grid; gap: 2px; }
.setp-choice strong { font-size: var(--text-body); }
.setp-choice small { color: var(--muted); font-size: var(--text-small); line-height: 1.45; }
.setp-recording-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 14px 10px; }
.setp-recording-foot .helper { margin: 0; }
.setp-recording-foot .btn { flex: none; width: auto; }

@media (max-width: 700px) {
  .setp-columns { grid-template-columns: minmax(0, 1fr); margin-top: 22px; }
  .setp-wide { display: none; }
  /* The boards keep the arrow on a phone too. */
  .setp-columns .row-item > svg { display: block; }
  .setp-narrow { display: inline; }
  .setp-crest-line { align-items: flex-start; gap: 14px; padding: 16px; }
  .setp-crest { width: 56px; height: 56px; }
  /* "Mudar emblema" is a link under the club's name. */
  .setp-crest-line .row-main small:has(> .text-btn) { display: block; justify-self: start; }
  .setp-crest-line .text-btn.setp-narrow { display: inline-flex; font-size: var(--text-label); font-weight: 600; }
  .setp-crest-line .row-action { display: none; }
  .setp-club .row-item:not(.setp-crest-line) { padding: 14px 16px; }
  .setp-recording-foot { flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .setp-recording-foot .btn { width: 100%; height: 48px; }
}

/* Pessoas e convites: the people a little wider than the invitations. The
   invite button sits in the page head on a laptop and over the lists on a
   phone. */
.setp-people { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.setp-invite-phone { display: none; }

/* A line whose title opens a dialog (shared/_row's `dialog`): the title in
   bold, as the board draws it. An invitation has no arrow. */
:is(.setp-person, .setp-invitation) .row-open { font-weight: 700; }
.setp-columns .row-item.setp-invitation > svg { display: none; }
.setp-person .avatar { width: 36px; height: 36px; font-size: var(--text-small); }
.setp-person .avatar.setp-me { background: var(--navy); color: var(--yellow); }
.setp-team { white-space: nowrap; }
.setp-team .badge.team { font-size: 11px; }
.setp-team .setp-wide { margin-left: 4px; }
/* A person's club roles: grey pills, as the board draws them. */
.setp-person .row-aside { gap: 6px; }
.setp-person .row-aside .badge { padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--muted); font-size: 12px; font-weight: 600; }
.setp-people .section-title a { color: var(--blue); white-space: nowrap; }
.setp-people .section-title h2 { white-space: nowrap; }
.setp-invitation { align-items: flex-start; }
.setp-invitation .row-main small { display: block; }
/* A long email ends in an ellipsis; the dialog shows it whole. */
.setp-invitation .row-head { display: block; min-width: 0; }
.setp-invitation .row-title { display: block; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.setp-expired { color: var(--ink); font-weight: 600; }

/* Inside a dialog: the parts one under the other. */
.setp-dialog h2.setp-email { overflow-wrap: anywhere; }
.setp-dialog .helper { margin: 0 0 var(--space-2); }
.setp-subhead { margin: var(--space-5) 0 var(--space-3); font-size: var(--text-subheading); }
.setp-assignments { margin-bottom: var(--space-4); box-shadow: inset 0 0 0 1px var(--line); }
.setp-assign { display: grid; gap: var(--space-3); }
.setp-assign .btn { justify-self: start; }
.setp-link { display: grid; gap: var(--space-2); margin: var(--space-4) 0; }
.setp-remove { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--line-soft); }
.setp-close { margin-top: var(--space-5); }

@media (max-width: 700px) {
  /* On a phone: Convidar alguém, then the invitations, then the people. */
  .setp-people { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-5); }
  .head-actions:has(> .setp-invite-head) { display: none; }
  .setp-invite-phone { display: flex; order: 1; margin-bottom: -2px; }
  .setp-invite-phone .btn { flex: 1; height: 48px; font-size: var(--text-body); }
  .setp-people .setp-help { display: none; }
  .setp-invitations { order: 2; }
  .setp-members { order: 3; }
  .setp-person .row-aside { display: none; }
  .setp-person .setp-team { margin-right: 4px; }
  .setp-invitation { align-items: center; }
}
