/* Digital Book Library Custom Styles */
.digital-book-library-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}
.digital-book-library-header {
  text-align: center;
  margin-bottom: 24px;
}
.digital-book-library-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color, #234a83);
}
.digital-book-library-header p {
  color: #555;
  margin-top: 8px;
  font-size: 1.1rem;
}
.digital-book-library-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 32px 0 24px 0;
}
.digital-book-library-stat {
  background: #f5f7fa;
  border-radius: 12px;
  padding: 16px 32px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #234a83;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.digital-book-library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
}
.digital-book-library-filters input[type="text"],
.digital-book-library-filters select {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}
.digital-book-library-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.digital-book-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  padding: 20px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  height: 267px;
  min-height: unset;
  overflow: hidden;
  position: relative;
}
.digital-book-badges {
  display: flex;
  gap: 8px;
  position: absolute;
  top: 18px;
  left: 20px;
}
.digital-book-badge {
  background: #e6eaf3;
  color: #234a83;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 6px;
  padding: 2px 10px;
  display: inline-block;
}
.digital-book-badge.pdf {
  background: #f5dada;
  color: #b71c1c;
}
.digital-book-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 36px 0 6px 0;
  color: #234a83;
  min-height: 48px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: auto;
}
.digital-book-author {
  color: #666;
  font-size: 0.98rem;
  margin-bottom: 8px;
}
.digital-book-desc {
  color: #444;
  font-size: 0.97rem;
  margin-bottom: 4px;
  height: unset;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.digital-book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.97rem;
  color: #555;
  margin-bottom: 8px;
}
.digital-book-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.digital-book-rating {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.digital-book-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}
.digital-book-btn.read {
  background: #234a83;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  margin-top: 4px;
}
.digital-book-btn.read:hover {
  background: #1a3560;
}
.digital-book-btn.download {
  background: #234a83;
  color: #fff;
}
.digital-book-btn.download:hover {
  background: #1a3560;
}
@media (max-width: 1100px) {
  .digital-book-library-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 900px) {
  .digital-book-library-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .digital-book-library-stats {
    flex-direction: column;
    gap: 16px;
  }
  .digital-book-library-grid {
    grid-template-columns: 1fr;
  }
}

/* Book Page Layout */
.bookpage-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 8px 0 8px;
  background: #f8fafc;
}
.back-link {
  display: inline-block;
  color: #234a83;
  font-weight: 500;
  margin-bottom: 18px;
  text-decoration: none;
  font-size: 1rem;
}
.bookpage-main {
  display: flex;
  gap: 36px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 32px 24px 24px 24px;
  flex-wrap: wrap;
}
.bookpage-covercol {
  flex: 0 0 320px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.bookpage-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
  justify-content: flex-start;
}
.badge {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 12px;
  background: #e6eaf3;
  color: #234a83;
}
.badge-pdf {
  background: #f5dada;
  color: #b71c1c;
}
.badge-status {
  background: #e6eaf3;
  color: #234a83;
}
.badge-domain {
  background: #e6eaf3;
  color: #234a83;
}
.bookpage-coverimg {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.bookpage-cover-placeholder {
  width: 100%;
  height: 300px;
  background: #f5f7fa;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 3rem;
}
.bookpage-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.btn {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  width: 100%;
  padding: 12px 0;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: #234a83;
  color: #fff;
}
.btn-outline {
  background: #f5dada;
  color: #b71c1c;
  border: 1px solid #f5dada;
}
.btn svg.icon {
  width: 1.1em;
  height: 1.1em;
  vertical-align: middle;
}
.bookpage-infocol {
  flex: 1 1 340px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bookpage-labels {
  margin-bottom: 6px;
}
.bookpage-title {
  font-size: 2.1rem;
  margin: 0 0 10px 0;
  line-height: 1.2;
  color: #222;
  font-weight: 700;
}
.bookpage-author {
  color: #234a83;
  font-weight: 500;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.bookpage-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: #666;
  font-size: 1rem;
  margin-bottom: 8px;
}
.bookpage-meta svg.icon {
  color: #234a83;
  margin-right: 2px;
}
.bookpage-social {
  display: flex;
  gap: 18px;
  color: #234a83;
  font-size: 1rem;
  margin-bottom: 12px;
}
.bookpage-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e6eaf3;
  margin: 18px 0 0 0;
}
.tab-btn {
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: #234a83;
  padding: 12px 24px 10px 24px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border 0.2s, color 0.2s;
}
.tab-btn.active {
  color: #234a83;
  border-bottom: 2.5px solid #234a83;
  background: #f5f7fa;
}
.bookpage-tab-content {
  background: #fff;
  border-radius: 0 0 12px 12px;
  padding: 18px 0 0 0;
  min-height: 120px;
}
.tab-content { display: none; }
.tab-content.active { display: block; }
.bookpage-desc {
  color: #444;
  font-size: 1.08rem;
  line-height: 1.7;
}
.bookpage-commentform {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bookpage-commentform textarea {
  width: 100%;
  min-height: 80px;
  border-radius: 8px;
  border: 1px solid #e6eaf3;
  padding: 12px;
  font-size: 1rem;
  resize: vertical;
}
.bookpage-reviews-placeholder {
  color: #888;
  font-size: 1rem;
  padding: 12px 0;
}
.bookpage-related-section {
  margin-top: 48px;
}
.bookpage-related-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 18px;
  color: #234a83;
}
.bookpage-related-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.bookpage-related-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
  padding: 18px 14px;
  text-decoration: none;
  color: #222;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.bookpage-related-badge {
  background: #f5dada;
  color: #b71c1c;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 2px 10px;
  margin-bottom: 4px;
}
.bookpage-related-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.bookpage-related-author {
  font-size: 0.97rem;
  color: #234a83;
}
.bookpage-related-meta {
  font-size: 0.97rem;
  color: #fbc02d;
}
.bookpage-related-btn {
  margin-top: 8px;
  background: #234a83;
  color: #fff;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 0.97rem;
  font-weight: 600;
  cursor: pointer;
}
.bookpage-no-related {
  color: #888;
  font-size: 1rem;
}
.bookpage-footer-spacer {
  height: 32px;
}
/* Modal Styles */
.bookpage-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
}
.bookpage-modal[style*="display: flex"] {
  display: flex !important;
}
.bookpage-modal-content {
  position: relative;
  background: #fff;
  width: 90vw;
  height: 90vh;
  max-width: 900px;
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bookpage-modal-close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  background: none;
  border: none;
  color: #234a83;
  cursor: pointer;
  z-index: 10;
}
.bookpage-modal iframe {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: none;
}
@media (max-width: 900px) {
  .bookpage-modal-content {
    width: 98vw;
    height: 95vh;
    max-width: 98vw;
    max-height: 95vh;
    border-radius: 0;
  }
}
@media (max-width: 768px) {
  .bookpage-main {
    flex-direction: column;
    gap: 24px;
    padding: 18px 6px;
  }
  .bookpage-covercol, .bookpage-infocol {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }
  .bookpage-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Fix icon size on single book page */
.bookpage-infocol .icon,
.bookpage-meta .icon,
.bookpage-social .icon,
.bookpage-related-meta .icon {
  width: 1.1em;
  height: 1.1em;
  min-width: 18px;
  min-height: 18px;
  max-width: 22px;
  max-height: 22px;
  vertical-align: middle;
  display: inline-block;
  margin-right: 4px;
  margin-bottom: 2px;
  fill: currentColor;
}

/* Optionally, reduce font-size for .bookpage-social and .bookpage-meta to keep icons and text balanced */
.bookpage-meta, .bookpage-social {
  font-size: 1rem;
} 