/* E-Bülten flip viewer */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap');

html, body.eb-viewer {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.eb-viewer {
  --eb-bg: #0a1628;
  --eb-chrome-h: 0px;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, #1a3050 0%, transparent 55%),
    radial-gradient(ellipse at center, #13233d 0%, #070e1a 72%);
  color: #fff;
  display: flex;
  flex-direction: column;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
}
.eb-viewer *,
.eb-viewer *::before,
.eb-viewer *::after {
  box-sizing: border-box;
}
.eb-viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  min-height: 48px;
}
.eb-viewer-top h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eb-viewer-top a {
  color: #c4a35a;
  text-decoration: none;
  font-size: 14px;
  flex-shrink: 0;
}
.eb-viewer-stage {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 8px 12px;
  position: relative;
  overflow: hidden;
  width: 100%;
}
.eb-nav-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  flex-shrink: 0;
  align-self: center;
  touch-action: manipulation;
}
.eb-nav-btn:hover { background: rgba(255,255,255,.16); }
.eb-nav-btn:disabled { opacity: .35; cursor: default; }

/* Kitap sahnesi: stage'i doldurur; A4 JS ile sığdırılır */
.eb-book {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: transparent;
  overflow: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
}
.eb-book.is-centered {
  display: flex;
  align-items: center;
  justify-content: center;
}
.eb-book-scroll {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
}
.eb-book-scaler {
  position: absolute;
  top: 0;
  left: 0;
  width: 420mm; /* çift sayfa varsayılan (masaüstü) */
  height: 297mm;
  transform-origin: top left;
  overflow: hidden;
  background: transparent;
  border-radius: 2px;
}
.eb-book-scaler.is-single {
  width: 210mm;
}
.eb-spread {
  display: flex;
  flex-direction: row;
  width: 420mm;
  height: 297mm;
  box-shadow:
    0 24px 64px rgba(0,0,0,.5),
    0 0 0 1px rgba(255,255,255,.06);
  border-radius: 2px;
  overflow: hidden;
  background: #1a1a1a;
}
.eb-book-scaler.is-single .eb-spread {
  width: 210mm;
}
.eb-spread-page {
  position: relative;
  flex: 0 0 210mm;
  width: 210mm;
  height: 297mm;
  background: #f7f5f0;
  overflow: hidden;
}
.eb-spread-page + .eb-spread-page {
  border-left: 1px solid rgba(0,0,0,.18);
  box-shadow: inset 8px 0 16px -12px rgba(0,0,0,.35);
}
.eb-spread-page.is-blank {
  background:
    linear-gradient(160deg, #ece8e0 0%, #f7f5f0 55%, #e8e4dc 100%);
}
.eb-spread-page.is-blank::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .12;
  background:
    radial-gradient(ellipse at 40% 30%, rgba(11,31,58,.35), transparent 60%);
  pointer-events: none;
}
.eb-spread-page.is-hidden {
  display: none;
}
.eb-cover-open {
  position: absolute;
  inset: 0;
  z-index: 5;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  appearance: none;
  -webkit-appearance: none;
}
.eb-cover-open[hidden] {
  display: none !important;
}
.eb-cover-open-hint {
  margin: 0 0 7%;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(7, 21, 38, 0.55);
  color: #fff;
  font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.eb-viewer--cover .eb-nav-side#ebPrev {
  opacity: 0.35;
}
.eb-spread iframe {
  width: 210mm;
  height: 297mm;
  border: 0;
  display: block;
  background: #f7f5f0;
  overflow: hidden;
  scrollbar-width: none;
}
.eb-spread iframe::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.eb-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.eb-page-label {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  letter-spacing: .02em;
  min-width: 7ch;
  text-align: center;
}
.eb-viewer-bar input[type="number"] {
  width: 64px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(0,0,0,.3);
  color: #fff;
  padding: 6px;
  font-size: 14px;
}
.eb-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 6px;
}
.eb-zoom-btn {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.eb-zoom-val {
  min-width: 4.5ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.9);
}
.eb-viewer-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.eb-viewer-actions a, .eb-viewer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}
.eb-viewer-actions a.primary {
  background: #c4a35a;
  color: #111;
  border-color: #c4a35a;
  font-weight: 600;
}

@media (max-width: 700px) {
  .eb-viewer-top {
    padding: 8px 12px;
    min-height: 44px;
  }
  .eb-viewer-top h1 {
    font-size: 15px;
  }
  .eb-viewer-stage {
    grid-template-columns: minmax(0, 1fr);
    padding: 6px 8px;
    gap: 0;
  }
  .eb-nav-btn.eb-nav-side {
    display: none;
  }
  .eb-book-scaler {
    width: 210mm;
    border-radius: 0;
  }
  .eb-spread {
    width: 210mm;
    box-shadow: 0 8px 28px rgba(0,0,0,.45);
    border-radius: 0;
  }
  .eb-viewer-bar {
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .eb-viewer-bar input[type="number"] {
    width: 52px;
    padding: 5px;
  }
  .eb-zoom-btn {
    width: 34px;
    height: 34px;
  }
  .eb-viewer-actions a,
  .eb-viewer-actions button {
    padding: 7px 10px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .eb-viewer-top a span { display: none; }
  .eb-viewer-actions {
    width: 100%;
    justify-content: center;
  }
}
