/* The account control beside every view's switch, the Play with friends button
   and a game's own link to it, the account menu, the thumbs and the toast. */

.account {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--face, system-ui, sans-serif);
}
.account__signin,
.account__me,
.account__guest {
  font: inherit;
  font-size: 0.82rem;
  color: inherit;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  border-radius: 2rem;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.account__me {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}
.account__guest {
  cursor: default;
}
.account__signin:hover,
.account__me:hover {
  border-color: currentColor;
}
.account__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  z-index: 90;
  min-width: 15rem;
  display: grid;
  padding: 0.4rem;
  background: #1c1723;
  border: 1px solid #2b2334;
  border-radius: 0.7rem;
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.5);
}
.account__who {
  margin: 0.3rem 0.5rem 0.1rem;
  font-weight: 700;
  color: #f3eef7;
}
.account__who span,
.account__stat {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #a99db6;
}
.account__stat {
  margin: 0 0.5rem 0.4rem;
}
.account__item {
  font: inherit;
  font-size: 0.88rem;
  text-align: start;
  color: #f3eef7;
  background: none;
  border: 0;
  border-radius: 0.4rem;
  padding: 0.45rem 0.5rem;
  text-decoration: none;
  cursor: pointer;
}
.account__item:hover,
.account__item:focus-visible {
  background: #241d2d;
}
.account__danger {
  color: #f87171;
}

.thumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
}
.thumbs__pair {
  display: inline-flex;
  gap: 0.35rem;
}
/* What everyone thinks: quiet, beside the buttons. */
.thumbs__count {
  font-size: 0.82em;
  opacity: 0.75;
  white-space: nowrap;
}
.thumbs__count:empty {
  display: none;
}
/* After a thumbs down: why, if the player wants to say. */
.thumbs__why {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  flex-basis: 100%;
}
.thumbs__why[hidden] {
  display: none;
}
.thumbs__why-label {
  font-size: 0.82em;
  opacity: 0.75;
}
.thumbs .thumbs__reason {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 1rem;
  filter: none;
}
.thumbs .thumbs__reason[aria-pressed='true'] {
  border-color: #ffb43d;
  background: rgba(255, 180, 61, 0.16);
}
.thumbs button {
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.35rem 0.55rem;
  color: inherit;
  background: transparent;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: 0.5rem;
  cursor: pointer;
  filter: grayscale(0.7);
}
.thumbs button[aria-pressed='true'] {
  filter: none;
  border-color: #ffb43d;
  background: rgba(255, 180, 61, 0.16);
}
/* Love this!: two thumbs up, one leaning on the other. */
.thumbs__double {
  display: inline-flex;
}
.thumbs__double span:first-child {
  transform: rotate(-12deg);
}
.thumbs__double span + span {
  margin-inline-start: -0.5em;
  transform: rotate(10deg) translateY(-0.12em);
}

.account-toast {
  position: fixed;
  left: 50%; /* centred: stays physical */
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 95;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 0.9rem;
  color: #f3eef7;
  background: #1c1723;
  border: 1px solid #2b2334;
  border-radius: 0.7rem;
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.5);
  font: 0.9rem/1.4 var(--face, system-ui, sans-serif);
}
.account-ask {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.7rem;
  max-width: 34rem;
}
.account-kept {
  flex-basis: 100%;
}
.account-link {
  font: inherit;
  color: #ffb43d;
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.account {
  gap: 0.5rem;
}

/* Play with friends: the one light button in every view's corner, so the way
   into a session is never more than a glance away. The four seat colours on
   it are the players'. */
.friends-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding-block: 0.36rem 0.36rem; padding-inline: 0.45rem 0.95rem;
  border-radius: 2rem;
  background: #f3eef7;
  color: #0c0910;
  font-family: var(--face, system-ui, sans-serif);
  font-size: 0.84rem;
  line-height: 1.2;
  font-variation-settings: 'wdth' 100, 'wght' 780;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25), 0 0.4rem 1.2rem rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.friends-cta:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0.6rem 1.4rem rgba(0, 0, 0, 0.4), 0 0 1.6rem rgba(243, 238, 247, 0.18);
}
.friends-cta .friends-emblem {
  flex: none;
  width: 1.45rem;
  height: 1.45rem;
  padding: 0.2rem;
  border-radius: 50%;
  background: #0c0910;
}
.friends-cta:focus-visible {
  outline: 2px solid #ffb43d;
  outline-offset: 3px;
}

/* A game's own way in: beside its Play, in every view's details. */
.friends-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding-block: 0.6rem 0.6rem; padding-inline: 0.7rem 1.05rem;
  border-radius: 0.7rem;
  /* From the text colour, so it reads in the dark views and the light ones. */
  background: color-mix(in srgb, currentColor 7%, transparent);
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  color: inherit;
  font-family: var(--face, system-ui, sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  font-variation-settings: 'wdth' 100, 'wght' 720;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.friends-link:hover {
  background: color-mix(in srgb, currentColor 13%, transparent);
  border-color: color-mix(in srgb, currentColor 55%, transparent);
}
.friends-link .friends-emblem {
  flex: none;
}
.friends-link:focus-visible {
  outline: 2px solid #ffb43d;
  outline-offset: 2px;
}


/* The sign-in sheet (account/signin.js): every way into an account. */
.signin {
  width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  box-sizing: border-box;
  padding: 1.1rem 1.2rem 1rem;
  color: #f3eef7;
  background: #1c1723;
  border: 1px solid #2b2334;
  border-radius: 1rem;
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, 0.6);
  font-family: var(--face, system-ui, sans-serif);
}
.signin::backdrop {
  background: rgba(4, 3, 8, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.signin__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.signin__head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.signin__close {
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  color: #a99db6;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.signin__why,
.signin__small,
.signin__status {
  margin: 0.6rem 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #c9bfd4;
}
.signin__status:empty {
  display: none;
}
.signin__adult {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0.8rem 0;
  font-size: 0.92rem;
  cursor: pointer;
}
.signin__adult input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #ffb43d;
}
.signin__providers,
.signin__email,
.signin__passkeys {
  display: grid;
  gap: 0.5rem;
  margin: 0.8rem 0;
}
.signin__provider,
.signin__action {
  font: inherit;
  font-size: 0.92rem;
  min-height: 2.6rem;
  padding: 0.5rem 0.9rem;
  color: #f3eef7;
  background: #2a2233;
  border: 1px solid #3a3045;
  border-radius: 0.6rem;
  cursor: pointer;
  text-align: center;
}
.signin__provider:hover,
.signin__action:hover,
.signin__provider:focus-visible,
.signin__action:focus-visible {
  border-color: #ffb43d;
}
.signin__action--quiet {
  background: transparent;
}
.signin__action:disabled {
  opacity: 0.6;
  cursor: progress;
}
.signin__input {
  font: inherit;
  font-size: 0.95rem;
  min-height: 2.6rem;
  box-sizing: border-box;
  width: 100%;
  padding: 0.45rem 0.7rem;
  color: #f3eef7;
  background: #110d16;
  border: 1px solid #3a3045;
  border-radius: 0.6rem;
}
.signin__small a {
  color: #ffb43d;
}

/* Cloudflare Turnstile, shown only when it asks the player to click (account/device.js). */
.turnstile-box {
  position: fixed;
  inset-inline-end: 1rem;
  bottom: 1rem;
  z-index: 400;
}
