/**
 * Immediate Availability Tag - front office style
 * Modern, minimal green pill designed for product thumbnails and Creative Elements product cards.
 */
.iat-badge-target,
.product-miniature .thumbnail-container,
.product-miniature .product-thumbnail,
.js-product-miniature .thumbnail-container,
.js-product-miniature .product-thumbnail,
.ce-product .ce-product-image,
.elementor-product .elementor-product-image,
.elementor-widget-product-image .elementor-widget-container {
  position: relative;
}

.iat-badge-mount {
  --iat-offset-x: 12px;
  --iat-offset-y: 52px;

  box-sizing: border-box;
  max-width: calc(100% - (var(--iat-offset-x) * 2));
  z-index: 32;
  pointer-events: none;
}

.iat-badge-mount--overlay {
  position: absolute;
}


/* Prevent initial shortcode-position flash before the JS has moved the overlay
   badge into the Creative Elements badge stack or the product image container. */
.iat-badge-mount--overlay:not([data-iat-mounted]) {
  visibility: hidden;
}

.iat-badge-mount--inline {
  position: static;
  display: inline-flex;
  margin-bottom: 0.45rem;
}

.iat-badge-mount--top-left {
  top: var(--iat-offset-y);
  left: var(--iat-offset-x);
}

.iat-badge-mount--top-right {
  top: var(--iat-offset-y);
  right: var(--iat-offset-x);
}

.iat-badge-mount--bottom-left {
  bottom: var(--iat-offset-y);
  left: var(--iat-offset-x);
}

.iat-badge-mount--bottom-right {
  right: var(--iat-offset-x);
  bottom: var(--iat-offset-y);
}

.iat-badge {
  --iat-green: #16a34a;
  --iat-green-dark: #14532d;
  --iat-green-soft: #ecfdf3;
  --iat-white-soft: rgba(255, 255, 255, 0.92);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  color: var(--iat-green-dark);
  background: linear-gradient(135deg, var(--iat-white-soft) 0%, var(--iat-green-soft) 100%);
  border: 1px solid rgba(22, 163, 74, 0.26);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
}

.iat-badge__dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 999px;
  background: var(--iat-green);
}

.iat-badge__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep the tag above image overlays, without blocking Creative Elements badges or product links. */
.product-miniature .iat-badge-mount,
.js-product-miniature .iat-badge-mount,
.ce-product .iat-badge-mount,
.elementor-product .iat-badge-mount {
  pointer-events: none;
}

@media (max-width: 575px) {
  .iat-badge-mount {
    max-width: calc(100% - 18px);
  }

  .iat-badge {
    padding: 0.39rem 0.58rem;
    font-size: 0.68rem;
  }
}

/* Creative Elements compatibility: when a native CE Product Badges widget exists,
   the JS injects the Immediate Availability badge into that existing absolute badge stack. */
.ce-product-badges .iat-badge-mount,
.elementor-widget-product-badges .iat-badge-mount,
.iat-badge-mount--ce-stack {
  position: static !important;
  inset: auto !important;
  display: flex;
  width: fit-content;
  max-width: 100%;
  z-index: auto;
  pointer-events: none;
}


.ce-product-badges .iat-badge,
.elementor-widget-product-badges .iat-badge {
  max-width: 100%;
}

/* Fallback when no CE badge stack exists: the badge is attached directly over the image. */
.iat-badge-mount--image-overlay {
  position: absolute;
}

/* Make sure the native CE badge widget remains clickable/visible above image widgets,
   while our badge does not intercept product-card clicks. */
.elementor-widget-product-badges .ce-product-badges,
.ce-product-badges {
  pointer-events: none;
}
