/* WP Video Stories Widget CSS */

.vsw-widget-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99998; /* Abaixo do modal */
}

.vsw-thumbnail {
    width: 80px; /* Tamanho do thumbnail */
    height: 142px; /* Proporção 9:16 para stories */
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;
    background-color: #333;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out;
}

.vsw-thumbnail:hover {
    transform: scale(1.1);
}

.vsw-thumbnail img,
.vsw-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vsw-modal {
    display: none; /* Escondido por padrão */
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85); /* Fundo escuro semi-transparente */
    align-items: center;
    justify-content: center;
}

.vsw-modal-content {
    position: relative;
    background-color: #1c1c1c; /* Cor de fundo escura para o player */
    margin: auto;
    padding: 0;
    width: auto;
    max-width: 400px; /* Largura máxima do story */
    height: auto;
    max-height: 90vh; /* Altura máxima, respeitando a viewport */
    aspect-ratio: 9 / 16; /* Proporção de stories */
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    border-radius: 10px;
    overflow: hidden; /* Para garantir que o vídeo não ultrapasse as bordas arredondadas */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vsw-video-player {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 10px; /* Para cantos arredondados no vídeo, se o container não cortar */
    background-color: #000;
}

.vsw-close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 100001;
    padding: 5px;
    line-height: 1;
}

.vsw-close-modal:hover,
.vsw-close-modal:focus {
    color: #bbb;
    text-decoration: none;
}

.vsw-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    z-index: 100001;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

.vsw-nav-button:hover {
    background-color: rgba(0,0,0,0.6);
}

.vsw-prev-video {
    left: 10px;
}

.vsw-next-video {
    right: 10px;
}

.vsw-progress-bar-container {
    position: absolute;
    top: 10px; /* Ajuste conforme necessário */
    left: 10px;
    right: 50px; /* Espaço para o botão de fechar */
    height: 5px; /* Altura das barras de progresso */
    display: flex;
    gap: 3px; /* Espaço entre as barras de progresso */
    z-index: 100001;
}

.vsw-progress-bar-segment {
    flex-grow: 1;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.3); /* Cor da barra de progresso inativa */
    border-radius: 2px;
    overflow: hidden; /* Para a barra de preenchimento */
}

.vsw-progress-bar-fill {
    width: 0%; /* Começa vazia */
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* Cor da barra de progresso ativa/preenchida */
    border-radius: 2px;
    transition: width 0.1s linear; /* Transição suave para o preenchimento */
}

/* Responsividade para telas menores */
@media screen and (max-width: 480px) {
    .vsw-thumbnail {
        width: 60px;
        height: 106px; /* Mantendo proporção */
        bottom: 10px;
        left: 10px;
    }
    .vsw-modal-content {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh; /* Ocupa a tela inteira no mobile */
        border-radius: 0;
    }
    .vsw-video-player {
        border-radius: 0;
    }
    .vsw-close-modal {
        top: 15px;
        right: 15px;
        font-size: 28px;
    }
    .vsw-nav-button {
        padding: 8px 12px;
        font-size: 20px;
    }
    .vsw-progress-bar-container {
        top: 15px;
        left: 15px;
        right: 60px;
    }
}

