/**
 * LIESCO — CRO Components
 */

.liesco-floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: calc(22px + var(--safe-area-bottom, 0px));
  z-index: calc(var(--z-bottom-nav, 1005) - 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: var(--color-carbon, #1a1a1a);
  background: transparent;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(26, 26, 26, 0.12);
  line-height: 1;
  text-decoration: none;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.liesco-floating-whatsapp:hover,
.liesco-floating-whatsapp:focus-visible {
  color: var(--color-carbon, #1a1a1a);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(26, 26, 26, 0.16);
}

.liesco-floating-whatsapp__image {
  display: block;
  width: 68px;
  height: 68px;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}

.liesco-cro-trust-line {
  color: rgba(0, 0, 0, 0.58);
  font-family: var(--font-sans, Inter, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.liesco-cro-payment-benefits {
  margin: 12px 0 14px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--font-sans, Inter, sans-serif);
}

.liesco-cro-payment-benefits__title {
  color: #242424;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.liesco-cro-payment-benefits__note {
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.52);
  font-size: 12.5px;
  line-height: 1.35;
}

.liesco-product-payment-benefits {
  margin: 12px 0 14px;
}

.liesco-product-trust-line {
  margin: 10px 0 20px;
}

.liesco-product-attr__header--size {
  justify-content: flex-start;
  gap: 10px;
}

.liesco-product-attr__header--size .liesco-product-attr__selected {
  margin-right: auto;
}

.liesco-product-size-guide {
  color: var(--color-carbon, #1a1a1a);
  font-family: var(--font-sans, Inter, sans-serif);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.liesco-cro-checkout-trust {
  margin-top: 18px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  font-family: var(--font-sans, Inter, sans-serif);
}

.liesco-cro-checkout-trust__title {
  margin: 0 0 6px;
  color: #222;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.liesco-cro-checkout-trust__text {
  margin: 0;
  color: rgba(0, 0, 0, 0.68);
  font-size: 14px;
  line-height: 1.45;
}

.liesco-cro-checkout-trust__methods {
  margin-top: 8px;
  color: rgba(0, 0, 0, 0.56);
  font-size: 13px;
  line-height: 1.4;
}

.is-commerce-feedback {
  pointer-events: none;
  opacity: 0.76;
}

.liesco-toast.liesco-added-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(var(--liesco-bottom-nav-total-height, 64px) + 18px);
  z-index: calc(var(--z-bottom-nav, 1005) + 10);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  max-width: none;
  width: auto;
  padding: 14px 52px 14px 15px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  color: #222;
  font-family: var(--font-body, Inter, sans-serif);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: visible;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  backdrop-filter: blur(10px);
}

.liesco-toast.liesco-added-toast.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.liesco-toast__content {
  min-width: 0;
}

.liesco-toast .liesco-toast__title {
  margin: 0;
  color: #222;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.liesco-toast .liesco-toast__text {
  display: block;
  min-width: 0;
  margin-top: 3px;
  color: rgba(0, 0, 0, 0.58);
  font-size: 12.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.liesco-toast__action {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.86);
  border-radius: 0;
  background: #111;
  color: #fff;
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.liesco-toast__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(0, 0, 0, 0.58);
  font-family: var(--font-body, Inter, sans-serif);
  font-size: 0;
  line-height: 1;
  cursor: pointer;
}

.liesco-toast__close:hover,
.liesco-toast__close:focus-visible {
  color: rgba(0, 0, 0, 0.86);
  background: rgba(0, 0, 0, 0.04);
  outline: none;
}

.liesco-toast__close::before {
  content: "×";
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}

.liesco-toast.liesco-toast--error {
  border-color: rgba(0, 0, 0, 0.12);
}

body.liesco-cart-panel-active .liesco-toast.liesco-added-toast {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.panel-open .liesco-floating-whatsapp,
body.liesco-cart-panel-active .liesco-floating-whatsapp,
body.liesco-search-overlay-active .liesco-floating-whatsapp,
body.filters-open .liesco-floating-whatsapp,
body.keyboard-open .liesco-floating-whatsapp {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

/* Ocultar WhatsApp flotante en checkout — tapa radios y CTAs en mobile */
body.woocommerce-checkout .liesco-floating-whatsapp {
  display: none !important;
}

@media (min-width: 768px) {
  .liesco-toast.liesco-added-toast {
    left: 50%;
    right: auto;
    bottom: 32px;
    width: min(420px, calc(100vw - 48px));
    transform: translateX(-50%) translateY(12px);
  }

  .liesco-toast.liesco-added-toast.is-visible {
    transform: translateX(-50%) translateY(0);
  }
}

@media (max-width: 767px) {
  .liesco-floating-whatsapp {
    right: 8px;
    bottom: calc(
      var(--liesco-bottom-nav-total-height) +
      18px
    );
    width: 46px;
    height: 46px;
  }

  .liesco-floating-whatsapp__image {
    width: 58px;
    height: 58px;
  }

  .liesco-cro-trust-line {
    font-size: 13px;
  }
}
