/* ==========================================
   BASIC RESET
   ========================================== */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  height: 100%;

  overflow: hidden;

  background: #202020;

  font-family: Arial, Helvetica, sans-serif;

  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================
   TOOLBAR
   ========================================== */

.viewer-toolbar {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 58px;

  background: #111;

  color: white;

  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 0 15px;

  z-index: 10000;

  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ==========================================
   TOOLBAR SECTIONS
   ========================================== */

.toolbar-left,
.toolbar-center,
.toolbar-right {
  display: flex;

  align-items: center;

  gap: 8px;
}

.toolbar-left {
  min-width: 160px;
}

.toolbar-center {
  justify-content: center;
}

.toolbar-right {
  min-width: 160px;
  justify-content: flex-end;
}

/* ==========================================
   BUTTONS
   ========================================== */

.viewer-button {
  border: none;

  background: #333;

  color: white;

  width: 36px;
  height: 34px;

  border-radius: 5px;

  font-size: 18px;

  cursor: pointer;
}

.viewer-button:hover {
  background: #555;
}

.viewer-button:disabled {
  opacity: 0.35;

  cursor: not-allowed;
}

/* ==========================================
   PAGE NUMBER
   ========================================== */

.page-number,
.page-count,
.page-separator {
  color: #eee;

  font-size: 14px;
}

.page-number {
  min-width: 35px;

  text-align: center;
}

/* ==========================================
   ZOOM
   ========================================== */

#zoomLevel {
  min-width: 50px;

  text-align: center;

  color: #eee;

  font-size: 14px;
}

/* ==========================================
   PROTECTION TEXT
   ========================================== */

.protection-text {
  font-size: 12px;

  color: #ccc;
}

/* ==========================================
   PDF VIEWER AREA
   ========================================== */

.viewer-container {
  position: absolute;

  top: 58px;

  left: 0;

  right: 0;

  bottom: 0;

  overflow: auto;

  display: flex;

  justify-content: center;

  align-items: flex-start;

  padding: 30px;

  background: #2b2b2b;
}

/* ==========================================
   PDF CANVAS
   ========================================== */

.pdf-canvas {
  display: none;

  background: white;

  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

  user-select: none;

  -webkit-user-select: none;

  -webkit-user-drag: none;
}

/* ==========================================
   LOADING
   ========================================== */

.loading {
  position: absolute;

  top: 50%;

  left: 50%;

  transform: translate(-50%, -50%);

  color: white;

  font-size: 18px;
}

/* ==========================================
   WATERMARK
   ========================================== */

.watermark {
  position: fixed;

  top: 50%;

  left: 50%;

  transform: translate(-50%, -50%) rotate(-30deg);

  text-align: center;

  font-size: 28px;

  font-weight: bold;

  color: rgba(80, 80, 80, 0.12);

  pointer-events: none;

  user-select: none;

  -webkit-user-select: none;

  z-index: 9999;

  white-space: nowrap;
}

/* ==========================================
   SECURITY MESSAGE
   ========================================== */

.security-message {
  position: fixed;

  bottom: 20px;

  left: 50%;

  transform: translateX(-50%);

  background: rgba(0, 0, 0, 0.85);

  color: white;

  padding: 10px 18px;

  border-radius: 6px;

  font-size: 13px;

  z-index: 20000;

  opacity: 0;

  pointer-events: none;

  transition: opacity 0.3s ease;
}

.security-message.show {
  opacity: 1;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {
  .viewer-toolbar {
    height: 52px;

    padding: 0 8px;
  }

  .viewer-container {
    top: 52px;

    padding: 15px 5px;
  }

  .toolbar-right {
    display: none;
  }

  .toolbar-left {
    min-width: auto;
  }

  .viewer-button {
    width: 32px;

    height: 30px;
  }

  .watermark {
    font-size: 17px;
  }
}

/* ==========================================
   PRINT PROTECTION
   Hides all content if the page is sent
   to the print dialog (Ctrl+P, File→Print,
   or browser print-to-PDF).
   ========================================== */

@media print {
  html,
  body {
    display: none !important;
    visibility: hidden !important;
  }
}
