/*! giasy-image-lightbox-popup-20260908.css
 * Phóng to = popup tối có khung, KHÔNG tràn full trắng như mở ảnh riêng.
 */
html.storefront-root [data-giasy-image-lightbox="1"],
html.admin-root [data-giasy-image-lightbox="1"],
html.storefront-root [data-giasy-image-lightbox="1"][role="dialog"],
html.admin-root [data-giasy-image-lightbox="1"][role="dialog"],
html.storefront-root .giasy-image-lightbox,
html.admin-root .giasy-image-lightbox {
  background: rgba(0, 0, 0, 0.92) !important;
  background-color: rgba(0, 0, 0, 0.92) !important;
  color: #fff !important;
  border: none !important;
}

/* Overlay sky → đen mờ */
html.storefront-root body:has([role="dialog"] img[alt*="Zoom"]) .fixed.inset-0.isolate,
html.storefront-root body:has([role="dialog"] img[alt*="Zoom"]) .bg-sky-100\/55,
html.storefront-root body:has([role="dialog"] img[alt*="Zoom"]) [class*="bg-sky-100"],
html.storefront-root [data-radix-dialog-overlay] {
  background: rgba(0, 0, 0, 0.82) !important;
  background-color: rgba(0, 0, 0, 0.82) !important;
  backdrop-filter: blur(3px) !important;
  -webkit-backdrop-filter: blur(3px) !important;
  opacity: 1 !important;
}

/* Dialog zoom: nền tối full, nội dung căn giữa */
html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]),
html.storefront-root [data-radix-dialog-content]:has(img[alt*="Zoom"]) {
  background: rgba(0, 0, 0, 0.82) !important;
  background-color: rgba(0, 0, 0, 0.82) !important;
  color: #fff !important;
  border: none !important;
  max-width: 100vw !important;
  width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  translate: 0 0 !important;
  border-radius: 0 !important;
  padding: 24px !important;
  margin: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Wrapper trong dialog không giãn ảnh full */
html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]) .bg-slate-900,
html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]) [class*="bg-slate-"],
html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]) > div {
  background: transparent !important;
  background-color: transparent !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 100% !important;
}

/* Ảnh = popup giữa màn, để lộ nền tối xung quanh */
html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]) img[alt*="Zoom"] {
  max-width: min(88vw, 980px) !important;
  max-height: 72vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  margin: auto !important;
  border-radius: 12px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.65) !important;
  background: #0b1220 !important;
}

html.storefront-root [role="dialog"]:has(img[alt*="Zoom"]) button {
  color: #fff !important;
}
