/* CSS para el Plugin de Contenedor de Videos */

/* Grid normal */
.video-container-wrapper {
    margin: 20px 0;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    box-sizing: border-box;
    padding: 0 10px;
}

.video-container-grid {
    display: grid;
    gap: 20px;
    margin: 20px 0;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.video-container-item {
    position: relative;
    /* Los bordes y sombras se aplicarán desde PHP */
    border-radius: 8px; /* Valor por defecto, se sobrescribirá */
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* Transición añadida para efectos hover */
    transition: all 0.3s ease;
}

.video-container-item iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.video-container-item blockquote {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lazy loading containers */
.video-lazy-container {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.video-lazy-container:hover {
    transform: scale(1.02);
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-thumbnail {
    background: linear-gradient(135deg, #ff0050 0%, #00f2ea 100%);
}

.instagram-thumbnail {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.play-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.play-button svg {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.play-button:hover svg {
    opacity: 1;
}

.tiktok-play, .instagram-play {
    font-size: 18px;
    font-weight: 600;
}

.tiktok-play .tiktok-icon, .instagram-play .instagram-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

/* Loading state */
.video-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    font-size: 14px;
}

.video-loading::after {
    content: "Cargando...";
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Estilos para TikTok e Instagram originales */
.tiktok-container, .instagram-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tiktok-container iframe, .instagram-container iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
}

.video-link-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.video-preview {
    text-align: center;
    color: white;
    padding: 20px;
}

.platform-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.tiktok-icon {
    background: linear-gradient(45deg, #ff0050, #00f2ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instagram-icon {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.video-preview h4 {
    margin: 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.video-link-btn {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    font-weight: 500;
}

.video-link-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
    text-decoration: none;
    color: white !important;
}

/* Modo compacto */
.video-expandable-container {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 20px;
}

.video-expandable-grid {
    display: grid;
    gap: 20px;
    justify-items: center;
    width: 100%;
    box-sizing: border-box;
}

.video-expandable-item {
    position: relative;
    /* Los bordes y sombras se aplicarán desde PHP */
    border-radius: 8px; /* Valor por defecto, se sobrescribirá */
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* Transición añadida para efectos hover */
    transition: all 0.3s ease;
}

.video-expandable-item iframe {
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}

.video-expandable-item blockquote {
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Botón Ver más/menos */
.expand-toggle-btn {
    display: block;
    margin: 20px auto 0 auto;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.3);
    transition: all 0.3s ease;
    position: relative;
    width: auto;
    max-width: 250px;
    text-align: center;
}

.expand-toggle-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.4);
}

.expand-toggle-btn:active {
    transform: translateY(0);
}

.expand-toggle-btn .icon {
    transition: transform 0.3s ease;
    margin-left: 8px;
}

.expand-toggle-btn.expanded .icon {
    transform: rotate(180deg);
}

/* Responsive */
@media (max-width: 768px) {
    .video-container-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .video-container-item {
        max-width: calc(100vw - 60px) !important;
        width: 100% !important;
        margin: 0 auto !important;
    }
    
    .video-expandable-grid {
        grid-template-columns: 1fr !important;
    }
    
    .video-expandable-item {
        max-width: calc(100vw - 80px);
    }
    
    .expand-toggle-btn {
        margin: 15px auto 0 auto;
        font-size: 12px;
        padding: 10px 20px;
        max-width: 200px;
    }
    
    .play-button {
        padding: 15px;
        font-size: 16px;
    }
    
    .tiktok-play .tiktok-icon, .instagram-play .instagram-icon {
        font-size: 2rem;
    }
}