/* Modal jako centrální flex kontejner */
.lb-modal{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
/* otevření */
.lb-toggle:checked ~ .lb-modal{ display: flex; }

/* Overlay klikací k zavření (za obsahem) */
.lb-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  cursor: zoom-out;
  z-index: 1;
}

/* Box s obsahem (před overlayem) */
.lb-content{
  position: relative;         /* DŮLEŽITÉ pro absolutní křížek */
  z-index: 2;                 /* nad overlayem */
  max-width: 1280px;
  max-height: 90vh;
  overflow: auto;
  margin: 0 4vw;
  display: grid;
  gap: .75rem;
  background: transparent;
  border-radius: 12px;
}

/* Obrázek se vejde do boxu */
.lb-content img{
  display:block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
  border-radius: 10px;
}

/* Křížek – vždy nad obsahem */
.lb-close{
  position: absolute;
  top: .5rem; right: .5rem;
  z-index: 3;                 /* nad vším v boxu */
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 24px/1 system-ui, sans-serif;
  color: #fff;
  background: rgba(0,0,0,.4);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}
/* Totálně schovej přepínač (ale ne display:none) */
.lb-toggle{
  position: absolute !important;
  /* nezabírej místo */
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  /* vizuálně pryč */
  opacity: 0 !important;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  /* ať nemůže „prolézat“ nad thumbnail */
  pointer-events: none;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
}
/* ruka nad thumbnailem */
.lb-thumb,
.lb-thumb img{
  cursor: pointer;  /* standardní „hand“ */
}

/* volitelně jemná nápověda interakce */
.lb-thumb img{
  transition: transform .15s ease, box-shadow .15s ease;
  width:100%; border-radius:5px;
}
.lb-thumb:hover img,
.lb-thumb:focus-visible img{
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
  outline: none;
}

.lb-thumb:focus-visible { outline: 2px solid #0a84ff; outline-offset: 3px; }
