/**
 * Mobile advertising slot — structural reservation only.
 * Default: zero footprint. Active banner only within the mobile layout breakpoint.
 * Desktop / wide viewports: always hidden (does not alter .ad-rail).
 */

.mobile-ad-slot {
  box-sizing: border-box;
  display: none;
  margin: 0;
  padding: 0;
  height: 0;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  visibility: hidden;
  pointer-events: none;
}

.mobile-ad-slot[hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.mobile-ad-slot__label {
  margin: 0;
  padding: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6a6358;
  text-align: center;
  line-height: 1.2;
}

.mobile-ad-slot__frame {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
}

.mobile-ad-slot__content {
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
}

/* Compact banner geometry — reserved only while active on mobile. */
@media (max-width: 900px) {
  .mobile-ad-slot.is-active:not([hidden]) {
    --mobile-ad-banner-min-height: 3.5rem;
    display: block;
    visibility: visible;
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0.75rem 0;
    padding: 0;
    overflow: visible;
  }

  .mobile-ad-slot.is-active:not([hidden]) .mobile-ad-slot__label:not([hidden]) {
    display: block;
    margin: 0 0 0.35rem;
  }

  .mobile-ad-slot.is-active:not([hidden]) .mobile-ad-slot__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: var(--mobile-ad-banner-min-height);
    padding: 0.45rem 0.75rem;
    border: 1px dashed rgba(199, 161, 90, 0.45);
    border-radius: 8px;
    background: rgba(255, 253, 252, 0.55);
  }

  .mobile-ad-slot.is-active:not([hidden]) .mobile-ad-slot__content {
    width: 100%;
    min-height: var(--mobile-ad-banner-min-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #4a453c;
  }
}

/* Wide / desktop: mobile slots never enter layout, even if marked active. */
@media (min-width: 901px) {
  .mobile-ad-slot,
  .mobile-ad-slot.is-active,
  .mobile-ad-slot.is-active:not([hidden]) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
