/**
 * TAA Ad Space — horizontal banner.
 *
 * The slot reserves its height up-front via aspect-ratio (default 1400/415) so
 * there's no layout shift while the ad loads. Images are scaled with
 * object-fit: contain — advertiser creative is never cropped.
 */

.taa-ad-banner {
    display: block;
    width: 100%;
    max-width: var(--taa-ad-maxw, 1400px);
    margin: 20px auto;
    text-align: center;
}

.taa-ad-banner.taa-ad-empty {
    display: none;
}

.taa-ad-slot {
    position: relative;
    width: 100%;
    aspect-ratio: var(--taa-ad-ratio, 1400 / 415);
    overflow: hidden;
}

.taa-ad-slot .taa-ad-link,
.taa-ad-slot .taa-ad-img {
    display: block;
    width: 100%;
    height: 100%;
}

.taa-ad-img {
    object-fit: contain;
    object-position: center;
}

/* Loading shimmer */
.taa-ad-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: taa-ad-shimmer 1.4s ease infinite;
    border-radius: 4px;
}

@keyframes taa-ad-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .taa-ad-skeleton { animation: none; }
}
