/* news-lightbox.css – styly pro lightbox obrázků v aktualitách (CMSMS)
   Barvu akcentu upravte v proměnné --nlb-accent podle designu webu. */

:root {
  --nlb-accent: #0082ca;            /* modrá – hover lupičky, tlačítek a rámeček fokusu */
  --nlb-backdrop: rgba(0, 0, 0, .88);
}

/* ---------- náhled v článku ---------- */

a.nlb {
  position: relative;
  display: inline-block;
  max-width: 100%;
  line-height: 0;
  cursor: zoom-in;
  overflow: hidden;
}

a.nlb img {
  display: block;
  max-width: 100%;
  height: auto;
  transition: transform .25s ease;
}

a.nlb:hover img,
a.nlb:focus-visible img { transform: scale(1.03); }

a.nlb:focus-visible { outline: 3px solid var(--nlb-accent); outline-offset: 2px; }

/* ikonka lupy v pravém dolním rohu */
a.nlb::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6) no-repeat center / 18px 18px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E");
  transition: background-color .2s ease, transform .2s ease;
  pointer-events: none;
}

a.nlb:hover::after,
a.nlb:focus-visible::after { background-color: var(--nlb-accent); transform: scale(1.1); }

/* ---------- overlay ---------- */

.nlb-noscroll { overflow: hidden; }

.nlb-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nlb-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.nlb-overlay.nlb-open { opacity: 1; visibility: visible; }

.nlb-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
}

.nlb-img {
  display: block;
  max-width: 92vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  background: #222;
  transition: opacity .2s ease;
}

.nlb-loading .nlb-img { opacity: 0; }

.nlb-caption {
  margin-top: 12px;
  max-width: 80ch;
  color: #eee;
  font-size: 15px;
  line-height: 1.4;
  text-align: center;
}

.nlb-counter {
  position: absolute;
  top: 18px;
  left: 20px;
  color: #ccc;
  font-size: 14px;
}

/* tlačítka */
.nlb-btn {
  position: absolute;
  border: 0;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 32px;
  line-height: 46px;
  text-align: center;
  padding: 0;
  transition: background-color .2s ease;
}

.nlb-btn:hover,
.nlb-btn:focus-visible { background: var(--nlb-accent); outline: none; }

.nlb-close { top: 12px; right: 12px; }
.nlb-prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.nlb-next  { right: 12px; top: 50%; transform: translateY(-50%); }

/* spinner */
.nlb-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nlb-spin .8s linear infinite;
}

.nlb-loading .nlb-spinner { display: block; }

@keyframes nlb-spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .nlb-prev, .nlb-next { top: auto; bottom: 14px; transform: none; }
  .nlb-img { max-height: 75vh; }
}

@media (prefers-reduced-motion: reduce) {
  a.nlb img, a.nlb::after, .nlb-overlay, .nlb-img { transition: none; }
  .nlb-spinner { animation-duration: 2s; }
}
