/* ═══════════════════════════════════════════════════════════════════════════
   Log de ativação - histórico de cupons / itens promocionais
   ═══════════════════════════════════════════════════════════════════════════ */

/* Seletor com o tema para vencer o ngDialog-theme-default (carregado depois).
   O !important no fundo é necessário porque telas do catálogo (dialog.delete /
   dialog.move) injetam `.ngdialog-content { background-color: transparent !important }`
   globalmente, e o histórico é aberto por cima do modal de item nessas telas. */
.ngdialog.ngdialog-theme-default.ngdialog-log-ativacao .ngdialog-content {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background-color: #ffffff !important;
    width: 560px;
    max-width: calc(100vw - 32px);
}

.la {
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

/* ─── Cabeçalho ────────────────────────────────────────────────────────────── */
.la-header {
    padding: 22px 24px 16px;
    border-bottom: 1px solid #EFEFEF;
}
.la-header__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #EEF3FC;
    color: #3060CA;
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.la-header__title {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.la-header__subtitle {
    margin-top: 2px;
    font-size: 12.5px;
    color: #888;
}

/* ─── Corpo ────────────────────────────────────────────────────────────────── */
.la-body {
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
    padding: 16px 24px 12px;
    background: #F6F7F9;
}
.la-body::-webkit-scrollbar { width: 8px; }
.la-body::-webkit-scrollbar-thumb { background: #d0d0d0; border-radius: 4px; }
.la-body::-webkit-scrollbar-track { background: transparent; }

.la-state {
    text-align: center;
    padding: 32px 0;
    color: #999;
}
.la-state i { color: #cfcfcf; }
.la-state p { margin: 10px 0 0; font-size: 13.5px; }
.la-state .btn { margin-top: 12px; }
.la-state--erro i { color: #E0B4AE; }
.la-state--erro p { color: #7A1712; }

/* ─── Agrupamento por dia ─────────────────────────────────────────────────── */
.la-dia + .la-dia { margin-top: 14px; }
.la-dia__label {
    font-size: 11px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* ─── Linha do tempo ──────────────────────────────────────────────────────── */
.la-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}
.la-evento {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 10px;
}
/* Linha ligando o marcador de um registro ao do próximo */
.la-evento:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 34px;
    bottom: -6px;
    left: 13px;
    width: 2px;
    background: #E2E5EA;
}
.la-evento__marker {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    background: #F0F0F0;
    color: #757575;
}
.la-evento__marker--criacao { background: #EEF3FC; color: #3060CA; }
.la-evento__marker--ativacao { background: #E6F7EE; color: #1d7d4a; }
.la-evento__marker--desativacao { background: #FDECEC; color: #C0392B; }
.la-evento__marker--alteracao { background: #FFF8EC; color: #8A6420; }

/* Cada registro é um card próprio, para separar bem um log do outro */
.la-evento__content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px 12px;
    background: #ffffff;
    border: 1px solid #E6E8EC;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.la-evento__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.la-evento__hora {
    font-size: 12px;
    color: #999;
    font-variant-numeric: tabular-nums;
}

.la-acao {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1.5;
    background: #F0F0F0;
    color: #757575;
}
.la-acao--criacao { background: #EEF3FC; color: #3060CA; }
.la-acao--ativacao { background: #E6F7EE; color: #1d7d4a; }
.la-acao--desativacao { background: #FDECEC; color: #C0392B; }
.la-acao--alteracao { background: #FFF8EC; color: #8A6420; }

.la-evento__detalhes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 6px;
    font-size: 12.5px;
    color: #5b5b5b;
}
.la-detalhe i { color: #aaa; margin: 0 2px; }
.la-detalhe__campo { color: #888; }
.la-detalhe strong { color: #1a1a1a; font-weight: 600; }

.la-evento__autor {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    font-size: 13px;
    color: #3a3a3a;
}
.la-evento__autor > i { color: #bbb; }
.la-evento__autor-nome { font-weight: 600; }
.la-origem {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 9px;
    border: 1px solid #E0E0E0;
    font-size: 10.5px;
    font-weight: 600;
    color: #666;
}
.la-origem i { font-size: 10px; }
/* Quem executou: Bigou (admin) x lojista — cores fora da paleta das ações */
.la-origem--admin { background: #32373B; border-color: #32373B; color: #ffffff; }
.la-origem--loja { background: #F1EAFB; border-color: #DCCBF5; color: #6432b4; }
.la-evento__email {
    margin-top: 1px;
    padding-left: 19px;
    font-size: 12px;
    color: #999;
    word-break: break-all;
}

/* ─── Rodapé ──────────────────────────────────────────────────────────────── */
.la-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 12px 24px 18px;
    border-top: 1px solid #EFEFEF;
}
.la-footer__total {
    margin-right: auto;
    font-size: 12px;
    color: #999;
}

/* ─── CTA "Histórico" reutilizado nas telas ───────────────────────────────── */
.la-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    font-weight: 600;
    color: #3060CA;
    cursor: pointer;
}
.la-cta:hover,
.la-cta:focus { color: #1f4aa8; text-decoration: none; }
