.bfwa-product-ad {
    border: 1px solid #e1e1e1;
    background: #fff9e6;
    padding: 12px;
    margin: 12px 0;
    border-radius: 4px;
}

.bfwa-product-ad__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.bfwa-product-ad__title {
    font-weight: 700;
    margin-bottom: 6px;
}

.bfwa-product-ad__price {
    color: #b12704;
    margin-bottom: 4px;
}

.bfwa-product-ad__text {
    font-size: 0.95rem;
    color: #4a4a4a;
}

/* YouTube Video Gallery Item */
.bfwa-video-gallery-item {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 12px;
}

.bfwa-youtube-gallery-link {
    display: inline-block;
    position: relative;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.bfwa-youtube-gallery-link:hover {
    transform: scale(1.02);
}

.bfwa-youtube-gallery-link img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* YouTube Thumbnail Wrapper */
.bfwa-youtube-thumbnail-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.bfwa-youtube-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}

.bfwa-youtube-thumbnail:hover {
    opacity: 0.9;
}

/* Play Button */
.bfwa-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    pointer-events: none;
}

.bfwa-youtube-gallery-link:hover .bfwa-play-button {
    background: rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

.bfwa-youtube-thumbnail-wrapper:hover .bfwa-play-button {
    background: rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

.bfwa-play-button svg {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Large Play Button for Main Thumbnail */
.bfwa-play-button--large {
    width: 100px;
    height: 100px;
}

.bfwa-play-button--large svg {
    width: 70px;
    height: 70px;
}

/* Video Modal */
.bfwa-video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.bfwa-video-modal--active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bfwa-video-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.bfwa-video-modal__content {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.bfwa-video-modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: color 0.2s ease;
}

.bfwa-video-modal__close:hover {
    color: #ccc;
}

.bfwa-video-modal__video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.bfwa-video-modal__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Admin Meta Box */
.bfwa-youtube-meta-box input[type="url"],
.bfwa-youtube-meta-box input[type="checkbox"] {
    margin: 5px 0;
}

.bfwa-youtube-preview {
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.bfwa-youtube-preview img {
    max-width: 100%;
    height: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bfwa-video-modal__content {
        width: 95%;
        max-width: 100%;
    }

    .bfwa-play-button {
        width: 60px;
        height: 60px;
    }

    .bfwa-play-button svg {
        width: 45px;
        height: 45px;
    }

    .bfwa-play-button--large {
        width: 70px;
        height: 70px;
    }

    .bfwa-play-button--large svg {
        width: 50px;
        height: 50px;
    }

    .bfwa-video-modal__close {
        top: -35px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
}


