/* ==========================================================================
   ESTRUTURA DE SUPORTE - POST FOCO (REFATORADO - APP SHELL GRID)
   ========================================================================== */

/* ==================================================
   LAYOUT APP SHELL COM GRID (DEFINITIVO)
   ================================================== */
:root {
    --app-height: 100vh;
}

.layout-wrapper {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100dvh;
    height: var(--app-height);
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    background: transparent;
    isolation: isolate;
}

/* HEADER – agora com layout de grid interno */
.sticky-header {
    position: relative;
    z-index: 100000;
    background: #1a1a1a86;
    backdrop-filter: blur(8px);
    padding: 10px 10px 0 10px;
    /* padding apenas em cima e laterais */
    transition: max-height 0.3s ease-out;
    max-height: 35vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
}

.sticky-header::-webkit-scrollbar {
    display: none;
}

/* Botão de Colapso (Lingueta) – posicionado na borda inferior do header */
.btn-toggle-collapse {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    width: 45px;
    height: 30px;
    width: clamp(60px, 15vmin, 100px);
    height: clamp(25px, 5vmin, 60px);
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn-toggle-collapse:active {
    transform: translateX(-50%) scale(0.9);
}

.btn-toggle-collapse:hover {
    background: #000;
}

/* MAIN – área rolável */
.lista-scrollavel {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    margin: 0;
}

/* FOOTER fixo */
.fixed-input {
    align-content: center;
    padding: 0;
    background-color: #000;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================================================
   CARD PRINCIPAL (sem zumbis)
   ================================================== */
.spotted-card.card-focado {
    border: 2px solid var(--cor-borda-glow);
    position: relative;
    animation: glowPulsar 3s infinite alternate;
    max-width: 700px;
    display: flex;
    margin: 15px auto;
    transform: none;
    transition: none;
    cursor: default;
}

.spotted-card.card-focado:hover {
    cursor: default;
}

@keyframes glowPulsar {
    from {
        box-shadow: 0 0 10px rgba(221, 200, 14, 0.1);
    }

    to {
        box-shadow: 0 0 25px rgba(221, 200, 14, 0.4);
    }
}

.post-content-focado {
    font-size: 18px;
    line-height: 1.5;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin: 10px 0;
    padding: 0 10px;
    width: 100%;
}

/* ==================================================
   MINIMIZAÇÃO DO HEADER VIA CONTROLLER
   ================================================== */
#lingoteContainer.minimizado .sticky-header {
    display: none;
}

/* Estado minimizado do conteúdo do card (opcional, se quiser esconder também) */
#lingoteContainer.minimizado .card-body,
#lingoteContainer.minimizado .spotted-card,
#lingoteContainer.minimizado .container-img-post {
    display: none;
}

/* ==================================================
   SCROLL SNAP MAGNÉTICO (comentários)
   ================================================== */
.lista-comentarios-social {
    container-name: feedComentarios;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 30px 20px;
    gap: 10px;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* ==================================================
   ANIMAÇÃO DE ENTRADA DOS COMENTÁRIOS
   ================================================== */
@keyframes surgirComentario {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.9);
        opacity: 0.5;
        transform: translateY(10px) scale(0.98);
    }

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

.comentario-entrou {
    animation: surgirComentario 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) ease-in-out forwards;
}

/* ==================================================
   FEEDBACK DE UPLOAD
   ================================================== */
#feedback-upload {
    display: block;
    visibility: visible;
    opacity: 1;
    color: #fff;
    font-weight: bold;
    padding: 6px;
    margin-bottom: 10px;
    border-radius: 6px;
    font-size: clamp(0.85rem, 2vw, 1.1rem);
}

/* ==================================================
   BOLHAS DE COMENTÁRIO
   ================================================== */
.comentario-item {
    padding-bottom: 5px;
    padding-top: 6px;
    padding-inline-end: 8px;
    padding-inline-start: 9px;
    border-radius:16px 16px 16px 4px;
    border-right: 3px solid var(--cor-borda-glow);
    background: rgba(255, 255, 255, 0.062);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    align-self: flex-start;
    width: min-content;
    min-width: 180px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    flex-direction: column;
    word-break: break-word;
    hyphens: auto;
    margin-bottom: 20px;
    scroll-snap-align: start;
    scroll-margin-top: 50px;
    /* Ajuste conforme a altura do seu header fixo */
    -moz-user-select: text;
    user-select: text;
    will-change: transform;

}

/* Bolha do próprio usuário (direita) */
.comentario-item.meu-comentario {
    border-right: none;
    border-radius: 15px 15px 5px 15px;
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
    width: min-content;
}

.lista-comentarios-social::-webkit-scrollbar {
    display: none;
}

.comentario-item .acoes-bolha {
    text-align: left;
}

.comentario-item.meu-comentario .acoes-bolha {
    text-align: right;
}

/* ==================================================
   VIBES (mantido integral)
   ================================================== */
.comentario-item.vibe-light {
    background: oklch(from var(--cor-borda-glow) 0.95 0.04 h);
    color: #111111;
    border: 1px solid oklch(from var(--cor-borda-glow) 0.88 0.06 h);
}

.comentario-item.vibe-light .comentario-texto,
.comentario-item.vibe-light .comentario-data,
.comentario-item.vibe-light .comentario-autor,
.comentario-item.vibe-light .btn-responder-fenda {
    color: #111111;
    font-weight: bold;
}

.comentario-item.vibe-light .indicador-resposta {
    font-weight: bold;
    opacity: 1;
    color: oklch(from var(--cor-borda-glow) 0.30 c h);
    border-left: 3px solid oklch(from var(--cor-borda-glow) 0.30 c h);
    background: rgba(0, 0, 0, 0.06);
    margin-bottom: 10px;
    border-radius: 10px;
}

.comentario-item.vibe-dark {
    background: rgba(22, 22, 29, 0.911);
    backdrop-filter: blur(5px);
    color: #eeeeee;
}

.comentario-item.vibe-neon {
    background: #000000;
    backdrop-filter: none;
    position: relative;
    animation: neon-ultra 5s infinite alternate ease-in-out;
    color: var(--cor-borda-glow);
}

.comentario-item.vibe-neon .comentario-data,
.comentario-item.vibe-neon .comentario-autor {
    font-weight: bold;
    text-shadow: 0 0 6px var(--cor-borda-glow);
    opacity: 0.9;
}

@keyframes neon-ultra {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        filter: saturate(0.7);
        box-shadow: 0 0 10px var(--cor-borda-glow);
    }

    20%,
    24%,
    55% {
        color: rgba(0, 0, 0, 0.5);
        box-shadow: 0 0 20px var(--cor-borda-glow);
    }
}

@keyframes pulsar-luz {
    0% {
        box-shadow: 0 0 10px var(--cor-borda-glow), inset 0 0 5px var(--cor-borda-glow);
    }

    50% {
        box-shadow: 0 0 25px var(--cor-borda-glow), inset 0 0 15px var(--cor-borda-glow);
    }

    100% {
        box-shadow: 0 0 10px var(--cor-borda-glow), inset 0 0 5px var(--cor-borda-glow);
    }
}


.comentario-item.vibe-glass {
    background: rgb(255 255 255 / 5%);
    backdrop-filter: blur(6px);
    color: #fff;
    border-bottom: 1px solid #11111141;
    border-top: 1px solid #11111141;
    border-left: 1px solid #11111141;
    
}


.comentario-item.vibe-ads {
    background-color: #161625;
    border: 2px solid var(--cor-borda-glow);
    position: relative;
    animation: pulsar-luz 3s infinite ease-in-out;
    color: var(--cor-borda-glow);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 60 60'%3E%3Cpath d='M30 0l25.98 15v30L30 60 4.02 45V15z' fill='none' stroke='white' stroke-width='1' stroke-opacity='0.1'/%3E%3C/svg%3E");
    background-size: 30px 30px;
}

.comentario-item.vibe-ads .comentario-texto {
    color: #fff;
    text-shadow: 0 0 8px var(--cor-borda-glow);
    font-weight: 500;
}

.comentario-item.vibe-ads .comentario-data {
    color: var(--cor-aura-user);
    text-shadow: 0 0 8px var(--cor-borda-glow);
    font-weight: bold;
}

.comentario-item.vibe-glass:hover  {
    transition: 0.3 ease;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(112, 205, 228, 0.2);
    background: #b8b8b800;
}


/* META DADOS */
.comentario-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    letter-spacing: 1px;
    gap: 8px;
    width: 100%;
}

.comentario-item .comentario-autor  {
    color: var(--cor-borda-glow);
    font-size: clamp(0.85rem, 0.382vw + 0.625rem, 1rem);
    font-weight: bold;
    flex-grow: 1;
    max-width: clamp(75px, 60vmax, 150px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: min-content;
}

.comentario-data {
    font-size: clamp(0.8rem, 0.382vw + 0.625rem, 0.95rem);
    opacity: 0.75;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.comentario-texto {
    color: #ddd;
    font-size: clamp(0.95rem, 0.382vw + 0.625rem, 1.3rem);
    line-height: 1.4;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: left;
}

/* COMENTÁRIOS FILHOS */
.comentario-filho {
    margin-left: 40px;
    max-width: 58%;
    position: relative;
}


/* BOTÃO RESPONDER */
.btn-responder-bolha {
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #f5de0cc4;
    border-radius: 10px;
    padding: 4px 6px;
    color: #000000;
    box-shadow: 0px 3px 0px rgba(0, 0, 0, 0.3), inset 0px 2px 2px rgba(255, 255, 255, 0.192);
    text-transform: uppercase;
    font-size: 0.6rem;
    margin-top: 5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    opacity: 0.7;
    transition: all 0.15s ease-out;
}

.btn-responder-bolha:hover {
    opacity: 1;
    background: #e4e006;
    transform: translateY(-2px);
    box-shadow: 0px 4px 0px rgba(0, 0, 0, 0.35), inset 0px 2px 2px rgba(255, 255, 255, 0.5);
}

/* ==================================================
   BARRA FIXA (WHATSAPP STYLE) – SEM FLUTUAÇÃO
   ================================================== */
.sessao-fofoca-focada {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(0, 0, 0, 0.75);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 5px;
    position: relative;
    width: 100%;
    max-width: 900px;
    box-sizing: border-box;
    margin: 0 auto;
    z-index: 9999;
}

/* --- Textarea (ocupa espaço disponível, mas será comprimido pelo rodapé) --- */
.textarea-chat {
    flex: 1 1 auto;
    /* cresce, mas pode encolher */
    min-width: 80px;
    /* evita que suma */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 8px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    min-height: 40px;
    max-height: 100px;
    overflow-y: auto;
    scrollbar-width: none;
    margin: 0;
    line-height: 1.4;
}

.textarea-chat:focus {
    outline: none;
    border-color: var(--cor-borda-glow, #70cde4);
}

.textarea-chat::-webkit-scrollbar {
    display: none;
}

/* --- Botão de anexo (+) --- */
.btn-attach-gaveta {
    background: #6ee2ff38;
    border: none;
    border-radius: 50%;
    width: clamp(30px, 8vmin, 70px);
    height: clamp(30px, 8vmin, 70px);
    font-size: clamp(1.1rem, 5vmin, 2rem);
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
}

.btn-attach-gaveta:hover {
    background: #70cde4de;
    filter: brightness(1.03);
    transition: 0.3s ease-in-out;

}

/* --- Botão de enviar --- */
.btn-enviar-chat {
    background: var(--laranja-fenda, #ff8c00);
    border: none;
    border-radius: 50%;
    width: clamp(30px, 6vmin, 70px);
    height: clamp(30px, 6vmin, 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #000;
    font-size: clamp(0.95rem, 3.5vmin, 1.8rem);
}

/* --- Rodapé (contador + miniatura) – AGORA NO FLUXO NORMAL --- */
.chat-footer-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    /* não encolhe */
    color: #aaa;
    margin-right: 0;
}

/* --- Miniatura do anexo --- */
#anexo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width:  clamp(25px, 8vmin, 70px);
    height: clamp(25px, 8vmin, 70px);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    transition: 0.2s;
    flex-shrink: 0;
    cursor: pointer;
}

#anexo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

#anexo-preview:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

/* --- Contador --- */
#char-count {
    pointer-events: auto;
    /* permite selecionar o texto se quiser */
    color: #b1b1b1;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    white-space: nowrap;
    font-size: 0.8rem;
    overflow-wrap: break-word;
    overflow: hidden;
    gap: 4px;
}

/* --- Feedback toast (flutuante sobre a barra, sem atrapalhar) --- */
#feedback-upload {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

#feedback-upload.visivel {
    opacity: 1;
}

#feedback-upload .icone-feedback {
    font-size: 1rem;
    line-height: 1;
}

#feedback-upload .texto-feedback {
    font-size: 0.7rem;
}

#feedback-upload.sucesso {
    border-color: rgba(0, 255, 100, 0.3);
}

#feedback-upload.sucesso .icone-feedback {
    color: #00ff64;
}

#feedback-upload.erro {
    border-color: rgba(255, 70, 70, 0.3);
}

#feedback-upload.erro .icone-feedback {
    color: #ff4a4a;
}

/* --- Gaveta (mantida) --- */
.gaveta-opcoes {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 5px;
    right: 0;
    width: auto;
    max-height: 55vh;
    max-width: 200px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    box-sizing: border-box;
    overflow: hidden;
    overflow-y: auto;
}

.customizacao-rapida {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.input-mini {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6px 12px;
    color: #fff;
    font-size: 0.85rem;
}

.color-mini {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #fff;
    cursor: pointer;
}

/* INDICADOR NA GAVETA */

.nome-resposta {
    white-space: normal;
    font-size: clamp(0.85rem, 1.5vw, 1.3rem);
    max-width: 3.5vw;
    text-overflow: ellipsis;
    overflow: hidden;
}

.resposta-indicador {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 188, 0, 0.15);
    padding: 6px 12px;
    border-radius: 20px;
    color: #ffbc00;
    white-space: normal;
    /* permite quebra de linha */
    word-break: break-word;
    /* evita estouro de palavras longas */
    max-width: fit-content;
    box-sizing: border-box;
}

.cancelar-resposta {
    background: none;
    border: none;
    color: #ff6666;
    cursor: pointer;
}

.btn-attach-opcao {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 30px;
    padding: 10px;
    text-align: center;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}



/* Botão voltar – fica grudado no topo do .sticky-header */
.btn-voltar-fenda {
    position: sticky;
    top: 0;
    z-index: 10;
    display: inline-block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: clamp(1.1rem, 0.41vw + 1.018rem, 1.8rem);
    margin: 0 0 15px 0;
    padding: 6px 10px;
    flex-shrink: 0;
    align-self: flex-start;
    border-radius: 8px;
    transition: background 0.2s;
    width: fit-content;
}

.btn-voltar-fenda:hover {
    color: var(--dourado);
}

.box-post-central {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.sem-comentarios {
    opacity: 0.6;
    font-size: 0.9rem;
    text-align: center;
    padding: 15px;
}

/* ==================================================
   CONTAINER QUERIES (responsividade das bolhas)
   ================================================== */
@container feedComentarios (max-width: 360px) {
    .comentario-item {
        max-width: 75%;
        min-width: 180px;
        padding: 3px 6px;
        font-size: 0.8rem;
    }

    .comentario-filho {
        margin-left: 25px;
        max-width: 72%;
    }

    .comentario-item .comentario-autor  {
        font-size: 0.8rem;
    }

    .comentario-texto {
        font-size: 0.9rem;
        line-height: 1.2;
    }
}

@container feedComentarios (min-width: 361px) and (max-width: 500px) {
    .comentario-item {
        max-width: 73%;
        min-width: 180px;
    }

    .comentario-filho {
        margin-left: 35px;
        max-width: 70%;
    }
}

@container feedComentarios (min-width: 501px) and (max-width: 800px) {
    .comentario-item {
        max-width: 71%;
        min-width: 220px;
    }
}

@container feedComentarios (min-width: 801px) {
    .comentario-item {
        max-width: 55%;
        min-width: 250px;
    }

    .comentario-item.meu-comentario {
        max-width: 53%;
    }

    .comentario-filho {
        margin-left: 40px;
        max-width: 52%;
    }
}

/* IMAGENS NOS COMENTÁRIOS */
.comentario-media-wrapper {
    container-type: inline-size;
    container-name: foto-comentario;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.comentario-img {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    display: block;
    cursor: pointer;
    -webkit-user-drag: element;
    user-select: none;
    cursor: zoom-in;
    /* Indica para o usuário que pode clicar para ampliar */
    transition: transform 0.3s ease;

}

@container foto-comentario (max-width: 200px) {
    .comentario-img {
        object-fit: cover;
    }
}

@container foto-comentario (min-width: 201px) and (max-width: 300px) {
    .comentario-img {
        object-fit: cover;
    }
}

@container foto-comentario (max-width: 350px) {
    .comentario-img {
        object-fit: cover;
    }
}

@container foto-comentario (max-height: 200px) {
    .comentario-img {
        object-fit: cover;
    }
}

@container foto-comentario (min-height: 201px) and (max-width: 250px) {
    .comentario-img {
        object-fit: cover;
    }
}

@container foto-comentario (max-height: 320px) {
    .comentario-img {
        object-fit: contain;
    }
}

.comentario-img:active {
    transform: scale(1.05);

}


/* CORTINA (PREVIEW) */
.btn-fechar-post {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.btn-fechar-post:hover {
    background-color: #70cde4;
    transform: scale(1.05);
    transition: 0.3s ease-out;
}


.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
    overflow: auto;
}

.preview-card {
    background: rgba(20, 20, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    max-width: 600px;
    width: 90%;
    overflow: auto;
    scrollbar-width: none;
    display: block;
    flex-direction: column;
    max-height: 85%;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255, 188, 0, 0.3);
}

.preview-card::-webkit-scrollbar {
    display: none;
}

.preview-botao {
    background: #ffbc00;
    color: #000;
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.preview-botao:hover {
    background: #ffd966;
    transform: scale(1.02);
}

.preview-categoria {
    font-size: 0.8rem;
    font-weight: bold;
    color: #ffbc00;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.preview-avatar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.preview-avatar .avatar-p {
    width: clamp(40px, 6vmin, 80px);
    height: clamp(40px, 6vmin, 80px);
    border-radius: 50%;
    border: 2px solid #ffbc00;
}

.preview-nome {
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
}

.preview-mensagem {
    font-size: 1rem;
    line-height: 1.4;
    color: #ddd;
    margin: 16px 0;
    text-align: left;
    word-break: break-word;
}

.preview-imagem {
    margin: 16px 0;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--glass-bg);
    border-right: none;
}

.preview-imagem img {
    width: 100%;
    height: auto;
    display: block;
}

.preview-engajamento {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    color: #ccc;
    font-size: 1.4rem;
}

.preview-engajamento i {
    margin-right: 6px;
}

/* LINGOTE */
.lingote-container {
    display: block;
    width: 100%;
    height: 100%;
}


/* ISOLAMENTO DE CONTEXTO (swipe blocker) – sem !important desnecessário */


/* O conteúdo do post (card + reações), sem posição especial */
.fenda-estatica-context {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 10px 10px 10px;
    /* sem overflow próprio */
}

.fenda-estatica-context .spotted-card:-webkit-scrollbar {
    display: none;
}


.fenda-estatica-context .reacoes-gravadas {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

/* Garante que o card não tenha scroll interno */
.fenda-estatica-context .spotted-card {
    max-height: none;
    overflow-y: visible;
    scrollbar-width: none;
}

.reacao-placeholder {
    justify-content: flex-end;
    order: 2;
    width: 100%;
    text-align: center;
    /* Centraliza o texto "Ninguém reagiu ainda..." */
    margin-top: 8px;
    /* Espaçamento extra do card se necessário */
}

.fenda-estatica-context {
    display: flex;
    justify-items: center;
}


/* Oculta o header global na página de post (compatível) */
body.pagina-post .header-principal {
    display: none;
}

/* Animação do brilho */
@keyframes highlightFade {
    0% {
        background-color: rgba(255, 193, 7, 0.4);
    }

    /* Âmbar suave com transparência */
    100% {
        background-color: transparent;
    }
}

.comentario-item.comentario-highlight {
    animation: highlightFade 3s ease-out forwards;
    border-radius: 8px;
    /* Para seguir o arredondado dos seus cards */
    padding: 5px;
    /* Aumenta a área de impacto do brilho */
}

/* INDICADOR NA BOLHA DE OCMENTÁRIOS */
.indicador-resposta {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.10);
    border-left: 3px solid var(--cor-borda-glow);
    border-radius: 8px;
    margin-bottom: 10px;
    color: #ffffff;
    transition: background 0.3s;
    max-width: fit-content;
    word-break: break-all;
    font-size: 0.85rem;
    font-weight: bold;
    padding: 4px 8px;
    opacity: 0.75;
}

.indicador-resposta:hover {
    background: rgba(255, 255, 255, 0.144);
}

/* GIFs externos no card principal (página do post) */
.spotted-card.card-focado .spotted-card img {
    max-width: 100%;
    object-fit: contain;
    max-height: 100vh;
    background: transparent;
    border: none;
    border-radius: 12px;
}

.comentario-img.gif-externo {
    padding: 4px;
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    background: transparent;
}

/* sem borda para stickers */
.comentario-img.gif-externo {
    border: none;
    border-radius: 12px;
}


/* Comentário deletado (placeholder) */
.comentario-deletado {
    background: rgba(128, 128, 128, 0.1);
    border-right: 5px solid #888;
    opacity: 0.7;
}

.comentario-deletado-msg {
    text-align: center;
    padding: 8px;
    color: #c4c4c4;
    font-style: italic;
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.comentario-deletado-msg i {
    margin-right: 6px;
}

/* Estado de loading durante a exclusão */
.comentario-item.is-loading {
    filter: brightness(0.7) blur(1px);
    pointer-events: none;
    transition: filter 0.2s;

}



.fenda-estatica-context .container-img-post img {
    object-fit: cover;
    max-height: 100vh;
    max-width: 100%;
    display: flex;
    justify-content: center;

}

/* Landscape e Mobile (ajustes finos) */
@media (orientation: landscape) {
    .fenda-estatica-context .container-img-post {
        max-height: 100vh;
        display: flex;
        justify-content: center;
        background: #00000066;
    }

    .fenda-estatica-context .container-img-post img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

}


/* ==================================================
   ELLIPSIS FLUTUANTE À ESQUERDA (estilo WhatsApp)
   ================================================== */


.btn-excluir-comentario {
    position: absolute;
    top: 6px;
    left: -38px; /* um pouco mais para fora para não poluir */
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7); /* <- MAIS NÍTIDO */
    cursor: pointer;
    padding: 8px 10px; 
    font-size: 1.3rem; 
    font-weight: bold;
    transition: 0.2s;
    pointer-events: none;
    line-height: 1;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5); /* ajuda a destacar no fundo escuro */
}

/* Mostra no hover (desktop) */
 .btn-excluir-comentario,
.btn-excluir-comentario:focus {
    opacity: 1;
    pointer-events: auto;
    color: #cccccc; /* dourado da Fenda para ficar mais chamativo */
    transform: scale(1.15);
}

/* No mobile, sempre visível (ajuste para não atrapalhar) */
@media (hover: none) {
    .btn-excluir-comentario {
        opacity: 0.6;
        pointer-events: auto;
        left: -28px; /* um pouco mais próximo */
        color: rgba(255, 255, 255, 0.8);
    }
}

.btn-excluir-comentario:hover {
    color: #ff4b2b;
    transform: scale(1.2);
}

/* Ajuste para comentários do autor (lado direito) – o ellipsis fica à esquerda, então não muda */
.comentario-item.meu-comentario .btn-excluir-comentario {
    left: -32px; /* mantém à esquerda, mesmo com o comentário à direita */
}

/* ==================================================
   DIALOG POP-UP ESTILO WHATSAPP (compacto)
   ================================================== */
.dialog-confirmacao {
    border: none;
    border-radius: 16px;
    padding: 0;
    background: transparent;
    max-width: 90%;
    width: 280px; /* mais compacto */
    margin: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Remove o backdrop padrão (não usado com show()) */
.dialog-confirmacao::backdrop {
    display: none;
}

.dialog-conteudo {
    background: rgba(20, 20, 32, 0.96);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px 20px 20px;
    text-align: center;
    border: 1px solid rgba(255, 140, 0, 0.3);
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
}

.dialog-conteudo h3 {
    margin: 0 0 8px 0;
    color: #ffbc00;
    font-size: 1rem;
    font-weight: 600;
}

.dialog-conteudo p {
    margin: 0 0 16px 0;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
}

.dialog-botoes {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.dialog-btn {
    border: none;
    border-radius: 30px;
    padding: 7px 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    min-width: 80px;
}

.dialog-btn-sim {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid #ff4b2b;
    color: #ff8a8a;
}

.dialog-btn-sim:hover {
    background: rgba(220, 53, 69, 0.4);
}

.dialog-btn-nao {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid #666;
    color: #ccc;
}

.dialog-btn-nao:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==================================================
   RESPONSIVIDADE – telas pequenas e landscape
   ================================================== */
@media (max-width: 480px) {
    .btn-excluir-comentario {
        left: -24px;
        font-size: 0.85rem;
        top: 4px;
    }
    .dialog-confirmacao {
        width: 250px;
    }
    .dialog-conteudo {
        padding: 14px 16px 16px;
    }
    .dialog-conteudo h3 {
        font-size: 0.9rem;
    }
    .dialog-conteudo p {
        font-size: 0.8rem;
    }
    .dialog-btn {
        font-size: 0.8rem;
        padding: 4px 10px;
        min-width: 60px;
    }

   .post-encerrado-banner {
            font-size: 0.8rem;
            padding: 8px 12px;
        }
     .comentarios-bloqueados-msg {
            font-size: 0.85rem;
        }
}

@media (orientation: landscape) and (max-height: 500px) {
    .dialog-confirmacao {
        width: 240px;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .dialog-conteudo {
        padding: 10px 14px 14px;
    }
    .dialog-conteudo h3 {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    .dialog-conteudo p {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    .dialog-btn {
        font-size: 0.75rem;
        padding: 4px 10px;
        min-width: 50px;
    }
}


/* ============================================================
       🔥 POST ENCERRADO – BANNER E BLOQUEIO
       ============================================================ */
    .post-encerrado-banner {
        background: rgba(255, 188, 0, 0.08);
        border-left: 4px solid #ffbc00;
        padding: 10px 16px;
        margin-bottom: 12px;
        border-radius: 4px;
        color: #ffbc00;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .post-encerrado-banner i {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .fixed-input-bloqueado {
        background: rgba(255, 255, 255, 0.02);
        border-top: 1px solid rgba(255, 255, 255, 0.04);
        padding: 16px 20px;
    }

    .comentarios-bloqueados-msg {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        color: #ffffff;
        opacity: 0.7;
        font-size: 0.95rem;
        font-style: italic;
        flex-wrap: wrap;
        text-align: center;
    }

    .comentarios-bloqueados-msg i {
        font-size: 1.2rem;
        color: #ffffff;
        opacity: 0.7;
    }

    