:root {
  --cross-promo-cyan: #38bdf8;
  --cross-promo-blue: #4f7cff;
  --cross-promo-violet: #a855f7;
  --cross-promo-surface: #080d1a;
  --cross-promo-line: rgba(125, 211, 252, 0.22);
}

[data-cross-promo-placement][hidden],
.cross-promo-modal[hidden],
.cross-promo-banner[hidden] {
  display: none !important;
}

.cross-promo-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--cross-promo-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(168, 85, 247, 0.13), transparent 38%),
    linear-gradient(135deg, rgba(12, 24, 48, 0.96), rgba(8, 11, 22, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.cross-promo-card::before {
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.08);
  content: "";
  filter: blur(54px);
  inset: auto auto -110px -70px;
  pointer-events: none;
}

.cross-promo-result-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
}

.cross-promo-result-card .cross-promo-card-topline,
.cross-promo-dashboard-copy .cross-promo-card-topline {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #7dd3fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.cross-promo-card-topline::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cross-promo-cyan), var(--cross-promo-violet));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
  content: "";
}

.cross-promo-result-card h3,
.cross-promo-dashboard-copy h3 {
  margin: 0;
  color: #f8fbff;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  letter-spacing: -0.025em;
}

.cross-promo-result-card h3 {
  font-size: 17px;
  line-height: 1.2;
}

.cross-promo-result-card p,
.cross-promo-dashboard-copy > p {
  margin: 0;
  color: #a8b5c9;
  font-size: 12px;
  line-height: 1.55;
}

.cross-promo-link {
  display: inline-flex;
  width: fit-content;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 12px;
  padding: 0 14px;
  color: #fff;
  background: linear-gradient(115deg, #168eea, #5968f6 55%, #943de7);
  box-shadow: 0 10px 26px rgba(55, 118, 238, 0.2);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cross-promo-link::after {
  content: "↗";
  font-size: 13px;
}

.cross-promo-link:hover {
  transform: translateY(-1px);
  border-color: rgba(186, 230, 253, 0.66);
  box-shadow: 0 14px 32px rgba(76, 87, 238, 0.3);
  filter: brightness(1.08);
}

.cross-promo-link:focus-visible,
.cross-promo-close:focus-visible,
.cross-promo-skip:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.92);
  outline-offset: 3px;
}

.cross-promo-dashboard-card {
  display: grid;
  grid-template-columns: minmax(440px, 1.48fr) minmax(230px, 0.52fr);
  min-height: 250px;
  margin: 18px 0;
}

.cross-promo-dashboard-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  padding: 26px;
}

.cross-promo-dashboard-copy h3 {
  max-width: 420px;
  font-size: clamp(21px, 2.3vw, 27px);
  line-height: 1.06;
}

.cross-promo-dashboard-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 1px 0 2px;
}

.cross-promo-dashboard-tags span {
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  padding: 6px 9px;
  color: #c7d7eb;
  background: rgba(255, 255, 255, 0.035);
  font-size: 9px;
  font-weight: 720;
}

.cross-promo-dashboard-visual {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-right: 1px solid rgba(125, 211, 252, 0.12);
  background: #050b18;
}

.cross-promo-dashboard-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.cross-promo-modal {
  position: fixed;
  z-index: 1000;
  display: grid;
  place-items: center;
  inset: 0;
  padding: 20px;
}

.cross-promo-modal-backdrop {
  position: absolute;
  border: 0;
  background: rgba(1, 4, 12, 0.7);
  backdrop-filter: blur(7px);
  cursor: default;
  inset: 0;
}

.cross-promo-dialog {
  position: relative;
  z-index: 1;
  width: min(470px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 22px;
  padding: 27px;
  background:
    radial-gradient(circle at 88% 8%, rgba(168, 85, 247, 0.16), transparent 38%),
    linear-gradient(145deg, #0d1729, #070b14 74%);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.62), 0 0 52px rgba(50, 121, 224, 0.1);
  animation: crossPromoDialogIn 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cross-promo-dialog-mark {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 15px;
  color: white;
  background: linear-gradient(145deg, rgba(35, 175, 243, 0.92), rgba(129, 58, 224, 0.95));
  box-shadow: 0 14px 34px rgba(67, 94, 237, 0.28);
}

.cross-promo-dialog-mark svg {
  width: 22px;
  height: 22px;
}

.cross-promo-dialog h2 {
  max-width: 390px;
  margin: 0;
  color: #f8fbff;
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  font-size: clamp(24px, 5vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.cross-promo-dialog > p {
  margin: 13px 0 21px;
  color: #aebbd0;
  font-size: 13px;
  line-height: 1.65;
}

.cross-promo-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.cross-promo-skip {
  min-height: 42px;
  border: 0;
  padding: 0 10px;
  color: #9eabc0;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 740;
}

.cross-promo-skip:hover {
  color: #fff;
}

.cross-promo-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #b8c4d5;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  font-size: 20px;
}

.cross-promo-dialog > .cross-promo-close {
  position: absolute;
  top: 15px;
  right: 15px;
}

.cross-promo-banner {
  position: fixed;
  z-index: 80;
  right: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  width: min(760px, calc(100vw - 32px));
  min-height: 64px;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(125, 211, 252, 0.27);
  border-radius: 18px;
  padding: 10px 10px 10px 16px;
  transform: translateX(50%);
  color: #fff;
  background: rgba(7, 13, 26, 0.96);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.5), 0 0 34px rgba(79, 124, 255, 0.1);
  backdrop-filter: blur(18px);
  animation: crossPromoBannerIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cross-promo-banner-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(140deg, #22b8f3, #6f5af3 58%, #a53ce2);
}

.cross-promo-banner-mark svg {
  width: 18px;
  height: 18px;
}

.cross-promo-banner p {
  flex: 1;
  margin: 0;
  color: #dce8f7;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.cross-promo-banner .cross-promo-link {
  flex: 0 0 auto;
}

.cross-promo-banner .cross-promo-close {
  flex: 0 0 auto;
}

body.cross-promo-modal-open {
  overflow: hidden;
}

@keyframes crossPromoDialogIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes crossPromoBannerIn {
  from { opacity: 0; transform: translate(50%, 16px); }
  to { opacity: 1; transform: translate(50%, 0); }
}

@media (max-width: 820px) {
  .cross-promo-dashboard-card {
    grid-template-columns: 1fr;
  }

  .cross-promo-dashboard-visual {
    min-height: 210px;
    border-right: 0;
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
    order: -1;
  }
}

@media (max-width: 680px) {
  .cross-promo-result-card {
    padding: 14px;
  }

  .cross-promo-dashboard-card {
    margin-inline: 0;
  }

  .cross-promo-dashboard-copy {
    padding: 20px;
  }

  .cross-promo-dashboard-visual {
    min-height: 180px;
  }

  .cross-promo-dialog {
    padding: 24px 20px 20px;
  }

  .cross-promo-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cross-promo-dialog-actions .cross-promo-link,
  .cross-promo-dialog-actions .cross-promo-skip {
    width: 100%;
  }

  .cross-promo-banner {
    bottom: max(72px, calc(env(safe-area-inset-bottom) + 58px));
    display: flex;
    gap: 9px;
    border-radius: 16px;
    padding: 10px;
  }

  .cross-promo-banner-mark {
    display: none;
  }

  .cross-promo-banner p {
    min-width: 0;
    font-size: 11px;
  }

  .cross-promo-banner .cross-promo-link {
    width: auto;
    min-height: 44px;
    padding-inline: 10px;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cross-promo-dialog,
  .cross-promo-banner {
    animation: none;
  }

  .cross-promo-link {
    transition: none;
  }
}
