/* The dialog shares the public storefront fonts, jacket and purchase controls. */
.book-panel {
  --panel-navy: var(--navy, #091e32);
  --panel-ink: var(--text, #102238);
  --panel-red: var(--red, #d50938);
  --panel-muted: #455c70;
  --panel-rule: #d7e1e9;
  width: min(1000px, calc(100% - 48px));
  max-width: none;
  height: fit-content;
  max-height: min(880px, calc(100dvh - 48px));
  border: 1px solid #9eafbe;
  border-radius: 12px;
  box-shadow: 0 24px 90px #03142370;
  background: #fff;
  color: var(--panel-ink);
  font: 400 18px/1.45 Abel, 'Arial Narrow', sans-serif;
}
.book-panel::backdrop { background: #041728bd; backdrop-filter: blur(4px); }
.book-panel-toolbar {
  min-height: 54px;
  padding: 5px 16px;
  border-color: #ffffff26;
  background: var(--panel-navy);
  color: #fff;
}
.book-panel-toolbar button, .book-panel-toolbar button:hover { color: #fff; background: transparent; }
.book-panel-toolbar button[data-book-back] { font-size: 17px; }
.book-panel-toolbar button:hover { text-decoration: underline; text-underline-offset: 4px; }
.book-panel-toolbar .book-panel-close { display: grid; place-items: center; width: 38px; min-width: 44px; height: 44px; padding: 0; font: 400 30px/1 Abel, sans-serif; }
.book-panel-toolbar .book-panel-close:hover { border-radius: 6px; background: #fff2; text-decoration: none; }
.book-panel-toolbar button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.book-panel-scroll { flex: 0 1 auto; background: white; }
.book-inspector {
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(0, 1.25fr);
  align-items: stretch;
  background: #fff;
  color: var(--panel-ink);
  overflow-wrap: anywhere;
}
.book-inspector-art {
  --jacket-width: clamp(160px, 19vw, 237px);
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  align-self: start;
  min-height: 100%;
  padding: 32px 28px;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 60% 34%, #3b566a, #18374d 50%, #0a2033);
}
.book-inspector-art::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url('assets/route-lines.svg') 83% 50% / auto 85% no-repeat;
  opacity: .3;
  pointer-events: none;
}
.book-inspector-copy { min-width: 0; padding: clamp(22px, 3vw, 38px); }
.book-inspector p { margin: 0; }
.book-inspector .book-inspector-edition {
  color: var(--panel-muted);
  font: 400 12px/1.35 Abel, 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: .17em;
}
.book-inspector-edition span { margin: 0 5px; color: #7790a3; }
.book-inspector-edition::after { content: ''; display: block; width: 35px; height: 3px; margin: 7px 0 12px; background: var(--panel-red); }
.book-inspector h1 {
  margin: 0;
  color: var(--panel-ink);
  font: 700 clamp(36px, 3.6vw, 55px)/1.01 var(--heading, 'Roboto Condensed', 'Arial Narrow', sans-serif);
  letter-spacing: -.025em;
}
.book-inspector #book-title:focus { outline: none; }
.book-inspector .book-inspector-byline { margin-top: 6px; color: var(--panel-ink); font-size: 17px; }
.book-inspector .book-inspector-description { margin-top: 13px; color: var(--panel-muted); font-size: 18px; line-height: 1.42; }
.book-inspector .book-inspector-purchase { margin: 17px 0 0; padding: 15px 0 0; border-top: 1px solid var(--panel-rule); }
.book-inspector-purchase p { margin: 6px 0; font-size: 17px; line-height: 1.4; }
.book-inspector-purchase .manual-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 11px;
  margin: 0;
  color: var(--panel-ink);
  font: 650 36px/1.1 var(--heading, 'Roboto Condensed', 'Arial Narrow', sans-serif);
}
.book-inspector-purchase .manual-price small { margin: 0; color: var(--panel-muted); font: 400 17px/1.3 Abel, sans-serif; }
.book-inspector-purchase .sales-price-note { margin: 3px 0 0; color: var(--panel-muted); font-size: 15px; }
.book-inspector-purchase .sales-buy-row,
.book-inspector-purchase [data-checkout-state] form { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; margin: 10px 0 4px; }
.book-inspector-purchase .manual-button, .book-inspector-purchase button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  width: auto;
  min-height: 47px;
  padding: 10px 19px;
  margin: 0;
  border: 1px solid var(--panel-red);
  border-radius: 7px;
  background: var(--panel-red);
  color: #fff;
  font: 400 18px/1.35 Abel, sans-serif;
  text-decoration: none;
}
.book-inspector-purchase .manual-button:hover, .book-inspector-purchase button:hover { border-color: #ae092e; background: #ae092e; color: #fff; }
.book-inspector-purchase .manual-button-secondary, .book-inspector-purchase .btn-outline-secondary {
  background: white;
  border-color: #a9b9c6;
  color: var(--panel-ink);
}
.book-inspector-purchase .manual-button-secondary:hover, .book-inspector-purchase .btn-outline-secondary:hover { background: #f1f5f8; border-color: #758da1; color: var(--panel-ink); }
.book-inspector-sample, .book-inspector-page, .book-inspector-contents li a, .book-inspector-purchase [data-checkout-state] > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 6px;
  color: #a70e30;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.book-inspector-sample:hover, .book-inspector-page:hover, .book-inspector-contents li a:hover { text-decoration-thickness: 2px; }
.book-inspector-purchase .sales-terms { margin: 0; font-size: 15px; color: var(--panel-muted); }
.book-inspector-purchase .sales-terms > summary { display: list-item; list-style-position: inside; padding: 4px 0; cursor: pointer; }
.book-inspector-purchase .manual-terms, .book-inspector-purchase .manual-notice {
  max-width: 100%;
  padding: 11px 14px;
  margin: 9px 0;
  background: #f0f4f7;
  border-left: 3px solid #71879a;
  color: var(--panel-ink);
  font-size: 16px;
  line-height: 1.45;
}
.book-inspector-purchase .manual-accept { margin: 12px 0; }
.book-inspector-purchase .manual-accept input { accent-color: var(--panel-red); }
.book-inspector .book-inspector-format { margin: 7px 0 0; color: var(--panel-muted); font-size: 14px; line-height: 1.45; }
.book-inspector-contents { margin: 18px 0 0; border-block: 1px solid var(--panel-rule); }
.book-inspector-contents > summary {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 49px;
  padding: 7px 0;
  list-style: none;
  cursor: pointer;
}
.book-inspector-contents > summary::-webkit-details-marker { display: none; }
.book-inspector-contents > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  flex: none;
  margin: 0 3px 4px 2px;
  border: solid #526e84;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.book-inspector-contents[open] > summary::after { transform: rotate(225deg); margin-block: 4px 0; }
.book-inspector-contents > summary span { font: 650 20px/1.3 var(--heading, 'Roboto Condensed', 'Arial Narrow', sans-serif); }
.book-inspector-contents > summary small { margin-left: auto; color: var(--panel-muted); font-size: 15px; }
.book-inspector-contents ol { margin: 0; padding: 0; list-style: none; }
.book-inspector-contents li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--panel-rule); line-height: 1.35; }
.book-inspector-contents li > div { min-width: 0; }
.book-inspector-contents li small { display: block; color: var(--panel-muted); font-size: 14px; }
.book-inspector-contents li a { flex: none; font-size: 15px; }
.book-inspector-page { margin-top: 4px; font-size: 16px; }
.book-panel .book-inspector :is(a, button, input, summary):focus-visible { outline: 3px solid var(--panel-red); outline-offset: 3px; }

@media (min-width: 701px) {
  .book-inspector-art { position: relative; display: block; overflow: clip; align-self: stretch; min-height: 350px; }
  .book-inspector-art > .shelf-jacket {
    position: sticky;
    top: 28px;
    margin: clamp(12px, 5vh, 48px) auto 0;
  }
}
@media (max-width: 750px) {
  .book-panel { width: 100vw; max-width: 100%; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .book-panel-toolbar { padding: calc(4px + env(safe-area-inset-top)) 12px 4px; }
}
@media (max-width: 700px) {
  .book-inspector { display: block; }
  .book-inspector-art { --jacket-width: 94px; position: relative; min-height: 0; padding: 14px 25px; }
  .book-inspector-art::before { background-position: 66% 40%; background-size: auto 180%; }
  .book-inspector-copy { padding: 19px 21px max(20px, env(safe-area-inset-bottom)); }
  .book-inspector h1 { font-size: clamp(32px, 8vw, 40px); }
  .book-inspector-edition::after { margin: 4px 0 9px; }
  .book-inspector .book-inspector-description { margin-top: 9px; font-size: 17px; }
  .book-inspector .book-inspector-purchase { margin-top: 12px; padding-top: 11px; }
  .book-inspector-contents { margin-top: 13px; }
}
@media (forced-colors: active) {
  .book-panel { border: 1px solid CanvasText; }
  .book-inspector-art::before { display: none; }
  .book-inspector-purchase .manual-button { border: 2px solid ButtonText; }
}
