/* ==========================================================================
   Mercado Sonoro — CSS consolidado dos layouts de anúncios (Kunena)
   Substitui os <style> repetidos em:
   - layouts/category/item/default.php
   - layouts/topic/list/default.php
   - layouts/topic/row/default.php
   - layouts/topic/row/user.php
   ========================================================================== */

.topic-item-search-hover:hover {
    color: #d85e6f;
}

.topic-item-offer-hover:hover {
    color: #318dae;
}

/* Cor para todas as restantes categorias */
.topic-item-default-hover:hover {
    color: #7c93a5;
}

.parente {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0 !important;
    background: #eef1f5 !important;
    margin-right: 7px;
}

.parente .category,
.parente .category-stickymsg {
    flex: 1 1 calc(33% - 1rem);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 17px;
    background: #fff;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.parente .category:hover {
    transform: translateY(-6px);
    box-shadow: 0px 16px 0px -10px #d8dfe7;
}

#kunena.layout .cartoes td {
    padding: 0 !important;
}

.lastmessage-td {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0;
    margin-top: 20px;
}

.lastmessage-td .catavatar {
    flex: 0 0 70px;
    width: 70px;
}

.lastmessage-td .catavatar img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    display: block;
}

.lastmessage-td .meio {
    flex: 1 1 auto;
    min-width: 0;
}

.lastmessage-td .respostas {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.topic-item-offer,
.topic-item-search,
.topic-item-bares {
    margin: 10px 0 18px !important;
    text-align: left !important;
}

#kunena.layout .topico-geral span,
#kunena.layout .topico-geral {
    color: #fff !important;
    font-weight: 400;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    display: inline-block;
    white-space: nowrap;
    border: 0;
}

.ktopic-category a {
    font-weight: bold;
}

/* --------------------------------------------------------------------
   Vindo do <style> inline do index.php do template.
   Colocado depois de propósito: mesma especificidade que as regras
   acima, por isso a ordem no ficheiro é o que garante que estas
   vencem (tal como acontecia antes, por o inline carregar mais tarde).
   -------------------------------------------------------------------- */
.topico-geral a {
    padding: 14px 11px 17px 11px;
    border-radius: 50%;
    box-shadow: inset 0 0 20px 0px #dee5e8;
}

.topico-geral {
    margin: 10px 0 23px 0;
    text-align: center;
}

.category > .topico-geral.topic-item-unread a {
    box-shadow: inset 0 0 20px 0 #b2e6b2;
}

.topico-geral a.locked {
    box-shadow: inset 0 0 20px 0px #fff078;
    color: #fca22d;
}

.esconder {
    display: none;
}

.seta {
    margin-top: 19px;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .parente .category {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        flex: 1 1 calc(100% - 1rem);
    }

    .parente .category > div {
        width: 100%;
        flex: none;
    }

    .lastmessage-td {
        display: none !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        height: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .lastmessage-td .meio {
        line-height: 20px;
    }
}
