/* STLBEAST V777 — accessible guide-image zoom viewer */
:root {
  --v777-bg: rgba(0, 5, 12, 0.96);
  --v777-panel: #071728;
  --v777-border: #158ee7;
  --v777-blue: #2aa9ff;
  --v777-text: #f2f7ff;
  --v777-muted: #b9c9da;
}

a.v777-guide-zoom-trigger {
  position: relative;
  display: block;
  cursor: zoom-in;
  text-decoration: none;
  outline: none;
}

a.v777-guide-zoom-trigger::after {
  content: "Click to enlarge";
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid rgba(42, 169, 255, 0.9);
  border-radius: 999px;
  background: rgba(0, 9, 19, 0.88);
  color: var(--v777-text);
  font: 700 13px/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

a.v777-guide-zoom-trigger:hover::after,
a.v777-guide-zoom-trigger:focus-visible::after {
  background: #0a5fa2;
}

a.v777-guide-zoom-trigger:focus-visible {
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(42, 169, 255, 0.45);
}

img.v777-guide-zoom-image {
  cursor: zoom-in;
}

.v777-zoom-open {
  overflow: hidden !important;
}

.v777-zoom-modal[hidden] {
  display: none !important;
}

.v777-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--v777-bg);
  color: var(--v777-text);
  overscroll-behavior: contain;
}

.v777-zoom-toolbar,
.v777-zoom-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px max(12px, env(safe-area-inset-left));
  background: rgba(4, 18, 31, 0.98);
  border-color: rgba(42, 169, 255, 0.35);
}

.v777-zoom-toolbar {
  justify-content: space-between;
  border-bottom: 1px solid rgba(42, 169, 255, 0.35);
}

.v777-zoom-footer {
  justify-content: center;
  border-top: 1px solid rgba(42, 169, 255, 0.35);
  color: var(--v777-muted);
  font: 600 13px/1.35 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

.v777-zoom-title {
  min-width: 0;
  overflow: hidden;
  color: var(--v777-text);
  font: 800 15px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v777-zoom-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.v777-zoom-button,
.v777-zoom-original {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(42, 169, 255, 0.65);
  border-radius: 9px;
  background: var(--v777-panel);
  color: var(--v777-text);
  font: 800 15px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
  text-decoration: none;
}

.v777-zoom-button:hover,
.v777-zoom-button:focus-visible,
.v777-zoom-original:hover,
.v777-zoom-original:focus-visible {
  background: #0a5fa2;
  outline: 3px solid rgba(42, 169, 255, 0.32);
  outline-offset: 1px;
}

.v777-zoom-original {
  padding: 0 12px;
  white-space: nowrap;
}

.v777-zoom-viewport {
  position: relative;
  overflow: auto;
  display: grid;
  place-items: center;
  padding: 24px;
  scrollbar-color: var(--v777-blue) #06101b;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y pinch-zoom;
}

.v777-zoom-stage {
  min-width: min-content;
  min-height: min-content;
  display: grid;
  place-items: center;
}

.v777-zoom-full-image {
  display: block;
  max-width: none !important;
  max-height: none !important;
  width: auto;
  height: auto;
  border: 1px solid rgba(42, 169, 255, 0.55);
  border-radius: 8px;
  background: #02070d;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
  user-select: none;
  -webkit-user-drag: none;
}

.v777-zoom-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--v777-muted);
  font: 700 16px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
}

.v777-zoom-loading[hidden] {
  display: none;
}

@media (max-width: 720px) {
  a.v777-guide-zoom-trigger::after {
    right: 8px;
    bottom: 8px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .v777-zoom-toolbar {
    align-items: flex-start;
    gap: 8px;
  }

  .v777-zoom-title {
    padding-top: 12px;
    font-size: 13px;
  }

  .v777-zoom-controls {
    max-width: 225px;
  }

  .v777-zoom-original {
    width: 42px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    position: relative;
  }

  .v777-zoom-original::after {
    content: "↗";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--v777-text);
    font-size: 20px;
  }

  .v777-zoom-viewport {
    padding: 10px;
  }

  .v777-zoom-footer {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v777-zoom-modal *,
  .v777-guide-zoom-trigger::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
