/* =========================
   🔒 AISLAMIENTO TOTAL
========================= */
.vp-app, 
.vp-app * {
    box-sizing: border-box;
}

.vp-app p {
    margin: 0;
}

/* =========================
   🎬 PLAYER
========================= */
.vp-main-player {
    position: relative; 
    width: 100%; 
    aspect-ratio: 16/9;
    border-radius: 12px; 
    overflow: hidden; 
    background: #000;
}

.vp-video-wrapper.vertical .vp-main-player { 
    aspect-ratio: 9/16; 
    max-width: 320px; 
    margin: 0 auto; 
}

.vp-click-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    background: rgba(0,0,0,0.4);
    display: flex; 
    align-items: center; 
    justify-content: center;
    cursor: pointer;
}

.vp-main-player iframe { 
    position: absolute; 
    inset: 0;
    width: 100%; 
    height: 100%; 
    border: none; 
}

/* Ajuste específico para videos de X */
.vp-video-wrapper.x .vp-main-player {
    background: #000;
}

/* Ajuste para centrar el reproductor de X */
.vp-x-fix {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    padding: 5px 0;
    border-radius: 12px;
}

/* Forzar que el widget de X no sea tan ancho en desktop */
.vp-x-fix twitter-widget {
    margin: 0 auto !important;
    max-width: 550px !important;
}

.vp-play-button { 
    width: 60px; 
    height: 60px; 
    background: #eb0045; 
    border-radius: 50%;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.vp-play-button::after {
    content: '';
    margin-left: 5px;
    border-style: solid;
    border-width: 10px 0 10px 18px; 
    border-color: transparent transparent transparent white;
}

/* =========================
   📱 AJUSTE GLOBAL PARA VIDEOS VERTICALES (TikTok, Reels, Shorts)
========================= */
.vp-video-wrapper.vertical .vp-main-player {
    aspect-ratio: unset !important;
    height: 740px !important;
    max-width: 325px !important;
    margin: 0 auto;
}

.vp-video-wrapper.vertical .vp-main-player iframe {
    height: 100% !important;
}

/* =========================
   📺 RECOMENDACIONES
========================= */
.vp-contenedor-reco { 
    margin-top: 15px; 
    border-top: 2px solid #f0f0f0; 
    padding-top: 15px; 
}

.vp-reco-header { 
    font-size: 11px; 
    font-weight: 900; 
    color: #243746; 
    margin-bottom: 12px; 
    text-transform: uppercase;
}

/* 👉 DESKTOP: GRID */
.vp-reco-grid { 
    display: grid; 
    gap: 12px; 
    grid-template-columns: repeat(3, 1fr); 
}

/* 👉 VERTICAL: 2 columnas */
.vp-video-wrapper.vertical .vp-reco-grid { 
    grid-template-columns: repeat(2, 1fr); 
}

/* 👉 MÓVIL: TODO EN FILA (SCROLL HORIZONTAL) */
@media (max-width: 768px) {
    .vp-reco-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 5px;
        scroll-snap-type: x mandatory;
    }

    .vp-reco-card {
        min-width: 260px;
        scroll-snap-align: start;
    }
}

/* =========================
   🧩 CARD
========================= */
.vp-reco-card { 
    background: #fff; 
    border-radius: 10px; 
    padding: 12px;
    border: 1px solid #eee; 
    display: flex; 
    flex-direction: column;
    height: 100%;
    transition: 0.2s;
}

.vp-reco-card:hover {
    border-color: #eb0045;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* =========================
   📝 CONTENIDO
========================= */
.vp-reco-info {
    display: flex;
    flex-direction: column;
}

/* TITULO CON ICONO */
.vp-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #243746;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 2px;
}

.vp-title i {
    font-size: 14px;
}

/* TAGS */
.vp-reco-tags { 
    font-size: 11px; 
    color: #eb0045; 
    font-weight: 700; 
    margin-bottom: 10px; 
}

/* =========================
   🔘 BOTÓN
========================= */
.vp-btn-ver-modal {
    margin-top: auto;
    width: 100%; 
    background: #243746; 
    color: white; 
    border: none;
    padding: 8px; 
    border-radius: 5px; 
    font-size: 10px; 
    font-weight: 900; 
    cursor: pointer; 
    text-transform: uppercase;
}

.vp-btn-ver-modal:hover {
    background: #eb0045;
}

/* =========================
   🎭 MODAL
========================= */
#vp-modal-teatro {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: none;

    align-items: flex-start;
    justify-content: center;

    padding: 20px;
    padding-top: 60px;
    overflow-y: auto;
}

.vp-modal-content { 
    position: relative; 
    background: #000; 
    border-radius: 15px; 
    width: 100%;
}

.vp-close-teatro {
    position: absolute; 
    top: -35px; 
    right: 0; 
    color: white;
    font-size: 12px; 
    font-weight: 900; 
    cursor: pointer; 
    background: #eb0045; 
    padding: 5px 12px; 
    border-radius: 5px;
}

/* =========================
   🎭 FIX CARDS MODAL (IGUAL ALTURA)
========================= */

#vp-modal-teatro .vp-reco-grid {
    align-items: stretch;
}

#vp-modal-teatro .vp-reco-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#vp-modal-teatro .vp-reco-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#vp-modal-teatro .vp-btn-ver-modal {
    margin-top: auto;
}