/* ======================================================================
   UBD Visual UX · SIMPLE AVAILABILITY 1.6.8

   Corrige únicamente la píldora de disponibilidad en Producto · modo sencillo.

   Hallazgo real:
   - La píldora pertenece al módulo ubddeliverydateproduct:
     .ubd-product-availability
   - El modo sencillo aplica una regla muy agresiva a TODOS los span dentro
     de .current-price y puede volver a agrandar el texto de la píldora.
   - Esta capa tardía gana esa colisión sin tocar la lógica de disponibilidad.

   Sólo CSS. No cambia fechas, reglas, JS, producto, carrito ni checkout.
   ====================================================================== */

@media (max-width: 699px) {

  /* Precio y disponibilidad en dos niveles limpios y centrados. */
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price.ubd-price-with-availability {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;

    width: 100% !important;
    margin: 0 auto 30px !important;
    overflow: visible !important;
    text-align: center !important;
  }

  /* El precio conserva el tamaño grande del modo sencillo. */
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price.ubd-price-with-availability
  > .price {
    margin: 0 !important;
  }

  /* Píldora exacta del módulo ubddeliverydateproduct.
     Fuerza tamaño legible y evita que herede el font-size gigante del precio. */
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price.ubd-price-with-availability
  > span.ubd-product-availability,
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price
  > span.ubd-product-availability {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100% - 28px) !important;

    height: auto !important;
    min-height: 26px !important;
    max-height: none !important;

    margin: 0 auto !important;
    padding: 6px 13px !important;

    border: 0 !important;
    border-radius: 999px !important;
    box-sizing: border-box !important;

    background: #2F6B57 !important;
    background-color: #2F6B57 !important;
    color: #fff !important;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
    letter-spacing: .01em !important;
    text-transform: none !important;
    text-decoration: none !important;
    text-align: center !important;
    white-space: nowrap !important;

    overflow: visible !important;
    text-overflow: clip !important;
    box-shadow: 0 2px 7px rgba(47,107,87,.18) !important;
  }

  /* Defensa contra reglas globales que agrandan hijos del precio. */
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price
  > span.ubd-product-availability,
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price
  > span.ubd-product-availability * {
    font-size: 11px !important;
    line-height: 1.1 !important;
    font-weight: 850 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    text-shadow: none !important;
  }
}

/* Tablet/desktop sencillo: mantenerla proporcionada también. */
@media (min-width: 700px) {
  html.ubd-product-ready.ubd-catalog-simple
  body#product
  .product-prices
  .current-price
  > span.ubd-product-availability {
    height: auto !important;
    min-height: 28px !important;
    max-height: none !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
  }
}
