/* Sign in, sign up, invitations, the clubs list and the account page. */

.invitation {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.invitation strong {
  font-size: var(--text-small);
  margin-right: 10px;
}

.invitation p {
  font-size: var(--text-small);
  color: var(--muted);
  margin: 10px 0;
}

.invitation input {
  margin: 6px 0 10px;
}

.auth-layout {
  max-width: 1300px;
  padding: 40px 6vw;
  margin: auto;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-6);
  box-shadow: 0 10px 40px #213f7c08;
}

.auth-card>p {
  font-size: var(--text-small);
  color: var(--muted);
  line-height: 1.7;
  margin: 15px 0 25px;
}

.auth-card form>label {
  margin: 20px 0 var(--space-2);
}

.auth-card .btn {
  margin-top: var(--space-5);
}

/* A narrow page of cards under the brand, on the same left edge as the
   clubs page: the admin's correction of a field's position. */
.account-page {
  display: grid;
  gap: 18px;
  max-width: 560px;
  margin: 30px 0 60px;
}

.account-page>.text-btn {
  justify-self: start;
}

.account-head h1 {
  margin-top: var(--space-2);
  font-size: 30px;
  overflow-wrap: anywhere;
}

.account-section h2 {
  margin: 0;
  font-size: var(--text-heading);
}

.account-section select {
  width: 100%;
}

.account-section .helper {
  margin-top: 10px;
}

.account-section .btn {
  margin-top: 20px;
}

.auth-layout .toast {
  left: 50%;
}

@media (max-width: 960px) {
  .auth-layout {
    padding: 30px;
  }

  .auth-card {
    padding: 25px;
  }
}

@media (max-width: 700px) {
  .auth-layout {
    padding: 25px 22px;
  }

  .auth-card {
    padding: var(--space-5);
  }

  .auth-card.centered {
    margin: 40px auto;
  }

  .auth-layout .toast {
    left: 50%;
  }
}

/* Signed-out pages, the invitation and the club link (layouts/auth): the
   entry pattern (boards A-Convite-D/-P). Laptop: a fixed navy band on the
   left with the brand at the top and the page's headline and lead at the
   bottom; the one form centred on white, 420px at most. Phone: the band on
   top with the brand and the headline, the form below on the grey page.
   Text colours stay at WCAG AA or better: var(--muted) is 6.3:1 on white. */

.auth-split {
  --auth-band: clamp(360px, 40vw, 560px);

  background: var(--surface);
}

.auth-shell {
  display: grid;
  grid-template-columns: var(--auth-band) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 44px 56px;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
}

.auth-panel .brand {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  gap: 8px;
  color: var(--on-navy);
  font-size: 22px;
}



/* Faint pitch markings behind the band (shared/pitch_markings, to scale).
   On a laptop the whole pitch, larger than the panel, tilted and off to the
   right as texture behind the headline (the first signed-out design); on a
   phone a corner of the centre circle. */
.auth-pitch,
.auth-pitch-band {
  position: absolute;
  color: rgb(255 255 255 / 12%);
  pointer-events: none;
}

.auth-pitch {
  top: 50%;
  right: -22%;
  height: 118%;
  aspect-ratio: 704 / 1102;
  color: rgb(255 255 255 / 9%);
  transform: translateY(-50%) rotate(-8deg);
}

.auth-pitch-band {
  display: none;
}

.auth-panel-copy {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 40px;
}

.auth-headline {
  margin: 0;
  font-family: var(--display);
  font-size: 64px;
  font-style: italic;
  line-height: .95;
  letter-spacing: .01em;
}

.auth-headline span {
  color: var(--yellow);
}

.auth-intro {
  max-width: 380px;
  margin: 18px 0 0;
  color: var(--on-navy-muted);
  font-size: 16px;
  line-height: 1.5;
}

.auth-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.auth-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 40px;
}

.auth-split .auth-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.auth-split .auth-card h1 {
  margin: 0 0 var(--space-3);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}

.auth-split .auth-card > p,
.auth-split .helper {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.6;
}

.auth-split .auth-card form {
  margin-top: 22px;
}

.auth-split .auth-card form > label {
  margin: 14px 0 6px;
  color: var(--ink);
  font-size: var(--text-small);
  font-weight: 600;
}

.auth-split .auth-card form > label:first-of-type {
  margin-top: 0;
}

.auth-split :is(input:not([type=checkbox], [type=submit]), select, textarea) {
  min-height: var(--control-height);
  padding: 0 12px;
  border-color: var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-body);
}

.auth-split ::placeholder {
  color: var(--faint);
}

/* A lighter focus ring than the app's: thin, blue, a little apart. */
.auth-split :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Blue would fade into the navy band (2.8:1); yellow stands out. */
.auth-split .auth-panel :focus-visible {
  outline-color: var(--yellow);
}

/* On inputs the ring sits on the border, so it reads as a 2px blue border. */
.auth-split :is(input:not([type=checkbox], [type=submit]), select, textarea):focus-visible {
  outline-offset: -1px;
}

.auth-split textarea {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.auth-split .auth-card form > .checkbox {
  align-items: flex-start;
  margin: var(--space-5) 0 var(--space-2);
  font-weight: 500;
  line-height: 1.5;
}

.auth-split .checkbox input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

@media (max-width: 800px) {
  .auth-split .checkbox input { width: 20px; height: 20px; }
}

.auth-split .auth-card form > small {
  display: block;
  color: var(--muted);
  font-size: var(--text-small);
  line-height: 1.6;
}

.auth-split .auth-card .btn {
  margin-top: 28px;
  border-radius: var(--radius);
  font-weight: 700;
}

/* The one action follows the last field with no divider and takes the
   form's width, like its fields; the bar sets the spacing, not the button. */
.auth-split .auth-card .form-actions {
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.auth-card .form-actions .btn,
.auth-split .auth-card .form-actions .btn {
  margin-top: 0;
}

.auth-split .auth-card .form-actions > .btn.primary,
.auth-split .auth-card .form-actions > form:only-child {
  flex: 1 1 100%;
}

.auth-split .auth-card .form-actions .btn.primary {
  width: 100%;
  min-height: 50px;
  font-size: 16px;
}

/* Google's sign-in under the form: "ou" centred on a thin line, then a
   button as wide as the form's own, with no extra gap from its form. */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--muted);
  font-size: var(--text-small);
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.auth-card .auth-alt form,
.auth-split .auth-card .auth-alt form {
  margin-top: 0;
}

.auth-card .auth-alt .btn,
.auth-split .auth-card .auth-alt .btn {
  width: 100%;
  min-height: 50px;
  margin-top: 0;
  font-size: 16px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
  font-size: var(--text-body);
  font-weight: 600;
}

.auth-links a,
.auth-split .auth-card > .text-btn,
.auth-split .helper a {
  color: var(--blue);
  font-weight: 600;
  text-underline-offset: 3px;
}

.auth-links a:hover,
.auth-split .auth-card > .text-btn:hover,
.auth-split .helper a:hover {
  text-decoration: underline;
}

.auth-split .auth-card > .text-btn {
  margin-top: var(--space-5);
}

.auth-split .error {
  color: var(--problem);
  font-size: var(--text-body);
}

/* Notices float over the form column, not the middle of the page. */
.auth-split .toast {
  left: calc(50% + var(--auth-band) / 2);
}

/* The language picker, quietly at the bottom of the form side. */
.auth-footer {
  display: flex;
  justify-content: flex-end;
  padding: var(--space-4) 40px;
  color: var(--muted);
  font-size: var(--text-small);
}

.auth-footer .locale-picker {
  color: var(--navy-3);
}

/* At the bottom of the page the language menu opens upward. */
.auth-footer .locale-list {
  top: auto;
  bottom: calc(100% + 6px);
}

/* Tablets and phones: the band on top, the form below on the grey page. */
@media (max-width: 860px) {
  .auth-split {
    background: var(--bg);
  }

  .auth-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }

  .auth-panel {
    padding: 18px 20px 26px;
  }

  .auth-pitch {
    display: none;
  }

  .auth-pitch-band {
    display: block;
    top: -70px;
    right: -80px;
    width: 260px;
    height: 260px;
  }

  .auth-panel-copy {
    margin-top: 22px;
    padding-top: 0;
  }

  .auth-headline {
    font-size: 40px;
  }

  .auth-intro {
    display: none;
  }

  .auth-main {
    justify-content: flex-start;
    max-width: 452px;
    padding: 20px 16px 28px;
  }

  /* 16px text keeps phones from zooming in on focus. */
  .auth-split :is(input:not([type=checkbox], [type=submit]), select, textarea) {
    font-size: 16px;
  }

  .auth-split .auth-card form {
    margin-top: 14px;
  }

  .auth-split .auth-card .form-actions .btn.primary {
    min-height: 52px;
  }

  .auth-split .toast {
    left: 50%;
  }

  .auth-footer {
    justify-content: center;
    padding: 0 16px 24px;
  }
}

/* Invitation and club link: the invited email in a quiet grey row. */
.invitation-email {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-top: 16px;
  padding: var(--space-3) 14px;
  border-radius: var(--radius);
  background: var(--bg);
  font-size: var(--text-label);
  overflow-wrap: anywhere;
}

.invitation-email span {
  color: var(--muted);
}

.auth-split .invitation-card .helper {
  margin-top: 16px;
}

.auth-split .auth-links + .helper,
.auth-split .auth-card form + .helper {
  margin-top: var(--space-4);
  font-size: var(--text-small);
}

@media (max-width: 860px) {
  .invitation-email {
    display: block;
    background: var(--surface);
    line-height: 1.3;
  }

  .invitation-email strong {
    display: block;
  }
}

/* Grid children and long privacy controls must fit the account's phone column. */
.account-page,
.account-section,
.account-section form {
  min-width: 0;
}

.account-section h3,
.account-section .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.contacts-choice .btn {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) { .account-head h1 { font-size: var(--text-title-phone); } }

/* The invitation's head (A-Convite): the club under a small shield, then who
   invites you, where, and as what. On a phone the same lines sit in the navy
   band (.entry-band), so the head here stays only for screen readers. */
.entry-crest {
  flex: none;
  color: var(--ok);
}

.entry-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.entry-head p {
  display: grid;
  margin: 0;
  overflow-wrap: anywhere;
}

.entry-head span {
  color: var(--muted);
  font-size: var(--text-small);
}

.entry-head strong {
  font-size: var(--text-heading);
}

.auth-split .auth-card h1.entry-title {
  margin: 22px 0 0;
}

.entry-title span {
  color: var(--blue);
}

.entry-band {
  display: none;
}

.entry-ask-short {
  display: none;
}

@media (max-width: 860px) {
  .entry-band {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
  }

  .entry-band p {
    display: grid;
    margin: 0;
    font-size: var(--text-label);
    line-height: 1.35;
  }

  .entry-band span {
    color: var(--on-navy-muted);
  }

  .invitation-card .entry-head,
  .auth-split .auth-card h1.entry-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .invitation-card .invitation-email {
    margin-top: 0;
  }

  .entry-help {
    text-align: center;
  }

  .entry-ask {
    display: none;
  }

  .entry-ask-short {
    display: inline;
  }

  .entry-sep {
    display: none;
  }

  .entry-expiry {
    display: block;
  }
}
