/* sz_flipbook — colours follow the Simonswerk site (teal accent, light grey band) */
.flipbook {
  --fb-accent: #009999;
  --fb-accent-ink: #007a7a;
  --fb-ink: #1a1a1a;
  --fb-muted: #6b6b6b;
  --fb-band: #f3f4f4;
  --fb-gap: 1rem;
  --fb-shadow: 0 18px 40px rgba(0, 0, 0, .22);

  color: var(--fb-ink);
}

/* the site wraps every content element with spacing utilities (py-4__8 py-lg-8__0) that use !important —
   a viewer needs far less breathing room, so this scoped override has to use !important as well */
.section.ce-szflipbook_flipbook { padding-top: 1rem !important; padding-bottom: 2rem !important; }

.flipbook__title--sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.flipbook__download { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1.1rem; border: 1px solid var(--fb-accent); border-radius: 999px; color: var(--fb-accent); font-weight: 600; text-decoration: none; transition: background-color .2s, color .2s; }
.flipbook__download:hover, .flipbook__download:focus-visible { background: var(--fb-accent); color: #fff; }

/* stage: full-width light band, book centred */
.flipbook__stage, .flipbook__toolbar, .flipbook__thumbs { user-select: none; -webkit-user-select: none; }
.flipbook__stage { background: var(--fb-band); padding: clamp(.75rem, 1.5vw, 1.25rem) 0; }
.flipbook__stage-inner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; }
.flipbook__bookwrap { position: relative; width: 100%; margin: 0 auto; }
.flipbook__book { position: relative; width: 100%; max-width: 1400px; margin: 0 auto; }
.flipbook__book .flipbook__page { background: #fff; overflow: hidden; }
.flipbook__book .flipbook__page[data-density="hard"] { background: #f8f8f8; }
.flipbook__img, .flipbook__pagelink { display: block; width: 100%; height: 100%; object-fit: contain; }
.flipbook__img { user-select: none; -webkit-user-drag: none; pointer-events: none; }
.flipbook--ready .flipbook__pagelink { pointer-events: none; }
.flipbook__page--linked { cursor: pointer; }
.flipbook__pagelink::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 0 var(--fb-accent); transition: box-shadow .2s; pointer-events: none; }
.flipbook__page--linked:hover .flipbook__pagelink::after, .flipbook__pagelink:focus-visible::after { box-shadow: inset 0 0 0 3px var(--fb-accent); }
.flipbook__pagelink { position: relative; }

/* StPageFlip containers */
.stf__parent { margin: 0 auto; }
.stf__block { filter: drop-shadow(var(--fb-shadow)); }
.stf__item { -webkit-tap-highlight-color: transparent; }

/* no-JS: stack pages */
.flipbook__book--nojs { display: flex; flex-direction: column; align-items: center; gap: var(--fb-gap); }
.flipbook__book--nojs .flipbook__page { width: 100%; max-width: 720px; box-shadow: var(--fb-shadow); }
.flipbook__book--nojs .flipbook__img { height: auto; }
.flipbook:not(.flipbook--ready) .flipbook__nav,
.flipbook:not(.flipbook--ready) .flipbook__toolbar,
.flipbook:not(.flipbook--ready) .flipbook__thumbs { display: none; }

/* controls */
.flipbook__nav, .flipbook__tool, .flipbook__zoom-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; padding: 0; border-radius: 50%;
  border: 1px solid var(--fb-accent); background: #fff; color: var(--fb-accent);
  cursor: pointer; transition: background-color .2s, color .2s, opacity .2s, transform .2s;
}
.flipbook__nav:hover, .flipbook__tool:hover { background: var(--fb-accent); color: #fff; }
.flipbook__nav:active { transform: scale(.94); }
.flipbook__nav:disabled, .flipbook__tool:disabled { opacity: .3; cursor: default; background: #fff; color: var(--fb-accent); }
.flipbook:focus { outline: none; }
.flipbook:focus-visible .flipbook__book { outline: 2px solid var(--fb-accent); outline-offset: 6px; }
.flipbook__nav:focus-visible, .flipbook__tool:focus-visible, .flipbook__thumb:focus-visible, .flipbook__zoom-close:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 3px; }

.flipbook__toolbar { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 1rem 0 .75rem; }
.flipbook__toolbar-sep { width: 1px; height: 1.5rem; background: #d5d7d7; margin: 0 .25rem; }
.flipbook__status { min-width: 11ch; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

.flipbook__thumbs { display: flex; gap: .75rem; overflow-x: auto; padding: .5rem .25rem 1rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.flipbook__thumb { position: relative; flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 2px; background: none; cursor: pointer; scroll-snap-align: center; transition: border-color .2s, transform .2s; }
.flipbook__thumb img { display: block; width: 72px; height: auto; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.flipbook__thumb:hover { transform: translateY(-2px); }
.flipbook__thumb[aria-current="true"] { border-color: var(--fb-accent); }
.flipbook__thumb-no { position: absolute; right: -2px; bottom: -2px; padding: 0 .35rem; font-size: .7rem; line-height: 1.4; color: #fff; background: var(--fb-accent); border-radius: 2px 0 0 0; opacity: 0; transition: opacity .2s; }
.flipbook__thumb:hover .flipbook__thumb-no, .flipbook__thumb[aria-current="true"] .flipbook__thumb-no { opacity: 1; }

/* inline zoom layer (over the book, same size) */
.flipbook__zoomlayer { position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; overflow: auto; cursor: grab; background: var(--fb-band); scrollbar-width: thin; z-index: 1; }
.flipbook__zoomlayer[hidden] { display: none; }
.flipbook__zoomlayer.is-panning { cursor: grabbing; user-select: none; }
.flipbook__zoomcanvas { display: flex; margin: 0 auto; box-shadow: var(--fb-shadow); }
.flipbook__zoomimg { display: block; flex: 0 0 auto; background: #fff; user-select: none; -webkit-user-drag: none; }
.flipbook__zoomlevel { min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; color: var(--fb-muted); }
.flipbook--zoomed .flipbook__nav { opacity: .35; }
.flipbook__stage-inner { position: relative; }

.flipbook__empty { padding: var(--fb-gap) 0; color: var(--fb-muted); }

@media (max-width: 767.98px) {
  .flipbook__stage-inner { grid-template-columns: minmax(0, 1fr); }
  .flipbook__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2.5rem; height: 2.5rem; }
  .flipbook__nav:active { transform: translateY(-50%) scale(.94); }
  .flipbook__nav--prev { left: .25rem; }
  .flipbook__nav--next { right: .25rem; }
  /* toolbar in two rows: page navigation | zoom, download, fullscreen — the first separator becomes the line break */
  .flipbook__toolbar { flex-wrap: wrap; row-gap: .75rem; }
  .flipbook__tool { flex-shrink: 0; }
  .flipbook__toolbar-sep:first-of-type { flex-basis: 100%; height: 0; margin: 0; background: none; }
}

/* fullscreen (real API and CSS fallback share the same class) */
.flipbook__viewer { background: #fff; }
/* stylelint-disable-next-line selector-no-vendor-prefix -- Safari only implements the prefixed fullscreen pseudo-class */
.flipbook__viewer:fullscreen, .flipbook__viewer:-webkit-full-screen, .flipbook--fullscreen .flipbook__viewer {
  position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; overflow: hidden; background: var(--fb-band);
}
.flipbook--fullscreen .flipbook__stage { flex: 1 1 auto; display: flex; align-items: center; padding: 1rem 0; min-height: 0; }
.flipbook--fullscreen .flipbook__stage-inner { width: 100%; }
.flipbook--fullscreen .flipbook__toolbar { margin: .5rem 0 .25rem; }
.flipbook--fullscreen .flipbook__thumbs { padding-bottom: .5rem; }
.flipbook-fullscreen-active { overflow: hidden; }
.flipbook__ico-exit, .flipbook--fullscreen .flipbook__ico-enter { display: none; }
.flipbook--fullscreen .flipbook__ico-exit { display: block; }

/* close (×): leaves the catalog and returns to the list; navigating also ends full screen.
   Anchored to the bookwrap (JS sizes it to the book), centred on the top-right corner of the page. */
.flipbook__close { display: inline-flex; position: absolute; top: 0; right: 0; transform: translate(50%, -50%); z-index: 3; width: 3rem; height: 3rem; padding: 0; border-radius: 50%; border: 1px solid var(--fb-accent); background: #fff; color: var(--fb-accent); cursor: pointer; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.flipbook__close:hover, .flipbook__close:focus-visible { background: var(--fb-accent); color: #fff; }
.flipbook__close:focus-visible { outline: 2px solid var(--fb-accent); outline-offset: 3px; }
@media (max-width: 767.98px) { .flipbook__close { width: 2.5rem; height: 2.5rem; } }


/* embed (?embed=1, inside the Download Center popup iframe): no site chrome, the viewer fills the frame */
.flipbook-embed body { margin: 0; background: #fff; }
.flipbook-embed .flipbook-page { padding: 1.5rem 0 0; }
.flipbook-embed .flipbook__stage { padding-top: clamp(1.5rem, 3vw, 2.25rem); }

/* list */
.flipbook-list { margin-bottom: 4rem; }
/* fixed-width cards wrapping as many per row as fit (5 at 1400 px, 6 from ~1800 px), every row centred — flex, not grid,
   so an incomplete last row is centred too; the project's Bootstrap build has no spacing utilities */
.flipbook-list__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 4rem 3rem; }
.flipbook-card { flex: 0 0 200px; display: flex; flex-direction: column; align-items: center; gap: .5rem; color: inherit; text-decoration: none; text-align: center; }
.flipbook-card__cover { display: block; width: 100%; aspect-ratio: 210 / 297; object-fit: cover; box-shadow: var(--fb-shadow, 0 18px 40px rgba(0, 0, 0, .22)); background: #eee; transition: transform .25s; }
@media (max-width: 575.98px) { .flipbook-list__grid { gap: 3rem 2rem; } .flipbook-card { flex-basis: calc(50% - 1rem); } } /* always two per row, down to 320 px */
.flipbook-card:hover .flipbook-card__cover { transform: translateY(-4px); }
.flipbook-card__title { font-weight: 700; }
.flipbook-card__cta { color: #009999; font-weight: 600; text-decoration: underline; }
