/* The account pages: /konto, /zaproszenie/<token>, /paruj. */

.acc-top {
  width: 100%;
  max-width: 27rem;
  text-align: center;
  margin-bottom: 1rem;
}

.acc-top__brand {
  display: inline-block;
  font-size: 2.1rem;
  text-decoration: none;
  padding: 0.2rem 0.4rem;
}

.acc {
  animation: rise-in 0.3s ease both;
}

.acc-wait {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}

/* ---- headings and text */
.acc-hello {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
}

.acc-hello__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.95rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.acc-hello__name {
  color: var(--honey);
}

.acc-lead {
  text-wrap: balance;
  color: var(--mist);
  font-size: 1rem;
}

.acc-text {
  font-size: 1rem;
}

.acc-text + .acc-text {
  margin-top: 0.6rem;
}

.acc-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.acc-card__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1.1;
}

.acc-card__sub {
  font-family: var(--text);
  font-weight: 600;
  font-size: 1rem;
  color: var(--cream);
}

label.acc-card__sub {
  display: block;
}

.acc-center {
  text-align: center;
}

.acc-sep {
  border: 0;
  height: 0.1em;
  margin: 0.2rem 0;
  background: var(--ink-3);
}

.acc-small {
  font-size: 0.9rem;
  color: var(--mist);
}

.acc-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.acc-actions--row {
  flex-direction: row;
  align-self: stretch;
}

.acc-actions--row > .btn {
  flex: 1 1 0;
}

.acc-status:empty {
  display: none;
}

.acc-status .note {
  animation: pop-in 0.2s ease both;
}

/* ---- a field with its button on one row */
.acc-inline {
  display: flex;
  gap: 0.6rem;
}

.acc-inline > .field {
  flex: 1 1 auto;
  min-width: 0;
}

.acc-inline > .btn {
  flex: none;
}

.field.acc-codefield {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  padding-left: 0.22em;
  padding-right: 0;
}

.field.acc-codefield::selection {
  background: var(--honey);
  color: var(--ink);
}

.field.acc-codefield::placeholder {
  color: var(--ink-4);
}

/* ---- the pairing code of this device */
.pair-box {
  align-items: center;
  text-align: center;
  border-top: 0.3em solid var(--honey);
}

.pair-code {
  font-family: var(--display);
  font-size: clamp(2.6rem, 14vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0.08em;
  color: var(--honey);
  white-space: nowrap;
  animation: pop-in 0.3s ease both;
}

.pair-code--big {
  font-size: clamp(2.8rem, 15vw, 3.8rem);
}

.qr {
  width: min(11.5rem, 32vh);
  max-width: 70%;
  aspect-ratio: 1;
  padding: 0.7rem;
  border-radius: 0.9rem;
  background: #fff;
  color: #000;
}

.qr > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.qr--missing {
  display: none;
}

.pair-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--mist);
  font-size: 0.95rem;
}

.pair-wait .spinner {
  width: 1.3rem;
  height: 1.3rem;
  border-width: 0.2rem;
}

.acc-addr {
  color: var(--cream);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- lists (devices, rooms, people, invitations) */
.acc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.acc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  min-height: 3.6rem;
}

.acc-row + .acc-row {
  border-top: 0.1em solid var(--ink-3);
}

.acc-row__icon {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--ink-3);
  color: var(--honey);
}

.acc-row__icon > svg {
  width: 1.45rem;
  height: 1.45rem;
}

.acc-row__body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.acc-row__title {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.acc-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  color: var(--mist);
  font-size: 0.88rem;
}

.acc-row > .btn {
  flex: none;
  min-height: 3rem;
  min-width: 6.6rem;
  padding-left: 0.8em;
  padding-right: 0.8em;
}

.acc-room {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--honey);
  flex: none;
  min-width: 4.6rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12em 0.6em;
  border-radius: 99em;
  background: var(--ink-4);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}

.tag--me {
  background: var(--honey);
  color: var(--ink);
}

.tag--screen {
  background: var(--a);
  color: var(--ink);
}

/* A button that asks once more before it acts. */
.btn.is-confirming {
  --face: var(--coral);
  --rim: var(--coral-deep);
  --label: var(--ink);
  font-weight: 700;
  box-shadow: 0 var(--edge) 0 var(--rim);
}

/* ---- a link to copy */
.linkbox {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.8rem;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: inset 0 0 0 0.12em var(--ink-4);
  animation: pop-in 0.25s ease both;
}

.linkbox__url {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  overflow-wrap: anywhere;
  word-break: break-all;
  user-select: all;
}

.linkbox__row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.linkbox__row > .btn {
  flex: none;
  min-height: 3rem;
}

.linkbox__row > .acc-small {
  flex: 1 1 auto;
}

/* ---- today's AI use */
.meter {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.meter__head {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  font-weight: 500;
}

.meter__value {
  color: var(--mist);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.meter__track {
  height: 0.75rem;
  border-radius: 99em;
  background: var(--ink);
  box-shadow: inset 0 0 0 0.1em var(--ink-4);
  overflow: hidden;
}

.meter__fill {
  height: 100%;
  border-radius: 99em;
  background: var(--good);
}

.meter__fill--high {
  background: var(--honey);
}

.meter__fill--full {
  background: var(--coral);
}

.acc-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.acc-foot > .btn {
  min-height: 3rem;
  min-width: 15rem;
}

/* ---- the done state of a pairing */
.acc-done {
  align-items: center;
  text-align: center;
  border-top: 0.3em solid var(--good);
}

.acc-done__mark {
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--good);
  color: var(--ink);
  box-shadow: 0 0.25rem 0 var(--good-deep);
  animation: pop-in 0.3s ease both;
}

.acc-done__mark > svg {
  width: 2.3rem;
  height: 2.3rem;
}

@media (min-width: 900px) {
  .page > .acc {
    max-width: 30rem;
  }
}
