/* WPSoft Site Tools v3.3.138 — styles apply only to galleries selected in AI HTML Designer. */
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount,
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-design-target > .wpst-ai-gallery-mount{
  display:block!important;grid-column:1 / -1!important;min-width:0!important;
  width:100%!important;max-width:100%!important;margin:0!important;padding:0!important;
  box-sizing:border-box!important;
}
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery{
  --wpst-gallery-gap:clamp(14px,var(--wpst-ai-gallery-gap,20px),30px)!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  box-sizing:border-box!important;
}
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery-card{
  border-radius:var(--wpst-ai-gallery-radius,16px)!important;
}
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery-card > img{
  aspect-ratio:var(--wpst-ai-gallery-ratio,4 / 3)!important;
  object-fit:cover!important;
}
.wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery-video > img{
  aspect-ratio:16/9!important;
}
@media(max-width:1024px){
  .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media(max-width:600px){
  .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount .wpst-media-gallery{
    --wpst-gallery-gap:12px!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* Elementor-only diagnostics for selected-but-empty gallery collections. */
.wpst-aihtml-root .wpst-ai-gallery-editor-message{
  display:block!important;grid-column:1/-1!important;max-width:100%!important;
  border:1px solid #c7d9fa!important;background:#f0f6ff!important;color:#244269!important;
  padding:14px 18px!important;border-radius:12px!important;
  font:500 13px/1.5 system-ui,sans-serif!important;margin:14px 0!important;
}
.wpst-aihtml-root .wpst-ai-gallery-editor-message a{color:#2259cd!important;text-decoration:underline!important;}


/* v3.3.140 — Prevent imported HTML's zero-gap grid from collapsing gallery
   gutters. The selection also covers manually embedded WPSoft shortcodes in
   AI HTML Designer, not only galleries created with the Elementor picker. */
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery {
  --wpst-gallery-gap:clamp(14px,var(--wpst-ai-gallery-gap,20px),30px)!important;
  display:grid!important;
  gap:var(--wpst-gallery-gap)!important;
  row-gap:var(--wpst-gallery-gap)!important;
  column-gap:var(--wpst-gallery-gap)!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  align-content:start!important;
  justify-content:stretch!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-ai-gallery-mount {
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery:not(.wpst-media-gallery--masonry) {
  grid-template-columns:repeat(var(--wpst-gallery-columns,3),minmax(0,1fr))!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card {
  position:relative!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(224,232,245,.95)!important;
  border-radius:var(--wpst-ai-gallery-radius,18px)!important;
  overflow:hidden!important;
  background:#f2f5fb!important;
  box-shadow:0 10px 30px rgba(18,35,70,.09)!important;
  transition:box-shadow .25s ease,transform .25s ease!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card:hover {
  transform:translateY(-3px)!important;
  box-shadow:0 20px 42px rgba(18,35,70,.17)!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card > img {
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:auto!important;
  aspect-ratio:var(--wpst-ai-gallery-ratio,4 / 3)!important;
  object-fit:cover!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  transition:transform .35s ease!important;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card:hover > img {
    transform:scale(1.035)!important;
  }
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery--video .wpst-media-gallery-video > img {
  aspect-ratio:16 / 9!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery--masonry {
  display:block!important;
  columns:var(--wpst-gallery-columns,3)!important;
  column-gap:var(--wpst-gallery-gap)!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery--masonry .wpst-media-gallery-card {
  margin-bottom:var(--wpst-gallery-gap)!important;
  break-inside:avoid!important;
}
body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery--masonry .wpst-media-gallery-card > img {
  aspect-ratio:auto!important;
}
@media(max-width:1024px) {
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery:not(.wpst-media-gallery--masonry) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery--masonry {columns:2!important;}
}
@media(max-width:600px) {
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery {
    --wpst-gallery-gap:12px!important;
    gap:12px!important;row-gap:12px!important;column-gap:12px!important;
  }
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card {
    border-radius:12px!important;
  }
}
@media(prefers-reduced-motion:reduce){
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card,
  body .wpst-aihtml-root[data-wpst-ai-html="1"] .wpst-media-gallery .wpst-media-gallery-card > img {
    transition:none!important;
  }
}
