/* EAC PDF Embed – mobile inline renderer styles.
   Desktop/tablet: show the native <embed>, hide the JS view and the link.
   Phones (<=767px): hide the native (blank) <embed>, show the PDF.js viewer
   (single page + prev/next pagination). */

.eac-pdf-jsview {
  display: none;
}
.eac-pdf-fallback-btn {
  display: none;
}

.eac-pdf-fallback-btn {
  align-items: center;
  gap: 8px;
  background-color: #007aad;
  color: #fff !important;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 40px;
  text-decoration: none;
  margin: 12px 0;
}

.eac-pdf-fallback-btn::before {
  content: "\1F4C4"; /* PDF page icon */
}

.eac-pdf-loading {
  padding: 24px 0;
  text-align: center;
  color: #6d7274;
  font-size: 28px;
  line-height: 1;
}

/* Single-page viewer */
.eac-pdf-jsview {
  border: 1px solid #e1e2e2;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f5f5;
}

.eac-pdf-canvas-wrap {
  height: 60vh;
  min-height: 360px;
  max-height: 760px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px;
}

.eac-pdf-page {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 1px 4px rgba(26, 26, 26, 0.15);
}

.eac-pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 8px 12px;
  background: #fff;
  border-top: 1px solid #e1e2e2;
}

.eac-pdf-pageinfo {
  font-size: 15px;
  font-weight: 600;
  color: #181a1b;
  min-width: 64px;
  text-align: center;
}

.eac-pdf-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #007aad;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.eac-pdf-nav:disabled {
  background: #c7cbcc;
  cursor: default;
}

@media (max-width: 767.98px) {
  .eac-pdf-embed > embed[type="application/pdf"] {
    display: none !important;
  }
  .eac-pdf-jsview {
    display: block;
  }

  /* If PDF.js can't render, fall back to the plain open-in-new-tab link. */
  .eac-pdf-embed.eac-pdf-failed .eac-pdf-jsview {
    display: none;
  }
  .eac-pdf-embed.eac-pdf-failed .eac-pdf-fallback-btn {
    display: inline-flex;
  }
}
