/* ==========================================================================
   CANADIAN YARDIE AD MANAGER - FRONT-END STYLES
   ========================================================================== */

/* 1. Base Ad Unit */
.cy-ad-unit {
    position: relative;
    border-radius: var(--radius-editorial, 4px);
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Header Strip on Paid Ads */
.cy-ad-header-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: #101612;
    border-bottom: 1px solid rgba(246, 240, 230, 0.12);
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.65rem;
    line-height: 1;
}

.cy-ad-sponsored-label {
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--accent-gold, #F2B90B);
}

.cy-ad-info-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(246, 240, 230, 0.7);
    text-decoration: none;
    transition: color 0.15s ease;
}

.cy-ad-info-link:hover {
    color: #ffffff;
}

.cy-ad-creative-wrap {
    position: relative;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.cy-ad-image-link {
    display: block;
    width: 100%;
    line-height: 0;
}

.cy-ad-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

.cy-ad-image-link:hover .cy-ad-banner-img {
    opacity: 0.94;
}

.cy-ad-custom-code {
    width: 100%;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

/* 2. Sticky Sidebar Ad Specifics */
.cy-sidebar-ad-sticky-wrap {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    z-index: 10;
    margin-top: 24px;
}

.cy-ad-placement-sidebar_sticky {
    box-shadow: 0 8px 24px -4px rgba(16, 22, 18, 0.15);
    border: 1px solid rgba(16, 22, 18, 0.1);
}

/* 3. Fallback "Advertise With Us" Banner */
.cy-ad-fallback {
    background: linear-gradient(145deg, #101612 0%, #16241C 55%, #0A6638 100%);
    color: #F6F0E6;
    border: 1px solid rgba(242, 185, 11, 0.25);
    box-shadow: 0 8px 28px -6px rgba(10, 102, 56, 0.25);
    position: relative;
    overflow: hidden;
}

.cy-ad-fallback::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(242, 185, 11, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cy-ad-fallback-inner {
    padding: 22px 20px 20px;
    position: relative;
    z-index: 2;
}

.cy-ad-fallback-kicker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.cy-ad-kicker-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-gold, #F2B90B);
}

.cy-ad-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10B981;
    box-shadow: 0 0 6px #10B981;
}

.cy-ad-rate-pill {
    display: inline-block;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(242, 185, 11, 0.18);
    color: var(--accent-gold, #F2B90B);
    border: 1px solid rgba(242, 185, 11, 0.4);
    padding: 3px 8px;
    border-radius: 999px;
}

.cy-ad-fallback-title {
    font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
    font-size: 1.28rem;
    font-weight: 900;
    line-height: 1.25;
    color: #ffffff;
    margin: 0 0 10px 0;
    letter-spacing: -0.015em;
}

.cy-ad-fallback-dek {
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(246, 240, 230, 0.82);
    margin: 0 0 16px 0;
}

.cy-ad-perks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(246, 240, 230, 0.12);
}

.cy-ad-perk-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(246, 240, 230, 0.9);
}

.cy-ad-perk-icon {
    color: var(--accent-gold, #F2B90B);
    font-weight: 900;
    font-size: 0.85rem;
    line-height: 1;
    flex-shrink: 0;
}

.cy-ad-fallback-action {
    margin-top: 16px;
}

.cy-ad-btn-book {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    background: var(--accent-gold, #F2B90B);
    color: #101612;
    padding: 12px 16px;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: var(--radius-editorial, 4px);
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(242, 185, 11, 0.35);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cy-ad-btn-book:hover {
    background: #ffc820;
    color: #101612;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 185, 11, 0.45);
}

.cy-ad-fallback-sub {
    margin-top: 10px;
    font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    font-size: 0.72rem;
    color: rgba(246, 240, 230, 0.65);
    text-align: center;
    line-height: 1.4;
}

.cy-ad-fallback-sub-desktop {
    display: none;
}

.cy-ad-fallback-sub-mobile {
    display: block;
}

/* 4. Homepage Prime Brand Billboard Placement */
.cy-ad-fallback-homepage_banner,
.cy-ad-placement-homepage_banner {
    max-width: 1200px;
    margin: 40px auto;
    border-radius: 8px;
    border: 1px solid rgba(242, 185, 11, 0.35);
    box-shadow: 0 10px 32px -4px rgba(10, 102, 56, 0.3);
}

.cy-ad-fallback-homepage_banner .cy-ad-fallback-inner {
    padding: 28px 24px;
}

@media (min-width: 860px) {
    .cy-ad-fallback-homepage_banner .cy-ad-fallback-inner {
        padding: 34px 40px 30px;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-fallback-content-grid {
        display: grid;
        grid-template-columns: 1.25fr 1fr;
        gap: 36px;
        align-items: center;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-fallback-title {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-fallback-dek {
        font-size: 0.95rem;
        line-height: 1.55;
        margin-bottom: 14px;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-fallback-sub-desktop {
        display: block;
        text-align: left;
        margin-top: 12px;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-fallback-sub-mobile {
        display: none;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-perks-list {
        border-top: none;
        padding-top: 0;
        margin-bottom: 20px;
        gap: 10px;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-perk-item {
        font-size: 0.85rem;
    }

    .cy-ad-fallback-homepage_banner .cy-ad-btn-book {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

/* 5. Leaderboard, Mid-Article & Footer Styles */
.cy-ad-placement-header_leaderboard {
    max-width: 1120px;
    margin: 16px auto;
    padding: 0 20px;
}

.cy-ad-placement-mid_article {
    margin: 36px auto;
    max-width: 760px;
    border: 1px solid var(--rule-hairline, #e5dfd5);
}

.cy-ad-placement-below_article {
    margin: 32px 0 24px;
    border: 1px solid var(--rule-hairline, #e5dfd5);
}

.cy-ad-placement-footer_sponsor {
    max-width: 1120px;
    margin: 32px auto 16px;
    padding: 0 20px;
}

/* 6. Mobile Adjustments */
@media (max-width: 1040px) {
    .cy-sidebar-ad-sticky-wrap {
        position: static !important;
        top: auto !important;
        margin-top: 24px;
    }
}
