/* Matnext Upsell Popup – Shopify-Style, responsive */

#matnext-upsell-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .25s ease;
}

#matnext-upsell-root.mtx-open {
  display: flex;
  opacity: 1;
}

.mtx-card {
  background: #fff;
  width: 100%;
  max-width: 440px;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  padding: 22px 20px 20px;
  transform: translateY(40px);
  opacity: 0;
  transition: transform .3s cubic-bezier(.16,1,.3,1), opacity .3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#matnext-upsell-root.mtx-open .mtx-card {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 600px) {
  #matnext-upsell-root { align-items: center; }
  .mtx-card { border-radius: 18px; transform: translateY(20px) scale(.98); }
}

.mtx-close {
  position: absolute;
  top: 14px; right: 16px;
  border: none; background: transparent;
  font-size: 22px; line-height: 1;
  color: #94a3b8; cursor: pointer;
}

.mtx-headline {
  font-size: 18px; font-weight: 700;
  color: #0f172a; margin: 0 24px 4px 0;
}
.mtx-subtext {
  font-size: 14px; color: #64748b; margin: 0 0 16px;
}

.mtx-product {
  display: flex; gap: 14px; align-items: center;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 12px; margin-bottom: 16px;
}
.mtx-product img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: 10px; flex-shrink: 0;
}
.mtx-product-info { flex: 1; min-width: 0; }
.mtx-product-title {
  font-size: 15px; font-weight: 600; color: #0f172a;
  margin: 0 0 4px; line-height: 1.3;
}
.mtx-product-price { font-size: 15px; color: #0f766e; font-weight: 600; }
.mtx-product-price del { color: #94a3b8; font-weight: 400; margin-right: 6px; }

.mtx-actions { display: flex; gap: 10px; }
.mtx-btn {
  flex: 1; border: none; border-radius: 12px;
  padding: 14px 16px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: transform .1s ease, background .2s ease;
}
.mtx-btn:active { transform: scale(.97); }
.mtx-accept { background: #0f766e; color: #fff; }
.mtx-accept:hover { background: #0d635c; }
.mtx-accept.mtx-loading { opacity: .7; pointer-events: none; }
.mtx-decline { background: #f1f5f9; color: #475569; }
.mtx-decline:hover { background: #e2e8f0; }

.mtx-spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: mtx-spin .6s linear infinite;
  vertical-align: middle;
}
@keyframes mtx-spin { to { transform: rotate(360deg); } }
