/* Lilly White product UI helper tooltips */

.lw-help-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  margin-left: 7px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  border: 1px solid rgba(214,183,106,0.55);
}

.lw-help-tip::after {
  content: attr(data-lw-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  z-index: 99999;
  width: min(320px, 82vw);
  padding: 13px 14px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  box-shadow: 0 18px 50px rgba(17,24,39,0.24);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.lw-help-tip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #111827;
  opacity: 0;
  transition: opacity .16s ease;
}

.lw-help-tip:hover::after,
.lw-help-tip:focus::after,
.lw-help-tip:hover::before,
.lw-help-tip:focus::before {
  opacity: 1;
}

.lw-help-tip:hover::after,
.lw-help-tip:focus::after {
  transform: translateX(-50%) translateY(0);
}

.lw-mixed-duplicate-hidden,
.lw-duplicate-mixed-button-hidden {
  display: none !important;
}

/* Fix cramped plugin text where possible */
.single-product .summary,
.single-product .entry-summary {
  word-spacing: normal;
}

.single-product .summary button,
.single-product .entry-summary button {
  white-space: normal;
}

/* Guest catalogue/login polish fallback */
body:not(.logged-in):not(.single-product) .lwpe-login-price-box,
body:not(.logged-in):not(.single-product) .lwpe-b2b-login,
body:not(.logged-in):not(.single-product) .lwpe-b2b-login-box,
body:not(.logged-in):not(.single-product) .lwpe-product-login-message {
  display: none !important;
}

body:not(.logged-in):not(.single-product) .lw-guest-product-card {
  position: relative !important;
  overflow: hidden !important;
}

body:not(.logged-in):not(.single-product) .lw-guest-product-overlay {
  position: absolute;
  inset: 12px;
  z-index: 60;
  border-radius: 22px;
  background:
    radial-gradient(circle at 90% 12%, rgba(214,183,106,0.24), transparent 35%),
    rgba(17,24,39,0.93);
  color: #fff !important;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  cursor: pointer;
}

body:not(.logged-in):not(.single-product) .lw-guest-product-card:hover .lw-guest-product-overlay,
body:not(.logged-in):not(.single-product) .lw-guest-product-card:focus-within .lw-guest-product-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lw-guest-product-overlay span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(214,183,106,0.16);
  color: #d6b76a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.lw-guest-product-overlay strong {
  max-width: 260px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.08;
}

.lw-guest-product-overlay em {
  max-width: 260px;
  color: rgba(255,255,255,0.74);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .lw-help-tip::after {
    left: auto;
    right: -8px;
    transform: translateY(4px);
  }

  .lw-help-tip:hover::after,
  .lw-help-tip:focus::after {
    transform: translateY(0);
  }

  body:not(.logged-in):not(.single-product) .lw-guest-product-overlay {
    position: static;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 18px;
  }

  body:not(.logged-in):not(.single-product) .lw-guest-product-overlay span,
  body:not(.logged-in):not(.single-product) .lw-guest-product-overlay em {
    display: none;
  }

  body:not(.logged-in):not(.single-product) .lw-guest-product-overlay strong {
    font-size: 13px;
    line-height: 1.25;
  }
}
