/* Scoped NCDC viewer; existing COALESIA Design System tokens are not changed. */
* { box-sizing: border-box; }
html { height: 100%; }
body.ncdc-viewer { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; min-width: 0; overflow: hidden; font-size: 16px; }
.ncdc-viewer [hidden] { display: none !important; }
body.ncdc-viewer > .ncdc-viewer__header { display: flex; align-items: flex-start; gap: 16px; height: auto; min-height: 0; padding: 16px 24px; background: #fff; border-bottom: 1px solid var(--coalesia-line); flex-shrink: 0; }
.ncdc-viewer__identity { flex: 1; min-width: 0; }
.ncdc-viewer__brand { margin: 0 0 4px; font-size: 12px; font-weight: 500; color: var(--coalesia-brand-green); overflow-wrap: anywhere; }
body.ncdc-viewer h1 { font: 500 20px/1.4 var(--sans); margin: 0; overflow-wrap: anywhere; }
html[lang="ka"] body.ncdc-viewer h1 { font-family: var(--coalesia-font-sans-ka); }
.ncdc-viewer__reference { margin: 4px 0 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ncdc-viewer a, .ncdc-viewer button { -webkit-tap-highlight-color: transparent; }
.ncdc-viewer button, .ncdc-viewer__control, .ncdc-viewer__close { min-height: 44px; min-width: 44px; padding: 8px 12px; font: 500 14px/1.4 var(--sans); background: #fff; color: var(--coalesia-brand-green); border: 1px solid var(--coalesia-line); border-radius: var(--coalesia-radius-field); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ncdc-viewer__close { gap: 6px; flex-shrink: 0; }
.ncdc-viewer__close span { font-size: 24px; line-height: 1; }
.ncdc-viewer button:disabled, .ncdc-viewer [aria-disabled="true"] { opacity: .42; cursor: default; }
.ncdc-viewer :is(button, a, main):focus-visible { outline: 3px solid var(--coalesia-brand-green); outline-offset: 2px; }
.ncdc-viewer__toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px 18px; flex-wrap: wrap; padding: 10px 24px; flex-shrink: 0; border-bottom: 1px solid var(--coalesia-line); }
.ncdc-viewer__pages, .ncdc-viewer__zoom { display: flex; align-items: center; gap: 8px; min-width: 0; }
#evidence-counter { font-size: 14px; min-width: 100px; text-align: center; }
#evidence-zoom-value { font-size: 13px; min-width: 40px; text-align: center; }
.ncdc-viewer__control { font-size: 26px; padding: 0; }
.ncdc-viewer__note { font-size: 12px; line-height: 1.5; margin: 0; padding: 8px 24px; flex-shrink: 0; }
.ncdc-viewer__stage { flex: 1; min-height: 0; min-width: 0; overflow: auto; overscroll-behavior: contain; padding: 16px; background: var(--coalesia-line); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.ncdc-viewer__image { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; background: #fff; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.ncdc-viewer__image.is-zoomed { max-width: none; margin-left: 0; margin-right: 0; }
.ncdc-viewer__message { padding: 20px; max-width: 620px; margin: 0 auto; background: #fff; line-height: 1.6; }
@media (max-width: 640px) {
  body.ncdc-viewer > .ncdc-viewer__header { padding: 10px 12px; gap: 8px; }
  body.ncdc-viewer h1 { font-size: 16px; line-height: 1.45; }
  .ncdc-viewer__brand { font-size: 11px; }
  .ncdc-viewer__toolbar { padding: 8px 12px; gap: 6px; }
  .ncdc-viewer__pages, .ncdc-viewer__zoom { justify-content: center; width: 100%; gap: 6px; }
  .ncdc-viewer__zoom { flex-wrap: wrap; }
  .ncdc-viewer__note { padding: 6px 12px; font-size: 11px; }
  .ncdc-viewer__note span { display: none; }
  .ncdc-viewer__stage { padding: 6px; }
  .ncdc-viewer__close { padding: 8px; font-size: 12px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .ncdc-viewer__brand, .ncdc-viewer__reference, .ncdc-viewer__note { display: none; }
  body.ncdc-viewer > .ncdc-viewer__header { padding-top: 4px; padding-bottom: 4px; align-items: center; }
  .ncdc-viewer__toolbar { padding-top: 4px; padding-bottom: 4px; }
}
@media print { body.ncdc-viewer { display: none !important; } }
