/*
 * Whapido Bulk Variations - Styles
 */

body.single-product div.product.product-type-simple .summary .price,
body.single-product div.product.product-type-simple .product-info .price,
body.single-product div.product.product-type-simple .summary p.price {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
}

body.whpbv-active div.product.product-type-variable .summary > .price,
body.whpbv-active div.product.product-type-variable .summary p.price,
body.whpbv-active div.product.product-type-variable .product-info .price {
  display: none !important;
}

body.whpbv-active form.variations_form,
body.whpbv-active .variations_form,
body.whpbv-active table.variations,
body.whpbv-active .variations,
body.whpbv-active .reset_variations,
body.whpbv-active .single_variation_wrap,
body.whpbv-active .woocommerce-variation,
body.whpbv-active .woocommerce-variation-add-to-cart,
body.whpbv-active .single_add_to_cart_button,
body.whpbv-active .woocommerce-variation-price,
body.whpbv-active .woocommerce-variation-availability {
  display: none !important;
}

.whpbv {
  margin: 14px 0 18px;
  padding: 12px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(0,0,0,.06);
}

.whpbv-title {
  font-weight: 800;
  text-align: left;
  margin-bottom: 10px;
  padding-left: 4px;
  letter-spacing: .08em;
}

.whpbv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.whpbv-row {
  display: grid;
  grid-template-columns: 56px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0,0,0,.05);
  transition: transform .15s ease, box-shadow .15s ease;
}

.whpbv-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 38px rgba(0,0,0,.08);
}

.whpbv-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #eceff3;
  background: #f3f4f6;
}

.whpbv-thumb img,
.whpbv-thumb .whpbv-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.whpbv-main {
  min-width: 0;
}

.whpbv-label {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: #111827;
  margin-bottom: 4px;
  white-space: normal;
}

.whpbv-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  line-height: 1.2;
}

.whpbv-price-old {
  color: #6b7280;
  text-decoration: line-through;
  font-weight: 600;
}

.whpbv-price-old .amount,
.whpbv-price-sale .amount {
  font-weight: inherit;
}

.whpbv-price-sale {
  color: #111827;
  font-weight: 700;
}

.whpbv-discount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
}

.whpbv-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.whpbv-inline-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 108px;
}

.whpbv-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 110px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 6px 14px rgba(17,24,39,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}

.whpbv-stepper:focus-within {
  border-color: rgba(34, 197, 94, .45);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .12), 0 6px 14px rgba(17,24,39,.06);
}

.whpbv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #111827;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}

.whpbv-btn:hover {
  filter: none;
  transform: scale(1.06);
}

.whpbv-stepper .whpbv-minus,
.whpbv-stepper .whpbv-plus {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 20px;
}

.whpbv-stepper .whpbv-minus:hover,
.whpbv-stepper .whpbv-plus:hover {
  filter: none;
  color: #000;
}

.whpbv-stepper .whpbv-plus.is-pulse,
.whpbv-stepper .whpbv-minus.is-pulse,
.whpbv-qty-pill.is-pulse {
  animation: whpbvPulse .22s ease;
}

.whpbv-qty-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}


.whpbv-row.whpbv-row-active {
  border-color: rgba(34, 197, 94, .35);
  box-shadow: 0 10px 26px rgba(34, 197, 94, .12);
}

.whpbv-row.whpbv-row-first-add {
  animation: whpbvRowGlow .55s ease;
}

.whpbv-stepper.whpbv-stepper-first-add {
  border-color: rgba(34, 197, 94, .45);
  background: #f6fef9;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .10), 0 6px 14px rgba(17,24,39,.06);
}

@keyframes whpbvPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes whpbvRowGlow {
  0% { transform: scale(1); }
  45% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

.whpbv-input {
  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;
}

.whpbv.whpbv-highlight {
  border-color: rgba(34, 197, 94, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

body.single-product .whp-sticky-atc .whp-btn-price,
body.single-product #whp-sticky-atc .whp-btn-price {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

body.single-product .whp-sticky-atc .whp-btn-label,
body.single-product #whp-sticky-atc .whp-btn-label {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  text-transform: uppercase;
}

body.single-product .whp-sticky-atc button.whp-sticky-cta,
body.single-product #whp-sticky-atc button.whp-sticky-cta {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap;
}

body.whpbv-active .whp-sticky-qty,
body.whpbv-active .whp-sticky-atc .whp-sticky-qty {
  display: none !important;
}

body.single-product #whp-sticky-atc .whp-sticky-cta .whp-btn-label {
  margin-left: auto;
  text-align: right;
}

body.whpbv-active #whp-sticky-atc .whp-sticky-cta.whpbv-needs-selection {
  background: var(--nasa-primary-color, var(--primary-color, #e13123)) !important;
  position: relative;
  justify-content: flex-end !important;
}

body.whpbv-active #whp-sticky-atc .whp-sticky-cta.whpbv-needs-selection .whp-btn-price {
  opacity: 0.55;
  position: absolute;
  left: 16px;
}

body.whpbv-active #whp-sticky-atc .whp-sticky-cta.whpbv-needs-selection .whp-btn-label {
  margin-left: auto;
  text-align: right;
  padding-right: 16px;
  font-size: 12px !important;
}

body.whpbv-active .whp-sticky-atc.whpbv-bulk-sticky button.whpbv-force-enabled,
body.whpbv-active #whp-sticky-atc.whpbv-bulk-sticky button.whpbv-force-enabled {
  opacity: 1 !important;
  pointer-events: auto !important;
  filter: none !important;
}

body.whpbv-active .whp-sticky-atc.whpbv-bulk-sticky button.whpbv-force-disabled,
body.whpbv-active #whp-sticky-atc.whpbv-bulk-sticky button.whpbv-force-disabled {
  opacity: 0.55 !important;
  pointer-events: none !important;
}

@media (min-width: 768px) {
  body.single-product .whp-sticky-atc .whp-btn-price,
  body.single-product #whp-sticky-atc .whp-btn-price {
    max-width: 240px;
  }
}

@media (max-width: 640px) {
  .whpbv {
    padding: 14px 10px;
    border-radius: 16px;
  }

  .whpbv-row {
    grid-template-columns: 48px minmax(0,1fr) auto;
    gap: 10px;
    padding: 10px;
  }

  .whpbv-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  .whpbv-label {
    font-size: 13px;
  }

  .whpbv-inline-control {
    min-width: 70px;
  }

  .whpbv-stepper {
    min-width: 102px;
    gap: 6px;
    padding: 0 8px;
  }

  body.single-product .whp-sticky-atc .whp-btn-price,
  body.single-product #whp-sticky-atc .whp-btn-price,
  body.whpbv-active .whp-sticky-atc .whp-btn-price,
  body.whpbv-active #whp-sticky-atc .whp-btn-price {
    text-align: left;
    font-size: 16px !important;
  }
}

body.whpbv-active.whpbv-keep-native-ui form.variations_form,
body.whpbv-active.whpbv-keep-native-ui .variations_form,
body.whpbv-active.whpbv-keep-native-ui table.variations,
body.whpbv-active.whpbv-keep-native-ui .variations,
body.whpbv-active.whpbv-keep-native-ui .reset_variations,
body.whpbv-active.whpbv-keep-native-ui .single_variation_wrap,
body.whpbv-active.whpbv-keep-native-ui .woocommerce-variation,
body.whpbv-active.whpbv-keep-native-ui .woocommerce-variation-add-to-cart,
body.whpbv-active.whpbv-keep-native-ui .single_add_to_cart_button,
body.whpbv-active.whpbv-keep-native-ui .woocommerce-variation-price,
body.whpbv-active.whpbv-keep-native-ui .woocommerce-variation-availability {
  display: initial !important;
}

body.whpbv-active.whpbv-keep-native-ui table.variations {
  display: table !important;
}

body.whpbv-active.whpbv-keep-native-ui .single_add_to_cart_button,
body.whpbv-active.whpbv-keep-native-ui .woocommerce-variation-add-to-cart {
  display: block !important;
}
