/* Pages outside of the atelier: the library, signing in, settings, sharing, people */
.plain-bar {
  gap: 6px !important;
  justify-content: flex-start !important;
  padding: 10px 20px !important;

  form {
    display: contents;
  }
}

.plain-bar__brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  font-family: var(--font-book);
  font-size: 19px;
  font-weight: 600;
  gap: 8px;
  letter-spacing: -0.01em;

  img {
    opacity: 0.85;
  }
}

/* Breadcrumbs of the plain pages, in the manner of the atelier's context bar */
.breadcrumbs {
  align-items: center;
  color: var(--ink-3);
  display: flex;
  font-size: 12.5px;
  gap: 8px;

  a {
    color: var(--ink-3);
    font-weight: 500;
    text-decoration: none;

    &:hover {
      color: var(--ink);
    }
  }

  strong {
    color: var(--ink);
    font-weight: 600;
  }

  img {
    opacity: 0.6;
  }
}

/* A card to sign in, sign up, or fill in a form */
.panel {
  --panel-border-color: transparent;

  background: var(--surface);
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 28px;

  h1 {
    font-family: var(--font-book);
    font-size: 32px;
    font-weight: 500;
    letter-spacing: -0.015em;
  }

  .product__logo {
    block-size: 64px;
    inline-size: 64px;
    opacity: 0.85;
  }
}

.input--actor {
  --input-background: var(--bg-flat);

  padding: 4px 10px;

  .input {
    background: transparent;
    border: 0;
    box-shadow: none !important;
  }

  img {
    block-size: 18px;
    inline-size: 18px;
    opacity: 0.45;
  }
}

/* Settings of a book */
.settings {
  margin-inline: auto;
  max-inline-size: 760px;
  padding: 8px 0 48px;
  text-align: start;
}

.settings__header {
  margin-block: 16px 24px;
}

.settings .book__form {
  align-items: flex-start;
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  gap: 28px;
  padding: 24px;

  /* Cover on the left, its colors in a row underneath */
  > .flex:first-child {
    flex-direction: column-reverse;
    flex-shrink: 0;
    gap: 12px;
    inline-size: 180px;
  }

  fieldset {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 0;

    .btn--circle {
      --btn-size: 24px;
      --btn-border-radius: 50%;
      --btn-icon-size: 12px;

      box-shadow: inset 0 0 0 1px oklch(0% 0 0 / 0.08);
    }

    .btn--circle:has(:checked) {
      box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
    }
  }

  .book__cover {
    border-radius: 10px;
    box-shadow: var(--shadow-card);
    inline-size: 180px;
    max-block-size: none;
  }

  .translation-button,
  [data-controller~="translation"] {
    display: none;
  }

  h1 {
    font-family: var(--font-book);
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.01em;
  }

  h1 .input,
  small .input {
    font: inherit;
  }

  small {
    font-size: 14px;
  }
}

.settings .book-access {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  margin-block: 20px 0;
  padding: 20px 24px;
  text-align: start;

  h3 {
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  hr {
    display: none;
  }
}

/* History of a text: what it was, beside what it is */
#main:has(.page-edit__current) {
  inline-size: min(1100px, 100%);
}

.library:has(.page-edit__current) {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-inline-size: none;

  > section {
    background: var(--sheet);
    border-radius: var(--radius-sheet);
    box-shadow: var(--shadow-md);
    color: var(--ink-1);
    font-family: var(--font-book);
    font-size: 17px;
    line-height: 1.6;
    padding: 28px 32px;
  }

  header {
    font-family: var(--font-sans);
    margin-block-end: 18px;
  }
}
