/* ENOTE Lightbox 1.0.0 */
.elb-trigger, img.elb-trigger { cursor: zoom-in; }
html.elb-open { overscroll-behavior: none; }

.elb { position: fixed; inset: 0; overscroll-behavior: contain; z-index: 2147483000; display: grid; grid-template-rows: auto 1fr auto;
  background: rgba(10, 14, 30, calc(.97 * var(--elb-fade, 1))); color: #fff; touch-action: none; -webkit-user-select: none; user-select: none;
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.elb[hidden] { display: none; }

.elb-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px;
  padding-top: max(8px, env(safe-area-inset-top)); position: relative; z-index: 2; }
.elb-count { font-variant-numeric: tabular-nums; opacity: .85; }
.elb-tools { display: flex; gap: 4px; margin-left: auto; }
.elb-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; text-decoration: none; transition: background .15s; }
.elb-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.elb-btn:focus-visible { outline: 2px solid #8fb2ff; outline-offset: 2px; }
.elb-fit[aria-pressed="true"] { background: rgba(23, 92, 255, .6); }

.elb-stage { position: relative; overflow: hidden; cursor: zoom-out; } /* клік закриває */
.elb.is-zoomed .elb-stage { cursor: grab; }
.elb.is-zoomed .elb-stage:active { cursor: grabbing; }
.elb-img { position: absolute; left: 0; top: 0; max-width: none !important; transform-origin: 0 0; will-change: transform;
  background: #fff; border-radius: 4px; box-shadow: 0 10px 40px rgba(0, 0, 0, .4); image-rendering: auto; }
.elb-spinner { position: absolute; right: 16px; bottom: 16px; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; opacity: 0; transition: opacity .2s; animation: elb-spin .8s linear infinite; }
.elb.is-loading .elb-spinner { opacity: 1; transition-delay: .3s; }
@keyframes elb-spin { to { transform: rotate(360deg); } }

.elb-nav { position: absolute; top: 50%; margin-top: -26px; width: 52px; height: 52px; border-radius: 50%; z-index: 2; background: rgba(0, 0, 0, .45); }
.elb-prev { left: 12px; }
.elb-next { right: 12px; }
.elb.is-single .elb-nav, .elb.is-single .elb-count { display: none; }

.elb-cap { margin: 0; padding: 10px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); text-align: center; color: rgba(255, 255, 255, .88); position: relative; z-index: 2; }
.elb-cap[hidden] { display: block; visibility: hidden; }

.elb-toast { position: absolute; left: 50%; bottom: 64px; transform: translate(-50%, 10px); padding: 8px 14px; border-radius: 8px;
  background: #fff; color: #0b163f; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3; }
.elb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* Сенсорні екрани: масштаб пальцями, кнопки +/− не потрібні; стрілки — менші й прозоріші. */
@media (hover: none), (pointer: coarse) {
  .elb-zoombtn { display: none; }
  .elb-nav { width: 44px; height: 44px; margin-top: -22px; background: rgba(0, 0, 0, .3); }
  .elb-prev { left: 6px; } .elb-next { right: 6px; }
}

/* Лупа */
.elb-lens { position: fixed; z-index: 2147482000; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
  border: 3px solid #fff; box-shadow: 0 6px 24px rgba(11, 22, 63, .35), 0 0 0 1px rgba(11, 22, 63, .15);
  background-color: #fff; background-repeat: no-repeat; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; }
.elb-lens.is-on { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .elb-lens, .elb-toast, .elb-spinner { transition: none; }
}
@media print { .elb, .elb-lens { display: none !important; } }
