/*
 * JO-Dealz - Deal image lightbox (shared by deal.php desktop layout and templates/mobile-deal-detail.php).
 * Pairs with assets/js/deal-lightbox.js. Logical properties so Arabic RTL and English LTR share one sheet.
 */
.dlb { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; background: rgba(8, 4, 8, .92); opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility 0s linear .22s; -webkit-tap-highlight-color: transparent; }
.dlb.is-open { opacity: 1; visibility: visible; transition: opacity .22s ease; }
.dlb__bar { position: absolute; z-index: 3; inset-inline: 0; inset-block-start: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top, 0px)) calc(14px + env(safe-area-inset-right, 0px)) 12px calc(14px + env(safe-area-inset-left, 0px)); pointer-events: none; }
.dlb__count { pointer-events: auto; min-height: 32px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; background: rgba(255, 255, 255, .14); color: #fff; font: 800 13px/1 system-ui, sans-serif; }
.dlb__count[hidden] { display: none; }
.dlb__btn { pointer-events: auto; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); color: #fff; font-size: 18px; cursor: pointer; transition: background .15s, transform .15s; }
.dlb__btn:hover { background: rgba(255, 255, 255, .26); }
.dlb__btn:active { transform: scale(.92); }
.dlb__btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.dlb__btn i { margin: 0 !important; line-height: 1; color: inherit !important; font-size: inherit !important; }
.dlb__close { margin-inline-start: auto; }
.dlb__stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)); touch-action: pan-y pinch-zoom; }
.dlb__img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); background: #1c1017; user-select: none; -webkit-user-drag: none; opacity: 0; transition: opacity .2s ease; }
.dlb__img.is-ready { opacity: 1; }
.dlb__img[hidden] { display: none; }
.dlb__msg { display: none; flex-direction: column; align-items: center; gap: 10px; color: rgba(255, 255, 255, .85); font: 700 15px/1.5 system-ui, sans-serif; text-align: center; }
.dlb__msg i { font-size: 40px; opacity: .7; }
.dlb.is-broken .dlb__msg { display: flex; }
.dlb__spin { position: absolute; width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: dlbSpin .8s linear infinite; display: none; }
.dlb.is-loading .dlb__spin { display: block; }
@keyframes dlbSpin { to { transform: rotate(360deg); } }
.dlb__nav { position: absolute; z-index: 3; inset-block-start: 50%; margin-block-start: -22px; }
.dlb__nav--prev { inset-inline-start: calc(14px + env(safe-area-inset-left, 0px)); }
.dlb__nav--next { inset-inline-end: calc(14px + env(safe-area-inset-right, 0px)); }
.dlb__nav[hidden] { display: none; }
html.dlb-lock, html.dlb-lock body { overflow: hidden !important; }

/* Zoom affordance on the page image */
.dlb-trigger { cursor: zoom-in; }
.dlb-hint { position: absolute; z-index: 6; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(20, 8, 14, .5); color: #fff; font-size: 15px; cursor: zoom-in; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .15s, transform .15s; }
.dlb-hint:hover { background: rgba(20, 8, 14, .78); }
.dlb-hint:active { transform: scale(.92); }
.dlb-hint i { margin: 0 !important; line-height: 1; color: inherit !important; font-size: inherit !important; }

@media (max-width: 640px) {
  .dlb__stage { padding-inline: 8px; }
  .dlb__nav { display: none; }   /* swipe on touch screens */
}
@media (hover: none) { .dlb__nav { display: none; } }
@media (prefers-reduced-motion: reduce) { .dlb, .dlb__img { transition: none; } .dlb__spin { animation-duration: 2s; } }
