/* ══════════════════════════════════════════════════════════════════════════════
   ADOBE ACROBAT WEB VIEWER — Ultra-realistic PDF Reader Interface
   Two-bar layout: Header bar (logo+user) + Toolbar (tools+zoom)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset for viewer page ── */
.acrobat-body {
  margin: 0;
  padding: 0;
  background-color: #525659;
  font-family: 'adobe-clean', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.acrobat-viewer {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ══════════════════════════════════════════════
   HEADER BAR — Top bar with logo, title, user
   ══════════════════════════════════════════════ */

.acrobat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  min-height: 48px;
  background-color: #1B1B1F;
  padding: 0 16px;
  z-index: 210;
  user-select: none;
}

.acrobat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.acrobat-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.acrobat-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.acrobat-home-btn {
  display: flex;
  align-items: center;
  padding: 6px;
  border-radius: 4px;
  transition: background-color 120ms;
  text-decoration: none;
}

.acrobat-home-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.acrobat-header-sep {
  width: 1px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.12);
}

.acrobat-header-sep-sm {
  width: 1px;
  height: 16px;
  background-color: rgba(255, 255, 255, 0.08);
}

.acrobat-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.2px;
}

.acrobat-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Filename with blurred name */
.acrobat-filename-display {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0;
  font-weight: 400;
  white-space: nowrap;
}

.acrobat-filename-blurred {
  filter: blur(4px);
  -webkit-filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.acrobat-filename-ext {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  user-select: none;
}

.acrobat-header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  cursor: default;
  transition: background-color 120ms, color 120ms;
  padding: 0;
}

.acrobat-header-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.acrobat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: default;
}

/* ══════════════════════════════════════════════
   SECONDARY TOOLBAR — Document tools, zoom
   ══════════════════════════════════════════════ */

.acrobat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  min-height: 40px;
  background-color: #2C2C2C;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 0 10px;
  z-index: 200;
  user-select: none;
}

.acrobat-toolbar-left,
.acrobat-toolbar-center,
.acrobat-toolbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.acrobat-toolbar-center {
  gap: 1px;
}

.acrobat-toolbar-sep-sm {
  width: 1px;
  height: 18px;
  background-color: rgba(255, 255, 255, 0.08);
  margin: 0 4px;
}

/* ── Tool Buttons ── */
.acrobat-tool-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  cursor: default;
  transition: background-color 100ms, color 100ms;
  padding: 0;
  flex-shrink: 0;
}

.acrobat-tool-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
}

.acrobat-tool-btn--sm {
  width: 24px;
  height: 24px;
}

.acrobat-tool-btn[disabled] {
  opacity: 0.3;
}

/* ── Page Navigation (inline in toolbar) ── */
.acrobat-page-nav-inline {
  display: flex;
  align-items: center;
  gap: 2px;
}

.acrobat-page-inline-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}

.acrobat-page-total {
  color: rgba(255, 255, 255, 0.4);
}

.acrobat-page-input {
  width: 26px;
  height: 20px;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  outline: none;
}

/* ── Zoom Slider ── */
.acrobat-zoom-track {
  width: 80px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  position: relative;
  margin: 0 4px;
}

.acrobat-zoom-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.acrobat-zoom-thumb {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.acrobat-zoom-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  min-width: 34px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

/* ══════════════════════════════════════════════
   MAIN AREA
   ══════════════════════════════════════════════ */

.acrobat-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ══════════════════════════════════════════════
   LEFT SIDEBAR
   ══════════════════════════════════════════════ */

.acrobat-sidebar {
  width: 220px;
  min-width: 220px;
  background-color: #2C2C2C;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.acrobat-sidebar-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.acrobat-sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  cursor: default;
  transition: background-color 100ms, color 100ms;
  padding: 0;
}

.acrobat-sidebar-tab.is-active {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.acrobat-sidebar-tab:hover {
  color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.05);
}

.acrobat-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

/* Webkit scrollbar styling */
.acrobat-sidebar-content::-webkit-scrollbar {
  width: 6px;
}
.acrobat-sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}
.acrobat-sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
}

/* ── Thumbnail Cards ── */
.acrobat-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: default;
}

.acrobat-thumb.is-active .acrobat-thumb-page {
  border-color: #4B9CF5;
  box-shadow: 0 0 0 1.5px rgba(75, 156, 245, 0.45), 0 2px 6px rgba(0,0,0,0.3);
}

.acrobat-thumb-page {
  width: 130px;
  height: 172px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 2px;
  padding: 10px 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
  filter: blur(0.5px);
  -webkit-filter: blur(0.5px);
  transition: border-color 150ms, box-shadow 150ms;
}

.acrobat-thumb-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.acrobat-thumb-square {
  width: 8px;
  height: 8px;
  border-radius: 1px;
  flex-shrink: 0;
}

.acrobat-thumb-line {
  height: 2.5px;
  background-color: #d4d4d4;
  border-radius: 1px;
}

.acrobat-thumb-block {
  width: 100%;
  height: 14px;
  background-color: #f0f0f0;
  border: 1px solid #e5e5e5;
  border-radius: 1px;
  margin: 2px 0;
}

.acrobat-thumb-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  font-variant-numeric: tabular-nums;
}

/* ══════════════════════════════════════════════
   DOCUMENT AREA
   ══════════════════════════════════════════════ */

.acrobat-document-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #525659;
  position: relative;
}

.acrobat-page-wrapper {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 40px 60px;
  background: #525659;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.acrobat-page-wrapper::-webkit-scrollbar {
  width: 8px;
}
.acrobat-page-wrapper::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}
.acrobat-page-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 4px;
}

/* ══════════════════════════════════════════════
   PDF PAGE — Blurred document
   ══════════════════════════════════════════════ */

.acrobat-page {
  width: 100%;
  max-width: 700px;
  min-height: 960px;
  background: #fff;
  border-radius: 0;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.08),
    0 4px 16px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.15);
  padding: 56px 56px 40px;
  position: relative;
  font-family: 'adobe-clean', 'Segoe UI', -apple-system, sans-serif;
  /* NO blur on the page container — blur is on inner content only */
  user-select: none;
  pointer-events: none;
}

/* Inner content wrapper — this gets blurred */
.acrobat-page-inner {
  filter: blur(3.2px);
  -webkit-filter: blur(3.2px);
  position: relative;
}

/* Protection overlay */
.acrobat-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 15%,
    transparent 85%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ── Document Header ── */
.pdf-doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.pdf-company-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pdf-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #E03C31 0%, #B71C1C 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pdf-company-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pdf-company-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.1px;
}

.pdf-company-addr {
  font-size: 8px;
  color: #999;
  letter-spacing: 0.2px;
}

.pdf-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: flex-end;
}

.pdf-meta-row {
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.pdf-meta-label {
  font-size: 8px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.pdf-meta-value {
  font-size: 9.5px;
  color: #444;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pdf-doc-divider {
  height: 2px;
  background: linear-gradient(90deg, #E03C31 0%, #E03C31 25%, #eee 25%, #eee 100%);
  margin-bottom: 26px;
  border-radius: 1px;
}

/* ── Title ── */
.pdf-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 22px 0;
  letter-spacing: -0.4px;
}

/* ── Bill To ── */
.pdf-bill-section {
  display: flex;
  gap: 36px;
  margin-bottom: 26px;
}

.pdf-bill-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-label {
  font-size: 7.5px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
}

.pdf-text-line {
  display: block;
  height: 7px;
  background-color: #e8e8e8;
  border-radius: 1.5px;
}

/* ── Invoice Table ── */
.pdf-table {
  margin-bottom: 20px;
}

.pdf-table-header {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  background-color: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 2px 2px 0 0;
  font-size: 7.5px;
  font-weight: 700;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-table-row {
  display: flex;
  align-items: flex-start;
  padding: 9px 10px;
  border: 1px solid #e5e5e5;
  border-top: none;
  font-size: 9.5px;
  color: #444;
  line-height: 1.4;
}

.pdf-table-row strong {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 9.5px;
}

.pdf-row-sub {
  display: block;
  font-style: normal;
  font-size: 7.5px;
  color: #aaa;
  margin-top: 1px;
  line-height: 1.3;
}

.pdf-table-row--last {
  border-radius: 0 0 2px 2px;
}

/* ── Table Totals ── */
.pdf-table-totals {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pdf-total-row {
  display: flex;
  justify-content: space-between;
  width: 200px;
  font-size: 9.5px;
  color: #666;
  padding: 2px 0;
}

.pdf-total-final {
  font-weight: 700;
  font-size: 11px;
  color: #1a1a1a;
  border-top: 1.5px solid #bbb;
  padding-top: 5px;
  margin-top: 2px;
}

/* ── Status Badge ── */
.pdf-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 3px;
  margin-bottom: 20px;
  letter-spacing: 0.1px;
}

.pdf-status-failed {
  background-color: #FFF0EE;
  color: #C9252D;
  border: 1px solid #FFD5D2;
}

/* ── Terms ── */
.pdf-terms {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.pdf-terms-title {
  margin: 0 0 4px 0;
  font-weight: 700;
  color: #777;
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ── Document Footer ── */
.pdf-doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 7px;
  color: #bbb;
}

/* ══════════════════════════════════════════════
   RIGHT RAIL — Icon-only tool strip
   ══════════════════════════════════════════════ */

.acrobat-right-rail {
  width: 44px;
  min-width: 44px;
  background-color: #2C2C2C;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  gap: 2px;
}

.acrobat-rail-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: default;
  transition: background-color 100ms, color 100ms;
  padding: 0;
}

.acrobat-rail-btn.is-active {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

.acrobat-rail-btn:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.65);
}

.acrobat-rail-sep {
  width: 24px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .acrobat-right-rail {
    display: none;
  }

  .acrobat-header-center {
    display: none;
  }
}

@media (max-width: 768px) {
  .acrobat-sidebar {
    display: none;
  }

  .acrobat-header-title {
    font-size: 14px;
  }

  .acrobat-toolbar-center {
    display: none;
  }

  .acrobat-page {
    padding: 32px 28px 24px;
    min-height: 620px;
  }

  .acrobat-page-wrapper {
    padding: 16px 12px 40px;
  }

  .pdf-bill-section {
    flex-direction: column;
    gap: 14px;
  }

  .pdf-doc-header {
    flex-direction: column;
    gap: 10px;
  }

  .pdf-doc-meta {
    align-items: flex-start;
  }

  .pdf-doc-footer {
    flex-direction: column;
    gap: 3px;
    align-items: flex-start;
  }

  .pdf-table-header,
  .pdf-table-row {
    font-size: 7.5px;
  }
}

@media (max-width: 480px) {
  .acrobat-header {
    height: 44px;
    padding: 0 10px;
  }

  .acrobat-toolbar {
    height: 36px;
    padding: 0 6px;
  }

  .acrobat-zoom-track {
    display: none;
  }

  .acrobat-zoom-label {
    display: none;
  }

  .acrobat-page {
    padding: 24px 18px 18px;
    min-height: 480px;
  }

  .pdf-title {
    font-size: 18px;
  }

  .pdf-table-header span:nth-child(2),
  .pdf-table-header span:nth-child(3),
  .pdf-table-row span:nth-child(2),
  .pdf-table-row span:nth-child(3) {
    display: none;
  }

  .pdf-total-row {
    width: 150px;
  }

  .pdf-bill-section {
    gap: 10px;
  }
}

/* ══════════════════════════════════════════════
   MODAL overrides for dark viewer context
   ══════════════════════════════════════════════ */

.acrobat-body .spectrum-Underlay {
  background-color: rgba(0, 0, 0, 0.45);
  /* No backdrop-filter — keep interface sharp behind overlay */
}

.acrobat-body .spectrum-Modal {
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.45),
    0 4px 12px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}
