/* PYMID Global CTA Block A/B + Auto-Popup (Mẫu 3 Pro High-CTR · Đỏ-Đen-Trắng + Founder PNG) */
#pymid-vpage-web-popup-backdrop,
#pymid-vpage-web-popup-pill,
#pymid-inline-article-action-box,
#pymid-caoap-single-bottom-block {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.m3-popup-open {
  overflow: hidden !important;
}

.m3-global-wrap {
  margin: 28px 0 20px;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}

.m3-global-wrap *,
.m3-popup-overlay * {
  box-sizing: border-box;
}

.m3-pro-stage {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(ellipse 56% 78% at 19% 58%, rgba(237, 28, 36, 0.44) 0%, rgba(237, 28, 36, 0.12) 45%, transparent 74%),
    radial-gradient(ellipse 46% 58% at 92% 10%, rgba(237, 28, 36, 0.28) 0%, transparent 65%),
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 28px),
    linear-gradient(135deg, #0b0e14 0%, #141821 48%, #2b0b10 100%);
  border: 1.5px solid rgba(237, 28, 36, 0.48);
  box-shadow: 0 22px 52px rgba(14, 17, 23, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  padding: 26px 28px 0 20px;
  align-items: end;
}

.m3-pro-stage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ed1c24 0%, #ff5a60 50%, #ed1c24 100%);
  z-index: 3;
}

.m3-founder-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  align-self: stretch;
  min-height: 356px;
  z-index: 2;
}

.m3-rim-glow {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24) 0%, rgba(237, 28, 36, 0.48) 44%, transparent 72%);
  filter: blur(12px);
  pointer-events: none;
  z-index: 1;
}

.m3-founder-img {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 296px;
  height: 360px !important;
  object-fit: contain;
  object-position: left bottom;
  margin: 0 !important;
  filter:
    drop-shadow(0 16px 26px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 18px rgba(237, 28, 36, 0.3));
  pointer-events: none !important;
  cursor: default !important;
  user-select: none;
}

.m3-nameplate {
  position: absolute;
  bottom: 14px;
  left: 8px;
  right: 8px;
  z-index: 3;
  background: rgba(14, 17, 23, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 3px solid #ed1c24;
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.m3-nameplate strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.m3-nameplate span {
  display: block;
  font-size: 11.5px;
  color: #cbd5e1;
  font-weight: 600;
  margin-top: 2px;
}

.m3-content-col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-bottom: 24px;
}

.m3-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.42);
  color: #a7f3d0;
  font-size: 12.5px;
  font-weight: 700;
}

.m3-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: m3LivePulse 2s infinite;
  flex-shrink: 0;
}

@keyframes m3LivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.m3-headline {
  margin: 0 !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.28 !important;
  color: #ffffff !important;
  letter-spacing: -0.01em;
}

.m3-sub {
  margin: 0 !important;
  font-size: 14.5px !important;
  color: #e2e8f0 !important;
  line-height: 1.5 !important;
}

.m3-white-card {
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  padding: 18px 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-top: 3px solid #ed1c24;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.m3-lead-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 !important;
}

.m3-inputs-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
}

.m3-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.m3-field-label {
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.25;
  margin: 0 !important;
  display: block;
}

.m3-req {
  color: #ed1c24;
  font-weight: 900;
}

.m3-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.m3-input-ico {
  position: absolute;
  left: 12px;
  width: 17px;
  height: 17px;
  color: #475569;
  pointer-events: none;
  flex-shrink: 0;
}

.m3-input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 14px 0 38px !important;
  border: 2px solid #94a3b8 !important;
  border-radius: 10px !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  background: #f1f5f9 !important;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  margin: 0 !important;
  transition: all 0.16s ease;
}

.m3-input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.m3-input:hover {
  border-color: #64748b !important;
  background: #f8fafc !important;
}

.m3-input:focus {
  outline: none !important;
  background: #ffffff !important;
  border-color: #ed1c24 !important;
  box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.15) !important;
}

.m3-input-wrap:focus-within .m3-input-ico {
  color: #ed1c24;
}

.m3-submit {
  position: relative;
  overflow: hidden;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px !important;
  min-height: 48px;
  border: none !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ed1c24 0%, #c8131a 100%) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 15.5px !important;
  font-weight: 800 !important;
  text-transform: none !important;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin: 0 !important;
  box-shadow: 0 10px 24px rgba(237, 28, 36, 0.36);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.m3-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -65%;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.32) 50%, transparent 100%);
  transform: skewX(-22deg);
  animation: m3BtnShimmer 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes m3BtnShimmer {
  0%, 58% { left: -65%; }
  100%    { left: 135%; }
}

.m3-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(237, 28, 36, 0.46);
}

.m3-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.m3-submit-arrow {
  display: inline-block;
  transition: transform 0.18s ease;
}

.m3-submit:hover .m3-submit-arrow {
  transform: translateX(5px);
}

.m3-feedback {
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
}

.m3-feedback.is-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.m3-feedback.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.m3-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.03em;
}

.m3-divider::before,
.m3-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.m3-zalo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.m3-btn-zalo-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1.5px solid #60a5fa;
  background: #eff6ff;
  color: #0056d6 !important;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.m3-btn-zalo-primary:hover {
  background: #0068ff;
  border-color: #0068ff;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 104, 255, 0.28);
}

.m3-community-foot {
  text-align: center;
  font-size: 13px;
  color: #334155;
  padding-top: 2px;
}

.m3-community-foot a {
  color: #c41219 !important;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Auto-Popup Modal */
.m3-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 13, 20, 0.74);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.m3-popup-overlay.is-open {
  display: flex;
}

.m3-popup-dialog {
  position: relative;
  width: min(94vw, 880px);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px;
  animation: m3PopIn 0.2s ease-out;
}

@keyframes m3PopIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.m3-popup-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  padding: 6px 13px !important;
  min-height: 0 !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background: rgba(14, 17, 23, 0.84) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  margin: 0 !important;
  transition: all 0.15s ease;
}

.m3-popup-close:hover {
  background: #ed1c24 !important;
  border-color: #ed1c24 !important;
}

.m3-popup-dialog .m3-pro-stage {
  grid-template-columns: 262px minmax(0, 1fr);
  gap: 20px;
  padding: 24px 26px 0 18px;
}

.m3-popup-dialog .m3-founder-col {
  min-height: 325px;
}

.m3-popup-dialog .m3-founder-img {
  height: 330px !important;
}

.m3-popup-dialog .m3-headline {
  font-size: 20px !important;
  padding-right: 76px;
}

@media (max-width: 820px) {
  .m3-pro-stage,
  .m3-popup-dialog .m3-pro-stage {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 20px 16px 18px;
  }

  .m3-founder-col,
  .m3-popup-dialog .m3-founder-col {
    min-height: 0;
    padding-top: 2px;
  }

  .m3-rim-glow {
    width: 190px;
    height: 190px;
    bottom: 18px;
  }

  .m3-founder-img,
  .m3-popup-dialog .m3-founder-img {
    height: 215px !important;
    max-width: 215px;
    object-position: center bottom;
  }

  .m3-nameplate {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    text-align: center;
    margin-top: -8px;
  }

  .m3-content-col {
    padding-bottom: 0;
  }

  .m3-inputs-grid,
  .m3-zalo-row {
    grid-template-columns: 1fr;
  }

  .m3-popup-dialog .m3-headline {
    padding-right: 0;
  }
}
