/*
 * V5.0.29 unified brand watermark
 * Scope:
 * - /zsb/info: historical exam detail container
 * - /zsb/ai: basic information form and AI recommendation result container
 * - all Hubei mindmap detail pages: mindmap canvas/viewer container
 */

:root {
  --xls-watermark-image-v529: url('/assets/xls-watermark-tile-v529.png');
  --xls-watermark-size-v529: 420px 240px;
}

/* Exact containers requested by the product owner. */
body .table-card,
body .form-card,
body #result,
body .map-canvas {
  position: relative;
  isolation: isolate;
}

body .table-card,
body .form-card,
body #result {
  overflow: hidden;
}

body .table-card::after,
body .form-card::after,
body #result::after,
body .map-canvas::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 18;
  display: block;
  background-image: var(--xls-watermark-image-v529);
  background-repeat: repeat;
  background-position: 22px 14px;
  background-size: var(--xls-watermark-size-v529);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Keep floating controls and full-screen tools visually above the watermark. */
body .map-canvas .canvas-tools,
body .map-canvas .pdf-toolbar,
body .map-canvas .standalone-pdf-toolbar,
body .map-canvas .subject-verb-viewer-toolbar,
body .map-canvas .tense-voice-viewer-toolbar {
  position: relative;
  z-index: 40;
}

/* The result container may start empty; preserve a stable watermark area. */
body #result {
  min-height: 110px;
}

@media (max-width: 760px) {
  :root {
    --xls-watermark-size-v529: 320px 184px;
  }

  body .table-card::after,
  body .form-card::after,
  body #result::after,
  body .map-canvas::after {
    background-position: 8px 6px;
  }
}

@media print {
  body .table-card::after,
  body .form-card::after,
  body #result::after,
  body .map-canvas::after {
    opacity: .72;
  }
}
