.phlx-adpro,
.phlx-adpro-slot {
  box-sizing: border-box;
  width: 100%;
  margin: 18px auto;
  clear: both;
}
.phlx-adpro-placeholder {
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(148,163,184,.12), rgba(148,163,184,.22), rgba(148,163,184,.12));
  background-size: 240% 100%;
  animation: phlx-adpro-pulse 1.6s ease-in-out infinite;
}
@keyframes phlx-adpro-pulse {
  0% { background-position: 0 0; }
  100% { background-position: -240% 0; }
}
.phlx-adpro-slot {
  position: relative;
  border-radius: 18px;
  overflow: clip;
}
.phlx-adpro-slot__label {
  display: block;
  font: 600 11px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  text-align: center;
  margin-bottom: 6px;
}
.phlx-adpro-slot__creative {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.phlx-adpro-iframe {
  width: 100%;
  min-height: inherit;
  border: 0;
  display: block;
}
.phlx-adpro-sponsored-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 8px 28px rgba(15, 23, 42, .12);
}
.phlx-adpro-slot--mobile_anchor,
.phlx-adpro-slot--sticky_footer {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(8px, env(safe-area-inset-bottom));
  z-index: 9998;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 782px) {
  .phlx-adpro-slot--mobile_anchor { display: none; }
}
.phlx-adpro-image { max-width: 100%; height: auto; display: inline-block; }
.phlx-adpro-universal-code { width: 100%; }
.phlx-adpro-vast { min-height: 120px; display: flex; align-items: center; justify-content: center; }
.phlx-adpro-slot--sticky_footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9998; margin: 0 auto; background: rgba(255,255,255,.96); box-shadow: 0 -8px 24px rgba(15,23,42,.16); }
.phlx-adpro-slot--sticky_header { position: fixed; left: 0; right: 0; top: 0; z-index: 9998; margin: 0 auto; background: rgba(255,255,255,.96); box-shadow: 0 8px 24px rgba(15,23,42,.16); }
.phlx-adpro-slot--mobile_anchor { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; margin: 0 auto; }
@media (min-width: 783px) { .phlx-adpro-slot--mobile_anchor { display: none; } }

/* Stage 8 safety-first renderer styles. Clear separation prevents ads from looking like reward actions. */
.phlx-smart-ad-slot,
.phlx-adpro-slot {
  box-sizing: border-box;
  clear: both;
  margin: 1.5rem auto;
  padding: 0.75rem;
  max-width: 100%;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.02);
}

.phlx-adpro-slot__label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.68;
}

.phlx-adpro-slot__creative {
  display: block;
  width: 100%;
  overflow: hidden;
}

.phlx-adpro-image,
.phlx-adpro-iframe {
  max-width: 100%;
  border: 0;
}

.phlx-adpro-iframe {
  width: 100%;
  min-height: 120px;
}

.phlx-adpro-sponsored-link {
  display: inline-block;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

.phlx-adpro-slot--sticky,
.phlx-adpro-slot--mobile_anchor,
.phlx-adpro-slot--sticky_footer {
  display: none;
}

body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--sticky,
body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--mobile_anchor,
body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--sticky_footer {
  display: block;
}

@media (max-width: 640px) {
  .phlx-smart-ad-slot,
  .phlx-adpro-slot {
    margin: 1.25rem 0;
    padding: 0.65rem;
    border-radius: 10px;
  }
}

.phlx-adpro-placeholder--empty[hidden] {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.phlx-adpro-selector-placeholder {
  width: 100%;
  clear: both;
}

.phlx-adpro-inspector-active .phlx-adpro-inspector-zone {
  outline: 2px dashed currentColor;
  outline-offset: 3px;
  cursor: crosshair;
}

.phlx-adpro-inspector-active .phlx-adpro-inspector-zone--blocked {
  outline: 2px dotted currentColor;
  outline-offset: 2px;
  opacity: .75;
}

.phlx-adpro-inspector-panel {
  position: fixed;
  inset: auto 12px 12px 12px;
  z-index: 2147483000;
  max-width: 920px;
  margin: 0 auto;
  padding: 12px 16px;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: Canvas;
  color: CanvasText;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  font: 600 14px/1.45 system-ui, sans-serif;
}

/* Phase 5 cache-safe, responsive and layout-stable delivery. */
.phlx-adpro-placeholder {
  min-height: var(--phlx-ad-min-height, 120px);
  aspect-ratio: var(--phlx-ad-aspect-ratio, auto);
  contain: layout paint;
}

.phlx-adpro-slot {
  max-inline-size: 100%;
  contain: layout paint;
}

.phlx-adpro-slot__creative {
  min-height: inherit;
  aspect-ratio: var(--phlx-ad-aspect-ratio, auto);
}

.phlx-adpro-picture,
.phlx-adpro-picture img,
.phlx-adpro-image,
.phlx-adpro-slot ins,
.phlx-adpro-slot iframe {
  display: block;
  max-inline-size: 100%;
  margin-inline: auto;
}

.phlx-adpro-picture img,
.phlx-adpro-image {
  inline-size: auto;
  block-size: auto;
  object-fit: contain;
}

.phlx-adpro-slot__close {
  position: absolute;
  inset-block-start: max(4px, env(safe-area-inset-top));
  inset-inline-end: max(4px, env(safe-area-inset-right));
  z-index: 2;
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: Canvas;
  color: CanvasText;
  font: 700 24px/1 system-ui, sans-serif;
  cursor: pointer;
}

.phlx-adpro-slot__close:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--sticky_footer,
body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--mobile_anchor {
  inset-inline: max(8px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-right));
  inset-block-end: calc(max(8px, env(safe-area-inset-bottom)) + var(--phlx-ad-safe-bottom, 0px));
  inline-size: auto;
  max-block-size: min(var(--phlx-ad-max-height, 180px), 40vh);
  overflow: auto;
  overscroll-behavior: contain;
}

body.phlx-smart-ads-allow-sticky .phlx-adpro-slot--sticky_header {
  inset-block-start: max(0px, env(safe-area-inset-top));
  max-block-size: min(var(--phlx-ad-max-height, 180px), 40vh);
  overflow: auto;
}

.phlx-adpro-slot[hidden],
.phlx-adpro-placeholder[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .phlx-adpro-placeholder {
    animation: none !important;
  }
}
