/* = Cpet Estimated Delivery (estilos base) ================================ */
.cp-delivery-badge{
  display:flex !important;
  align-items:center;
  justify-content:center;
  flex-wrap:nowrap !important;
  gap:.35em;
  width:100%;
  text-align:center;
  box-sizing:border-box;
  color:#fff !important;
  background:#00597D;
  border-radius:8px;
  padding:3px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  column-span: all;
}

/* Pseudo-icono: propiedades comunes (los glifos se asignan vía CSS dinámico) */
.cp-delivery-badge.state-today-a::before,
.cp-delivery-badge.state-today-b::before,
.cp-delivery-badge.state-tomorrow::before,
.cp-delivery-badge.state-next::before,
.cp-delivery-badge.state-monday::before{
  display:inline-block;
  margin-inline-end:.45em;
  line-height:1;
  color: currentColor;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hijos como texto seguido (no columnas) */
.cp-delivery-badge > *{
  flex:0 0 auto !important;
  display:inline !important;
}

/* Si activas lead_wrap="on", evita que .cp-lead rompa el flujo */
.cp-delivery-badge .cp-lead{
  display:contents !important;
  font-weight:inherit !important;
}

/* Desactivar “column-count:2” del tema alrededor del badge (fallback con :has) */
.woocommerce-product-details__short-description:has(.cp-delivery-badge),
.woocommerce-product-details__short-description p:has(.cp-delivery-badge),
.entry-content:has(.cp-delivery-badge),
.wpb_text_column:has(.cp-delivery-badge){
  -webkit-columns:auto !important;
  -moz-columns:auto !important;
  columns:auto !important;
  -webkit-column-count:1 !important;
  -moz-column-count:1 !important;
  column-count:1 !important;
  -webkit-column-gap: normal !important;
  column-gap: normal !important;
  -webkit-column-rule: none !important;
  column-rule: none !important;
}

/* Accesibilidad: respeta reducción de movimiento si añades animaciones */
@media (prefers-reduced-motion: reduce){
  .cp-delivery-badge::before{ animation:none !important; }
}