/* Enhanced Book Preview Page Styles */

/* Preview Header */
.preview-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  padding: 40px 30px;
  border-radius: 16px;
  margin-bottom: 30px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  color: white;
}

.preview-header-content {
  margin-bottom: 20px;
}

.book-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-badge i {
  font-size: 16px;
}

.preview-title {
  margin: 0 0 15px 0;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: white;
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.meta-item i {
  font-size: 16px;
  opacity: 0.9;
}

.meta-divider {
  opacity: 0.5;
}

/* Viewer Section */
.viewer-section {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.viewer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-bottom: 2px solid #cbd5e1;
}

.viewer-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-header h2 i {
  color: #dc2626;
  font-size: 24px;
}

.viewer-actions-top {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.action-btn:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.pdf-viewer-enhanced {
  width: 100%;
  height: 75vh;
  background: #f6f8fa;
  position: relative;
}

.viewer-footer {
  display: flex;
  gap: 12px;
  padding: 20px 25px;
  background: #f8fafc;
  border-top: 2px solid #e2e8f0;
  flex-wrap: wrap;
}

.btn-download,
.btn-open,
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-download {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  flex: 1;
  justify-content: center;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-open {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  flex: 1;
  justify-content: center;
}

.btn-open:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 102, 112, 0.4);
}

.btn-back {
  background: white;
  color: #64748b;
  border-color: #cbd5e1;
}

.btn-back:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #475569;
}

/* Sidebar Enhancements */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-box {
  background: white;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
}

.sidebar-box h3 {
  margin: 0 0 20px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
}

.sidebar-box h3 i {
  color: var(--primary-color);
  font-size: 20px;
}

/* Related Books Enhancement */
.related-book-item {
  border: 2px solid #e2e8f0;
}

.related-book-item:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px rgba(2, 102, 112, 0.15);
}

/* Responsive */
@media (max-width: 992px) {
  .book-preview-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .pdf-viewer-enhanced {
    height: 60vh;
  }
  
  .preview-title {
    font-size: 24px;
  }
  
  .viewer-footer {
    flex-direction: column;
  }
  
  .btn-download,
  .btn-open,
  .btn-back {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .preview-header {
    padding: 25px 20px;
  }
  
  .preview-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .meta-divider {
    display: none;
  }
  
  .viewer-header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .viewer-actions-top {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Loading State */
.pdf-viewer-enhanced::before {
  content: 'লোড হচ্ছে...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: 600;
  color: #64748b;
  z-index: 1;
}

/* Print Button Enhancement */
.action-btn i {
  font-size: 18px;
}

/* Smooth Animations */
* {
  transition: all 0.3s ease;
}

/* Focus States */
.action-btn:focus,
.btn-download:focus,
.btn-open:focus,
.btn-back:focus {
  outline: 3px solid rgba(2, 102, 112, 0.3);
  outline-offset: 2px;
}
