/* ============================================================================
   MySubShare — Ad slots (v14.0.0)
   ----------------------------------------------------------------------------
   Styled to sit inside the Soft Vault portal without pretending to be part of
   it. An ad that looks exactly like a subscription card gets clicked by
   mistake and then resented, so these read as a distinct, quieter surface:
   flatter background, a dashed edge, and a permanent "Sponsored" label.

   The theme variables are only defined on body.ms-sv, so every one carries a
   fallback for the shortcode used on an ordinary page outside the portal.
   ============================================================================ */

.ms-ad-mount{
  display:block;
  width:100%;
  margin:18px 0;
}

.ms-ad-mount--inline{ margin:22px 0; }

.ms-ad{
  position:relative;
  display:block;
  width:100%;
  box-sizing:border-box;
  background:var(--sv-panel,#12121a);
  border:1px dashed var(--sv-line-2,#2c2c3d);
  border-radius:var(--sv-r,16px);
  padding:14px;
  overflow:hidden;
  font-family:var(--sv-body,'Plus Jakarta Sans','DM Sans',-apple-system,BlinkMacSystemFont,sans-serif);
}

/* Outside the portal the page is usually light, so soften the surface. */
body:not(.ms-sv) .ms-ad{
  background:#f7f7fa;
  border-color:#dcdce4;
}

/* ------------------------------------------------------------- Label ---- */

.ms-ad-label{
  display:inline-block;
  font-size:10px;
  font-weight:700;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:var(--sv-ink-3,#6b6b80);
  margin-bottom:9px;
  white-space:nowrap;
}

body:not(.ms-sv) .ms-ad-label{ color:#8a8a99; }

/* -------------------------------------------------------------- Link ---- */

.ms-ad-link{
  display:block;
  color:inherit;
  text-decoration:none;
  position:relative;
}

a.ms-ad-link{ cursor:pointer; }

a.ms-ad-link:hover .ms-ad-heading{ color:var(--sv-orange,#fe6401); }
a.ms-ad-link:hover .ms-ad-cta{ filter:brightness(1.08); }
a.ms-ad-link:focus-visible{
  outline:2px solid var(--sv-orange,#fe6401);
  outline-offset:3px;
  border-radius:10px;
}

/* -------------------------------------------------------------- Badge --- */

.ms-ad-badge{
  position:absolute;
  top:0;
  right:0;
  z-index:2;
  background:var(--sv-orange,#fe6401);
  color:#fff;
  font-size:10.5px;
  font-weight:800;
  letter-spacing:.02em;
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
}

/* -------------------------------------------------------------- Media --- */

.ms-ad-media{
  display:block;
  overflow:hidden;
  border-radius:calc(var(--sv-r,16px) - 5px);
  background:var(--sv-card,#181824);
  line-height:0;
}

.ms-ad-media img{
  display:block;
  width:100%;
  height:auto;
  max-width:100%;
  object-fit:cover;
}

/* --------------------------------------------------------------- Text --- */

.ms-ad-text{ min-width:0; }

.ms-ad-heading{
  font-family:var(--sv-display,'Fredoka',system-ui,-apple-system,sans-serif);
  font-size:16.5px;
  font-weight:700;
  line-height:1.3;
  color:var(--sv-ink,#f5f5f8);
  margin:0 0 5px;
  white-space:normal;
  overflow-wrap:anywhere;
  transition:color .15s ease;
}

body:not(.ms-sv) .ms-ad-heading{ color:#141420; }

.ms-ad-body{
  font-size:13.5px;
  line-height:1.55;
  color:var(--sv-ink-2,#a2a2b4);
  margin:0;
  white-space:normal;
  overflow-wrap:anywhere;
}

body:not(.ms-sv) .ms-ad-body{ color:#55555f; }

.ms-ad-cta{
  display:inline-block;
  margin-top:12px;
  background:linear-gradient(135deg,var(--sv-orange,#fe6401),#ff8c2f);
  color:#fff;
  font-size:13.5px;
  font-weight:700;
  padding:9px 18px;
  border-radius:999px;
  white-space:nowrap;
  transition:filter .15s ease;
}

/* ------------------------------------------------------------ Banner ---- */

.ms-ad--banner .ms-ad-media{ margin-bottom:13px; }
.ms-ad--banner .ms-ad-media img{ aspect-ratio:1200 / 360; }

/* -------------------------------------------------------------- Card ---- */

.ms-ad--card .ms-ad-link{
  display:flex;
  align-items:center;
  gap:14px;
}

.ms-ad--card .ms-ad-media{
  flex:0 0 92px;
  width:92px;
  height:92px;
  border-radius:13px;
}

.ms-ad--card .ms-ad-media img{
  width:92px;
  height:92px;
  object-fit:cover;
}

/* ------------------------------------------------------------- Strip ---- */

.ms-ad--strip{ padding:13px 15px; }
.ms-ad--strip .ms-ad-heading{ font-size:15px; }
.ms-ad--strip .ms-ad-cta{ margin-top:10px; padding:8px 16px; font-size:13px; }

/* -------------------------------------------------------------- HTML ---- */

.ms-ad--html img{ max-width:100%; height:auto; }
.ms-ad--html iframe{ max-width:100%; border:0; }

/* ------------------------------------------------------------- Phones --- */

@media (max-width:820px){
  .ms-ad-mount{ margin:15px 0; }
  .ms-ad{ padding:13px; border-radius:14px; }
  .ms-ad-heading{ font-size:15.5px; }
  .ms-ad-body{ font-size:13px; }

  /* Full-width button on a phone, matching the portal's primary actions. */
  .ms-ad-cta{
    display:block;
    text-align:center;
    padding:12px 16px;
  }

  .ms-ad--card .ms-ad-link{ gap:12px; }
  .ms-ad--card .ms-ad-media,
  .ms-ad--card .ms-ad-media img{
    flex-basis:74px;
    width:74px;
    height:74px;
  }
  .ms-ad--card .ms-ad-cta{ display:inline-block; padding:8px 15px; }
}

@media (max-width:420px){
  .ms-ad--card .ms-ad-link{ display:block; }
  .ms-ad--card .ms-ad-media,
  .ms-ad--card .ms-ad-media img{
    width:100%;
    height:auto;
    aspect-ratio:16 / 9;
  }
  .ms-ad--card .ms-ad-media{ margin-bottom:12px; }
}

/* Respect a reader who has asked for less motion or a plainer surface. */
@media (prefers-reduced-motion:reduce){
  .ms-ad-heading,
  .ms-ad-cta{ transition:none; }
}
