.userspn-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    z-index: 9999;
    display: none;
    max-height: 90vh; /* Altura máxima del 90% de la ventana */
    border-radius: 10px;
    background: transparent;
    overflow-y: auto;
    background-color: #ffffff;
}
.userspn-popup-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding-top: 30px;
    padding-bottom: 30px;
    z-index: 1;
    -webkit-overflow-scrolling: touch; /* Mejor scroll en iOS */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.userspn-popup.userspn-popup-size-small,.userspn-popup.userspn-popup-size-small .userspn-popup-content{
    max-width: 300px;
}
.userspn-popup.userspn-popup-size-medium,.userspn-popup.userspn-popup-size-medium .userspn-popup-content{
    max-width: 750px;
}
.userspn-popup.userspn-popup-size-large,.userspn-popup.userspn-popup-size-large .userspn-popup-content{
    max-width: 1000px;
}
.userspn-popup.userspn-popup-size-full-size,.userspn-popup.userspn-popup-size-full-size .userspn-popup-content{
    max-width: 100%; /* Ancho máximo para pantallas grandes */
}
.userspn-popup-overlay {
    position: fixed; /* Cambiado de absolute a fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
}
.userspn-popup-close-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 5px;
    line-height: 1;
    z-index: 1000;
    transition: color 0.3s ease;
}
.userspn-popup-close-wrapper:hover {
    color: #000;
}

/* Gallery styles */
.userspn-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 20px;
}
.userspn-gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
}
.userspn-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}
.userspn-gallery-item:hover img {
    transform: scale(1.05);
}

/* Video player styles */
.userspn-video-player {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}
.userspn-video-player iframe,
.userspn-video-player video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
} 
#userspn-profile-popup{
    max-width:600px;
}

@media (max-width: 768px) {
    .userspn-popup-content{
        max-height: 100%;
    }
}