/* Container de Stories na Home */
.pbnews-story-wrapper { width: 100%; background: #fff; border-bottom: 1px solid #efefef; margin-bottom: 20px; }
.pbnews-story-container { display: flex; overflow-x: auto; padding: 15px 10px; gap: 15px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pbnews-story-container::-webkit-scrollbar { display: none; }
.pbnews-story-item { flex: 0 0 auto; width: 85px; text-align: center; cursor: pointer; }
.pbnews-image-ring { width: 76px; height: 76px; border-radius: 50%; padding: 2px; background: linear-gradient(45deg, var(--pbnews-ring-1), var(--pbnews-ring-2)); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; }
.pbnews-inner-circle { width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; overflow: hidden; background: #fff; position: relative; }
.pbnews-inner-circle img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; position: absolute; top: 0; left: 0; }
.pbnews-story-label { font-size: 12px; font-family: sans-serif; color: #000; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Modal v3.8 - Estrutura Flexbox Vertical */
.pbnews-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height para mobile */
    z-index: 2147483647 !important;
    background: rgba(0,0,0,0.95);
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pbnews-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    height: 100dvh; /* Dynamic viewport height */
    background: #000;
    overflow: hidden;
    transition: opacity 0.3s ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

/* Responsividade Desktop */
@media (min-width: 768px) {
    .pbnews-modal-content {
        width: 420px !important;
        height: 90vh !important;
        max-height: 850px;
        border-radius: 16px;
        box-shadow: 0 0 50px rgba(0,0,0,1);
    }
}

/* Imagem de Fundo */
.pbnews-main-img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100% !important; 
    height: 100% !important; 
    object-fit: cover !important; 
    z-index: 1; 
}

/* Navegação */
.pbnews-nav { position: absolute; top: 0; width: 45%; height: 100%; z-index: 100; cursor: pointer; }
.pbnews-nav-left { left: 0; }
.pbnews-nav-right { right: 0; }

/* Barra de Progresso */
.pbnews-progress-bar { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    display: flex; 
    padding: 15px 10px 5px; 
    gap: 4px; 
    z-index: 110; 
}
.pbnews-prog-segment { height: 2px; background: rgba(255,255,255,0.3); flex: 1; border-radius: 2px; overflow: hidden; }
.pbnews-prog-fill { height: 100%; background: #fff; width: 0%; }

/* Cabeçalho */
.pbnews-header { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    display: flex; 
    align-items: center; 
    padding: 30px 15px 10px; 
    justify-content: space-between; 
    z-index: 110; 
    background: linear-gradient(rgba(0,0,0,0.6), transparent); 
}
.pbnews-user { display: flex; align-items: center; gap: 10px; }
.pbnews-user img { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid #fff; object-fit: cover; }
.pbnews-user-meta { display: flex; align-items: center; gap: 8px; color: #fff; }
.pbnews-user-meta span:first-child { font-weight: 600; font-size: 14px; text-shadow: 1px 1px 4px rgba(0,0,0,0.8); }
.pbnews-time-ago { font-size: 13px; color: rgba(255,255,255,0.9); text-shadow: 1px 1px 4px rgba(0,0,0,0.8); }
.pbnews-close { font-size: 36px; cursor: pointer; line-height: 1; color: #fff; text-shadow: 1px 1px 4px rgba(0,0,0,0.8); }

/* Área de Rodapé Fixa - v3.8 */
.pbnews-footer-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    background: linear-gradient(transparent, rgba(0,0,0,0.7) 20%, rgba(0,0,0,0.95) 100%);
    padding: 60px 20px 0 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); /* Safe area para iOS */
}

.pbnews-text-content {
    flex: 1;
    overflow: hidden;
    margin-bottom: 15px;
}

.pbnews-tag { 
    display: inline-block; 
    padding: 4px 12px; 
    border-radius: 6px; 
    background: linear-gradient(45deg, var(--pbnews-tag-1), var(--pbnews-tag-2)); 
    font-size: 13px; 
    font-weight: 600; 
    margin-bottom: 10px; 
    color: #fff; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.4); 
}

.pbnews-title { 
    font-size: 22px; 
    line-height: 1.25; 
    font-weight: 700; 
    margin: 0 0 8px; 
    color: #fff; 
    text-shadow: 1px 1px 8px rgba(0,0,0,0.6); 
}

.pbnews-img-caption { 
    font-size: 11px; 
    color: rgba(255,255,255,0.7); 
    font-style: italic; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5); 
}

/* Botão Sempre Visível - v3.8 */
.pbnews-swipe-up { 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px; 
    padding: 12px 30px; 
    border: 1.5px solid #fff; 
    border-radius: 35px; 
    color: #fff; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px; 
    background: rgba(255,255,255,0.15); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    white-space: nowrap;
    flex-shrink: 0; /* Impede que o botão encolha */
    margin-bottom: 10px;
}

.pbnews-link-icon { 
    width: 18px; 
    height: 18px; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1' /%3E%3C/svg%3E"); 
    background-size: contain; 
    background-repeat: no-repeat; 
}
