/**
 * Lite Vimeo Embed Styles
 * 
 * @package ProRank SEO
 * @since 1.0.0
 */

lite-vimeo {
    background-color: #000;
    position: relative;
    display: block;
    contain: content;
    background-position: center center;
    background-size: cover;
    cursor: pointer;
    overflow: hidden;
    /* Maintain 16:9 aspect ratio */
    width: 100%;
    padding-bottom: 56.25%;
}

/* Gradient overlay */
lite-vimeo::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    background-image: linear-gradient(180deg, rgba(23,35,34,.75) 0%, transparent 50%);
    height: 60px;
    width: 100%;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

lite-vimeo:hover::before {
    opacity: 1;
}

/* Responsive iframe */
lite-vimeo > iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Play button */
lite-vimeo > .ltv-playbtn {
    display: block;
    width: 65px;
    height: 40px;
    position: absolute;
    cursor: pointer;
    transform: translate(-50%, -50%);
    top: 50%;
    left: 50%;
    z-index: 1;
    background-color: transparent;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 65 40"><rect width="65" height="40" rx="5" fill="%2300adef"/><polygon points="20,12 20,28 35,20" fill="%23fff"/></svg>');
    opacity: 0.8;
    transition: opacity 0.15s ease;
    border: none;
}

lite-vimeo:hover > .ltv-playbtn,
lite-vimeo .ltv-playbtn:focus {
    opacity: 1;
}

/* Focus styles for accessibility */
lite-vimeo .ltv-playbtn:focus {
    outline: 2px solid #00adef;
    outline-offset: 2px;
}

/* Loading state */
lite-vimeo.ltv-activated {
    cursor: unset;
}

lite-vimeo.ltv-activated::before,
lite-vimeo.ltv-activated > .ltv-playbtn {
    opacity: 0;
    pointer-events: none;
}

/* Support for different aspect ratios */
lite-vimeo[aspect-ratio="4:3"] {
    padding-bottom: 75%;
}

lite-vimeo[aspect-ratio="1:1"] {
    padding-bottom: 100%;
}

lite-vimeo[aspect-ratio="21:9"] {
    padding-bottom: 42.86%;
}

/* Ensure proper display in WordPress blocks */
.wp-block-embed__wrapper lite-vimeo {
    margin: 0;
}

/* Loading animation */
lite-vimeo.ltv-loading::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ltv-spin 1s ease-in-out infinite;
}

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

/* Print styles */
@media print {
    lite-vimeo {
        background-image: none !important;
        border: 1px solid #ccc;
    }
    
    lite-vimeo::after {
        content: "Video: vimeo.com/" attr(videoid);
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-family: sans-serif;
        color: #333;
    }
}