/* ==========================================================================
   Maslow Secure Room — document viewer chrome (DR-SPEC §4.4)
   Dark chrome so the document is the brightest thing on screen.
   Loads after room.css and reuses its tokens.
   ========================================================================== */

.v-body {
  margin: 0;
  background: #10162E;                 /* darker than --ink, so the bar reads as chrome */
  color: #fff;
  min-height: 100vh;
}

/* --- top bar -------------------------------------------------------------- */
.v-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 0 18px; height: 58px;
  background: rgba(27,36,84,.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.v-spacer { flex: 1; }

.v-back {
  width: 34px; height: 34px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(255,255,255,.18); border-radius: var(--r);
  color: #fff; font-size: 16px; line-height: 1;
}
.v-back:hover { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.32); }

.v-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.v-name {
  font-weight: 700; font-size: 15px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
}
.v-ext {
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  border: 1px solid rgba(255,255,255,.22); border-radius: 5px;
  padding: 2px 6px; color: rgba(255,255,255,.72); flex: none;
}

/* --- chips ---------------------------------------------------------------- */
.v-chip {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; font-weight: 600;
  border-radius: var(--r-sm); padding: 5px 9px; flex: none; white-space: nowrap;
}
.v-chip-wm { color: var(--pink); background: rgba(238,123,228,.13); border: 1px solid rgba(238,123,228,.34); }
.v-chip-vo { color: rgba(255,255,255,.68); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }

/* --- page indicator + zoom ------------------------------------------------ */
.v-pg {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em;
  color: rgba(255,255,255,.66); white-space: nowrap;
}
.v-zoom { display: flex; gap: 5px; }
.v-zbtn {
  width: 30px; height: 30px;
  border: 1.5px solid rgba(255,255,255,.18); border-radius: 8px;
  background: transparent; color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
}
.v-zbtn:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.32); }

/* --- download ------------------------------------------------------------- */
.v-dl {
  border: 1.5px solid var(--pink); background: var(--pink); color: #fff;
  border-radius: var(--r); padding: 8px 14px; font-size: 13px; font-weight: 700;
  white-space: nowrap; flex: none;
}
.v-dl:hover { background: var(--pink-deep); border-color: var(--pink-deep); color: #fff; }

/* --- stage ---------------------------------------------------------------- */
.viewer-stage {
  padding: 28px 18px 70px;
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.v-loading { color: rgba(255,255,255,.5); padding: 80px 0; letter-spacing: .16em; }

/* view.js creates .pagebox / .pageno — style them for the dark chrome. */
.pagebox {
  position: relative;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  background: #fff;
  max-width: min(1100px, 94vw);
}
.pagebox canvas, .pagebox img { display: block; max-width: 100%; height: auto; }
.pageno {
  position: absolute; left: 12px; bottom: 10px;
  font-family: var(--mono); font-size: 9px; letter-spacing: .12em;
  color: rgba(27,36,84,.5); background: rgba(255,255,255,.86);
  border-radius: 5px; padding: 3px 7px; pointer-events: none;
}

/* Watermark overlay for image previews (PDFs are stamped onto the canvas by view.js). */
.v-wm-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(38deg, transparent, transparent 120px,
              rgba(120,120,140,.12) 120px, rgba(120,120,140,.12) 121px);
  display: flex; align-items: center; justify-content: center;
}
.v-wm-overlay span {
  transform: rotate(-24deg);
  font-family: var(--mono); font-size: 12px;
  color: rgba(90,90,110,.4); white-space: nowrap;
}

.v-nopreview {
  max-width: 460px; text-align: center; margin-top: 80px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl); padding: 28px;
}

/* --- responsive ----------------------------------------------------------- */
@media (max-width: 820px) {
  .v-bar { gap: 9px; padding: 0 12px; }
  .v-name { max-width: 34vw; font-size: 14px; }
  .v-chip-wm, .v-ext { display: none; }        /* the watermark is on the page itself */
  .viewer-stage { padding: 16px 10px 60px; }
}

@media print { .v-bar { display: none; } .v-body { background: #fff; } }
