.pdf-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 10, 14, 0.72);
}

.pdf-gate-modal.hidden {
  display: none;
}

.pdf-gate-card {
  width: min(100%, 400px);
  background: #1a1d24;
  border: 1px solid #2a3140;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  color: #e8eaed;
  font-family: "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;
}

.pdf-gate-card h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.pdf-gate-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #9aa3b2;
  line-height: 1.45;
}

.pdf-gate-usage {
  margin: 0 0 14px;
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a3140;
  font-size: 12px;
  color: #c5cad3;
}

.pdf-gate-close {
  float: right;
  margin: -4px -4px 0 8px;
  padding: 2px 8px;
  background: transparent;
  border: none;
  color: #9aa3b2;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pdf-gate-close:hover {
  color: #e8eaed;
}

.pdf-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdf-gate-actions button {
  padding: 10px 14px;
  border-radius: 7px;
  border: 1px solid #2a3140;
  background: #252932;
  color: #e8eaed;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.pdf-gate-actions button:hover {
  border-color: #5aa17a;
}

.pdf-gate-actions button.primary {
  background: rgba(90, 161, 122, 0.18);
  border-color: #5aa17a;
  color: #7fd4a8;
}

.pdf-gate-actions button.primary:hover {
  background: rgba(90, 161, 122, 0.28);
}

.pdf-gate-actions button.secondary {
  font-weight: 500;
}

.pdf-gate-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.pdf-gate-foot {
  margin: 12px 0 0;
  font-size: 10.5px;
  color: #7a8494;
}

/* Free-tier print watermark — visibility toggled by pdf-gate.js */
.pdf-print-watermark {
  display: none;
}

@media print {
  /* Light footer, not a page-covering stamp — free users get the full,
     readable deliverable (docs/MONETIZATION.md). Fixed-position so it
     repeats at the bottom of every printed page. */
  .pdf-print-watermark.is-free-tier {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 4pt;
    text-align: center;
    pointer-events: none;
    z-index: 99999;
  }

  .pdf-print-watermark.is-free-tier span {
    font: 600 8pt/1 Helvetica, Arial, sans-serif;
    color: rgba(0, 0, 0, 0.4);
    letter-spacing: 0.04em;
    white-space: nowrap;
    user-select: none;
  }
}
