/**
 * TheBomb Video Embed Styles
 * Version: 1.2.4
 */

.thebomb-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Create aspect ratio container */
.thebomb-video-wrapper::before {
    content: '';
    display: block;
    padding-top: 56.25%; /* 16:9 Aspect Ratio - maintains wrapper height */
}

.thebomb-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 2;
}

.thebomb-video-overlay:hover {
    transform: scale(1.02);
}

.thebomb-video-overlay:hover .thebomb-play-button {
    background: rgba(0, 0, 0, 0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

.thebomb-video-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.thebomb-play-button {
    background: rgba(0, 0, 0, 0.6);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    pointer-events: none;
}

.thebomb-play-button svg {
    margin-left: 5px; /* Optical centering for play icon */
}

.thebomb-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
    background: #000;
    z-index: 1;
}

/* When container is shown, ensure it's visible */
.thebomb-video-container[style*="display: block"],
.thebomb-video-container[style*="display:block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important; /* Critical: Force opacity to 1 */
}

.thebomb-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    border-radius: 15px;
    display: block !important;
    visibility: visible !important;
}

/* Fade in animation for video container */
.thebomb-video-container.active {
    animation: fadeIn 0.3s ease-in-out forwards !important;
    opacity: 1 !important; /* Force opacity to 1 */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .thebomb-play-button {
        width: 80px;
        height: 80px;
    }
    
    .thebomb-play-button svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .thebomb-play-button {
        width: 60px;
        height: 60px;
    }
    
    .thebomb-play-button svg {
        width: 24px;
        height: 24px;
    }
}

/* Loading state */
.thebomb-video-wrapper.loading .thebomb-video-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

