.pewc-pwrupp-font-picker{
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 420px;
}
.pewc-pwrupp-font-button{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.2);
  background: #fff;
  /* Theme buttons sometimes force white text; override for readability */
  color: #111 !important;
  cursor: pointer;
}
.pewc-pwrupp-font-button-thumb{
  width: 160px;
  height: 40px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pewc-pwrupp-font-button-thumb img{
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.pewc-pwrupp-font-button-label{
  flex: 1 1 auto;
  text-align: left;
  color: inherit;
}

.pewc-pwrupp-font-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  border: 1px solid rgba(0,0,0,.2);
  background: #fff;
  z-index: 9999;
  max-height: 280px;
  overflow: auto;
  display: none;
}
.pewc-pwrupp-font-picker.is-open .pewc-pwrupp-font-list{
  display: block;
}
.pewc-pwrupp-font-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
}
.pewc-pwrupp-font-item:hover{
  background: rgba(0,0,0,.06);
}
.pewc-pwrupp-font-item img{
  width: 220px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Make the image the primary visual. Hide the label when we have a loaded image. */
.pewc-pwrupp-font-item.has-image .pewc-pwrupp-font-item-label,
.pewc-pwrupp-font-button.has-image .pewc-pwrupp-font-button-label{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* If image fails to load, fall back to readable text */
.pewc-pwrupp-font-item.no-image img,
.pewc-pwrupp-font-button.no-image img{
  display: none !important;
}

/* Ensure list items stay readable regardless of theme */
.pewc-pwrupp-font-item{
  color: #111;
}

/* Cart / checkout display for selected font */
.pewc-pwrupp-font-cart{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  vertical-align: middle;
}
.pewc-pwrupp-font-cart-img{
  width: 140px;
  height: 32px;
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 4px;
  padding: 2px 6px;
}
.pewc-pwrupp-font-cart-name{
  /* Keep text accessible; hide visually when image is present */
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
