/* A tela da Hotmart: o histórico de eventos e o detalhe num diálogo à direita. Cada cor e cada tamanho de fonte vêm de tokens.css. */
.hotmart-tabs { padding: var(--space-m); }
.hotmart-events__none { color: var(--ink-muted); }
.status.hotmart-outcome--quiet { border-color: var(--pending); color: var(--ink-muted); }
.admin .admin-table.hotmart-events tbody th { white-space: nowrap; }
.hotmart-events tbody :is(th, td) { vertical-align: middle; overflow-wrap: anywhere; }
/* Com a barra lateral, as cinco colunas só guardam cada palavra inteira de 1200px para cima. Abaixo disso, cada linha vira um bloco. */
@media (min-width: 1200px) {
  .hotmart-events { table-layout: fixed; }
  .hotmart-events thead th:first-child { width: 13rem; }
  .hotmart-events thead th:last-child { width: 14rem; }
}
@media (max-width: 1199px) {
  .admin .admin-table.hotmart-events, .hotmart-events tbody, .hotmart-events tr, .admin .admin-table.hotmart-events tbody th, .hotmart-events td { display: block; width: auto; }
  .hotmart-events thead { display: none; }
  .hotmart-events tr { padding: var(--space-s) var(--space-m); border-bottom: 1px solid var(--rail-tie); }
  .hotmart-events th, .hotmart-events td { padding: .25rem 0; border: 0; }
}

/* MD71: o detalhe é um dialog nativo, encostado à direita, como na pasta. O corpo rola, e a cabeça e o pé ficam. */
.hotmart-dialog { border: var(--border-thin) solid var(--ink); background: var(--surface); color: var(--ink); overflow: hidden; }
dialog.hotmart-dialog { margin: 0 0 0 auto; padding: 0; width: min(34rem, 100%); height: 100dvh; max-height: none; border-width: 0 0 0 var(--border-thin); }
.hotmart-dialog::backdrop { background: color-mix(in srgb, var(--ink) 65%, transparent); }
.hotmart-dialog > turbo-frame { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
.hotmart-dialog__head { display: flex; align-items: start; justify-content: space-between; gap: var(--space-s); padding: var(--space-m) var(--space-l); border-bottom: 1px solid var(--rail-tie); }
.hotmart-dialog__head .block-title { margin: 0; overflow-wrap: anywhere; }
.hotmart-dialog__body { display: grid; grid-auto-rows: max-content; gap: var(--space-m); padding: var(--space-l); overflow-y: auto; overscroll-behavior: contain; }
.hotmart-dialog__body:focus-visible { outline-offset: -3px; }
/* Os botões do rodapé ganham o espaço do rodapé da pasta, e quebram a linha numa tela estreita. */
.hotmart-dialog__foot { display: flex; flex-wrap: wrap; justify-content: end; gap: var(--space-s); padding: var(--space-m) var(--space-l); border-top: 1px solid var(--rail-tie); }
@media (max-width: 640px) {
  .hotmart-dialog__head, .hotmart-dialog__body, .hotmart-dialog__foot { padding-inline: var(--space-m); }
}

/* O envelope quebra a linha, para o diálogo nunca rolar de lado. O ERB escapa cada valor. */
.hotmart-envelope { border-radius: var(--radius-btn); box-shadow: none; }
.hotmart-envelope .terminal__bar { align-items: center; padding: var(--space-s) var(--space-m); }
.hotmart-envelope__name { margin-left: var(--space-xs); color: var(--terminal-comment); font-family: var(--font-mono); font-size: var(--fs-code-small); font-weight: var(--fw-body); }
.hotmart-envelope .terminal__body { margin: 0; padding: var(--space-m); font-size: var(--fs-code-small); line-height: var(--lh-caption); white-space: pre-wrap; overflow-wrap: anywhere; }

/* A página do evento, sem JavaScript. */
.hotmart-event { display: grid; gap: var(--space-m); }
.hotmart-event__back { justify-self: start; margin-top: var(--space-m); }

/* A lista da Hotmart: a última leitura, na ordem da Hotmart. Criar um módulo aqui não publica nada. */
.hotmart-modules { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rail-tie); }
.hotmart-module { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-s) var(--space-m); padding: var(--space-m) var(--space-l); }
.hotmart-module + .hotmart-module { border-top: 1px solid var(--rail-tie); }
.hotmart-module__number { color: var(--ink-muted); font-family: var(--font-mono); font-size: var(--fs-caption); }
.hotmart-module__main { min-width: 0; overflow-wrap: anywhere; }
.hotmart-module__main strong { display: block; font-weight: var(--fw-ui); }
.hotmart-module__main small { display: block; color: var(--ink-muted); font-size: var(--fs-caption); }
.hotmart-module__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: var(--space-xs) var(--space-s); }
@media (max-width: 640px) {
  .hotmart-module { grid-template-columns: 1.5rem minmax(0, 1fr); padding-inline: var(--space-m); }
  .hotmart-module__end { grid-column: 2; justify-content: start; }
}

/* MD68: o pulso. Cada linha diz o estado em texto, e a marca só repete o texto. */
.hotmart-pulse { margin: 0; border-top: 1px solid var(--rail-tie); }
.hotmart-pulse > div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--space-xs) var(--space-m); padding: var(--space-s) var(--space-l); }
.hotmart-pulse > div + div { border-top: 1px solid var(--rail-tie); }
.hotmart-pulse dt { color: var(--ink-muted); font-size: var(--fs-caption); font-weight: var(--fw-ui); }
.hotmart-pulse dd { display: flex; align-items: baseline; gap: var(--space-s); min-width: 0; margin: 0; overflow-wrap: anywhere; }
.hotmart-pulse__mark { flex: none; width: .5rem; height: .5rem; border-radius: 50%; background: var(--rails); transform: translateY(-1px); }
.hotmart-pulse__mark--ok { background: var(--success); }
@media (max-width: 640px) { .hotmart-pulse > div { grid-template-columns: minmax(0, 1fr); padding-inline: var(--space-m); } }

/* MD69: a fila. Um item por e-mail, por módulo e por falha, cada um com a saída dele. */
.hotmart-queue { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rail-tie); }
.hotmart-queue__empty { display: flex; align-items: center; gap: var(--space-s); margin: 0; padding: var(--space-m) var(--space-l); border-top: 1px solid var(--rail-tie); color: var(--ink-muted); }
.hotmart-queue__empty .icon { flex: none; color: var(--success); }
.hotmart-item { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: var(--space-s) var(--space-l); padding: var(--space-m) var(--space-l); }
.hotmart-item + .hotmart-item { border-top: 1px solid var(--rail-tie); }
.hotmart-item__main { flex: 1 1 22rem; min-width: 0; overflow-wrap: anywhere; }
.hotmart-item__main strong { display: block; font-weight: var(--fw-ui); }
.hotmart-item__main code, .hotmart-link code, .hotmart-links code { font-family: var(--font-mono); font-size: var(--fs-code-small); overflow-wrap: anywhere; }
.hotmart-item__main p { max-width: var(--reading-measure); margin: var(--space-xs) 0 0; color: var(--ink-muted); font-size: var(--fs-caption); line-height: var(--lh-caption); }
.hotmart-item__actions { display: flex; flex-wrap: wrap; align-items: start; justify-content: end; gap: var(--space-xs) var(--space-s); }
@media (max-width: 640px) {
  .hotmart-item, .hotmart-queue__empty { padding-inline: var(--space-m); }
  .hotmart-item__actions { justify-content: start; }
}

/* MD100 e MD104: um motivo antes de dispensar ou desfazer. O formulário abre no lugar, sem JavaScript. */
.hotmart-dismissal { display: grid; gap: var(--space-s); justify-items: end; }
.hotmart-dismissal > summary { list-style: none; }
.hotmart-dismissal > summary::-webkit-details-marker { display: none; }
.hotmart-dismissal[open] { flex-basis: 100%; justify-items: start; }
.hotmart-dismissal[open] > summary { background: var(--surface-muted); }
.hotmart-dismissal__form { display: grid; gap: var(--space-s); justify-items: start; width: 100%; }
.hotmart-dismissal__form .field { width: 100%; }
.hotmart-item__actions:has(.hotmart-dismissal[open]) { flex-basis: 100%; justify-content: start; }

/* MD35: um evento pendente roda de novo pelo detalhe. */
.hotmart-event__run { display: grid; justify-items: start; gap: var(--space-s); padding: var(--space-m); border: 1px solid var(--rail-tie); border-radius: var(--radius-btn); }
.hotmart-event__run p { margin: 0; color: var(--ink-muted); font-size: var(--fs-caption); }

/* MD70: o vínculo de um e-mail. O efeito vem antes do botão, e a busca fica no diálogo. */
.hotmart-link { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-m); }
.hotmart-link__fact { margin: 0; overflow-wrap: anywhere; }
.hotmart-link__step { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-s); justify-items: start; }
.hotmart-link__step .field { width: 100%; }
.hotmart-link__search { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.hotmart-link__search .field__input { flex: 1 1 12rem; min-width: 0; }
.hotmart-link__picks { min-width: 0; margin: 0; padding: 0; border: 0; }
.hotmart-link__none { margin: 0; color: var(--ink-muted); }
.hotmart-link__effect { display: flex; align-items: start; gap: var(--space-s); margin: 0; padding: var(--space-s) var(--space-m); border: 1px solid var(--rail-tie); border-radius: var(--radius-btn); background: var(--surface-muted); }
.hotmart-link__effect .icon { flex: none; margin-top: .125rem; }
.hotmart-picks { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.hotmart-pick { display: flex; align-items: center; gap: var(--space-s); min-height: var(--target-size); padding: var(--space-xs) var(--space-s); border-radius: var(--radius-btn); cursor: pointer; }
.hotmart-pick:hover { background: var(--surface-muted); }
.hotmart-pick input { flex: none; width: 1.125rem; height: 1.125rem; accent-color: var(--ink); }
.hotmart-pick strong { display: block; font-weight: var(--fw-ui); overflow-wrap: anywhere; }
.hotmart-pick small { display: block; color: var(--ink-muted); font-size: var(--fs-caption); overflow-wrap: anywhere; }

/* MD83: os módulos na ficha, com a data e a origem de cada conclusão. MD70: os e-mails vinculados ficam embaixo. */
.hotmart-ledger { display: grid; margin: 0; padding: 0; list-style: none; }
.hotmart-ledger > li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-s) var(--space-m); padding: var(--space-s) 0; }
.hotmart-ledger > li + li { border-top: 1px solid var(--rail-tie); }
.hotmart-ledger__number { color: var(--ink-muted); font-family: var(--font-mono); font-size: var(--fs-caption); }
.hotmart-ledger__main { min-width: 0; overflow-wrap: anywhere; }
.hotmart-ledger__main strong { display: block; font-weight: var(--fw-ui); }
.hotmart-ledger__main small { display: block; color: var(--ink-muted); font-size: var(--fs-caption); line-height: var(--lh-caption); }
.hotmart-ledger__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: var(--space-xs) var(--space-s); }
.hotmart-ledger > li:has(.hotmart-dismissal[open]) .hotmart-ledger__end { grid-column: 2 / -1; justify-content: start; }
.hotmart-ledger__empty { margin: 0; color: var(--ink-muted); }
.hotmart-ledger__caption { color: var(--ink-muted); font-size: var(--fs-caption); line-height: var(--lh-caption); }
.hotmart-links { display: grid; gap: var(--space-xs); margin: var(--space-m) 0 0; padding: var(--space-m) 0 0; list-style: none; border-top: 1px solid var(--rail-tie); }
.hotmart-links > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-s); overflow-wrap: anywhere; }
.hotmart-links__ask { color: var(--ink-muted); font-size: var(--fs-caption); }
@media (max-width: 640px) {
  .hotmart-ledger > li { grid-template-columns: 1.5rem minmax(0, 1fr); }
  .hotmart-ledger__end { grid-column: 2; justify-content: start; }
}
