/*
 * Site-specific React Bits TiltedCard adaptation: only the existing inner visual
 * rotates. Pointer glow remains exclusively owned by site.js / screen.css.
 * Source: https://github.com/DavidHDev/react-bits/blob/main/src/content/Components/TiltedCard/TiltedCard.jsx
 * MIT + Commons Clause; copyright (c) 2026 David Haz.
 * Full upstream permission/restriction notice is retained in interactions.js.
 * Native image viewer styling below is original site code.
 */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .shknv-tilt-visual {
    transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
    transform-origin: center;
    transition: transform 180ms ease-out;
  }
}

.shknv-image-host { position: relative; }

.shknv-image-open,
.shknv-image-close,
.shknv-image-original {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid #a85a90;
  border-radius: 10px;
  background: #21101f;
  color: #fff3fb;
  font: 600 13px/1.3 var(--sans, sans-serif);
  letter-spacing: .01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.shknv-image-open {
  margin-block: 8px;
  vertical-align: middle;
  box-shadow: 0 4px 16px #08040840;
}

.shknv-image-open-overlay {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 12px;
  max-width: calc(100% - 24px);
  margin: 0;
  background: #21101ff2;
}

.shknv-image-open:hover,
.shknv-image-close:hover,
.shknv-image-original:hover {
  border-color: #ff9bda;
  background: #48203d;
  color: #fff;
}

.shknv-image-open:focus-visible,
.shknv-image-close:focus-visible,
.shknv-image-original:focus-visible {
  outline: 3px solid #ff9bda;
  outline-offset: 3px;
}

.shknv-image-dialog {
  box-sizing: border-box;
  width: calc(100% - 24px);
  max-width: 1440px;
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-height: none;
  margin: auto;
  padding: clamp(10px, 2vw, 24px);
  overflow: hidden;
  border: 1px solid #82506f;
  border-radius: 16px;
  background: #100a12;
  color: #fff3fb;
  box-shadow: 0 24px 100px #0009;
  color-scheme: dark;
}

.shknv-image-dialog::backdrop {
  background: #080408e8;
  backdrop-filter: blur(10px);
}

.shknv-image-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.shknv-image-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.shknv-image-close { margin-left: auto; }

.shknv-image-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
}

.shknv-image-full {
  display: block;
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.shknv-image-status {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  max-width: 36ch;
  margin: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #21101ff2;
  color: #f9cce8;
  font: 14px/1.5 var(--sans, sans-serif);
  text-align: center;
}

.shknv-image-caption {
  max-height: 20vh;
  max-height: 20dvh;
  margin: 0;
  overflow: auto;
  overscroll-behavior: contain;
  color: #ddbdd5;
  font: 14px/1.5 var(--sans, sans-serif);
  overflow-wrap: anywhere;
  text-align: center;
}

.shknv-image-dialog [hidden] { display: none; }

@media (max-width: 480px) {
  .shknv-image-dialog {
    width: calc(100% - 16px);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    padding: 10px;
    border-radius: 12px;
  }
  .shknv-image-open-overlay { top: 8px; right: 8px; }
  .shknv-image-toolbar { gap: 6px; }
  .shknv-image-close,
  .shknv-image-original { padding-inline: 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .shknv-tilt-visual { transform: none; transition: none; }
}

@media print {
  .shknv-image-open,
  .shknv-image-dialog { display: none !important; }
}
