/* AWEBCs fallback — compact strip with visible text (not empty green bars) */
.ad-slot.ad-slot-fallback-only,
.ad-slot.is-fallback-active,
.ad-slot.ad-slot-prefill-fallback {
    display: block !important;
    line-height: normal !important;
    overflow: visible !important;
    background: transparent !important;
}

.ad-slot.is-fallback-active ins.adsbygoogle,
.ad-slot.is-fallback-active .adsense-google,
.ad-slot.ad-slot-prefill-fallback ins.adsbygoogle,
.ad-slot.ad-slot-prefill-fallback .adsense-google {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
}

.ad-slot-fallback {
    display: none;
    width: 100%;
}

.ad-slot.is-fallback-active .ad-slot-fallback,
.ad-slot.ad-slot-prefill-fallback .ad-slot-fallback {
    display: block;
    width: 100%;
}

.fallback-ad {
    position: relative;
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-height: 52px;
    max-height: 72px;
    padding: 8px 12px;
    text-decoration: none !important;
    color: #fff !important;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(120deg, #075e54 0%, #128c7e 45%, #25d366 100%);
    box-shadow: 0 2px 8px rgba(7, 94, 84, 0.2);
    transition: box-shadow 0.2s ease;
}

.fallback-ad-badge {
    position: absolute;
    top: 4px;
    right: 6px;
    z-index: 3;
    padding: 1px 5px;
    font-size: 8px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: rgba(20, 20, 20, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    pointer-events: none;
    text-indent: 0 !important;
}

.fallback-ad:hover {
    box-shadow: 0 3px 12px rgba(7, 94, 84, 0.35);
    color: #fff !important;
}

.fallback-ad-icon {
    grid-column: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.fallback-ad-icon svg {
    display: block;
    width: 32px;
    height: 32px;
}

.fallback-ad-body,
.fallback-ad-copy {
    grid-column: 2;
    min-width: 0;
    display: block !important;
    line-height: 1.3 !important;
    text-indent: 0 !important;
}

.fallback-ad-brand,
.fallback-ad-line,
.fallback-ad-price {
    display: block !important;
    text-indent: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

.fallback-ad-brand {
    font-size: 14px !important;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fallback-ad-line {
    font-size: 11px !important;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fallback-ad-price {
    font-size: 12px !important;
    font-weight: 600;
    color: #e8fff0 !important;
    -webkit-text-fill-color: #e8fff0 !important;
}

.fallback-ad-cta {
    grid-column: 3;
    padding: 6px 12px;
    font-size: 11px !important;
    font-weight: 700;
    color: #075e54 !important;
    -webkit-text-fill-color: #075e54 !important;
    background: #fff;
    border-radius: 16px;
    white-space: nowrap;
    text-indent: 0 !important;
}

.fallback-ad-visual,
.fallback-ad-img {
    display: none !important;
}

.ad-slot-compact.is-fallback-active,
.ad-slot-compact.is-filled,
.ad-slot-compact.ad-slot-prefill-fallback,
.ad-slot[data-ad-size="compact"].is-fallback-active {
    margin: 0.5rem 0 !important;
}

.ad-host-latest-prefooter,
.ad-host-sidebar-single {
    width: 100%;
    min-height: 0;
}

.ad-host-latest-prefooter:not(:has(.ad-slot.is-filled)):not(:has(.ad-slot.is-fallback-active)):not(:has(.ad-slot.ad-slot-prefill-fallback)),
.ad-host-sidebar-single:not(:has(.ad-slot.is-filled)):not(:has(.ad-slot.is-fallback-active)):not(:has(.ad-slot.ad-slot-prefill-fallback)) {
    display: none;
    margin: 0;
    padding: 0;
}

.ad-host-latest-prefooter:has(.ad-slot.is-fallback-active),
.ad-host-latest-prefooter:has(.ad-slot.ad-slot-prefill-fallback),
.ad-host-sidebar-single:has(.ad-slot.is-fallback-active),
.ad-host-sidebar-single:has(.ad-slot.ad-slot-prefill-fallback) {
    display: block;
}

/* Sidebar: stacked copy */
.fallback-ad-square,
.fallback-ad-portrait {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    max-height: 110px;
    min-height: 88px;
    padding: 10px;
    gap: 6px;
}

.fallback-ad-square .fallback-ad-icon,
.fallback-ad-portrait .fallback-ad-icon {
    display: none;
}

.fallback-ad-square .fallback-ad-body,
.fallback-ad-portrait .fallback-ad-body,
.fallback-ad-square .fallback-ad-copy,
.fallback-ad-portrait .fallback-ad-copy {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
}

.fallback-ad-square .fallback-ad-cta,
.fallback-ad-portrait .fallback-ad-cta {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
}

.fallback-ad-square .fallback-ad-line,
.fallback-ad-portrait .fallback-ad-line {
    display: none;
}

.adsense-in-article.ad-slot.is-fallback-active .fallback-ad {
    max-height: 64px;
    min-height: 48px;
    padding: 6px 10px;
}

.adsense-in-article .fallback-ad-brand {
    font-size: 12px !important;
}

.adsense-in-article .fallback-ad-cta {
    padding: 4px 10px;
    font-size: 10px !important;
}

.container-bn .ad-slot.is-fallback-active {
    margin-bottom: 0 !important;
}

.container-bn:has(.ad-slot.is-fallback-active) {
    display: block !important;
}

.ad-slot.ad-slot-fallback-only > .fallback-ad,
.ad-slot.is-fallback-active > .fallback-ad,
.ad-slot.ad-slot-prefill-fallback > .ad-slot-fallback > .fallback-ad {
    display: grid !important;
}

@media (max-width: 575.98px) {
    .fallback-ad {
        min-height: 48px;
        max-height: 64px;
        padding: 6px 10px;
        gap: 8px;
    }

    .fallback-ad-brand {
        font-size: 12px !important;
    }

    .fallback-ad-line {
        display: none;
    }

    .fallback-ad-cta {
        padding: 5px 10px;
        font-size: 10px !important;
    }
}
