/* ======================================================
   COMENTÁRIOS — HERÓIS PME
====================================================== */

.hpme-bloco {
    display: flex;
    gap: 0;
    border: 1.5px solid #d0d5dd;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
    background: #fff;
}

.hpme-bloco__esquerda {
    width: 300px;
    flex-shrink: 0;
    padding: 24px 20px;
    border-right: 1.5px solid #d0d5dd;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hpme-bloco__direita {
    flex: 1;
    padding: 24px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hpme-bloco__titulo {
    font-weight: 500;
    font-size: 20px;
    margin: 0 0 4px;
}

/* Estrelas esquerda — clicáveis e grandes */
.hpme-bloco__esquerda .hpme-form__estrelas {
    display: flex;
    gap: 6px;
    cursor: pointer;
    margin-top: 4px;
}

.hpme-bloco__esquerda .hpme-form__estrela {
    font-size: 32px;
    color: #d1d5db;
    transition: color .15s;
    line-height: 1;
}

.hpme-bloco__esquerda .hpme-form__estrela.hover,
.hpme-bloco__esquerda .hpme-form__estrela.selecionada {
    color: #f5a623;
}

/* Estrelas média (decorativas) */
.hpme-estrelas-media {
    display: flex;
    gap: 4px;
}

.hpme-estrela-media {
    font-size: 28px;
    color: #d1d5db;
}

.hpme-estrela-media--ativa {
    color: #f5a623;
}

.hpme-bloco__media-texto {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* Lista comentários */
.hpme-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    position: relative;
}

.hpme-lista::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #d0d5dd, transparent);
}

/* Card de cada comentário */
.hpme-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #faf7f1;
    border-left: 3px solid #b8904f;
    border-radius: 0px 14px 14px 0px;
    padding: 14px 16px;
    transition: background .2s;
}

.hpme-item:hover {
    background: #f5efe2;
}

/* Comentário de admin — destaque visual */
.hpme-item--admin {
    background: #fff8eb;
    border-left-color: #b8904f;
    border-left-width: 4px;
}

.hpme-item--admin:hover {
    background: #fdf2d8;
}

/* Respostas — indentadas, fundo mais claro */
.hpme-item--resposta {
    margin-left: 46px;
    position: relative;
    background: #fdfbf6;
    border-left-color: #d4b67d;
}

/*.hpme-item--resposta::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 22px;
    width: 14px;
    height: 1px;
    background: #d0d5dd;
}*/

/* Wrap do avatar */
.hpme-item__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

/* Avatar padrão (iniciais) — fundo dourado uniforme */
.hpme-item__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #b8904f !important;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    border: 2px solid #b8904f;
    box-sizing: border-box;
}

/* Avatar de admin (imagem do logo Heróis PME) */
.hpme-item__avatar--admin {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff !important;
    border: 2px solid #b8904f;
    padding: 2px;
    box-sizing: border-box;
    display: block;
}

.hpme-item__corpo {
    flex: 1;
    min-width: 0;
}

/* Texto do comentário */
.hpme-item__texto {
    margin: 6px 0 0;
    color: #444;
    line-height: 1.5;
}

.hpme-item__texto--truncado {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hpme-item__texto--expandido {
    display: block;
    -webkit-line-clamp: unset;
}

/* Botão "Ver mais / Ver menos" */
.hpme-item__ver-mais {
    background: none;
    border: none;
    color: #b8904f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0 0;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
}

.hpme-item__ver-mais:hover {
    text-decoration: underline;
    color: #1d2e52;
}

/* Topo do comentário — nome + data */
.hpme-item__topo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.hpme-item__topo strong {
    font-weight: 600;
}

/* Ícones inline (relógio, seta de reply) */
.hpme-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    stroke: currentColor;
}

/* Data — com ícone de relógio */
.hpme-item__data {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

/* Indicador "Em resposta a" */
.hpme-item__reply {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    font-weight: 400;
}

.hpme-item__reply-nome {
    color: #b8904f;
    font-weight: 600;
}

/* Estrelas do comentário */
.hpme-item__estrelas {
    display: flex;
    gap: 2px;
    margin: 4px 0 2px;
    font-size: 18px;
    line-height: 1;
}

.hpme-item__estrelas span {
    color: #d1d5db;
}

.hpme-item__estrelas span.ativa {
    color: #f5a623;
}

/* Paginação de comentários */
.hpme-paginacao {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.hpme-paginacao__btn,
.hpme-paginacao__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    background: #fff;
    transition: all .15s;
}

.hpme-paginacao__btn:hover,
.hpme-paginacao__num:hover {
    background: #f5f5f5;
    border-color: #aaa;
    color: #1a1a2e;
}

.hpme-paginacao__num--ativo {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
    cursor: default;
}

.hpme-paginacao__num--ativo:hover {
    background: #1a1a2e;
    color: #fff;
}

/* Formulário */
.hpme-form__nome-wrap {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
    animation: hpme-fadeIn .2s ease;
}

.hpme-form__campo-wrap {
    display: flex;
    flex-direction: column;
}

.hpme-form__nome,
.hpme-form__email {
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
}

.hpme-form__nome::placeholder,
.hpme-form__email::placeholder {
    color: #aaa !important;
    opacity: 1 !important;
}

.hpme-form__linha {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.hpme-form__textarea-wrap {
    flex: 1;
}

.hpme-form__textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 14px !important;
    padding: 9px 12px;
    font-size: 13px;
    resize: none;
    box-sizing: border-box;
    transition: all .2s;
    font-family: inherit;
}

.hpme-form__textarea::placeholder {
    color: #aaa !important;
    opacity: 1 !important;
}

.hpme-form__btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

.hpme-form__btn:hover {
    background: #333;
}

.hpme-form__extras {
    display: none;
    animation: hpme-fadeIn .2s ease;
}

.hpme-form__rgpd {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.hpme-form__rgpd a {
    color: #f5a623;
    font-weight: 500;
}
.hpme-form__rgpd a:hover {
    color: #1d2e52;
}

/* Mensagens de erro por baixo dos campos */
.hpme-erro-msg {
    display: block;
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    animation: hpme-fadeIn .15s ease;
}

.hpme-erro-campo,
input.hpme-erro-campo,
textarea.hpme-erro-campo {
    border-color: #dc2626 !important;
}

body[data-form-submit="regular"] button[type=submit] {
    font-family: Inter;
    display: inline-block;
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #fff;
}
body[data-form-submit="regular"] button[type=submit]:hover {
    background-color: #1d2e52 !important;
}

@keyframes hpme-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ======================================================
   RESPONSIVO — MOBILE (max-width: 640px)
====================================================== */

@media (max-width: 640px) {

    .hpme-bloco {
        flex-direction: column;
    }

    .hpme-bloco__esquerda {
        width: 100%;
        border-right: none;
        border-bottom: 1.5px solid #d0d5dd;
    }

    .hpme-form__nome-wrap {
        grid-template-columns: 1fr;
        max-width: 100% !important;
        display: grid !important;
    }
    .hpme-bloco__titulo {
        font-size: 18px;
        text-align: center;
    }
    .hpme-form__textarea-wrap {
        width: 100%;
    }

    .hpme-form__linha {
        flex-direction: column;
    }
    body[data-form-submit="regular"] button[type=submit] {
        width: 100%;
    }
    .hpme-form__btn {
        width: 100%;
    }

    /* RGPD sempre visível em mobile */
    .hpme-form__extras {
        display: block !important;
    }

    .hpme-item__avatar-wrap {
        display: none;
    }

    .hpme-bloco__esquerda .hpme-form__estrelas  {
        margin: 4px auto 0px;
    }
    .hpme-bloco__media-texto {
        text-align: center;
    }
    .hpme-item--resposta .hpme-item__topo {
        gap: 0px
    }
    .hpme-item--resposta .hpme-item__reply {
        margin-top: 8px;
        line-height: 11px;
    }
    .hpme-form__nome, .hpme-form__email {
        height: 50px !important;
    }

    /* Ordem em mobile: nome/email → mensagem → RGPD → botão */
    .hpme-form {
        display: flex;
        flex-direction: column;
    }

    .hpme-form__nome-wrap { order: 1; }
    .hpme-form__linha     { order: 2; }
    .hpme-form__extras    { order: 3; }

    .hpme-form__linha .hpme-form__textarea-wrap { order: 1; }
    .hpme-form__linha .hpme-form__btn           { order: 2; }

    /* Respostas em mobile — indentação reduzida */
    .hpme-item--resposta {
        margin-left: 10px;
    }
    .hpme-item--resposta::before {
        left: -12px;
        width: 8px;
    }
    /* Textarea sempre grande em mobile, sem expandir */
    .hpme-form__textarea {
        min-height: 80px;
    }
}