/* Make the nearest Elementor section/container holding Mascot its local frame. */
.e-con:has(> .elementor-widget-hsb-mascot-image),
.e-con:has(> .e-con-inner > .elementor-widget-hsb-mascot-image),
.elementor-widget-wrap:has(> .elementor-widget-hsb-mascot-image),
.elementor-column:has(> .elementor-widget-wrap > .elementor-widget-hsb-mascot-image) {
  position: relative;
}

/* The widget box and image share one width, so no inherited image width can fight it. */
.elementor-widget-hsb-mascot-image {
  position: absolute;
  z-index: 5;
  left: var(--hsb-mascot-x, 98%);
  top: var(--hsb-mascot-y, 95%);
  transform: translate(var(--hsb-mascot-x-shift, -98%), var(--hsb-mascot-y-shift, -95%));
  width: 180px;
  max-width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
}

.elementor-widget-hsb-mascot-image > .elementor-widget-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  line-height: 0;
}

.hsb-mascot-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  line-height: 0;
  --hsb-mascot-outline-width: 3px;
  --hsb-mascot-outline-color: #fff;
  --hsb-mascot-shadow-x: 0px;
  --hsb-mascot-shadow-y: 8px;
  --hsb-mascot-shadow-blur: 18px;
  --hsb-mascot-shadow-color: rgba(0,0,0,.45);
  --hsb-mascot-reflection-opacity: 35%;
  --hsb-mascot-reflection-fade: 65%;
  --hsb-mascot-reflection-gap: 0px;
  --hsb-mascot-reflection-angle: 0deg;
}

.elementor-widget-hsb-mascot-image .hsb-mascot-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.elementor-widget-hsb-mascot-image .hsb-mascot-main {
  position: relative;
  z-index: 2;
}

.elementor-widget-hsb-mascot-image .hsb-mascot-effect-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Tight alpha-aware drop shadows create a sticker edge without adding a box. */
.elementor-widget-hsb-mascot-image .has-outline:not(.has-shadow) .hsb-mascot-effect-layer {
  filter:
    drop-shadow(var(--hsb-mascot-outline-width) 0 0 var(--hsb-mascot-outline-color))
    drop-shadow(calc(0px - var(--hsb-mascot-outline-width)) 0 0 var(--hsb-mascot-outline-color))
    drop-shadow(0 var(--hsb-mascot-outline-width) 0 var(--hsb-mascot-outline-color))
    drop-shadow(0 calc(0px - var(--hsb-mascot-outline-width)) 0 var(--hsb-mascot-outline-color));
}

.elementor-widget-hsb-mascot-image .has-shadow:not(.has-outline) .hsb-mascot-effect-layer {
  filter: drop-shadow(var(--hsb-mascot-shadow-x) var(--hsb-mascot-shadow-y) var(--hsb-mascot-shadow-blur) var(--hsb-mascot-shadow-color));
}

.elementor-widget-hsb-mascot-image .has-outline.has-shadow .hsb-mascot-effect-layer {
  filter:
    drop-shadow(var(--hsb-mascot-outline-width) 0 0 var(--hsb-mascot-outline-color))
    drop-shadow(calc(0px - var(--hsb-mascot-outline-width)) 0 0 var(--hsb-mascot-outline-color))
    drop-shadow(0 var(--hsb-mascot-outline-width) 0 var(--hsb-mascot-outline-color))
    drop-shadow(0 calc(0px - var(--hsb-mascot-outline-width)) 0 var(--hsb-mascot-outline-color))
    drop-shadow(var(--hsb-mascot-shadow-x) var(--hsb-mascot-shadow-y) var(--hsb-mascot-shadow-blur) var(--hsb-mascot-shadow-color));
}
.elementor-widget-hsb-mascot-image .hsb-mascot-reflection-wrap {
  position: absolute;
  z-index: 1;
  top: calc(100% + var(--hsb-mascot-reflection-gap));
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: var(--hsb-mascot-reflection-opacity);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent var(--hsb-mascot-reflection-fade));
  mask-image: linear-gradient(to bottom, #000 0%, transparent var(--hsb-mascot-reflection-fade));
}

.elementor-widget-hsb-mascot-image .hsb-mascot-reflection {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  transform: scaleY(-1);
  transform-origin: center center;
}

@media (max-width: 1024px) {
  .elementor-widget-hsb-mascot-image { width: 145px; }
}

@media (max-width: 767px) {
  .elementor-widget-hsb-mascot-image { width: 105px; }
}
