/* Simple PDF Display System - Advanced Viewer Styles */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --pdf-bg: #f4f7fb;
  --pdf-bg-deep: #dbe7f6;
  --pdf-surface: #ffffff;
  --pdf-surface-soft: #f6f9ff;
  --pdf-text: #10233f;
  --pdf-text-muted: #52647e;
  --pdf-border: #d8e2f0;
  --pdf-primary: #0a6cff;
  --pdf-primary-2: #00bcd4;
  --pdf-success: #0f9d73;
  --pdf-warning: #e67e22;
  --pdf-shadow-sm: 0 14px 30px rgba(13, 43, 81, 0.12);
  --pdf-shadow-lg: 0 24px 60px rgba(13, 43, 81, 0.2);
  --pdf-gradient: linear-gradient(120deg, #0a6cff 0%, #00bcd4 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.pdf-document-single {
  position: relative;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  font-family: 'Outfit', sans-serif;
  color: var(--pdf-text);
}

.pdf-background-glow {
  position: absolute;
  inset: 0 auto auto 0;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(10, 108, 255, 0.22) 0%, rgba(0, 188, 212, 0.08) 36%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.pdf-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.pdf-layout > * {
  min-width: 0;
}

.pdf-main-column > section,
.pdf-main-column > header {
  margin-bottom: 24px;
}

.pdf-header,
.pdf-description,
.pdf-viewer-section,
.pdf-additional-info,
.pdf-related-wrapper,
.sidebar-card {
  background: var(--pdf-surface);
  border: 1px solid var(--pdf-border);
  border-radius: 18px;
  box-shadow: var(--pdf-shadow-sm);
}

.pdf-header {
  position: relative;
  padding: 30px;
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
}

.pdf-header::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  top: -120px;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.19) 0%, rgba(10, 108, 255, 0.04) 45%, transparent 72%);
  pointer-events: none;
}

.pdf-header-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pdf-type-pill {
  background: var(--pdf-gradient);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
}

.pdf-updated {
  font-size: 13px;
  font-weight: 500;
  color: var(--pdf-text-muted);
}

.pdf-document-title {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.3px;
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.pdf-header-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

.pdf-header-preview {
  border: 1px solid #d5e2f5;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--pdf-shadow-sm);
}

.pdf-cover-frame {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #d6e2f7;
  background: #eef4ff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

.pdf-cover-frame img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.pdf-cover-fallback {
  width: 100%;
  min-height: 250px;
  background: linear-gradient(145deg, #004fc6 0%, #00a6c1 100%);
  color: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 4px;
}

.pdf-cover-fallback .dashicons {
  width: 52px;
  height: 52px;
  font-size: 52px;
}

.pdf-hero-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.pdf-hero-metrics li {
  border: 1px solid #d9e5f8;
  background: #f6f9ff;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.pdf-hero-metrics li span {
  color: var(--pdf-text-muted);
}

.pdf-hero-metrics li strong {
  color: var(--pdf-text);
}

.pdf-meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pdf-surface-soft);
  border: 1px solid #dce8fa;
  color: var(--pdf-text-muted);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}

.pdf-taxonomy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.pdf-categories,
.pdf-tags {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.category-tag,
.pdf-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cde0fd;
  background: #edf4ff;
  color: #1054bf;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.category-tag:hover,
.pdf-tag:hover {
  background: var(--pdf-primary);
  border-color: var(--pdf-primary);
  color: #fff;
}

.pdf-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pdf-actions .btn {
  min-height: 44px;
}

.pdf-section-nav {
  margin-top: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pdf-section-nav a {
  text-decoration: none;
  color: #21579f;
  border: 1px solid #cde0fb;
  background: #edf5ff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.pdf-section-nav a:hover {
  background: var(--pdf-primary);
  color: #fff;
  border-color: var(--pdf-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--pdf-gradient);
  color: #fff;
  box-shadow: 0 10px 22px rgba(10, 108, 255, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 26px rgba(10, 108, 255, 0.28);
}

.btn-secondary {
  background: #fff;
  border-color: #d3def0;
  color: var(--pdf-text);
}

.btn-secondary:hover {
  border-color: var(--pdf-primary);
  color: var(--pdf-primary);
}

.pdf-description,
.pdf-additional-info,
.pdf-related-wrapper,
.pdf-search-experience {
  padding: 26px;
}

.pdf-description {
  overflow: hidden;
  background-image: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pdf-description h2,
.pdf-additional-info h2,
.pdf-viewer-section h2,
.pdf-related-wrapper h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
  font-weight: 700;
}

.pdf-description .excerpt,
.pdf-description .content {
  color: var(--pdf-text-muted);
  line-height: 1.75;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.pdf-description .content {
  color: var(--pdf-text);
}

.pdf-description .content > * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.pdf-description .content pre {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 10px;
  padding: 12px;
  background: #f4f8ff;
  border: 1px solid #d9e5f8;
}

.pdf-viewer-section {
  padding: 22px;
  overflow: hidden;
  position: relative;
}

.section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.open-tab-link {
  color: var(--pdf-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.open-tab-link:hover {
  text-decoration: underline;
}

.section-subtext {
  color: var(--pdf-text-muted);
  font-size: 13px;
}

.pdf-viewer-embed {
  border-radius: 14px;
  border: 1px solid #dae8fc;
  overflow: hidden;
  box-shadow: 0 26px 58px rgba(11, 46, 94, 0.26);
}

.pdf-viewer-embed iframe {
  display: block;
}

.pdf-main-viewer {
  width: 100%;
  height: 820px;
}

.pdf-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: 10002;
  background: rgba(10, 108, 255, 0.08);
}

.pdf-reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #00bcd4 0%, #0a6cff 100%);
  transition: width 0.08s linear;
}

.pdf-shortcode-viewer {
  width: 100%;
  height: var(--pdf-shortcode-height, 820px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.info-item {
  background: var(--pdf-surface-soft);
  border: 1px solid #dae6f7;
  border-radius: 12px;
  padding: 14px;
}

.info-item h3 {
  margin: 0 0 6px;
  color: var(--pdf-text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.75px;
  text-transform: uppercase;
}

.info-item p {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.pdf-sidebar {
  display: grid;
  gap: 18px;
}

.mobile-quick-access {
  display: none;
}

.sidebar-card {
  padding: 18px;
}

.sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 700;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-title-row h3 {
  margin: 0;
}

.sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid #c9dcfb;
  background: #edf5ff;
  color: #225ca7;
  font-size: 12px;
  font-weight: 700;
}

.sticky-top {
  position: sticky;
  top: 20px;
}

.quick-stats {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.quick-stats li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed #d4e0f0;
  padding: 8px 0;
  font-size: 14px;
}

.quick-stats li span {
  color: var(--pdf-text-muted);
}

.quick-stats li strong {
  font-weight: 700;
}

.sidebar-download {
  width: 100%;
}

.categories-card {
  border-color: #cfdef6;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
}

.category-tree-wrap {
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #dbe7f9;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.category-tree-level {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-tree-children .category-tree-level {
  margin-left: 16px;
  border-left: 1px dashed #c8d7ee;
  padding-left: 10px;
}

.category-tree-item + .category-tree-item {
  margin-top: 6px;
}

.category-tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe7f8;
  background: #fff;
  border-radius: 10px;
  padding: 7px 8px;
  box-shadow: 0 6px 14px rgba(18, 48, 92, 0.06);
}

.category-tree-link {
  color: var(--pdf-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  overflow-wrap: anywhere;
}

.category-tree-link:hover {
  color: var(--pdf-primary);
}

.category-tree-item.is-current > .category-tree-row .category-tree-link {
  color: var(--pdf-primary);
  font-weight: 700;
}

.category-tree-item.is-current > .category-tree-row {
  border-color: #bdd5fa;
  background: #eef5ff;
}

.category-tree-count {
  min-width: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--pdf-text-muted);
  border: 1px solid #d4dfef;
  border-radius: 999px;
  padding: 2px 6px;
}

.category-toggle {
  width: 24px;
  height: 24px;
  border: 1px solid #bdd3f4;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #edf5ff 100%);
  cursor: pointer;
  position: relative;
}

.category-toggle::before {
  content: "\002D";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #2d4f7f;
  font-size: 16px;
  font-weight: 700;
}

.category-toggle[aria-expanded="false"]::before {
  content: "\002B";
}

.category-tree-children.is-collapsed {
  display: none;
}

.discover-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.discover-list li + li {
  margin-top: 8px;
}

.discover-list a {
  display: block;
  font-size: 14px;
  color: var(--pdf-text);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f6f9ff;
  border: 1px solid #dbe7f8;
  overflow-wrap: anywhere;
}

.discover-list a:hover {
  color: var(--pdf-primary);
  border-color: #c1d7fa;
}

.sidebar-muted {
  margin: 0;
  color: var(--pdf-text-muted);
  font-size: 14px;
}

.related-pdfs-shortcode {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.related-item {
  background: var(--pdf-surface);
  border: 1px solid #d7e2f2;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--pdf-shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.related-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--pdf-shadow-lg);
}

.related-thumbnail {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  background: #f4f8ff;
  overflow: hidden;
  padding: 8px;
}

.related-thumbnail img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
}

.no-thumbnail {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #004ec7 0%, #00a4be 100%);
  color: #fff;
}

.no-thumbnail .dashicons {
  font-size: 56px;
  width: 56px;
  height: 56px;
}

.related-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.related-item-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
}

.related-item-title a {
  color: var(--pdf-text);
  text-decoration: none;
}

.related-item-title a:hover {
  color: var(--pdf-primary);
}

.related-author {
  margin: 0;
  font-size: 13px;
  color: var(--pdf-text-muted);
}

.related-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--pdf-text-muted);
}

.related-meta span::before {
  content: "\2022";
  margin-right: 6px;
}

.related-meta span:first-child::before {
  content: "";
  margin-right: 0;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 18, 34, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.modal-content {
  position: relative;
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #d6e1f2;
  box-shadow: var(--pdf-shadow-lg);
}

.close {
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 28px;
  color: #6a7d98;
  cursor: pointer;
  line-height: 1;
}

.share-options {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.share-btn {
  color: #fff;
  text-decoration: none;
  text-align: center;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1d9bf0; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.email { background: #425466; }

.share-link {
  padding-top: 14px;
  border-top: 1px solid #e0e7f2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-link label {
  display: block;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--pdf-text-muted);
  width: 100%;
}

.share-link input {
  width: 100%;
  flex: 1 1 220px;
  min-width: 0;
  border: 1px solid #cad8ec;
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}

.share-link button {
  width: auto;
  min-width: 92px;
  border: none;
  border-radius: 10px;
  padding: 10px 8px;
  margin-left: 0;
  background: var(--pdf-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.pdf-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #12335f;
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--pdf-shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10000;
}

.pdf-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pdf-error {
  color: #d1392f;
  background: #fff5f4;
  border: 1px solid #f2c7c3;
  border-radius: 12px;
  padding: 14px;
}

/* Advanced PDF Library Shortcode */
.pdf-library-shortcode {
  margin: 24px 0;
  font-family: 'Outfit', sans-serif;
}

.pdf-library-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.pdf-library-shell > * {
  min-width: 0;
}

img,
iframe {
  max-width: 100%;
}

.pdf-library-main {
  background: var(--pdf-surface);
  border: 1px solid var(--pdf-border);
  border-radius: 18px;
  box-shadow: var(--pdf-shadow-sm);
  padding: 20px;
}

.pdf-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pdf-library-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.3vw, 2rem);
  line-height: 1.2;
}

.pdf-library-heading p {
  margin: 0;
  font-size: 13px;
  color: var(--pdf-text-muted);
  font-weight: 600;
}

.pdf-library-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.pdf-library-auto-hint {
  margin: -6px 0 16px;
  font-size: 12px;
  color: var(--pdf-text-muted);
}

.pdf-library-search-wrap input,
.pdf-library-select-wrap select {
  width: 100%;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  padding: 11px 12px;
  min-height: 44px;
  font-size: 14px;
  font-family: inherit;
  background: #f8fbff;
  color: var(--pdf-text);
}

.pdf-library-search-wrap {
  position: relative;
  grid-column: 1 / -1;
}

.pdf-library-search-hero {
  min-height: 68px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eaf3ff 0%, #f5fbff 100%);
  border: 1px solid #cde2ff;
  box-shadow: 0 12px 24px rgba(11, 59, 124, 0.12);
  display: flex;
  align-items: center;
  padding: 0 10px 0 8px;
  overflow: hidden;
}

.pdf-library-search-hero input {
  border: none;
  background: transparent;
  min-height: 64px;
  font-size: 18px;
  font-weight: 600;
  padding-left: 8px;
}

.pdf-library-search-hero input:focus {
  box-shadow: none;
}

.pdf-search-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a6cff 0%, #00a9d9 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(10, 108, 255, 0.28);
  flex: 0 0 auto;
}

.pdf-search-icon-wrap .dashicons {
  width: 17px;
  height: 17px;
  font-size: 17px;
}

.pdf-search-glow-icon {
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 108, 255, 0.12);
  color: #0a6cff;
}

.pdf-search-glow-icon .dashicons {
  width: 15px;
  height: 15px;
  font-size: 15px;
}

.pdf-library-search-wrap input:focus,
.pdf-library-select-wrap select:focus {
  outline: none;
  border-color: var(--pdf-primary);
  box-shadow: 0 0 0 3px rgba(10, 108, 255, 0.15);
}

.pdf-picker {
  position: relative;
}

.pdf-picker-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--pdf-text);
  text-align: left;
  padding: 7px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.pdf-picker-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--pdf-text-muted);
  line-height: 1;
}

.pdf-picker-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
}

.pdf-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  border: 1px solid #cfe0f7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(10, 40, 84, 0.16);
  padding: 8px;
}

.pdf-picker-search {
  width: 100%;
  min-height: 36px;
  border: 1px solid #d4e4f8;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 12px;
  margin-bottom: 8px;
}

.pdf-picker-search:focus {
  outline: none;
  border-color: var(--pdf-primary);
  box-shadow: 0 0 0 2px rgba(10, 108, 255, 0.12);
}

.pdf-picker-options {
  max-height: 210px;
  overflow: auto;
  display: grid;
  gap: 5px;
}

.pdf-picker-option {
  width: 100%;
  border: 1px solid #dbe7f9;
  background: #f8fbff;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--pdf-text);
  cursor: pointer;
}

.pdf-picker-option:hover {
  border-color: #bcd5fa;
  background: #eef5ff;
  color: var(--pdf-primary);
}

.pdf-picker-option.is-active {
  border-color: #9fc5fa;
  background: #e6f1ff;
  color: #0c56c8;
}

.pdf-picker-empty {
  margin: 8px 0 2px;
  font-size: 12px;
  color: var(--pdf-text-muted);
}

.pdf-picker-native-select {
  display: none;
}

.pdf-library-grid {
  --pdf-lib-cols-desktop: 4;
  --pdf-lib-cols-tablet: 2;
  --pdf-lib-cols-mobile: 1;
  display: grid;
  grid-template-columns: repeat(var(--pdf-lib-cols-desktop), minmax(0, 1fr));
  gap: 14px;
}

.pdf-library-results {
  position: relative;
  transition: opacity 0.2s ease;
}

.pdf-library-results.is-loading {
  opacity: 0.58;
  pointer-events: none;
}

.pdf-library-card {
  background: #fff;
  border: 1px solid #d9e5f7;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 9px 20px rgba(14, 44, 82, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pdf-library-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(14, 44, 82, 0.15);
}

.pdf-library-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  background: #f3f8ff;
  overflow: hidden;
  padding: 10px;
}

.pdf-library-thumb img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #f8fbff;
  display: block;
  transition: transform 0.3s ease;
}

.pdf-library-card:hover .pdf-library-thumb img {
  transform: none;
}

.pdf-library-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0055d0 0%, #01a9c4 100%);
  color: #fff;
}

.pdf-library-fallback .dashicons {
  width: 60px;
  height: 60px;
  font-size: 60px;
}

.pdf-library-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  flex: 1;
}

.pdf-library-card-body h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pdf-library-card-body h3 a {
  color: var(--pdf-text);
  text-decoration: none;
}

.pdf-library-card-body h3 a:hover {
  color: var(--pdf-primary);
}

.pdf-library-card-author {
  margin: 0;
  color: var(--pdf-text-muted);
  font-size: 13px;
}

.pdf-library-card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--pdf-text-muted);
  font-size: 12px;
}

.pdf-library-card-meta span {
  border: 1px solid #dbe7f7;
  background: #f5f9ff;
  border-radius: 999px;
  padding: 4px 9px;
}

.pdf-library-card-actions {
  display: block;
  margin-top: 4px;
}

.pdf-library-card-actions .btn {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  font-size: 13px;
}

.pdf-library-sidebar {
  position: relative;
}

.pdf-library-mobile-sidebar-toggle {
  display: none;
  width: 100%;
  margin-bottom: 10px;
}

.pdf-library-sidebar-inner {
  display: grid;
  gap: 14px;
}

.pdf-tax-search-wrap {
  margin: 0 0 10px;
}

.pdf-tax-search-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfe0f7;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  background: #f8fbff;
  color: var(--pdf-text);
}

.pdf-tax-search-input:focus {
  outline: none;
  border-color: var(--pdf-primary);
  box-shadow: 0 0 0 3px rgba(10, 108, 255, 0.12);
}

.pdf-library-tax-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.pdf-library-tax-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  border: 1px solid #dbe6f7;
  background: #f8fbff;
  border-radius: 10px;
  padding: 9px 10px;
}

.pdf-library-tax-list li a {
  color: var(--pdf-text);
  text-decoration: none;
  font-size: 14px;
  flex: 1;
}

.pdf-library-tax-list li a:hover {
  color: var(--pdf-primary);
}

.pdf-library-tax-list li span {
  font-size: 12px;
  color: var(--pdf-text-muted);
  border: 1px solid #cedcf2;
  background: #fff;
  border-radius: 999px;
  padding: 2px 7px;
}

.pdf-library-tax-list li.is-active {
  border-color: #b9d2f7;
  background: #ebf4ff;
}

.pdf-library-tax-list li.is-active a {
  color: var(--pdf-primary);
  font-weight: 700;
}

.pdf-library-tax-list .is-empty {
  color: var(--pdf-text-muted);
  font-size: 13px;
}

.pdf-tax-search-empty {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--pdf-text-muted);
}

.pdf-library-empty {
  padding: 22px;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #f8fbff;
}

.pdf-library-empty h3 {
  margin: 0 0 8px;
}

.pdf-library-empty p {
  margin: 0 0 12px;
  color: var(--pdf-text-muted);
}

.pdf-library-pagination {
  margin-top: 18px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.pdf-library-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid #cedcf2;
  background: #fff;
  color: var(--pdf-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.pdf-library-pagination .page-numbers.current {
  background: var(--pdf-primary);
  border-color: var(--pdf-primary);
  color: #fff;
}

.pdf-copyright-note {
  max-width: 760px;
  margin: 10px auto 0;
  border: 1px solid #d8e4f7;
  background: #f8fbff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: #2f4668;
}

.pdf-copyright-note h3 {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.2;
  color: #15335c;
}

.pdf-copyright-note p {
  margin: 0 0 6px;
}

.pdf-copyright-note .copyright-request-title {
  margin-bottom: 2px;
  font-weight: 700;
}

.pdf-copyright-note ul {
  margin: 0 0 6px;
  padding-left: 18px;
}

.pdf-copyright-note li {
  margin: 0;
}

.pdf-copyright-note .copyright-footer {
  margin-bottom: 0;
}

.pdf-search-experience {
  border: 1px solid #bfd8ff;
  background:
    radial-gradient(circle at 88% 22%, rgba(6, 190, 226, 0.16) 0%, transparent 42%),
    linear-gradient(135deg, #f5fbff 0%, #e8f1ff 100%);
  box-shadow: 0 18px 36px rgba(8, 46, 100, 0.15);
}

.pdf-single-search-live {
  display: grid;
  gap: 12px;
}

.pdf-single-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pdf-single-search-input-wrap {
  border: 1px solid #bed8ff;
  border-radius: 13px;
  background: #fff;
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 10px;
  box-shadow: 0 10px 22px rgba(10, 58, 122, 0.1);
}

.pdf-single-search-input-wrap input {
  border: none;
  background: transparent;
  width: 100%;
  min-height: 48px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pdf-text);
  padding-left: 8px;
}

.pdf-single-search-input-wrap input:focus {
  outline: none;
}

.pdf-single-search-btn {
  min-width: 170px;
}

.pdf-single-live-results-wrap {
  border: 1px solid #cae0ff;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 12px 26px rgba(11, 50, 104, 0.12);
}

.pdf-single-live-results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.pdf-single-live-card .pdf-library-thumb {
  height: 205px;
}

.pdf-single-live-card .pdf-library-card-body {
  padding: 12px;
}

.pdf-single-live-card .pdf-library-card-body h3 {
  font-size: 14px;
}

.pdf-single-live-card .pdf-library-card-meta {
  gap: 6px;
  font-size: 11px;
}

.pdf-single-search-empty {
  margin: 8px 2px 2px;
  font-size: 12px;
  color: var(--pdf-text-muted);
}

.pdf-mobile-action-bar {
  display: none;
}

@media (max-width: 1120px) {
  .pdf-layout {
    grid-template-columns: 1fr;
  }

  .sticky-top {
    position: static;
  }

  .pdf-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-main-viewer {
    height: 640px;
  }

  .pdf-header-grid {
    grid-template-columns: 1fr;
  }

  .pdf-header-preview {
    max-width: 360px;
  }

  .pdf-shortcode-viewer {
    height: min(var(--pdf-shortcode-height, 820px), 75vh);
  }

  .pdf-library-shell {
    grid-template-columns: 1fr;
  }

  .pdf-library-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

.pdf-library-filters .btn {
  min-height: 46px;
}

.pdf-library-filters .btn,
.pdf-library-filters .pdf-library-select-wrap {
  align-self: stretch;
}

.pdf-library-filters .pdf-library-search-wrap + .pdf-library-select-wrap {
  grid-column: span 1;
}

.pdf-library-filters .btn.btn-primary,
.pdf-library-filters .btn.btn-secondary {
  width: 100%;
}

.pdf-library-filters .btn {
  width: 100%;
}

  .pdf-library-grid {
    grid-template-columns: repeat(var(--pdf-lib-cols-tablet), minmax(0, 1fr));
  }

  .pdf-library-mobile-sidebar-toggle {
    display: inline-flex;
  }

  .pdf-library-sidebar-inner {
    display: none;
  }

  .pdf-library-sidebar.is-open .pdf-library-sidebar-inner {
    display: grid;
  }
}

@media (max-width: 760px) {
  .pdf-document-single {
    padding: 10px;
  }

  .pdf-header,
  .pdf-description,
  .pdf-viewer-section,
  .pdf-additional-info,
  .pdf-related-wrapper,
  .sidebar-card {
    padding: 14px;
    border-radius: 14px;
  }

  .pdf-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .pdf-actions .btn {
    width: 100%;
    min-height: 38px;
    padding: 8px 6px;
    font-size: 12px;
    border-radius: 10px;
    gap: 4px;
  }

  .pdf-actions .btn .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
  }

  .pdf-section-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .pdf-section-nav::-webkit-scrollbar {
    display: none;
  }

  .pdf-viewer-embed {
    border-radius: 10px;
  }

  .pdf-main-viewer {
    height: 62vh;
    min-height: 340px;
  }

  .pdf-shortcode-viewer {
    height: min(var(--pdf-shortcode-height, 760px), 66vh);
    min-height: 300px;
  }

  .share-options {
    grid-template-columns: 1fr;
  }

  .share-link input {
    width: 100%;
    margin-bottom: 8px;
  }

  .share-link button {
    width: 100%;
  }

  .pdf-sidebar {
    grid-template-columns: 1fr;
  }

  .desktop-quick-access {
    display: none;
  }

  .mobile-quick-access {
    display: block;
  }

  .pdf-additional-info {
    padding: 12px;
  }

  .pdf-additional-info h2 {
    margin-bottom: 10px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .info-item {
    padding: 10px;
    border-radius: 10px;
  }

  .info-item h3 {
    font-size: 10px;
    margin-bottom: 4px;
    letter-spacing: 0.55px;
  }

  .info-item p {
    font-size: 13px;
  }

  .pdf-library-main {
    padding: 12px;
  }

  .pdf-library-filters {
    grid-template-columns: 1fr;
  }

  .pdf-library-search-hero {
    min-height: 48px;
    grid-column: auto;
  }

  .pdf-library-search-hero input {
    min-height: 46px;
    font-size: 14px;
  }

  .pdf-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pdf-library-card-actions {
    grid-template-columns: 1fr;
  }

  .pdf-library-thumb {
    height: auto;
    aspect-ratio: 3 / 4;
    padding: 6px;
  }

  .related-pdfs-shortcode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .related-thumbnail {
    height: auto;
    aspect-ratio: 3 / 4;
    padding: 6px;
  }

  .pdf-copyright-note {
    padding: 10px 11px;
    font-size: 11px;
    border-radius: 10px;
  }

  .pdf-copyright-note h3 {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .pdf-single-search-form {
    grid-template-columns: 1fr;
  }

  .pdf-single-live-results-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .pdf-single-live-card .pdf-library-thumb {
    height: auto;
    aspect-ratio: 3 / 4;
    padding: 6px;
  }

  .pdf-single-search-btn {
    width: 100%;
    min-width: 0;
  }

  .pdf-mobile-action-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 10003;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #cedff7;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(7px);
    box-shadow: 0 14px 24px rgba(10, 40, 84, 0.18);
  }

  .mobile-action-btn {
    border: 1px solid #d4e3f8;
    border-radius: 10px;
    text-decoration: none;
    color: var(--pdf-text);
    min-height: 42px;
    font-size: 12px;
    font-weight: 700;
    display: grid;
    place-items: center;
    gap: 2px;
    background: #fff;
  }

  .mobile-action-btn span {
    line-height: 1;
  }

  .mobile-action-primary {
    background: var(--pdf-gradient);
    color: #fff;
    border-color: transparent;
  }

  .pdf-document-single {
    padding-bottom: 86px;
  }
}

@media (max-width: 460px) {
  .pdf-main-viewer {
    min-height: 280px;
  }

  .pdf-shortcode-viewer {
    min-height: 250px;
  }

  .pdf-header-topline {
    gap: 8px;
  }

  .pdf-type-pill {
    font-size: 10px;
    padding: 6px 10px;
  }

  .pdf-meta-info {
    gap: 7px;
  }

  .meta-item {
    font-size: 12px;
    padding: 7px 10px;
  }

  .pdf-actions .btn {
    font-size: 11px;
    min-height: 36px;
    padding: 8px 4px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pdf-library-thumb {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .related-thumbnail {
    height: auto;
    aspect-ratio: 3 / 4;
  }
}
