.m4p-ad,
.m4p-ad * {
  box-sizing: border-box;
}
.m4p-ad {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  container-type: inline-size;
  height: var(--p-height);
  min-height: 100px;
}
.m4p-media {
  position: absolute;
  inset: 0;
}
.m4p-media img,
.m4p-media video {
  width: 100%;
  height: 100%;
  display: block;
}
.m4p-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.m4p-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--p-pad);
  min-height: inherit;
  height: 100%;
  pointer-events: none;
  overflow-wrap: anywhere;
}
.m4p-content > * {
  pointer-events: auto;
}
.m4p-content small {
  font-size: 11px;
  letter-spacing: 1.4px;
  margin-bottom: 12px;
}
.m4p-content h3 {
  font-size: clamp(14px, 5cqi, var(--p-size));
  line-height: 1.15;
  margin: 0 0 12px;
  color: inherit;
  white-space: pre-wrap;
}
.m4p-content p {
  font-size: var(--p-body);
  line-height: 1.5;
  margin: 0 0 20px;
  color: inherit;
  white-space: pre-wrap;
}
.m4p-content a {
  align-self: flex-start;
  padding: 11px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.m4p-ad[style*="text-align: center"] .m4p-content a {
  align-self: center;
}
.m4p-ad[style*="text-align: right"] .m4p-content a {
  align-self: flex-end;
}
.m4p-ad[data-layout="split"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.m4p-ad[data-layout="split"] .m4p-media {
  position: relative;
  min-height: 180px;
}
.m4p-ad[data-layout="stack"] {
  display: flex;
  flex-direction: column;
}
.m4p-ad[data-layout="stack"] .m4p-media {
  position: relative;
  aspect-ratio: 16/9;
  min-height: 100px;
}
.m4p-ad:not(:has(.m4p-content)) {
  min-height: 0;
}
.m4p-ad:not(:has(.m4p-content)) .m4p-media {
  position: relative;
}
.m4p-ad:not(:has(.m4p-content)) .m4p-media img,
.m4p-ad:not(:has(.m4p-content)) .m4p-media video {
  height: auto;
}
.m4p-ad:not(:has(.m4p-content)) .m4p-shade {
  display: none;
}
.m4p-ad[style]:not(:has(.m4p-content)) .m4p-media {
  height: 100%;
}
.m4p-whole {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.m4p-nav {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4;
  background: #0f172acc;
  color: white;
  padding: 4px 8px;
  border-radius: 20px;
  font: 12px Arial;
}
.m4p-nav button {
  background: transparent;
  border: 0;
  color: white;
  font-size: 24px;
  cursor: pointer;
}
.m4p-mobile {
  height: var(--p-mobile-height) !important;
}
.m4p-mobile[data-layout="split"] {
  display: flex;
  flex-direction: column;
}
.m4p-mobile .m4p-content {
  padding: min(var(--p-pad), 18px);
}
@media (max-width: 600px) {
  .m4p-ad {
    height: var(--p-mobile-height);
  }
  .m4p-ad[data-layout="split"] {
    display: flex;
    flex-direction: column;
  }
  .m4p-content {
    padding: min(var(--p-pad), 18px);
  }
}
.pb-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0f172a99;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pb-window {
  background: #f1f5f9;
  width: 1400px;
  max-width: 100%;
  height: 94vh;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font: 14px Arial;
  color: #0f172a;
}
.pb-head,
.pb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}
.pb-head h2 {
  margin: 0;
  font-size: 20px;
}
.pb-body {
  display: grid;
  grid-template-columns: 390px 1fr;
  flex: 1;
  min-height: 0;
}
.pb-fields {
  overflow: auto;
  padding: 20px;
  background: white;
  border-right: 1px solid #e2e8f0;
}
.pb-fields fieldset {
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  margin: 0 0 18px;
  padding: 0 0 18px;
}
.pb-fields legend {
  font-weight: bold;
  padding: 0 0 12px;
  font-size: 15px;
}
.pb-fields label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.pb-fields input:not([type="checkbox"]),
.pb-fields select,
.pb-fields textarea {
  display: block;
  width: 100%;
  padding: 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  margin-top: 5px;
  font: 14px Arial;
}
.pb-fields input[type="color"] {
  height: 38px;
  padding: 2px;
}
.pb-fields input[type="checkbox"] {
  margin-right: 8px;
}
.pb-preview {
  padding: 24px;
  overflow: auto;
}
.pb-stage {
  margin: 20px auto;
  max-width: 100%;
  transition: width 0.2s;
  background: repeating-conic-gradient(#e2e8f0 0% 25%, white 0% 50%) 0/20px 20px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}
.pb-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pb-window button,
.pb-toolbar button {
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: white;
  color: #0f172a;
  cursor: pointer;
}
.pb-window button.primary {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}
.pb-foot {
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}
.pb-status {
  font-size: 13px;
  color: #475569;
  flex: 1;
}
.pb-notice {
  background: #eff6ff;
  color: #1e40af;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.5;
}
.pb-media-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 8px 0;
  font-size: 12px;
}
.pb-media-row img {
  width: 46px;
  height: 35px;
  object-fit: cover;
}
.pb-media-row span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pb-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}
.pb-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pb-slot-preview {
  padding: 8px;
  background: #e2e8f0;
}
.pb-slot-preview .m4p-ad {
  max-height: 240px;
  pointer-events: none;
}
.pb-slot-preview .m4p-content {
  padding: 16px;
}
.pb-slot-preview .m4p-content h3 {
  font-size: 20px;
}
.pb-filter-copy {
  margin-top: 14px;
}
.pb-window button:focus-visible,
.pb-window input:focus-visible,
.pb-window select:focus-visible {
  outline: 3px solid #93c5fd;
}
@media (max-width: 850px) {
  .pb-body {
    display: flex;
    flex-direction: column;
    overflow: auto;
  }
  .pb-fields,
  .pb-preview {
    overflow: visible;
  }
  .pb-overlay {
    padding: 4px;
  }
  .pb-window {
    height: 98vh;
  }
  .pb-head,
  .pb-foot {
    padding: 12px;
  }
  .pb-preview {
    order: -1;
  }
  .pb-stage {
    margin: 12px auto;
  }
  .pb-fields {
    border-right: 0;
  }
}
.m4p-ad.m4p-fixed:not(:has(.m4p-content)) .m4p-media img,
.m4p-ad.m4p-fixed:not(:has(.m4p-content)) .m4p-media video {
  height: 100%;
}
.m4p-ad.m4p-mobile.m4p-mobile-fixed:not(:has(.m4p-content)) .m4p-media img,
.m4p-ad.m4p-mobile.m4p-mobile-fixed:not(:has(.m4p-content)) .m4p-media video {
  height: 100%;
}
@media (max-width: 600px) {
  .m4p-ad.m4p-mobile-fixed:not(:has(.m4p-content)) .m4p-media img,
  .m4p-ad.m4p-mobile-fixed:not(:has(.m4p-content)) .m4p-media video {
    height: 100%;
  }
}

/* Responsive preview and media sizing corrections. */
.m4p-mobile .m4p-content h3 {
  font-size: clamp(14px, 5cqi, var(--p-size));
}
.m4p-ad[data-layout="stack"] .m4p-content {
  height: auto;
  flex: 1;
  min-height: 0;
}
.m4p-ad[data-layout="split"] .m4p-content {
  min-width: 0;
}
.m4p-ad:not(:has(.m4p-content)) {
  aspect-ratio: var(--p-ratio, auto);
}
.m4p-ad.m4p-mobile:not(:has(.m4p-content)) {
  height: var(--p-mobile-height) !important;
}
.m4p-ad.m4p-fixed {
  min-height: 0;
}

/* Public slot wrappers must grow with the builder creative. */
.m4p-host {
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.m4p-host .m4p-media img {
  opacity: 1;
}
.m4p-host > .m4p-ad {
  flex-shrink: 0;
}

/* House ads: "Advertise here" ads shown in every empty ad space */
.m4p-house .m4p-shade{background:linear-gradient(90deg,rgba(10,16,26,.9) 0%,rgba(10,16,26,.55) 42%,rgba(10,16,26,0) 85%)!important}
.m4p-house.m4p-house-up .m4p-shade{background:linear-gradient(180deg,rgba(10,16,26,.1) 5%,rgba(10,16,26,.92) 85%)!important}
.m4p-house::after{content:attr(data-adl);position:absolute;top:10px;right:12px;z-index:3;font-size:9px;line-height:1;letter-spacing:.1em;text-transform:uppercase;padding:4px 7px;border-radius:5px;background:rgba(255,255,255,.16);color:#fff;pointer-events:none}
.m4p-house .m4p-content small{text-transform:uppercase;letter-spacing:.14em;font-size:10px;font-weight:600;opacity:.92;margin-bottom:8px}
.m4p-house .m4p-content h3{letter-spacing:-.01em;max-width:72%;margin-bottom:8px}
.m4p-house.m4p-house-up .m4p-content h3{max-width:100%}
.m4p-house .m4p-content p{max-width:62%;margin-bottom:14px}
.m4p-house.m4p-house-up .m4p-content p{max-width:100%}
.m4p-house .m4p-content a{font-size:13px;padding:9px 16px;border-radius:9px}
.m4p-house .m4p-content a::after{content:" \2192"}
.m4p-house.m4p-house-up .m4p-content a{font-size:11.5px;padding:7px 12px}
@media(max-width:640px){.m4p-house .m4p-content h3{max-width:88%}.m4p-house .m4p-content p{max-width:90%}}

/* Standard "Advertising space now available" ad (js/promo.js renderHouse) */
.m4h{display:block;position:relative;overflow:hidden;border-radius:16px;background:#021334;text-decoration:none;box-shadow:0 2px 10px rgba(2,19,52,.18);font-family:inherit}
.m4h-wide{height:var(--h,140px);display:flex;justify-content:center}
.m4h-wide img{height:100%;width:auto;max-width:100%;object-fit:contain;display:block}
.m4h-ratio{aspect-ratio:3/1}
.m4h-ratio img{width:100%;height:100%;object-fit:contain;display:block}
@media(max-width:600px){.m4h-wide{height:auto;aspect-ratio:3/1}.m4h-wide img{width:100%;height:100%}}
.m4h-tall{height:300px;border-radius:14px}
.m4h-tall .m4h-txt{position:absolute;left:16px;right:12px;top:16px;z-index:2;display:block}
.m4h-k{display:block;color:#38bdf8;font-weight:700;font-size:11px;letter-spacing:.08em}
.m4h-tall b{display:block;color:#fff;font-weight:800;font-size:22px;line-height:1.1}
.m4h-tall b:first-of-type{margin-top:6px}
.m4h b.m4h-o,.m4h .m4h-o{color:#f59e0b}
.m4h-tall em{display:block;font-style:normal;color:#e2e8f0;font-weight:500;font-size:11.5px;line-height:1.35;margin-top:8px}
.m4h-tall .m4h-dev{position:absolute;left:-9%;bottom:0;width:118%;max-width:none;height:46%;object-fit:cover;object-position:center bottom;-webkit-mask-image:linear-gradient(0deg,#000 62%,transparent 100%);mask-image:linear-gradient(0deg,#000 62%,transparent 100%)}
.m4h-small{height:150px;border-radius:14px}
.m4h-small .m4h-dev{position:absolute;left:0;top:0;width:105%;max-width:none;height:62%;object-fit:cover;object-position:center top;-webkit-mask-image:linear-gradient(180deg,#000 55%,transparent 100%);mask-image:linear-gradient(180deg,#000 55%,transparent 100%)}
.m4h-small .m4h-txt{position:absolute;left:12px;right:10px;bottom:10px;z-index:2}
.m4h-small b{display:block;color:#fff;font-weight:800;font-size:13.5px;line-height:1.15}
.m4h-small em{display:block;font-style:normal;color:#93c5fd;font-weight:700;font-size:10.5px;margin-top:4px}
.m4h-small .m4h-wideimg{display:none}
@media(max-width:900px){.m4h-small{height:auto;aspect-ratio:3/1;background:#021334}.m4h-small .m4h-dev,.m4h-small .m4h-txt{display:none}.m4h-small .m4h-wideimg{display:block;width:100%;height:100%;object-fit:contain}}

.m4h-rt{height:340px}
.m4h-rt .m4h-wideimg{display:none}
#vehRightAdSidebar{position:sticky;top:90px;align-self:flex-start}
@media(max-width:900px){#vehRightAdSidebar{position:static}.m4h-rt{height:auto;aspect-ratio:3/1;background:#021334}.m4h-rt .m4h-txt,.m4h-rt .m4h-dev{display:none}.m4h-rt .m4h-wideimg{display:block;width:100%;height:100%;object-fit:contain}}

.m4h-nolink{cursor:default}
.m4h img,.promo-banner-top .m4h img{opacity:1!important;filter:none!important}

/* ===== Ad Builder look (v438) ===== */
.pb-window{font:14px/1.45 "Inter",system-ui,-apple-system,"Segoe UI",Arial,sans-serif;border-radius:20px;box-shadow:0 30px 80px #0f172a55}
.pb-head,.pb-foot{padding:16px 26px}
.pb-head h2{font-size:21px;letter-spacing:-.01em}
.pb-head div div{color:#64748b;font-size:13px;margin-top:2px}
.pb-window button{font-weight:600;font-size:14px;line-height:1;font-family:inherit;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:11px 16px;border-radius:10px;border:1px solid #cbd5e1;background:#fff;color:#0f172a;cursor:pointer;transition:transform .12s,box-shadow .15s,background .15s,border-color .15s}
.pb-window button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 6px 14px #0f172a1a;border-color:#94a3b8}
.pb-window button:active:not(:disabled){transform:none;box-shadow:none}
.pb-window button:disabled{opacity:.5;cursor:not-allowed}
.pb-window button svg{flex:none}
.pb-window .pb-x{width:42px;height:42px;padding:0;border-radius:50%;color:#475569}
.pb-window .pb-x:hover:not(:disabled){background:#fee2e2;color:#b91c1c;border-color:#fecaca}
.pb-window button.primary{background:linear-gradient(135deg,#2563eb,#1d4ed8);border-color:#1d4ed8;color:#fff;padding:12px 22px;box-shadow:0 6px 16px #2563eb44}
.pb-window button.primary:hover:not(:disabled){background:linear-gradient(135deg,#1d4ed8,#1e40af);border-color:#1e40af}
.pb-window .pb-b-grey{background:#f1f5f9}
.pb-window .pb-b-blue{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8;width:100%;margin:2px 0 14px}
.pb-window .pb-b-blue:hover:not(:disabled){background:#dbeafe;border-color:#93c5fd}
.pb-window .pb-b-red{background:#fff;border-color:#fecaca;color:#b91c1c;width:100%}
.pb-window .pb-b-red:hover:not(:disabled){background:#fef2f2;border-color:#f87171}
.pb-window button.busy{position:relative;color:transparent!important;pointer-events:none}
.pb-window button.busy>*{opacity:0}
.pb-window button.busy::after{content:"";position:absolute;width:18px;height:18px;border:2.5px solid #94a3b8;border-top-color:#2563eb;border-radius:50%;animation:pbspin .7s linear infinite}
.pb-window button.primary.busy::after{border-color:#ffffff66;border-top-color:#fff}
@keyframes pbspin{to{transform:rotate(360deg)}}
.pb-fields{padding:18px;background:#f8fafc}
.pb-fields fieldset{background:#fff;border:1px solid #e2e8f0;border-radius:14px;margin:0 0 16px;padding:6px 16px 8px;box-shadow:0 1px 2px #0f172a0a;min-width:0}
.pb-fields legend{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:700;padding:0 8px;margin-left:-8px;color:#0f172a}
.pb-lg-ic{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:7px;background:#dbeafe;color:#1d4ed8;font-size:13px}
.pb-fields label{color:#334155;font-size:12.5px}
.pb-fields input:not([type="checkbox"]):not([type="file"]),.pb-fields select,.pb-fields textarea{padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font-size:14px;font-family:inherit;transition:border-color .15s,box-shadow .15s}
.pb-fields input:focus,.pb-fields select:focus,.pb-fields textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 4px #3b82f633}
.pb-fields select{appearance:none;-webkit-appearance:none;padding-right:34px;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center}
.pb-fields label:has(input[type="checkbox"]){display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;cursor:pointer}
.pb-fields input[type="checkbox"]{appearance:none;-webkit-appearance:none;flex:none;width:42px;height:24px;margin:0;border-radius:999px;background:#cbd5e1;position:relative;cursor:pointer;transition:background .2s}
.pb-fields input[type="checkbox"]::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0003;transition:transform .2s}
.pb-fields input[type="checkbox"]:checked{background:#2563eb}
.pb-fields input[type="checkbox"]:checked::after{transform:translateX(18px)}
.pb-fields input[type="checkbox"]:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.pb-fields .pb-drop{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;padding:16px 12px;margin:4px 0 14px;border:2px dashed #93c5fd;border-radius:14px;background:#f0f7ff;color:#1e3a8a;cursor:pointer;transition:background .15s,border-color .15s}
.pb-fields .pb-drop:hover,.pb-fields .pb-drop:focus-within{background:#dbeafe;border-color:#3b82f6}
.pb-fields .pb-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;margin:0;padding:0}
.pb-drop-ic{color:#2563eb;line-height:0}
.pb-drop b{font-size:13.5px}
.pb-drop small{color:#64748b;font-size:12px;font-weight:500}
.pb-help{color:#64748b;font-size:12px;margin:10px 0 6px}
.pb-media-row{padding:6px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc;gap:6px}
.pb-media-row img{width:52px;height:38px;border-radius:6px}
.pb-window .pb-media-row button{padding:0;width:30px;height:30px;border-radius:8px;font-size:13px}
.pb-seg{display:inline-flex;padding:4px;gap:4px;background:#e2e8f0;border-radius:12px}
.pb-window .pb-seg button{border:0;background:transparent;padding:8px 18px;border-radius:9px;color:#475569;box-shadow:none}
.pb-window .pb-seg button:hover:not(:disabled){background:#fff9;transform:none;box-shadow:none}
.pb-window .pb-seg button.on{background:#fff;color:#1d4ed8;box-shadow:0 1px 4px #0f172a22}
.pb-preview>p:not(.pb-notice){color:#64748b;font-size:13px;margin:10px 0 0}
.pb-stage{border-radius:14px;border-color:#cbd5e1}
.pb-notice{display:flex;gap:10px;align-items:flex-start;background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;border-radius:12px;padding:12px 14px;font-size:13px}
.pb-ni{flex:none;line-height:0;margin-top:2px}
.pb-status{display:inline-flex;align-items:center;gap:8px;font-weight:500}
.pb-dot{width:9px;height:9px;border-radius:50%;background:#94a3b8;flex:none}
.pb-status[data-state="ok"]{color:#15803d}.pb-status[data-state="ok"] .pb-dot{background:#22c55e}
.pb-status[data-state="warn"]{color:#b45309}.pb-status[data-state="warn"] .pb-dot{background:#f59e0b}
.pb-status[data-state="error"]{color:#b91c1c}.pb-status[data-state="error"] .pb-dot{background:#ef4444}
.pb-foot{gap:10px}
@media (max-width:850px){
  .pb-window{border-radius:14px}
  .pb-foot{position:sticky;bottom:0;padding:10px 12px}
  .pb-status{flex:1 1 100%}
  .pb-foot button{flex:1}
  .pb-seg{display:flex;width:100%}.pb-window .pb-seg button{flex:1;padding:9px 6px}
}
@media (max-width:850px){.pb-foot button{white-space:nowrap;padding:11px 10px}.pb-foot #pbPublish{flex:1.6}}
