/* PDF viewer modal (used when clicking a manual). */

.pdf-viewer-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(0, 0, 0, 0.95);
}

.pdf-viewer-modal.active {
  display: flex;
  flex-direction: column;
}

.pdf-viewer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.pdf-viewer-title {
  flex: 1 1 auto;
  font-size: 1.15rem;
  font-weight: 600;
}

.pdf-viewer-close {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-soft);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pdf-viewer-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-color: rgba(255, 140, 0, 0.45);
}

.pdf-viewer {
  flex: 1;
  overflow: hidden;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.pdf-viewer iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  text-align: center;
  color: #555;
  background: #f5f5f5;
}

.pdf-fallback h3 {
  margin-bottom: 1rem;
  color: #333;
}

.pdf-download-link {
  padding: 0.6rem 1.2rem;
  background: var(--brand-deep);
  color: #ffffff;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease;
}

.pdf-download-link:hover {
  background: var(--brand-strong);
}
