.dam-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, var(--dam-width, 970px));
  min-height: 0;
  margin: .75rem auto;
  overflow: visible;
}

.dam-slot--empty {
  display: none;
}

.rivax-posts-wrapper.layout-grid > .dam-slot {
  grid-column: 1 / -1;
}

.dam-slot__status {
  color: #667085;
  font-size: .8rem;
}

.dam-slot__label {
  position: static;
  order: 2;
  align-self: flex-start;
  margin-top: 3px;
  margin-left: max(0px, calc((100% - var(--dam-banner-width, 100%)) / 2));
  padding: 0;
  color: #667085;
  font-size: 9px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: transparent;
  pointer-events: none;
}

.dam-slot__creative,
.dam-slot__creative img,
.dam-slot__creative iframe {
  display: block;
  width: 100%;
  height: 100%;
}

.dam-slot__creative {
  order: 1;
  height: var(--dam-height, 90px);
  min-height: var(--dam-height, 90px);
}

.dam-slot__creative img {
  object-fit: contain;
}

.dam-slot__creative iframe {
  border: 0;
  height: var(--dam-height, 250px);
  pointer-events: none;
}

/* Preserve the booked dimensions against theme and Elementor overrides. */
.dam-slot[data-dam-placement] {
  width: min(100%, var(--dam-width, 970px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.dam-slot[data-dam-placement="sidebar_banner"] {
  width: 300px !important;
  max-width: 100%;
  align-self: center;
}

.dam-slot[data-dam-placement] .dam-slot__creative {
  width: 100%;
  margin: 0;
}

.dam-slot[data-dam-placement] .dam-slot__creative iframe {
  width: 100% !important;
  max-width: 100%;
  margin: 0;
}

/* Let the booked tablet banner span the article's horizontal padding. */
@media (min-width: 768px) and (max-width: 1023px) {
  .single-content > .dam-slot[data-dam-placement="content_inline"][data-dam-adslot="tablet"] {
    width: var(--dam-width, 728px) !important;
    max-width: none;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.dam-slot__textlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  min-height: 0;
  padding: .8rem 1rem;
  font-weight: 800;
}

@media (max-width: 1023px) {
  .dam-slot[data-dam-placement="sidebar_banner"] {
    display: none;
  }
}

/* Custom slots shrink as one proportional unit, including in narrow theme columns. */
.dam-slot[data-dam-fluid="true"] .dam-slot__creative {
  height: auto;
  min-height: 0;
  aspect-ratio: var(--dam-ratio);
}
.dam-slot[data-dam-fluid="true"] .dam-slot__creative iframe { height: 100%; }
.dam-slot__creative video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}
.dam-slot__video-link { order: 3; align-self: flex-start; font-size: .85rem; }
@media (min-width: 768px) and (max-width: 1023px) {
  .single-content > .dam-slot[data-dam-fluid="true"][data-dam-placement="content_inline"][data-dam-adslot="tablet"] {
    width: min(100%, var(--dam-width)) !important;
    max-width: 100%;
    left: auto;
    transform: none;
  }
}
