/* ==========================================================================
   CHANGELOG "NOVIDADES" (/novidades) — prefixo chg-
   Linha lobby-v2: paleta LITERAL hex (nunca tokens --truco-*), cartão
   #111822→#0d131b, esmeralda #25d08a, dourado #f3c43f, coral #ef6a5e,
   azul info #3B6FB0. Carregado por último na cascata do App.razor
   (decisão registrada no design do change add-changelog-news).
   Breakpoint único de empilhamento: 640px. Sem animação contínua.
   ========================================================================== */

.chg-page {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

/* ---- Cabeçalho ---------------------------------------------------------- */
.chg-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chg-eyebrow {
    font-family: 'Barlow', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: #f3c43f;
}

.chg-title {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: clamp(1.9rem, 4.5vw, 2.6rem);
    letter-spacing: .5px;
    line-height: 1.05;
    color: #e8edf2;
}

.chg-sub {
    margin: 0;
    font-size: .95rem;
    color: #9aa6b3;
}

/* ---- Estado vazio -------------------------------------------------------- */
.chg-empty {
    border-radius: 18px;
    padding: 48px 24px;
    text-align: center;
    background: linear-gradient(160deg, #111822, #0d131b);
    border: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chg-empty__ico {
    font-size: 40px;
    color: #f3c43f;
    opacity: .8;
}

.chg-empty__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    color: #e8edf2;
}

.chg-empty__text {
    font-size: .9rem;
    color: #9aa6b3;
    max-width: 34rem;
}

/* ---- Grupo por versão ----------------------------------------------------- */
.chg-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.chg-group__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chg-group__label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #25d08a;
    white-space: nowrap;
}

.chg-group__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(37, 208, 138, .35), rgba(255, 255, 255, .05));
}

/* ---- Card de entrada ------------------------------------------------------ */
.chg-card {
    border-radius: 16px;
    padding: 20px 22px;
    background: linear-gradient(160deg, #111822, #0d131b);
    border: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color .2s ease, transform .2s ease;
}

.chg-card:hover {
    border-color: rgba(255, 255, 255, .12);
    transform: translateY(-1px);
}

.chg-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chg-card__date {
    margin-left: auto;
    font-size: .75rem;
    color: #5a6776;
    letter-spacing: .5px;
}

.chg-card__title {
    margin: 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.15;
    color: #e8edf2;
}

/* Corpo markdown: tipografia legível sem deixar o RadzenMarkdown inventar escala própria. */
/* Tipografia de artigo ("blog"/ABNT-lite): texto justificado com hifenização, entrelinha
   folgada e recuo de primeira linha em TODO parágrafo (padrão ABNT), inclusive após heading. */
.chg-card__body {
    font-size: .92rem;
    line-height: 1.7;
    color: #b8becc;
    text-align: justify;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.chg-card__body p {
    margin: 0 0 .7em;
    text-indent: 1.4em;
}

.chg-card__body p:last-child {
    margin-bottom: 0;
}

.chg-card__body ul,
.chg-card__body ol {
    margin: 0 0 .6em;
    padding-left: 1.4em;
}

.chg-card__body a {
    color: #25d08a;
}

.chg-card__body code {
    background: rgba(255, 255, 255, .06);
    border-radius: 5px;
    padding: 1px 5px;
    font-size: .85em;
}

/* Headings do markdown: hierarquia de artigo, sempre um degrau acima do corpo (.92rem)
   e abaixo do chg-card__title (1.35rem) — sem isto o tema renderia um "##" maior que o
   próprio título do card. Alinhados à esquerda mesmo com o corpo justificado. */
.chg-card__body h1,
.chg-card__body h2,
.chg-card__body h3,
.chg-card__body h4,
.chg-card__body h5,
.chg-card__body h6 {
    margin: 1.4em 0 .45em;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .4px;
    color: #e8edf2;
    text-align: left;
}

.chg-card__body h1,
.chg-card__body h2 {
    font-size: 1.18rem;
}

.chg-card__body h3 {
    font-size: 1.08rem;
}

.chg-card__body h4,
.chg-card__body h5,
.chg-card__body h6 {
    font-size: .98rem;
}

.chg-card__body h1:first-child,
.chg-card__body h2:first-child,
.chg-card__body h3:first-child,
.chg-card__body h4:first-child {
    margin-top: 0;
}

.chg-card__body hr {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, .08);
    margin: 1em 0;
}

/* Screenshot: nunca estoura o card (spec). */
.chg-card__shot {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    margin-top: 4px;
}

/* ---- Chips de tipo --------------------------------------------------------- */
.chg-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 11px;
    border-radius: 999px;
    font-family: 'Barlow', system-ui, sans-serif;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.chg-chip--feature {
    color: #25d08a;
    background: rgba(37, 208, 138, .12);
    border: 1px solid rgba(37, 208, 138, .3);
}

.chg-chip--fix {
    color: #7fa8d9;
    background: rgba(59, 111, 176, .16);
    border: 1px solid rgba(59, 111, 176, .4);
}

.chg-chip--improvement {
    color: #f3c43f;
    background: rgba(243, 196, 63, .12);
    border: 1px solid rgba(243, 196, 63, .3);
}

/* ---- Dot de novidade na sidebar (vocabulário do .truco-live-dot, em dourado) ---- */
.chg-news-dot {
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    background: #f3c43f;
    margin-left: auto;
    flex: 0 0 auto;
    animation: chgNewsPulse 1.8s ease-out infinite;
}

@keyframes chgNewsPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 196, 63, .5);
    }

    100% {
        box-shadow: 0 0 0 8px rgba(243, 196, 63, 0);
    }
}

/* ---- Responsivo + movimento reduzido ---------------------------------------- */
@media (max-width: 640px) {
    .chg-page {
        gap: 20px;
    }

    .chg-card {
        padding: 16px;
    }

    .chg-card__top {
        flex-wrap: wrap;
    }

    /* Coluna estreita: justificar abre "rios" de espaço entre palavras — volta ao normal. */
    .chg-card__body {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chg-news-dot {
        animation: none;
    }

    .chg-card,
    .chg-card:hover {
        transition: none;
        transform: none;
    }
}
