.dm-media-overlay {
  position: fixed;
  z-index: 100500;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 7, 13, 0.78);
  backdrop-filter: blur(14px);
}

.dm-media-overlay.is-open {
  display: flex;
}

.dm-media-dialog {
  box-sizing: border-box;
  width: min(100%, 420px);
  padding: 20px;
  border: 1px solid rgba(128, 169, 201, 0.25);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(0, 211, 255, 0.12), transparent 38%),
    linear-gradient(145deg, #111b28, #0a111b 72%);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.48);
  color: #f2f8ff;
  font-family: inherit;
}

.dm-media-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.dm-media-eyebrow {
  margin: 0 0 5px;
  color: #75e5ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dm-media-title {
  margin: 0;
  color: #f8fbff;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
}

.dm-media-description {
  margin: 7px 0 0;
  color: #9aadc0;
  font-size: 12px;
  line-height: 1.5;
}

.dm-media-close {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(169, 195, 218, 0.17);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: #e8f1fa;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.dm-media-actions {
  display: grid;
  gap: 9px;
}

.dm-media-action {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(135, 171, 199, 0.18);
  border-radius: 15px;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  color: #f0f6fb;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.dm-media-action:hover,
.dm-media-action:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(71, 216, 255, 0.58);
  background: rgba(27, 153, 190, 0.16);
  outline: none;
}

.dm-media-action-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border: 1px solid rgba(63, 211, 246, 0.2);
  border-radius: 12px;
  background: rgba(23, 157, 195, 0.12);
  color: #75e5ff;
}

.dm-media-action-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dm-media-action-label {
  flex: 1;
}

.dm-media-action-arrow {
  color: #70889d;
  font-size: 19px;
}

.dm-media-upsell {
  width: min(100%, 430px);
  padding: 24px;
}

.dm-media-upsell-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 17px;
  place-items: center;
  border: 1px solid rgba(104, 225, 255, 0.32);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(26, 193, 227, 0.24), rgba(104, 89, 245, 0.2));
  color: #94ecff;
  font-size: 20px;
}

.dm-media-upsell .dm-media-title {
  max-width: 340px;
  font-size: 24px;
}

.dm-media-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 18px 0 14px;
}

.dm-media-price strong {
  color: #fff;
  font-size: 30px;
  font-weight: 900;
}

.dm-media-price span {
  color: #96aabd;
  font-size: 13px;
}

.dm-media-cta {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, #1ccbe5, #4aa5ff 62%, #7169f5);
  box-shadow: 0 12px 28px rgba(28, 174, 222, 0.2);
  color: #06121b;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.dm-media-cta:hover,
.dm-media-cta:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid rgba(139, 236, 255, 0.5);
  outline-offset: 3px;
}

.thread-message-video {
  display: block;
  width: min(100%, 340px);
  max-height: 390px;
  border: 1px solid rgba(130, 169, 196, 0.22);
  border-radius: 13px;
  background: #03070b;
  object-fit: contain;
}

.thread-message-video-compatibility {
  width: min(100%, 340px);
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(130, 169, 196, 0.22);
  border-radius: 13px;
  background: rgba(3, 7, 11, 0.9);
  color: rgba(229, 240, 248, 0.82);
  font-size: 13px;
  line-height: 1.45;
}

.thread-photo-wrap .thread-message-video {
  width: min(100%, 340px);
}

@media (max-width: 520px) {
  .dm-media-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .dm-media-dialog,
  .dm-media-upsell {
    width: 100%;
    padding: 18px;
    border-radius: 22px 22px 17px 17px;
  }

  .dm-media-action {
    min-height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dm-media-action {
    transition: none;
  }
}