.ecd-upgrade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ecd-upgrade-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.ecd-upgrade-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ecd-upgrade-modal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.ecd-upgrade-modal-dialog {
  width: 100%;
  max-width: 480px;
  margin: auto;
  pointer-events: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ecd-upgrade-modal.is-active .ecd-upgrade-modal-dialog {
  transform: translateY(0) scale(1);
}

.ecd-upgrade-modal-content {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 40px -10px rgba(19, 81, 156, 0.16), 0 2px 10px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  padding: 20px 22px 16px;
  display: flex;
  flex-direction: column;
}

.ecd-upgrade-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  font-size: 13px;
}

.ecd-upgrade-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ecd-upgrade-modal-header {
  padding-right: 28px;
}

.ecd-upgrade-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fef7ec;
  color: #d97706;
  border: 1px solid #fed7aa;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 6px;
  white-space: nowrap;
}

.ecd-upgrade-pill-badge i {
  color: #e89519;
  font-size: 11px;
}

.ecd-upgrade-modal-title {
  font-size: clamp(16px, 3.8vw, 19px);
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin: 0 0 5px 0;
  text-wrap: balance;
}

.ecd-upgrade-modal-notice {
  font-size: clamp(12px, 2.9vw, 13px);
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

.ecd-upgrade-out-text {
  color: #dc2626;
  font-weight: 600;
}

.ecd-upgrade-product-box {
  display: flex;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 11px 13px;
  margin: 10px 0;
  align-items: center;
}

.ecd-upgrade-prod-media {
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
}

.ecd-upgrade-prod-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ecd-upgrade-prod-details {
  flex: 1;
  min-width: 0;
}

.ecd-upgrade-prod-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ecd-upgrade-prod-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.ecd-upgrade-tag-edition {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #13519c;
  background: #eef5fc;
  border: 1px solid #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.ecd-upgrade-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 3px 0 5px;
  flex-wrap: wrap;
}

.ecd-upgrade-orig-price {
  font-size: 12px;
  color: #94a3b8;
  text-decoration: line-through;
  white-space: nowrap;
}

.ecd-upgrade-sale-price {
  font-size: 18px;
  font-weight: 800;
  color: #13519c;
  white-space: nowrap;
  line-height: 1;
}

.ecd-upgrade-save-tag {
  font-size: 10px;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.ecd-upgrade-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5px;
}

.ecd-upgrade-bullets li {
  font-size: 11px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.25;
}

.ecd-upgrade-bullets li i {
  color: #13519c;
  font-size: 11px;
  flex-shrink: 0;
}

.ecd-upgrade-coupon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0fdf4;
  border: 1px dashed #86efac;
  border-radius: 8px;
  padding: 6px 11px;
  margin-bottom: 9px;
  gap: 8px;
}

.ecd-upgrade-coupon-left {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #166534;
  white-space: nowrap;
}

.ecd-upgrade-coupon-left i {
  color: #15803d;
  font-size: 12px;
}

.ecd-upgrade-coupon-code {
  background: #ffffff;
  border: 1px solid #86efac;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
  color: #15803d;
  letter-spacing: 0.5px;
}

.ecd-upgrade-coupon-badge {
  font-size: 11px;
  font-weight: 600;
  color: #166534;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.ecd-upgrade-coupon-badge i {
  color: #16a34a;
  font-size: 11px;
}

.ecd-upgrade-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #13519c;
  color: #ffffff !important;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 8px;
  height: 42px;
  text-decoration: none !important;
  width: 100%;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  border: 1px solid #0f427c;
  box-shadow: 0 2px 8px rgba(19, 81, 156, 0.2);
}

.ecd-upgrade-cta-btn:hover {
  background: #0f427c;
  color: #ffffff !important;
}

.ecd-upgrade-cta-btn:active {
  background: #0b3260;
  transform: scale(0.99);
}

.ecd-upgrade-footer-guarantees {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 9px;
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.ecd-up-guarantee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.ecd-up-guarantee i {
  color: #13519c;
  font-size: 10.5px;
}

.ecd-up-guarantee-sep {
  color: #cbd5e1;
}

.rg-card-stock-badge--in,
.ecd-card-stock-badge--in,
.ed-badge--stock,
.ecd-badge--stock {
  display: none !important;
}

@media (max-width: 640px) {
  .ecd-upgrade-modal {
    padding: 8px;
  }

  .ecd-upgrade-modal-content {
    padding: 13px 13px 10px;
    border-radius: 14px;
    max-height: calc(100dvh - 16px);
    overflow: hidden;
  }

  .ecd-upgrade-modal-close {
    top: 9px;
    right: 9px;
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .ecd-upgrade-modal-header {
    padding-right: 22px;
  }

  .ecd-upgrade-pill-badge {
    font-size: 9.5px;
    padding: 2px 8px;
    margin-bottom: 4px;
  }

  .ecd-upgrade-modal-title {
    font-size: 15.5px;
    margin-bottom: 3px;
  }

  .ecd-upgrade-modal-notice {
    font-size: 11.5px;
    line-height: 1.32;
  }

  .ecd-upgrade-product-box {
    padding: 8px 10px;
    margin: 7px 0;
    gap: 10px;
    border-radius: 10px;
  }

  .ecd-upgrade-prod-media {
    width: 60px;
    height: 60px;
  }

  .ecd-upgrade-prod-name {
    font-size: 12.5px;
  }

  .ecd-upgrade-tag-edition {
    font-size: 9px;
    padding: 1px 4px;
  }

  .ecd-upgrade-price-row {
    gap: 5px;
    margin: 2px 0 3px;
  }

  .ecd-upgrade-orig-price {
    font-size: 11px;
  }

  .ecd-upgrade-sale-price {
    font-size: 15.5px;
  }

  .ecd-upgrade-save-tag {
    font-size: 9px;
    padding: 1px 4px;
  }

  .ecd-upgrade-bullets li {
    font-size: 10px;
    gap: 4px;
    line-height: 1.2;
  }

  .ecd-upgrade-bullets li i {
    font-size: 9.5px;
  }

  .ecd-upgrade-coupon-bar {
    padding: 5px 9px;
    margin-bottom: 7px;
    gap: 4px;
  }

  .ecd-upgrade-coupon-left {
    font-size: 10.5px;
  }

  .ecd-upgrade-coupon-code {
    font-size: 10.5px;
    padding: 1px 5px;
  }

  .ecd-upgrade-coupon-badge {
    font-size: 9.5px;
  }

  .ecd-upgrade-cta-btn {
    height: 38px;
    font-size: 12.5px;
    border-radius: 7px;
  }

  .ecd-upgrade-footer-guarantees {
    margin-top: 7px;
    font-size: 9.5px;
    gap: 4px;
  }

  .ecd-up-guarantee i {
    font-size: 9.5px;
  }
}
