/* CareMedox.org V1.0: ad geometry + responsive house promotions.
   Loaded after old lesson.css, main.css and dark-theme.css, so earlier fixed
   heights / display:none rules cannot clip or hide house placements. */
.cm-ad-wrap,.cm-ad-slot,.cm-caremedox-rcm-ad,.cm-caremedox-referral-ad,
.cm-ad-sidebar-unit,.cm-community-side .cm-ad-wrap,.cm-community-side .cm-ad-slot {
  box-sizing:border-box; min-width:0; width:100%; max-width:100%;
  max-height:none !important; height:auto !important; overflow:visible;
}
.cm-ad-wrap,.cm-ad-slot { margin-block:clamp(16px,2.8vw,26px); }
.cm-ad-sidebar { align-self:start; gap:16px; min-width:0; }
.cm-ad-sidebar .cm-ad-wrap,.cm-ad-sidebar .cm-caremedox-rcm-ad,
.cm-ad-sidebar .cm-caremedox-referral-ad { margin:0; }
.cm-caremedox-rcm-ad .cm-caremedox-ad-content,
.cm-caremedox-referral-ad .cm-referral-ad-content { min-width:0; }
.cm-caremedox-referral-ad h3,.cm-caremedox-rcm-ad h3,
.cm-caremedox-blue-ad h3 { line-height:1.24; overflow-wrap:anywhere; }
.cm-caremedox-rcm-ad :is(p,small),.cm-caremedox-referral-ad :is(p,small) { overflow-wrap:anywhere; }
.cm-caremedox-rcm-ad .cm-caremedox-ad-actions,
.cm-caremedox-referral-ad .cm-referral-actions { min-width:0; }
.cm-caremedox-rcm-ad :is(.cm-caremedox-ad-actions a),
.cm-caremedox-referral-ad :is(.cm-referral-actions a) { max-width:100%; white-space:normal; text-align:center; overflow-wrap:anywhere; }
.cm-ad-slot .adsbygoogle { display:block; min-width:0; width:100%; max-width:100%; }
.cm-ad-hub-promo { width:min(1130px,calc(100% - 34px)); margin:clamp(20px,3vw,38px) auto !important; }
.cm-ad-hub-promo.is-wide .cm-caremedox-ad-content { width:100%; }
/* Never make a sticky ad stay over the page at tablet sizes. */
@media (max-width:1160px) {
  .cm-lesson-shell .cm-ad-sidebar {
    display:grid !important; position:static !important; grid-column:2;
    grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; width:100%;
  }
  .cm-lesson-shell .cm-caremedox-referral-ad { display:block !important; }
}
@media (max-width:900px) {
  .cm-lesson-shell .cm-ad-sidebar {
    display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr));
    margin:20px 0 0 !important; width:100%;
  }
  .cm-caremedox-referral-ad { display:block !important; }
}
@media (max-width:700px) {
  .cm-lesson-shell .cm-ad-sidebar {
    display:grid !important; grid-template-columns:minmax(0,1fr);
    margin:18px 0 0 !important;
  }
  .cm-caremedox-referral-ad,
  .cm-caremedox-rcm-ad { display:block !important; }
  .cm-caremedox-blue-ad .cm-caremedox-ad-actions,
  .cm-caremedox-referral-ad .cm-referral-actions { grid-template-columns:minmax(0,1fr) !important; }
  .cm-caremedox-blue-ad .cm-caremedox-ad-actions a,
  .cm-caremedox-referral-ad .cm-referral-actions a { width:100%; }
  .cm-ad-hub-promo { width:calc(100% - 26px); }
}
@media (max-width:430px) {
  .cm-caremedox-rcm-ad,.cm-caremedox-referral-ad { padding:16px !important; border-radius:19px; }
  .cm-referral-mini-points,.cm-caremedox-ad-points { gap:5px; }
  .cm-referral-mini-points span,.cm-caremedox-ad-points span { font-size:.69rem; }
}
