:root{
  --dgx-blue:#0d69ba;
  --dgx-black:#000;
}

#dgx-engager-overlay{
  position: fixed !important;
  inset:0;
  background:rgba(0,0,0,0.55);
  display:grid;
  place-items:center;
  z-index:999999;
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease, visibility .22s ease;
  padding:16px;
}

#dgx-engager-overlay.show{
  opacity:1;
  visibility:visible;
}

/* Desktop modal base */
.dgx-engager-modal{
  width:min(720px, 100%);
  background:var(--dgx-black);
  color:#fff;
  border:1px solid rgba(255,255,255,0.10);
  border-radius:0px;
  padding:16px;
margin-top:90px;
  box-shadow:0 30px 80px rgba(0,0,0,0.55);
  transform:translateY(10px) scale(0.985);
  transition:transform .22s ease;
  position:relative;
}

#dgx-engager-overlay.show .dgx-engager-modal{
  transform:translateY(0) scale(1);
}

.dgx-engager-close{
  position:absolute;
  top:10px;
  right:10px;
  width:40px;
  height:40px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.14);
  background:rgba(255,255,255,0.06);
  color:#fff;
  cursor:pointer;
  font-size:22px;
  line-height:38px;
}

/* Header with avatar */
.dgx-engager-head{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
}

.dgx-engager-avatar{
  width:52px;
  height:52px;
  border-radius:999px;
  object-fit:cover;
  border:2px solid var(--dgx-blue);
  flex:0 0 auto;
}

.dgx-engager-headtext{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.dgx-engager-badge{
  display:inline-flex;
  align-items:center;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(13,105,186,0.18);
  border:1px solid rgba(13,105,186,0.45);
  width:max-content;
}

.dgx-engager-title{
  font-size:18px;
  font-weight:800;
  line-height:1.25;
}

.dgx-engager-msg{
  font-size:14px;
  line-height:1.55;
  color:rgba(255,255,255,0.88);
  margin:8px 0 14px;
}

.dgx-engager-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dgx-engager-cta{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 14px;
  border-radius:0px;
  text-decoration:none;
  font-weight:800;
  border:1px solid rgba(255,255,255,0.10);
  background:var(--dgx-blue);
  color:#fff;
  flex:1;
  min-width:200px;
}

.dgx-engager-secondary{
  padding:12px 14px;
  border-radius:0px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
  color:rgba(255,255,255,0.92);
  cursor:pointer;
  min-width:130px;
}

.dgx-engager-foot{
  font-size:12px;
  color:rgba(255,255,255,0.60);
  margin-top:12px;
}

/* MOBILE: bottom sheet, big buttons */
@media (max-width: 640px){
  #dgx-engager-overlay{
    place-items:end center;
    padding:12px;
  }

  .dgx-engager-modal{
    width:100%;
    border-radius:0px;
    padding:14px;
    transform:translateY(18px);
  }

  #dgx-engager-overlay.show .dgx-engager-modal{
    transform:translateY(0);
  }

  .dgx-engager-cta,
  .dgx-engager-secondary{
    width:100%;
    min-width:0;
  }

  .dgx-engager-title{
    font-size:16px;
  }
}


/* Portrait layout: image left, content right */
.dgx-engager-layout{
  display:flex;
  gap:16px;
  align-items:stretch; /* makes both columns same height */
}

/* Left image should stretch to match content height */
.dgx-engager-portrait{
  width:160px;          /* bigger image */
  height:100%;          /* <-- key */
  align-self:stretch;   /* <-- key */
  object-fit:cover;
  border-radius:0px;
  border:2px solid rgba(13,105,186,0.75);
  flex:0 0 auto;
  background:rgba(255,255,255,0.06);
}

/* Right content */
.dgx-engager-content{
  display:flex;
  flex-direction:column;
  min-width:0;
  flex:1;
}

/* Make text wrap nicely */
.dgx-engager-title,
.dgx-engager-msg{
  word-wrap:break-word;
}

/* Mobile: stack portrait on top, then text */
@media (max-width: 640px){
  .dgx-engager-layout{
    flex-direction:column;
  }

  .dgx-engager-portrait{
    width:100%;
    height:310px;      /* fixed hero height on mobile */
    border-radius:0px;
  }

  .dgx-engager-modal{
    width:100%;
  }
}