/* The current user's profile (docs/adr/0021). */

.profile-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 2.5rem;
    padding: 1.25rem;
    border: 0.125rem solid var(--border);
}

.profile-card__details {
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    gap: 0.35rem;
}

.profile-card__name {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-card__label {
    font-weight: 700;
}

.profile-card__hint,
.profile-settings__hint {
    font-size: 0.875rem;
    opacity: 0.85;
}

.profile-section + .profile-section {
    margin-top: 2.5rem;
}

.profile-section h2 {
    margin-bottom: 0.75rem;
}

/*
 * My teams on phones (docs/adr/0095): a folded <details> per team, just its
 * name until opened, rather than a table to scroll sideways; the table from
 * 48rem. Each is hidden at the other's widths, so screen readers meet one.
 */
.profile-teams__list {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.profile-team {
    border: 0.125rem solid var(--border);
    background-color: var(--white);
}

.profile-team__summary {
    display: flex;
    align-items: baseline;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.profile-team__heading {
    font-size: 1rem;
    font-weight: 700;
}

.profile-team__body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.profile-team__facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem 1rem;
    align-items: baseline;
}

.profile-team__facts dt {
    font-size: 0.875rem;
    font-weight: 700;
}

/* Known as's link is just under the summary, too close for a smaller target (WCAG 2.5.8): 24px tall whatever the font. */
.profile-team__facts a {
    display: inline-block;
    line-height: 1.5rem;
}

@media (max-width: 47.99rem) {
    .profile-teams__table {
        display: none;
    }
}

@media (min-width: 48rem) {
    .profile-teams__list {
        display: none;
    }
}

/*
 * Settings (partly a mock; docs/adr/0027): a form per section, a line
 * between each. A form's one child is its section, so the section spaces
 * what's in it, as a form spaces its fields.
 */
.profile-settings + .profile-settings {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 0.125rem solid var(--border);
}

.profile-settings__section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Links to Settings' sections, at the top of its long page (docs/adr/0120). */
.settings-jump {
    margin-bottom: 1.5rem;
}

.settings-jump__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 1.25rem;
    font-weight: 700;
}

/*
 * Settings' sections after Profile (docs/adr/0076): full-width bands, grey
 * and white in turn, as an event's Formations is (docs/adr/0067).
 */
.profile-band {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
    background-color: var(--white);
    color: var(--black);
}

.profile-band--grey {
    background-color: var(--row-stripe);
}

/* Its band sets it apart, so no line and gap of its own. */
.profile-band .danger-zone {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

/* The ways to sign in (docs/adr/0075): as wide as the forms around it, a row each, its button at the end. */
.profile-settings--ways {
    max-width: 32rem;
}

.sign-in-ways {
    display: grid;
    gap: 0.5rem;
}

.sign-in-ways__way {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    padding: 0.75rem 1rem;
    border: 0.125rem solid var(--black);
    background-color: var(--white);
    color: var(--black);
}

/* The provider's own logo, or an envelope for email (docs/adr/0077). */
.sign-in-ways__name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.sign-in-ways__logo {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.sign-in-ways__status {
    font-size: 0.875rem;
}

.sign-in-ways__way form {
    margin-left: auto;
}

/* The address we email them at, and a new one (docs/adr/0102): as wide as the forms around it. */
.profile-settings--email {
    max-width: 32rem;
}

/* Default positions per sport (docs/adr/0023). */
.profile-card__sports {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 0.75rem;
    align-items: center;
    margin-top: 0.35rem;
}

.profile-card__sports dt {
    font-size: 0.875rem;
}

.sport-positions {
    max-width: 40rem;
    border: 0.125rem solid var(--border);
    background-color: var(--white);
}

.sport-positions + .sport-positions {
    margin-top: 0.5rem;
}

.sport-positions__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
}

/* A sport one of their teams plays. */
.sport-positions--mine {
    border-color: var(--black);
}

.sport-positions--mine .sport-positions__summary {
    background-color: var(--tertiary);
}

.sport-positions__name {
    font-size: 1rem;
    font-weight: 700;
}

.sport-positions__current {
    margin-left: auto;
    font-size: 0.875rem;
}

.sport-positions__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
}

/* Dates you're away (docs/adr/0049). */
.away {
    display: grid;
    gap: 0.5rem;
    max-width: 32rem;
    margin-bottom: 1rem;
}

.away__period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.75rem;
    border: 0.125rem solid var(--black);
}

.away__dates {
    font-weight: 700;
}

.away__fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
}

.away__fields .form__input {
    max-width: 12rem;
}

/* After signing up: passing bintold on (docs/adr/0059). */
.welcome-share {
  max-width: 40rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 0.125rem solid var(--black);
}

.welcome-share p {
  margin: 0.5rem 0 1rem;
}

/* Agreeing to changed terms (docs/adr/0084): the tick box after what's changed, then the way out. */
.welcome-terms {
  margin-top: 2rem;
}

.welcome-terms__out {
  max-width: 40rem;
  margin-top: 1.5rem;
}
