/* =========================================================
   Affiliate link / banner presentation (v1.10.9)
   Provider-issued anchor markup and anchor text remain unchanged.
   Disclosure stays visible as plain text; the detached pill is removed.
========================================================= */

/* Neutralise legacy button classes accidentally inherited by the wrapper. */
.ipo-platform-skin--legacy .ipo-affiliate-text-button {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  transform: none !important;
  box-sizing: border-box !important;
  isolation: isolate;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button:hover {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-cta {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 16px !important;
  border: 1px solid #e6c45a !important;
  border-radius: 18px !important;
  background: #fffdf5 !important;
  color: #172033 !important;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .12) !important;
  box-sizing: border-box !important;
  overflow: hidden;
}

.ipo-platform-skin--legacy .ipo-affiliate-cta-meta {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  width: 100%;
  min-width: 0;
  margin: 0 !important;
}

/* A disclosure is prudent, but it does not need to be a floating chip. */
.ipo-platform-skin--legacy .ipo-affiliate-disclosure {
  display: inline-block !important;
  flex: 0 0 auto;
  margin: 0 !important;
  padding: 0 9px 0 0 !important;
  border: 0 !important;
  border-right: 1px solid #dbc984 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #7b6418 !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  letter-spacing: .06em !important;
  white-space: nowrap;
  box-shadow: none !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-cta-guide,
.ipo-platform-skin--legacy .ipo-affiliate-cta-note {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-cta-guide {
  min-width: 0;
  color: #6b3518 !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1.45 !important;
  letter-spacing: .01em !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-cta-note {
  color: #667085 !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  line-height: 1.45 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code {
  position: relative;
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 13px 54px 13px 18px !important;
  border: 1px solid #d6a700 !important;
  border-radius: 13px !important;
  background: linear-gradient(180deg, #ffdc58 0%, #f7c91e 100%) !important;
  color: #111827 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.48 !important;
  text-align: left !important;
  text-decoration: none !important;
  text-shadow: none !important;
  white-space: normal !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  line-break: strict;
  text-wrap: pretty;
  box-shadow: 0 7px 16px rgba(187, 136, 0, .20) !important;
  box-sizing: border-box !important;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type::after {
  content: "→";
  position: absolute;
  right: 13px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(17, 24, 39, .10);
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform .18s ease, background .18s ease;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type:hover {
  color: #111827 !important;
  filter: brightness(1.025);
  box-shadow: 0 11px 22px rgba(187, 136, 0, .27) !important;
  transform: translateY(-2px);
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type:hover::after {
  background: rgba(17, 24, 39, .16);
  transform: translate(3px, -50%);
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .38) !important;
  outline-offset: 3px;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--copy-short .ipo-affiliate-provider-code > a:first-of-type {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  word-break: keep-all !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--copy-medium .ipo-affiliate-provider-code > a:first-of-type {
  min-height: 62px !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--copy-long .ipo-affiliate-provider-code > a:first-of-type {
  min-height: 72px !important;
  padding-top: 15px !important;
  padding-bottom: 15px !important;
  font-size: 13.5px !important;
  line-height: 1.58 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type img {
  max-width: 100%;
  height: auto;
}

.ipo-platform-skin--legacy .ipo-affiliate-provider-code > img[width="1"][height="1"],
.ipo-platform-skin--legacy .ipo-affiliate-provider-code > img[width="0"][height="0"],
.ipo-platform-skin--legacy .ipo-affiliate-banner-code > img[width="1"][height="1"],
.ipo-platform-skin--legacy .ipo-affiliate-banner-code > img[width="0"][height="0"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Banner block: frameless multi-banner presentation. */
.ipo-platform-skin--legacy .ipo-affiliate-banner-group {
  width: 100%;
  box-sizing: border-box;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-group__disclosure {
  display: block;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  color: #64748b !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: .08em !important;
  text-align: center !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-group__items {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 24px);
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-group.is-layout-row-centered .ipo-affiliate-banner-group__items {
  flex-flow: row wrap;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-group.is-layout-stack .ipo-affiliate-banner-group__items {
  flex-flow: column nowrap;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-group__item {
  display: flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  justify-content: center;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner {
  position: relative;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
  box-shadow: none;
  box-sizing: border-box;
  overflow: visible;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner .ipo-affiliate-disclosure {
  display: none !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-code {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 100%;
  min-height: 1px;
  overflow: visible;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-code > a,
.ipo-platform-skin--legacy .ipo-affiliate-banner-code > picture,
.ipo-platform-skin--legacy .ipo-affiliate-banner-code > iframe {
  display: inline-block;
  max-width: 100%;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-code img {
  display: block;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 auto;
  border: 0;
}

.ipo-platform-skin--legacy .ipo-affiliate-banner-code iframe {
  max-width: 100% !important;
  border: 0;
}

/* Placement sizing. */
.ipo-platform-skin--legacy .ipo-sec-v4-hero-panel .ipo-affiliate-text-button,
.ipo-platform-skin--legacy .ipo-detail-broker-cta-actions .ipo-affiliate-text-button {
  max-width: 100%;
}

.ipo-platform-skin--legacy .ipo-sec-v4-bottom-cta .ipo-affiliate-text-button {
  flex: 0 1 410px;
  max-width: 410px;
}

/* Dark bottom section: keep the CTA as a high-contrast white card. */
.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 410px) !important;
  gap: clamp(28px, 5vw, 58px) !important;
  padding: clamp(28px, 4vw, 42px) !important;
  background: linear-gradient(135deg, #071a3b 0%, #0a2850 58%, #12334c 100%) !important;
  border: 1px solid rgba(250, 204, 21, .20) !important;
  box-shadow: 0 20px 48px rgba(7, 26, 59, .22) !important;
  overflow: hidden;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout::before,
.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout::after {
  opacity: .18 !important;
  pointer-events: none;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout .ipo-affiliate-text-button {
  position: relative;
  z-index: 2;
  max-width: 410px;
  justify-self: end;
}

/* Compact cards/tables: keep disclosure inside the card and remove the detached chip. */
.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-text-cta {
  gap: 7px !important;
  padding: 9px !important;
  border-radius: 13px !important;
  box-shadow: none !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-cta-meta {
  gap: 6px !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-disclosure {
  padding-right: 6px !important;
  font-size: 8px !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-cta-guide {
  font-size: 9px !important;
  line-height: 1.35 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-cta-note {
  display: none !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-provider-code > a:first-of-type {
  min-height: 42px !important;
  padding: 9px 36px 9px 11px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact.ipo-affiliate-text-button--copy-medium .ipo-affiliate-provider-code > a:first-of-type,
.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact.ipo-affiliate-text-button--copy-long .ipo-affiliate-provider-code > a:first-of-type {
  min-height: 52px !important;
  white-space: normal !important;
  font-size: 11.5px !important;
  line-height: 1.48 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--compact .ipo-affiliate-provider-code > a:first-of-type::after {
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-size: 13px;
}

.ipo-platform-skin--legacy .ipo-securities-side > .ipo-affiliate-text-button--ranking,
.ipo-platform-skin--legacy .ipo-security-pickup-side > .ipo-affiliate-text-button--security-card {
  width: 100%;
  max-width: 260px;
}

.ipo-platform-skin--legacy .ipo-sec-compare-table .ipo-affiliate-text-button--compare {
  width: 164px;
  min-width: 146px;
  margin: 0 auto !important;
}

.ipo-platform-skin--legacy .ipo-sec-compare-table .ipo-affiliate-text-button--compare .ipo-affiliate-cta-guide {
  font-size: 8px !important;
}

.ipo-platform-skin--legacy .ipo-sec-compare-table .ipo-affiliate-text-button--compare .ipo-affiliate-provider-code > a:first-of-type {
  min-height: 40px !important;
  padding: 8px 31px 8px 8px !important;
  font-size: 11px !important;
}

.ipo-platform-skin--legacy .ipo-detail-strategy-broker-card > .ipo-affiliate-text-button--strategy-card,
.ipo-platform-skin--legacy .ipo-detail-strategy-broker-mini-actions .ipo-affiliate-text-button--strategy-mini {
  width: min(100%, 220px);
  margin-left: auto !important;
}

@media (max-width: 960px) {
  .ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout {
    grid-template-columns: 1fr !important;
  }

  .ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout .ipo-affiliate-text-button {
    width: 100% !important;
    max-width: 520px;
    justify-self: start;
  }
}

@media (max-width: 768px) {
  .ipo-platform-skin--legacy .ipo-sec-compare-table .ipo-affiliate-text-button--compare,
  .ipo-platform-skin--legacy .ipo-securities-side > .ipo-affiliate-text-button--ranking,
  .ipo-platform-skin--legacy .ipo-security-pickup-side > .ipo-affiliate-text-button--security-card,
  .ipo-platform-skin--legacy .ipo-detail-strategy-broker-card > .ipo-affiliate-text-button--strategy-card {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .ipo-platform-skin--legacy .ipo-affiliate-text-cta {
    gap: 8px;
    padding: 13px !important;
    border-radius: 16px !important;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-cta-guide {
    font-size: 12px !important;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type {
    min-height: 52px !important;
    padding: 12px 46px 12px 14px !important;
    font-size: 14px !important;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-text-button--copy-short .ipo-affiliate-provider-code > a:first-of-type {
    white-space: normal !important;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-text-button--copy-long .ipo-affiliate-provider-code > a:first-of-type {
    min-height: 66px !important;
    font-size: 13px !important;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-provider-code > a:first-of-type::after {
    right: 10px;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-banner-group__items {
    gap: 14px;
  }

  .ipo-platform-skin--legacy .ipo-affiliate-banner-group__item {
    width: 100%;
  }

  .ipo-platform-skin--legacy .ipo-sec-v4-bottom-cta .ipo-affiliate-text-button {
    flex-basis: 100%;
    max-width: 100%;
  }

  .ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta.ipo-affiliate-cta-layout {
    gap: 22px !important;
    padding: 22px !important;
  }
}

/* =========================================================
   v1.10.9 visibility and non-affiliate consistency fixes.
   Some legacy bottom-CTA rules colour every nested span white.
   These component-scoped selectors deliberately outrank them.
========================================================= */
.ipo-platform-skin--legacy .ipo-affiliate-cta-meta--no-disclosure {
  gap: 0 !important;
}

.ipo-platform-skin--legacy .ipo-affiliate-cta-meta--no-disclosure .ipo-affiliate-cta-guide {
  width: 100%;
}

.ipo-platform-skin--legacy .ipo-affiliate-text-button--non-affiliate .ipo-affiliate-text-cta {
  border-color: #e1c45e !important;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta .ipo-affiliate-text-cta .ipo-affiliate-disclosure {
  color: #7b6418 !important;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta .ipo-affiliate-text-cta .ipo-affiliate-cta-guide {
  color: #6b3518 !important;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta .ipo-affiliate-text-cta .ipo-affiliate-cta-note {
  color: #667085 !important;
}

.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta .ipo-affiliate-provider-code > a:first-of-type,
.ipo-platform-skin--legacy .ipo-sec-v4-page .ipo-sec-v4-bottom-cta .ipo-affiliate-provider-code > a:first-of-type * {
  color: #111827 !important;
  text-shadow: none !important;
}

/* The same protection is required in IPO-detail bottom CTA variants. */
.ipo-platform-skin--legacy .ipo-detail-broker-cta-bottom .ipo-affiliate-text-cta .ipo-affiliate-disclosure {
  color: #7b6418 !important;
}

.ipo-platform-skin--legacy .ipo-detail-broker-cta-bottom .ipo-affiliate-text-cta .ipo-affiliate-cta-guide {
  color: #6b3518 !important;
}

.ipo-platform-skin--legacy .ipo-detail-broker-cta-bottom .ipo-affiliate-text-cta .ipo-affiliate-cta-note {
  color: #667085 !important;
}

.ipo-platform-skin--legacy .ipo-detail-broker-cta-bottom .ipo-affiliate-provider-code > a:first-of-type,
.ipo-platform-skin--legacy .ipo-detail-broker-cta-bottom .ipo-affiliate-provider-code > a:first-of-type * {
  color: #111827 !important;
  text-shadow: none !important;
}
