/* ==========================================================================
   PDF MODAL & VIEWER STYLES - SENIOR FRIENDLY / LARGE TYPOGRAPHY
   ========================================================================== */

.pdf-layout-split {
  display: flex;
  width: 100%;
  height: calc(90vh - 90px);
  min-height: 600px;
}

/* Left Sidebar: List of PDFs */
.pdf-sidebar {
  width: 420px;
  background: #ffffff;
  border-right: 2px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.pdf-sidebar-header {
  padding: 18px 20px;
  border-bottom: 2px solid var(--border-light);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdf-search-box {
  position: relative;
  width: 100%;
}

.pdf-search-input {
  width: 100%;
  padding: 13px 18px 13px 48px;
  border-radius: var(--radius-md);
  border: 2px solid #cbd5e1;
  font-size: 1.05rem; /* ~16.8px */
  outline: none;
  transition: all var(--transition-fast);
  background: #f8fafc;
  color: var(--text-main);
  font-weight: 600;
   box-sizing: border-box;
}

.pdf-search-input::placeholder {
  color: #64748b;
  font-size: 1rem;
   box-sizing: border-box;
}

.pdf-search-input:focus {
  border-color: var(--tvsi-blue-primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(18, 84, 183, 0.15);
   box-sizing: border-box;
}

.pdf-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.pdf-batch-download-btn {
  width: 100%;
  padding: 13px 20px;
  background: #eff6ff;
  color: var(--tvsi-blue-primary);
  border: 2px dashed #93c5fd;
  border-radius: var(--radius-md);
  font-size: 1.05rem; /* ~16.8px */
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pdf-batch-download-btn svg {
  width: 20px;
  height: 20px;
}

.pdf-batch-download-btn:hover {
  background: #dbeafe;
  border-color: var(--tvsi-blue-primary);
  color: #0c439c;
  transform: translateY(-1px);
}

/* PDF List Items */
.pdf-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdf-item {
  padding: 16px 18px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pdf-item:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.pdf-item.active {
  background: #eff6ff;
  border-color: var(--tvsi-blue-primary);
  box-shadow: 0 4px 14px rgba(18, 84, 183, 0.18);
}

.pdf-item-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.pdf-item-icon svg {
  width: 24px;
  height: 24px;
}

.pdf-item.active .pdf-item-icon {
  background: var(--tvsi-blue-primary);
  color: #ffffff;
}

.pdf-item-info {
  flex: 1;
  min-width: 0;
}

.pdf-item-title {
  font-size: 1.1rem; /* ~17.6px */
  font-weight: 800;
  color: #0f172a;
  line-height: 1.45;
  margin-bottom: 8px;
}

.pdf-item.active .pdf-item-title {
  color: var(--tvsi-blue-dark);
}

.pdf-item-meta {
  font-size: 0.9375rem; /* 15px */
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pdf-item-badge {
  background: #e2e8f0;
  color: #1e293b;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.85rem; /* ~13.6px */
  font-weight: 800;
}

.pdf-item.active .pdf-item-badge {
  background: #bfdbfe;
  color: #1e40af;
}

.pdf-quick-download {
  padding: 10px;
  border-radius: 10px;
  color: #64748b;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-quick-download svg {
  width: 22px;
  height: 22px;
}

.pdf-quick-download:hover {
  background: #e2e8f0;
  color: var(--tvsi-blue-primary);
}

/* Right Content: PDF Viewer Screen */
.pdf-viewer-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #1e293b;
  overflow: hidden;
}

.pdf-viewer-toolbar {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  gap: 18px;
}

.pdf-current-title {
  font-size: 1.15rem; /* ~18.4px */
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 580px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-mobile-back-btn {
  display: none;
}

.pdf-mobile-notice {
  display: none;
}

.pdf-current-title svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.pdf-viewer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.pdf-tool-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.95rem; /* ~15.2px */
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.pdf-tool-btn svg {
  width: 18px;
  height: 18px;
}

.pdf-tool-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.pdf-tool-btn.btn-primary {
  background: var(--tvsi-blue-primary);
  border-color: var(--tvsi-blue-primary);
}

.pdf-tool-btn.btn-primary:hover {
  background: #1a64da;
}

.pdf-view-toggle-group {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.pdf-view-toggle-group .pdf-tool-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem; /* ~15.2px */
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
}

.pdf-view-toggle-group .pdf-tool-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.pdf-view-toggle-group .pdf-tool-btn.active-tab {
  background: var(--tvsi-blue-primary);
  color: #ffffff;
  font-weight: 900;
}

.pdf-viewer-viewport {
  flex: 1;
  background: #334155;
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: auto;
  padding: 0;
}

.pdf-iframe-container {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* PDF Canvas Viewer Styles (PDF.js Inline Renderer - Zero Download Prompts on Mobile) */
.pdf-canvas-viewer-container {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #334155;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pdf-loading-indicator {
  padding: 40px 20px;
  text-align: center;
  color: #ffffff;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

.pdf-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spinPdf 0.8s linear infinite;
}

@keyframes spinPdf {
  to { transform: rotate(360deg); }
}

.pdf-pages-wrapper {
  width: 100%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.pdf-page-card {
  width: 100%;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  position: relative;
  border: 1px solid #cbd5e1;
}

.pdf-page-num-tag {
  background: #1e293b;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  position: absolute;
  top: 8px;
  right: 8px;
  border-radius: 4px;
  z-index: 5;
  pointer-events: none;
  opacity: 0.85;
}

.pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* Rich In-Page Document Preview Card when viewing summary mode */
.pdf-document-preview-card {
  width: 100%;
  max-width: 900px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: 100%;
  overflow-y: auto;
}

.pdf-preview-header-meta {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 18px;
}

.pdf-preview-header-meta h3 {
  font-size: 1.5rem; /* ~24px */
  font-weight: 900;
  color: #0f2f67;
  margin-bottom: 12px;
  line-height: 1.35;
}

.pdf-preview-header-meta p {
  font-size: 1.125rem; /* 18px */
  color: #334155;
  line-height: 1.65;
  font-weight: 500;
}

.pdf-preview-guide-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pdf-step-box {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px 22px;
}

.pdf-step-title {
  font-size: 1.15rem; /* ~18.4px */
  font-weight: 800;
  color: var(--tvsi-blue-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pdf-step-title span:first-child {
  display: inline-flex;
  width: 32px;
  height: 32px;
  background: #1254b7;
  color: #ffffff;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

.pdf-step-desc {
  font-size: 1.05rem; /* ~16.8px */
  color: #1e293b;
  line-height: 1.65;
  padding-left: 44px;
  font-weight: 500;
}
