
/* TISIAS PATCH V166
   TARGET ONLY: /ican-finals2026test

   Universal image viewer for every image inside the Finals page content.
   - Click any image -> full-screen viewer
   - Mouse wheel -> zoom in/out
   - Hold left mouse button + drag -> free panning
   - Double click / RESET -> reset view
   - ESC / X / backdrop -> close

   No content/order/layout/media/PDF/Catalogue Reader changes.
*/

#wsite-content img {
  cursor: zoom-in;
}

html.tisias-v166-image-viewer-open,
html.tisias-v166-image-viewer-open body {
  overflow: hidden !important;
}

#tisias-v166-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: none;
  background:
    radial-gradient(circle at 50% 45%, rgba(34,58,48,.22), transparent 42%),
    rgba(2,7,5,.96);
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

#tisias-v166-image-viewer.tisias-v166-open {
  display: block;
}

.tisias-v166-viewer-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.tisias-v166-viewer-stage.tisias-v166-dragging {
  cursor: grabbing;
}

.tisias-v166-viewer-image {
  display: block;
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: auto;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 26px 80px rgba(0,0,0,.48);
  border-radius: 5px;
}

.tisias-v166-toolbar {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 120px);
  padding: 7px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 13px;
  background: rgba(2,13,9,.82);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
}

.tisias-v166-toolbar button,
.tisias-v166-close {
  appearance: none;
  border: 1px solid rgba(164,255,93,.26);
  border-radius: 9px;
  background: rgba(145,255,72,.08);
  color: #eaffcd;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.tisias-v166-toolbar button {
  min-width: 42px;
  min-height: 34px;
  padding: 0 11px;
}

.tisias-v166-toolbar button:hover,
.tisias-v166-close:hover {
  background: rgba(145,255,72,.16);
  border-color: rgba(164,255,93,.48);
}

.tisias-v166-zoom-value {
  min-width: 66px;
  text-align: center;
  color: #fff6ba;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.tisias-v166-close {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 25px;
  line-height: 1;
}

.tisias-v166-caption {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(900px, calc(100vw - 40px));
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 10px;
  background: rgba(1,10,7,.78);
  color: #e9f5ed;
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
  backdrop-filter: blur(8px);
}

.tisias-v166-help {
  display: inline-block;
  margin-left: 8px;
  color: #aaff63;
  font-weight: 800;
}

@media (max-width: 700px) {
  .tisias-v166-toolbar {
    top: 9px;
    max-width: calc(100vw - 74px);
    gap: 5px;
    padding: 5px;
  }

  .tisias-v166-toolbar button {
    min-width: 36px;
    min-height: 32px;
    padding: 0 8px;
  }

  .tisias-v166-close {
    top: 9px;
    right: 9px;
    width: 38px;
    height: 38px;
  }

  .tisias-v166-viewer-image {
    max-width: 96vw;
    max-height: 82vh;
  }

  .tisias-v166-caption {
    bottom: 9px;
  }

  .tisias-v166-help {
    display: none;
  }
}
