.jmfsp-badge-host {
  position: relative !important;
}

.jmfsp-free-shipping-badge {
  --jmfsp-bg: #14804A;
  --jmfsp-color: #FFFFFF;
  --jmfsp-border: #14804A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 5px 9px;
  border: 1px solid var(--jmfsp-border);
  background: var(--jmfsp-bg);
  color: var(--jmfsp-color);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-sizing: border-box;
  z-index: 12;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.jmfsp-free-shipping-badge.jmfsp-style-pill {
  border-radius: 999px;
}

.jmfsp-free-shipping-badge.jmfsp-style-rectangle {
  border-radius: 4px;
}

.jmfsp-free-shipping-badge.jmfsp-style-outline {
  border-radius: 4px;
  background: transparent;
  color: var(--jmfsp-color);
  box-shadow: none;
}

.jmfsp-badge-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.jmfsp-badge-text {
  min-width: 0;
}

.jmfsp-badge-overlay {
  position: absolute;
  margin: 0;
}


.jmfsp-cart-top-right {
  right: 70px;
  top: 12px;
  left: auto;
  bottom: auto;
}

.jmfsp-position-top-left {
  top: 8px;
  left: 8px;
}

.jmfsp-position-top-right {
  top: 8px;
  right: 8px;
}

.jmfsp-position-bottom-left {
  bottom: 8px;
  left: 8px;
}

.jmfsp-position-bottom-right {
  bottom: 8px;
  right: 8px;
}

.jmfsp-badge-inline {
  position: relative;
  margin: 6px 0 0 0;
  vertical-align: middle;
  box-shadow: none;
}

@media (max-width: 767px) {
  .jmfsp-cart-top-right {
    right: 48px;
    top: 8px;
  }

  .jmfsp-free-shipping-badge {
    max-width: calc(100% - 12px);
    padding: 4px 7px;
    font-size: 11px;
  }

  .jmfsp-position-top-left,
  .jmfsp-position-bottom-left {
    left: 6px;
  }

  .jmfsp-position-top-right,
  .jmfsp-position-bottom-right {
    right: 6px;
  }

  .jmfsp-position-top-left,
  .jmfsp-position-top-right {
    top: 6px;
  }

  .jmfsp-position-bottom-left,
  .jmfsp-position-bottom-right {
    bottom: 6px;
  }
}

/* Tooltip de zonas */
.jmfsp-free-shipping-badge {
  pointer-events: auto;
  cursor: help;
}

.jmfsp-free-shipping-badge:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.jmfsp-tooltip-layer {
  position: fixed;
  z-index: 999999;
  max-width: 300px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #222;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .12s ease;
}

.jmfsp-tooltip-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.jmfsp-tooltip-layer:after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #222;
}

.jmfsp-tooltip-layer.is-below:after {
  top: -5px;
  bottom: auto;
  border-top: 0;
  border-bottom: 5px solid #222;
}

/* v1.7.1 - Blindaje del texto del badge frente a estilos genericos del tema. */
.product-miniature .jmfsp-free-shipping-badge,
.js-product-miniature .jmfsp-free-shipping-badge,
article.product-miniature .jmfsp-free-shipping-badge,
#main .jmfsp-free-shipping-badge {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  white-space: nowrap !important;
  text-indent: 0 !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
}

.product-miniature .jmfsp-free-shipping-badge.jmfsp-style-pill,
.js-product-miniature .jmfsp-free-shipping-badge.jmfsp-style-pill,
article.product-miniature .jmfsp-free-shipping-badge.jmfsp-style-pill,
#main .jmfsp-free-shipping-badge.jmfsp-style-pill {
  border-radius: 999px !important;
}

.product-miniature .jmfsp-free-shipping-badge .jmfsp-badge-icon,
.js-product-miniature .jmfsp-free-shipping-badge .jmfsp-badge-icon,
article.product-miniature .jmfsp-free-shipping-badge .jmfsp-badge-icon,
#main .jmfsp-free-shipping-badge .jmfsp-badge-icon {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
  flex: 0 0 15px !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (max-width: 767px) {
  .product-miniature .jmfsp-free-shipping-badge,
  .js-product-miniature .jmfsp-free-shipping-badge,
  article.product-miniature .jmfsp-free-shipping-badge,
  #main .jmfsp-free-shipping-badge {
    font-size: 11px !important;
  }
}
