/* Container das bolinhas */
.wps-stories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 20px 0;
    justify-content: center;
}

/* Trigger (Bolinha) */
.wps-story-trigger {
    text-align: center;
    cursor: pointer;
    width: 80px;
    flex-shrink: 0;
}

.wps-story-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    border: 2px solid #e1306c; /* Cor estilo Instagram */
    margin: 0 auto 5px;
}

.wps-story-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
}

.wps-story-title {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.2;
    display: inline-block;
}

/* Overlay Fullscreen */
.wps-story-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
}

.wps-story-overlay.open {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1%;
}

.wps-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
}

/* Slide Content */
.wps-story-content {
    width: 100%;
    max-width: 550px; /* Largura mobile */
    height: 100%;
    position: relative;
    background: #222;
    border-radius: 5px;
    overflow: hidden;
}

.wps-story-slide {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.wps-story-slide.active {
    display: block;
}

.wps-slide-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
}

.wps-slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradiente: Escuro no topo (30%), Transparente no meio, Escuro no fim (80%) */
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.3) 0%, 
        transparent 40%, 
        transparent 20%, 
        rgba(0,0,0,0.8) 100%);
    pointer-events: none; /* Garante que cliques passem pelo gradiente */
    z-index: 1;
}

.wps-slide-info {
    position: absolute;
	text-align: center;
    bottom: 50px;
    left: 20px;
    right: 20px;
    color: #fff;
    z-index: 10;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.wps-slide-info h2 {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 10px;
}

.wps-read-more {
    display: flex;
    margin-top: 10px;
    padding: 10px 13px;
    background: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    position: relative;
    z-index: 10;
    cursor: pointer;
    text-shadow: none;
    width: fit-content;
    margin: auto;
    gap: 10px;
}

/* Navegação e Progresso (Simples) */
.wps-nav-left, .wps-nav-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 50%;
    z-index: 3;
}

/* Estilo das Setas Visuais */
.wps-nav-left span, .wps-nav-right span {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 30px;
    color: #fff;
    font-weight: bold;
    opacity: 0.7;
    cursor: pointer;
}

.wps-nav-left span { left: 15px; }
.wps-nav-right span { right: 15px; }

.wps-nav-left:hover span, .wps-nav-right:hover span { opacity: 1; }

.wps-nav-left { left: 0; }
.wps-nav-right { right: 0; }

.wps-progress-bar {
    position: absolute;
    top: 10px;
    left: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    z-index: 4;
}

.wps-progress-item {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
}

/* Animação Keyframe */
@keyframes wpsFillProgress {
    from { width: 0%; }
    to { width: 100%; }
}

/* Estado Base */
.wps-progress-fill {
    background: #fff;
    width: 0%;
    height: 100%;
}

/* Item Passado (Cheio) */
.filled .wps-progress-fill {
    width: 100%;
}

/* Item Atual (Animando) */
.animating .wps-progress-fill {
    width: 0%;
    animation: wpsFillProgress 8s linear forwards;
}

/* Cabeçalho do Story (Ícone + Categoria) */

/* Cabeçalho do Story (Atualizado) */
.wps-story-header {
    position: absolute;
    top: 25px;
    left: 15px;
    right: 15px; /* Ocupa largura total */
    z-index: 50; /* Z-index alto para garantir clique */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Separa info e botão */
    pointer-events: none; /* Deixa passar clique nas áreas vazias */
}

.wps-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wps-story-header img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #fff;
    object-fit: cover;
}

.wps-story-header span {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}

/* Botão de Pausa */
.wps-pause-toggle {
    background: none;
    border: none;
    cursor: pointer;
    pointer-events: auto; /* Reabilita clique no botão */
    padding: 5px;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: flex; /* Centraliza SVG */
}

.wps-pause-toggle:hover {
    opacity: 1;
}

/* Lógica de Pausa (O segredo do congelamento) */
.wps-story-overlay.paused .wps-progress-fill {
    animation-play-state: paused !important;
}

/* Alterna ícones quando pausado */
.wps-story-overlay.paused .icon-pause { display: none; }
.wps-story-overlay.paused .icon-play { display: block !important; }

/* Miniatura do Próximo Story (Desktop) - Estilo "Mini View" */
.wps-next-story-preview {
    display: none;
    position: absolute;
    top: 50%;
    right: calc(50% - 600px); /* Ajuste conforme necessidade */
    transform: translateY(-50%);
    
    /* Tamanho fixo simulando proporção de celular */
    width: 230px; 
    height: 320px;
    
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s;
    z-index: 100;
}

.wps-next-story-preview:hover {
    transform: translateY(-50%) scale(1.05);
    border-color: #fff;
}

/* Camada da Imagem de Fundo */
.wps-preview-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Gradiente para leitura do texto */
.wps-preview-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
}

/* Label "A seguir" no topo */
.wps-preview-label {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.9);
    font-weight: bold;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Conteúdo (Categoria e Título) na parte inferior */
.wps-preview-content {
    position: absolute;
    bottom: 15px;
    left: 10px;
    right: 10px;
    z-index: 2;
    text-align: left;
}

.wps-preview-cat {
    display: block;
    font-size: 10px;
    color: #e1306c; /* Cor de destaque */
    margin-bottom: 4px;
    font-weight: 600;
}

.wps-preview-title {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
    margin: 0;
    /* Limita a 3 linhas para não estourar */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ocultar em telas menores */
@media (max-width: 1100px) {
    .wps-next-story-preview {
        display: none !important;
    }
}

/* --- Animações de Transição entre Stories (Corrigido) --- */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { 
        transform: translateX(0); 
        filter: brightness(100%);
    }
    to { 
        /* Move um pouco para a esquerda (efeito parallax) */
        transform: translateX(-25%); 
        /* Escurece em vez de ficar transparente, para não mostrar o fundo do site */
        filter: brightness(50%); 
        opacity: 1; 
    }
}

.wps-story-overlay.animate-in {
    display: flex !important;
    animation: slideInRight 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10002; /* Garante que o NOVO fique por cima */
}

.wps-story-overlay.animate-out {
    display: flex !important;
    animation: slideOutLeft 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10001; /* Fica por baixo, mas visível */
    pointer-events: none;
}


/* --- Reforço do CSS do Preview (Garante que não fique preto) --- */
.wps-next-story-preview {
    background-color: #000; /* Fundo base */
    overflow: hidden; /* Garante que a imagem não vaze */
}

.wps-preview-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.8;
}

.wps-preview-content {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 10;
}

.wps-prev-story-preview {
    display: none;
    position: absolute;
    top: 50%;
    left: calc(50% - 600px); /* Posiciona à ESQUERDA do container */
    transform: translateY(-50%);
    
    width: 230px; 
    height: 320px;
    
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    background: #000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, border-color 0.3s;
    z-index: 100;
}

.wps-prev-story-preview:hover {
    transform: translateY(-50%) scale(1.05);
    border-color: #fff;
}

@media (max-width: 1100px) {
    .wps-prev-story-preview {
        display: none !important;
    }
}

/* --- Animações de VOLTAR (Slide da esquerda) --- */
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        filter: brightness(100%);
    }
    to { 
        transform: translateX(25%); /* Move para a direita */
        filter: brightness(50%); 
        opacity: 1; 
    }
}

.wps-story-overlay.animate-in-left {
    display: flex !important;
    animation: slideInLeft 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10002;
}

.wps-story-overlay.animate-out-right {
    display: flex !important;
    animation: slideOutRight 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 10001;
    pointer-events: none;
}

@media (max-width: 768px) {
    .wps-story-content {
        max-width: 100% !important;
    }

    .wps-story-overlay.open {
        padding: 0 !important;
    }

    .wps-close-btn {
        top: 28px !important;
    }

    .wps-pause-toggle {
        margin-right: 50px;
    }
} 
