.library-access-actions,
.mobile-book-access-actions {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  pointer-events: auto;
}

.library-access-actions {
  top: .5rem;
  left: .5rem;
}

.library-access-actions--with-collection {
  top: 2.85rem;
}

.mobile-book-access-actions {
  top: 10px;
  right: 10px;
  left: 10px;
}

.library-access-action {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  padding: .35rem .65rem;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgb(0 0 0 / .18);
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.library-access-action--trial {
  background: rgb(229 244 233 / .96);
  color: #23613a;
}

.library-access-action--buy {
  background: rgb(238 232 255 / .96);
  color: #5535a5;
}

.library-access-action:hover {
  filter: brightness(.97);
}

.library-access-action:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

.library-access-action:disabled {
  cursor: wait;
  opacity: .65;
}

.library-access-dialog {
  width: min(28rem, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: #171512;
  box-shadow: 0 1.5rem 3rem rgb(15 23 42 / .28);
}

.library-access-dialog::backdrop {
  background: rgb(17 24 39 / .7);
}

.library-access-dialog-panel {
  padding: 1.25rem;
}

.library-access-dialog-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.library-access-dialog-message {
  margin: .5rem 0 0;
  color: #4b5563;
  font-size: .875rem;
  line-height: 1.5;
}

.library-access-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.25rem;
}

.library-access-dialog-button {
  min-height: 2.25rem;
  padding: .45rem .8rem;
  border: 0;
  border-radius: .5rem;
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
}

.library-access-dialog-button--cancel {
  background: white;
  color: #111827;
  box-shadow: 0 0 0 1px #d1d5db inset;
}

.library-access-dialog-button--confirm {
  background: #4f46e5;
  color: white;
  box-shadow: 0 1px 2px rgb(0 0 0 / .15);
}

.library-access-dialog-button:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

.mobile-library-access-choice-actions {
  display: grid;
  gap: .55rem;
  margin-top: 1.25rem;
}

.mobile-library-access-choice-button {
  width: 100%;
  min-height: 2.65rem;
}

.mobile-library-access-choice-button--trial {
  background: #e5f4e9;
  color: #23613a;
}

.mobile-library-access-choice-button--buy {
  background: #4f46e5;
  color: white;
}

.mobile-library-access-choice-button--cancel {
  margin-top: .15rem;
}
