/* KSK Designer 1.1.7 — purchase WPCode integration and initial load. */

/* First paint: avoid the temporary narrow WooCommerce product while JS assembles
   the full-width editor. The server adds kskd-booting only to THIS product. */
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready){
  position:relative!important;
  min-height:min(750px,80vh)!important;
  isolation:isolate;
}
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)>*{
  visibility:hidden!important;
  pointer-events:none!important;
}
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)::before,
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)::after{
  content:"";
  display:block!important;
  position:absolute!important;
  left:50%!important;
  z-index:999!important;
  visibility:visible!important;
  pointer-events:none!important;
  box-sizing:border-box!important;
}
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)::before{
  top:clamp(145px,32vh,290px)!important;
  width:43px!important;height:43px!important;
  margin-left:-21.5px!important;
  border:4px solid #d9e9fa!important;
  border-top-color:#1769c2!important;
  border-radius:50%!important;
  animation:kskd-startup-spin .75s linear infinite!important;
}
body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)::after{
  content:"Ładowanie kreatora…"!important;
  top:calc(clamp(145px,32vh,290px) + 55px)!important;
  transform:translateX(-50%)!important;
  width:max-content!important;max-width:90%!important;
  color:#37628f!important;
  font-size:13px!important;font-weight:600!important;line-height:1.4!important;font-family:inherit!important;
  text-align:center!important;
}
@keyframes kskd-startup-spin {to { transform:rotate(360deg); }}
@media(prefers-reduced-motion:reduce){
  body.kskd-product .product.kskd-booting:not(.kskd-ui-ready)::before {animation-duration:2.5s!important;}
}

/* The Project-corner color widget must disappear completely for products that
   have no color attribute (e.g. only a size attribute for a pillow). */
body.kskd-product .kskd-shell .kskd-variant-chooser[hidden],
.kskd-lightbox .kskd-shell .kskd-variant-chooser[hidden]{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
body.kskd-product .kskd-shell.kskd-no-studio-colors .kskd-variant-chooser,
.kskd-lightbox .kskd-shell.kskd-no-studio-colors .kskd-variant-chooser{
  display:none!important;
}

/* KSK realization WPCode panel: move it out of flex row, give it one full-width
   line beneath the actual Add-to-cart controls. Scope resets to the new wrapper. */
.kskd-buy-card .kskd-buy-delivery-row{
  position:relative!important;display:block!important;clear:both!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  margin:14px 0 0!important;padding:13px 0 0!important;
  border-top:1px solid #e4edf6!important;
}
.kskd-buy-card .kskd-buy-delivery-row>.ksk-realizacja-box{
  display:flex!important;
  position:relative!important;float:none!important;clear:both!important;
  inset:auto!important;left:auto!important;right:auto!important;top:auto!important;bottom:auto!important;
  transform:none!important;
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:auto!important;margin:0!important;box-sizing:border-box!important;
}
.kskd-buy-card .kskd-buy-delivery-row .ksk-realizacja-content{
  min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important;
}
.kskd-buy-card .kskd-buy-delivery-row .ksk-realizacja-open{max-width:100%!important;white-space:normal!important}

/* WPCode discount button is a real modal trigger; only its placement changes.
   Keep it directly below the blue savings banner, outside the price bar. */
body.kskd-product .summary.kskd-purchase-rebuilt .ksk-rabat-box{
  max-width:100%!important;box-sizing:border-box!important;
}
body.kskd-product .summary.kskd-purchase-rebuilt .kskd-buy-discount-under-box{
  display:inline-flex!important;align-items:center!important;justify-content:flex-start!important;
  position:relative!important;float:none!important;clear:both!important;
  inset:auto!important;transform:none!important;
  width:auto!important;max-width:100%!important;
  margin:7px 0 14px!important;padding:5px 7px!important;
  color:#1769c2!important;font-size:12px!important;font-weight:650!important;
  line-height:1.45!important;text-decoration:underline!important;text-underline-offset:2px!important;
  background:transparent!important;border:0!important;border-radius:6px!important;
  box-shadow:none!important;cursor:pointer!important;
}
@media(max-width:850px){
  body.kskd-product .product.kskd-booting:not(.kskd-ui-ready){min-height:65vh!important;}
  .kskd-buy-card .kskd-buy-delivery-row{margin-top:10px!important;padding-top:10px!important;}
}
