/* Fixes added when the site was converted from WordPress to static files. */

/* Gallery grid. The theme sizes each thumbnail cell at 33% / 50% / 100% width
   (desktop / tablet / phone, see the theme stylesheet), but relied on the gallery
   plugin's own stylesheet, which WordPress no longer loaded, to place the cells
   side by side. Without it every thumbnail sat on its own row. */
.ngg-galleryoverview {
  display: flex;
  flex-wrap: wrap;
}

/* Homepage slider arrows. The theme's own slider styling pins .flex-direction-nav
   to the bottom-right corner (position: absolute; bottom: 0; right: 0). That rule
   also hits the homepage slider (MetaSlider) and squeezes both arrows into that
   corner, below the photo and in reverse order. Putting the container back in
   normal flow lets MetaSlider's own rules centre the arrows vertically on the
   photo, 10px in from its left and right edges. */
.metaslider .flex-direction-nav {
  position: static;
}

/* Photo viewer (assets/viewer.js), replacing the broken NextGEN/fancybox lightbox.
   The dialog fills the screen; the photo sits in a white frame like the site's
   content box, and a click on the dark area around it closes the viewer. */
html:has(dialog.viewer[open]) {
  overflow: hidden;
}

dialog.viewer {
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px 72px;
  border: 0;
  background: transparent;
  color: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  touch-action: pan-y pinch-zoom;
}

dialog.viewer:not([open]) {
  display: none;
}

dialog.viewer::backdrop {
  background: rgba(17, 17, 17, 0.9);
}

.viewer-figure {
  margin: 0;
  padding: 10px;
  max-width: 100%;
  background: #fff;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.viewer-figure.is-loaded {
  opacity: 1;
}

.viewer-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  max-height: calc(100dvh - 170px);
}

.viewer-caption {
  margin: 14px 0 0;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.viewer-count {
  position: absolute;
  top: 18px;
  left: 20px;
  margin: 0;
  font-size: 13px;
  color: #bbb;
}

.viewer-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}

.viewer-btn:hover,
.viewer-btn:focus-visible {
  background: rgba(0, 0, 0, 0.7);
}

.viewer-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.viewer-btn[hidden] {
  display: none;
}

.viewer-close {
  top: 10px;
  right: 12px;
}

.viewer-prev,
.viewer-next {
  top: 50%;
  transform: translateY(-50%);
}

.viewer-prev {
  left: 14px;
}

.viewer-next {
  right: 14px;
}

@media (max-width: 600px) {
  dialog.viewer {
    padding: 52px 8px 24px;
  }
  .viewer-prev {
    left: 4px;
  }
  .viewer-next {
    right: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .viewer-figure {
    transition: none;
  }
}

/* Contact form (kontakt): restored 2026-11-25, posts to worker/index.js. */
.kontakt-honeypot {
  position: absolute;
  left: -9999px;
}

#kontaktivorm .cf-turnstile {
  margin: 0 0 20px;
}
