/* Signed-out pages: a single card centered on the page, like Google's sign-in. */

.auth-layout {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--surface);
}

.auth-layout__main {
  width: 100%;
  max-width: 450px;
}

.auth-card {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  padding: 48px 40px 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  outline: none;
}

.auth-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--ink-2);
  font-size: 22px;
}

.auth-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
  text-align: center;
  text-wrap: balance;
}

.auth-card__subtitle {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.auth-card__body {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 4px;
  margin-top: 32px;
}

.auth-card__text {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 20px;
}

.auth-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

.auth-card__actions > :only-child {
  margin-left: auto;
}

.auth-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue);
}

.auth-card__icon .ms {
  font-size: 28px;
}

.auth-card__icon[data-tone="bad"] {
  background: var(--danger-wash);
  color: var(--danger);
}

/* The email chip Google shows once an account is chosen. */
.account-chip {
  display: flex;
  justify-self: center;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 3px 12px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 14px;
  font-weight: 500;
}

.account-chip .ms {
  color: var(--ink-2);
  font-size: 22px;
}

.account-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 24px 8px 0;
  color: var(--ink-2);
  font-size: 12px;
}

.auth-card .empty-state {
  margin: auto 0;
  padding: 0;
  border: 0;
}

.auth-card__view,
.auth-step,
.auth-card__form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.auth-card__view {
  outline: none;
}

.auth-card__text--center {
  text-align: center;
}

.auth-card__inline-link {
  justify-self: start;
  margin: 4px 0 0 -8px;
}

/*
 * Longer forms (profile setup): on a desktop the card widens into two columns, like Google's
 * account creation. The heading and email stay on the left while the form fills the right.
 * On narrower screens everything stacks in one column.
 */
.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}

.auth-split__intro {
  display: grid;
  align-content: start;
}

.auth-split__caption {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.auth-split__note {
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}

.auth-split__intro .photo-picker {
  justify-self: center;
}

.auth-split .auth-card__body {
  gap: 0;
  margin-top: 0;
}

@media (min-width: 900px) {
  .auth-layout--wide {
    background: var(--surface-alt);
  }

  .auth-layout--wide .auth-layout__main {
    max-width: 1040px;
  }

  .auth-layout--wide .auth-card {
    min-height: 0;
    padding: 36px 40px 32px;
    border-color: transparent;
    border-radius: 28px;
  }

  .auth-layout--wide .auth-card__brand {
    justify-content: flex-start;
    margin-bottom: 24px;
  }

  .auth-split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 56px;
  }

  .auth-split__intro {
    position: sticky;
    top: 24px;
    align-self: start;
  }

  .auth-split .auth-card__title {
    font-size: 36px;
    line-height: 44px;
    text-align: left;
  }

  .auth-split .auth-card__subtitle,
  .auth-split__caption,
  .auth-split__note {
    text-align: left;
  }

  .auth-split .account-chip,
  .auth-split__intro .photo-picker {
    justify-self: start;
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .auth-layout {
    justify-content: flex-start;
    padding-inline: 0;
  }

  .auth-card {
    min-height: 0;
    padding: 24px 24px 36px;
    border: 0;
  }
}

/*
 * Answering a question without an account.
 *
 * It sits in the signed-out card like the other pages here, but it is read rather than filled in:
 * the question first, what it is about under it, then the conversation and a box to answer in.
 */
.reply {
  display: grid;
  gap: 24px;
  text-align: left;
}

.reply__shop {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.reply__title {
  margin: 4px 0 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}

.reply__job {
  margin: 2px 0 0;
  color: var(--ink-2);
}

.reply__question {
  padding: 20px;
  border-radius: 8px;
  background: var(--surface-alt);
}

.reply__body {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.reply__asked {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.reply__subtitle {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.reply__list,
.reply__files,
.reply__thread {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reply__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--grid);
  border-radius: 4px;
}

.reply__size {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* The shop's words on the left, the customer's own on the right, as a conversation reads. */
.reply__turn {
  max-width: 80%;
  padding: 12px 16px;
  border: 1px solid var(--grid);
  border-radius: 12px;
  background: var(--surface);
}

.reply__turn--yours {
  margin-left: auto;
  border-color: transparent;
  background: var(--surface-alt);
}

.reply__from {
  margin: 0 0 4px;
  color: var(--ink-3);
  font-size: 12px;
}

.reply__said,
.reply__attached {
  margin: 0;
  white-space: pre-wrap;
}

.reply__attached {
  margin-top: 8px;
}

.reply__empty,
.reply__closed {
  margin: 0;
  color: var(--ink-2);
}

.reply__form {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--grid);
}

.reply__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* The file box itself is replaced by the label around it, the way the composer does it. */
.reply__attach input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reply__expiry {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}
