/* Best Places Directory - Ads Styling */

/* Ad Card Container - matches listing card width */
.bpd-ad-card {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    margin: 0 auto 0 auto;
    align-items: flex-start;
    position: relative;
}

.bpd-ad-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
    /* No hover effect for bare ad */
}

/* Ad Content Wrapper */
.bpd-ad-content {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    padding: 0;
    justify-content: flex-start;
    width: 100%;
    position: relative;
}

/* Ad Image */
.bpd-ad-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

/* Ad Link */
.bpd-ad-link {
    text-decoration: none;
    display: block;
    width: 100%;
}

.bpd-ad-link:hover .bpd-ad-image {
    opacity: 0.9;
}

/* Ad Embed Container */
.bpd-ad-embed {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    padding: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.bpd-ad-embed > * {
    max-width: 100% !important;
    overflow: hidden !important;
}

/* Ensure iframes respect container width but keep their aspect ratio */
.bpd-ad-embed iframe {
    max-width: 100% !important;
    border: none;
    display: block;
    /* Don't force width/height - let iframe keep its inline styles */
}

/* Sponsored Label */
.bpd-ad-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    letter-spacing: 0.5px;
}

/* Ad Card in Places List */
.bpd-places-list > .bpd-ad-card {
    margin-bottom: 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .bpd-ad-embed {
        min-height: 150px;
    }
}

@media (max-width: 499px) {
    .bpd-ad-label {
        font-size: 0.65rem;
        padding: 4px 8px;
        top: 6px;
        left: 6px;
    }

    .bpd-ad-image {
        border-radius: 6px;
    }

    .bpd-ad-embed {
        min-height: 120px;
    }

    .bpd-ad-embed iframe {
        width: 100% !important;
        height: auto !important;
    }
}
