﻿
/* =========================================================
   ESTILO IMERSIVO (SOCIAL GAME CARD) - MOBILE/FEED
   ========================================================= */

/* Apenas aplica esse layout especial se o card tiver a classe .immersive-card */
.post-card.immersive-card {
    overflow: hidden; /* Garante que a imagem não vaze as bordas arredondadas */
    border: 1px solid #333; /* Borda sutil conforme referência */
}

/* Área da Imagem e Overlay */
.immersive-header {
    position: relative;
    width: 100%;
    height: 100%; /* Altura fixa para destaque visual */
    background-color: #000;
}

.immersive-main-image {
    width: 100%;
    height: 100%;
    max-height: 850px;
    padding-top: 47px;
    object-fit: cover;
    display: block;
}

.post-body {
    color: #b0b0b0;
    font-size: 0.95em;
    margin-top: 10px;
    margin-bottom: 3px;
    line-height: 1.4;
}

/* O Gradiente e Container do Usuário */
.immersive-user-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Aumentamos o padding-top para o mesmo valor do padding da imagem (43px) 
       + um pouco de respiro (15px original) = 58px */
    padding: 12px 15px 15px 15px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgb(0 0 0 / 90%) 46px, rgba(0, 0, 0, 0) 70px);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.immersive-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.immersive-avatar {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8); /* Borda branca destaque */
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.immersive-user-text {
    display: flex;
    flex-direction: column;
}

.immersive-username {
    font-weight: 700;
    font-size: 1rem;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    text-decoration: none;
}

.immersive-time {
    font-size: 0.75rem;
    color: #ddd; /* Texto mais claro para contraste */
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Botões de ação (Menu dots / Save) dentro do overlay */
.immersive-actions {
    display: flex;
    gap: 10px;
}

.immersive-btn {
    color: white;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(2px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    transition: background 0.2s;
}

    .immersive-btn:hover {
        background: rgba(255, 255, 255, 0.2);
    }

/* Ajuste do corpo do post quando usar esse layout */
.post-card.immersive-card .post-body {
    padding-top: 2px;
    padding-left: 4px;
}

.post-card.immersive-card .read-more-container {
    color: #b0b0b0; /* Cor da descrição conforme referência */
    font-size: 0.95rem;
    margin-bottom: 3px;
    line-height: 1.4;
}





.post-options {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 7px;
}

/* Opcional: Para garantir que os botões tenham o mesmo tamanho visual */
.post-action-btn {
    display: inline-flex;
    color: #b0b3b8;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.2s;
}

    .post-action-btn:hover {
        background: #3a3b3c;
        border-radius: 5px;
        padding: 7px;
        color: #ffffff;
    }

a {
    color: inherit !important;
    text-decoration: none !important;
}

    a:hover {
        color: #ffffff !important; /* text-white */
    }

.btn {
    background: rgba(255, 255, 255, 0.05); /* Simulação do 'glass' antigo */
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    color: #ffffff; /* text-white */
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn.ghost {
        background: transparent;
        border: 1px solid #3e4042; /* border-color */
    }

.publish-button {
    background: #2d88ff; /* primary-color/accent */
    color: #ffffff; /* text-white */
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

/* PRIVACIDADE */
.privacy-select-wrapper {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #18191a; /* bg-dark/bg-primary */
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #3e4042; /* border-color */
}

.privacy-select {
    background: transparent;
    border: none;
    color: #b0b3b8; /* text-gray */
    cursor: pointer;
    outline: none;
}

.privacy-select-wrapper i {
    color: #b0b3b8; /* text-gray */
}

/* WRAPPERS DE POSTS COMPARTILHADOS */
.shared-post-wrapper {
    border: 1px solid #3e4042; /* border-color */
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

.shared-indicator {
    font-size: 0.9em;
    color: #b0b3b8; /* text-gray */
    margin: 0;
    padding: 0;
}

/* CSS DOS MODAIS (PADRONIZADO) */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #242526; /* bg-card */
    margin: auto;
    padding: 20px;
    border: 1px solid #3e4042; /* border-color */
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3e4042; /* border-color */
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: #ffffff; /* text-white */
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.close-modal-btn {
    color: #b0b3b8; /* text-gray */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

#editPostForm textarea, #sharePostForm textarea {
    width: 100%;
    min-height: 120px;
    background-color: #18191a; /* bg-dark */
    border: 1px solid #3e4042; /* border-color */
    color: #ffffff; /* text-white */
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    resize: vertical;
}

/* ================================================================ */
/* ▼▼▼ INÍCIO DO CSS DO NOVO STORY VIEWER ▼▼▼ */
/* ================================================================ */

/* O Fundo/Overlay do Modal */
#story-viewer-modal {
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* O "X" para fechar */
.story-close-btn {
    position: absolute;
    top: 20px;
    right: 35px;
    z-index: 10000;
    background: none;
    border: none;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    padding: 0;
}

    .story-close-btn:hover {
        color: #b0b3b8; /* text-gray */
    }

/* Botões de Navegação */
.story-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10000;
    background: none;
    border: none;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    padding: 10px;
}

    .story-nav-btn:hover {
        color: #b0b3b8; /* text-gray */
    }

#story-nav-prev {
    left: 20px;
}

#story-nav-next {
    right: 20px;
}

/* Botão Excluir Story */
.story-delete-btn {
    display: none;
    position: absolute;
    bottom: 20px;
    right: 35px;
    z-index: 10000;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    user-select: none;
    padding: 10px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

    .story-delete-btn:hover {
        color: #e53e3e; /* danger color */
    }

/* Contêiner principal do Story */
.story-content-wrapper {
    width: 100%;
    max-width: 400px;
    height: 90vh;
    max-height: 700px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Barras de progresso */
#story-progress-bars {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 1010;
}

.progress-bar-container {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-inner div {
    height: 100%;
    width: 0%;
    background: white;
}

/* Cabeçalho (Avatar e Nome) */
.story-header-info {
    position: absolute;
    top: 20px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1010;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    color: white;
}

#story-viewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

#story-viewer-name {
    font-weight: bold;
}

/* A Mídia */
#story-viewer-image,
#story-viewer-video,
#story-viewer-text {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

#story-viewer-text {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 20px;
    font-size: 1.2em;
    color: white;
    text-align: center;
    background: linear-gradient(to bottom, #4a00e0, #8e2de2);
}

#popupModal {
    z-index: 10003;
}

/* Estilos para Comentários Avançados */
.comment-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    margin-top: 12px;
    animation: fadeIn 0.3s ease;
}

.comment-content-wrapper {
    flex: 1;
}

.comment-bubble {
    background-color: #18191a; /* bg-dark (destaca sobre o bg-card) */
    padding: 10px 12px;
    border-radius: 12px;
    display: inline-block;
    min-width: 150px;
    color: #ffffff; /* text-white */
    border: 1px solid #3e4042; 
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.9em;
    color: #ffffff; 
}

.delete-comment-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 0.8em;
    opacity: 0.6;
}

    .delete-comment-btn:hover {
        opacity: 1;
    }

.comment-actions-bar {
    display: flex;
    gap: 15px;
    font-size: 0.8em;
    margin-top: 4px;
    margin-left: 5px;
    color: #b0b3b8; 
}

.c-action {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

    .c-action:hover {
        text-decoration: none;
    }

    .c-action.active {
        color: white; 
    }

.comment-media img {
    max-width: 200px;
    border-radius: 8px;
    display: block;
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.share-modal-content {
    max-width: 500px;
}

.full-width {
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

.preview-box {
    background: rgba(255,255,255,0.05);
    padding: 10px;
    margin: 10px 0;
    border-radius: 8px;
    font-size: 0.9em;
    color: #b0b3b8; /* text-gray */
    pointer-events: none;
    max-height: 150px;
    overflow: hidden;
    border: 1px solid #3e4042; /* border-color */
}

.divider-share {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #b0b3b8; /* text-gray */
    font-size: 0.85em;
    gap: 10px;
}

    .divider-share::before, .divider-share::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #3e4042; /* border-color */
        height: 1px;
        background: #3e4042;
    }

    .divider-share span {
        padding: 0 10px;
    }

.external-share-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* --- CSS ATUALIZADO PARA ÍCONES DE COMPARTILHAMENTO --- */
.share-modal-content {
    max-width: 450px;
    background-color: #242526; /* bg-card */
    border-radius: 16px;
    color: #ffffff; /* text-white */
}

/* Área de ícones */
.social-share-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.social-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
    text-decoration: none !important;
}

    .social-icon-btn:hover {
        transform: translateY(-3px) scale(1.1);
        opacity: 0.9;
        color: white;
    }

/* Cores das Redes (Mantidas originais pois são de marca) */
.btn-whatsapp {
    background: #25D366;
    background: linear-gradient(45deg, #25D366, #128C7E);
}

.btn-facebook {
    background: #1877F2;
}

.btn-twitter {
    background: #000000;
    border: 1px solid #333;
}

.btn-linkedin {
    background: #0077b5;
}

.btn-telegram {
    background: #0088cc;
}

.btn-pinterest {
    background: #bd081c;
}

.btn-reddit {
    background: #ff4500;
}

.btn-copy {
    background: #18191a; /* bg-dark */
    border: 1px solid #3e4042; /* border-color */
    color: #b0b3b8; /* text-gray */
}

@media (min-width: 1300px) {
    .framefeed {
        justify-self: anchor-center;
        max-width: 50%;
    }
}


@media (max-width: 968px) {

    #feed-file-name-display:empty {
        display: none;
    }

    /* 1. Prepara o rodapé (SEM o espaço extra por padrão) */
    .create-post-footer {
        position: relative;
        align-items: center;
        padding-bottom: 0; /* Começa sem espaço extra */
        transition: padding-bottom 0.2s ease; /* Efeito suave ao aparecer */
    }

        /* MÁGICA: Só aplica o espaço de 25px se o span NÃO estiver vazio */
        .create-post-footer:has(#feed-file-name-display:not(:empty)) {
            padding-bottom: 25px;
        }

        /* 2. Mantém o alinhamento dos botões em uma linha só */
        .create-post-footer > div {
            flex-wrap: nowrap !important;
            gap: 5px !important;
        }

    #feed-file-name-display {
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 100%;
        font-size: 0.85em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--text-secondary);
        margin: 0;
        /* padding: 0; */
        padding: 6px 12px;
        display: block;
    }
}