/**
 * LS Liste Post Category — Estilos do front-end
 * Herda cores e tipografia do tema ativo via currentColor e inherit.
 */

/* ============================================================
   Container principal da lista
   ============================================================ */
.ls-lpc-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ============================================================
   Item individual
   ============================================================ */
.ls-lpc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid;
    border-color: rgba(0, 0, 0, 0.08);
}

.ls-lpc-item:first-child {
    padding-top: 4px;
}

.ls-lpc-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

/* Modo escuro: inverte a borda */
@media (prefers-color-scheme: dark) {
    .ls-lpc-item {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* ============================================================
   Thumbnail
   ============================================================ */
.ls-lpc-thumb {
    flex-shrink: 0;
    display: block;
    width: 68px;
    height: 68px;
    overflow: hidden;
    border-radius: 4px;
}

.ls-lpc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ls-lpc-item:hover .ls-lpc-thumb img {
    transform: scale(1.06);
}

/* ============================================================
   Área de texto
   ============================================================ */
.ls-lpc-content {
    flex: 1;
    min-width: 0; /* evita overflow de texto */
}

/* ============================================================
   Título do post
   ============================================================ */
.ls-lpc-post-title {
    margin: 0 0 4px;
    padding: 0;
    font-size: 0.92em;
    font-weight: 600;
    line-height: 1.4;
    /* herda a família do tema */
    font-family: inherit;
    color: inherit;
    border: none;
}

.ls-lpc-post-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.ls-lpc-post-title a:hover,
.ls-lpc-post-title a:focus {
    opacity: 0.7;
    text-decoration: underline;
}

/* ============================================================
   Data de publicação
   ============================================================ */
.ls-lpc-date {
    display: block;
    font-size: 0.78em;
    opacity: 0.55;
    margin-bottom: 5px;
    font-style: normal;
}

/* ============================================================
   Trecho / Excerpt
   ============================================================ */
.ls-lpc-excerpt {
    margin: 4px 0 6px;
    padding: 0;
    font-size: 0.82em;
    line-height: 1.5;
    opacity: 0.8;
    /* limita a 3 linhas */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   Botão / link "Leia mais"
   ============================================================ */
.ls-lpc-readmore {
    display: inline-block;
    font-size: 0.80em;
    font-weight: 600;
    text-decoration: none;
    /* usa a cor de destaque do tema se definida, senão usa currentColor */
    color: var(--wp--preset--color--primary, var(--color-primary, currentColor));
    opacity: 0.9;
    transition: opacity 0.2s ease, letter-spacing 0.2s ease;
    letter-spacing: 0;
}

.ls-lpc-readmore:hover,
.ls-lpc-readmore:focus {
    opacity: 1;
    letter-spacing: 0.03em;
    text-decoration: underline;
}

/* ============================================================
   Sem thumbnail: ocupa toda a largura
   ============================================================ */
.ls-lpc-item:not(:has(.ls-lpc-thumb)) .ls-lpc-content {
    width: 100%;
}

/* ============================================================
   Acessibilidade: foco visível
   ============================================================ */
.ls-lpc-post-title a:focus-visible,
.ls-lpc-readmore:focus-visible,
.ls-lpc-thumb:focus-visible {
    outline: 2px solid var(--wp--preset--color--primary, currentColor);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================================
   Responsivo — telas muito estreitas (ex: sidebar em mobile)
   ============================================================ */
@media (max-width: 360px) {
    .ls-lpc-thumb {
        width: 54px;
        height: 54px;
    }

    .ls-lpc-post-title {
        font-size: 0.88em;
    }
}
