/*
 * Aperturas en vivo (centr.ar/aperturas/). La portada: Enviados a un lado, con los checks que pasan
 * a doble y verde uno por uno, y el panel «Seguimiento» del primero, que suma su historia al mismo
 * ritmo. Ciclo de 12 s: los correos se abren al 12, 26 y 40 %; el cursor llega al 56 %.
 */
.ap-live {
  --T: 12s;
  background:
    radial-gradient(420px 260px at 0 100%, rgb(22 128 76 / 0.06), transparent 70%),
    #fff;
}

/* Un correo de Enviados. */
.ap-sent {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background: #f2f6ee;
  font-size: 13px;
}
.ap-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 8px;
  color: var(--ink-2);
}
.ap-bar svg {
  width: 16px;
  height: 16px;
}
.ap-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 0.9fr) minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  white-space: nowrap;
}
.ap-row b {
  overflow: hidden;
  font-weight: 650;
  text-overflow: ellipsis;
}
.ap-row small {
  overflow: hidden;
  color: var(--ink-3);
  text-overflow: ellipsis;
}
.ap-rest {
  opacity: 0.7;
}
.ap-ck,
.ap-when {
  display: inline-grid;
}
.ap-ck > *,
.ap-when > * {
  grid-area: 1 / 1;
}
.ap-ck svg {
  width: 18px;
  height: 18px;
  color: #9aa69f;
}
.ap-ck .now {
  color: var(--ok);
}
.ap-when {
  justify-items: end;
  color: var(--ink-3);
  font-size: 12px;
  font-style: normal;
}
.ap-when i {
  font-style: normal;
}
.ap-when .now {
  color: var(--ok);
  font-weight: 650;
}
/* Lo que cambia parte del final: sin movimiento se ve abierto. */
.ap-ck .was,
.ap-when .was {
  opacity: 0;
}

/* La tarjeta que aparece al pasar por el doble check. */
.ap-tip {
  position: absolute;
  left: 28px;
  top: 128px;
  z-index: 1;
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  white-space: nowrap;
}
.ap-tip::before {
  content: '';
  position: absolute;
  left: 14px;
  top: -5px;
  width: 10px;
  height: 10px;
  rotate: 45deg;
  border-radius: 2px;
  background: inherit;
}
.ap-tip small {
  color: #c5d8cf;
  font-size: 12px;
}
.ap-cur {
  position: absolute;
  left: 34px;
  top: 98px;
  z-index: 2;
  width: 22px;
  height: 22px;
  opacity: 0;
}

/* El panel «Seguimiento». */
.ap-panel {
  display: flex;
  flex-direction: column;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
.ap-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ap-head img {
  border-radius: 50%;
}
.ap-head span {
  display: grid;
}
.ap-head b {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.ap-head small {
  color: var(--ink-3);
  font-size: 12.5px;
}
.ap-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 6px;
}
.ap-stats span {
  display: grid;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f2f6ee;
}
.ap-stats b {
  font-size: 19px;
  letter-spacing: -0.03em;
}
.ap-stats small {
  color: var(--ink-3);
  font-size: 12px;
}
.ap-day {
  margin: 12px 0 4px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ap-line,
.ap-mini {
  list-style: none;
  display: grid;
  margin: 0;
  padding: 0;
}
.ap-line li,
.ap-mini li {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
}
/* El hilo que une los renglones del historial. */
.ap-line li:not(:last-child)::after,
.ap-mini li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 13.5px;
  top: 34px;
  bottom: -8px;
  width: 1px;
  background: var(--line);
}
.ap-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e5f2e8;
  color: var(--ok);
}
.ap-dot svg {
  width: 15px;
  height: 15px;
}
.ap-line .e1 .ap-dot,
.ap-mini li:last-child .ap-dot {
  background: #eef1ee;
  color: var(--ink-3);
}
.ap-line .e3 .ap-dot {
  background: #e7eef8;
  color: #2f5f9e;
}
.ap-line li > span:not(.ap-dot),
.ap-mini li > span:not(.ap-dot) {
  display: grid;
  min-width: 0;
}
.ap-line small,
.ap-mini small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-line time,
.ap-mini time {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ap-insight {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: auto 0 0;
  padding: 11px 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12.5px;
}
.ap-insight svg {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--ok);
}

@media (prefers-reduced-motion: no-preference) {
  .ap-live .r1 :is(.ap-ck, .ap-when) .was {
    animation: ap-was-1 var(--T) infinite both;
  }
  .ap-live .r1 :is(.ap-ck, .ap-when) .now {
    animation: ap-now-1 var(--T) infinite both;
  }
  .ap-live .r2 :is(.ap-ck, .ap-when) .was {
    animation: ap-was-2 var(--T) infinite both;
  }
  .ap-live .r2 :is(.ap-ck, .ap-when) .now {
    animation: ap-now-2 var(--T) infinite both;
  }
  .ap-live .r3 :is(.ap-ck, .ap-when) .was {
    animation: ap-was-3 var(--T) infinite both;
  }
  .ap-live .r3 :is(.ap-ck, .ap-when) .now {
    animation: ap-now-3 var(--T) infinite both;
  }
  .ap-live .r1 {
    animation: ap-hit-1 var(--T) infinite both;
  }
  .ap-live .r2 {
    animation: ap-hit-2 var(--T) infinite both;
  }
  .ap-live .r3 {
    animation: ap-hit-3 var(--T) infinite both;
  }
  .ap-live .ap-cur {
    animation: ap-cur var(--T) infinite both;
  }
  .ap-live .ap-tip {
    animation: ap-tip var(--T) infinite both;
  }
  .ap-line .e1 {
    animation: ap-ev-1 var(--T) infinite both;
  }
  .ap-line .e2 {
    animation: ap-ev-2 var(--T) infinite both;
  }
  .ap-line .e3 {
    animation: ap-ev-3 var(--T) infinite both;
  }
  .ap-line .e4,
  .ap-day:first-of-type {
    animation: ap-ev-4 var(--T) infinite both;
  }
  .ap-stats b {
    animation: ap-tick var(--T) infinite both;
  }
}
@keyframes ap-was-1 {
  0%,
  11% {
    opacity: 1;
  }
  13%,
  96% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ap-now-1 {
  0%,
  11% {
    opacity: 0;
    scale: 0.6;
  }
  13% {
    opacity: 1;
    scale: 1.15;
  }
  16%,
  96% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-was-2 {
  0%,
  25% {
    opacity: 1;
  }
  27%,
  96% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ap-now-2 {
  0%,
  25% {
    opacity: 0;
    scale: 0.6;
  }
  27% {
    opacity: 1;
    scale: 1.15;
  }
  30%,
  96% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-was-3 {
  0%,
  39% {
    opacity: 1;
  }
  41%,
  96% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ap-now-3 {
  0%,
  39% {
    opacity: 0;
    scale: 0.6;
  }
  41% {
    opacity: 1;
    scale: 1.15;
  }
  44%,
  96% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
  }
}
/* La fila destella cuando se abre. */
@keyframes ap-hit-1 {
  0%,
  11%,
  22%,
  100% {
    border-color: var(--line);
  }
  13% {
    border-color: rgb(22 128 76 / 0.55);
  }
}
@keyframes ap-hit-2 {
  0%,
  25%,
  36%,
  100% {
    border-color: var(--line);
  }
  27% {
    border-color: rgb(22 128 76 / 0.55);
  }
}
@keyframes ap-hit-3 {
  0%,
  39%,
  50%,
  100% {
    border-color: var(--line);
  }
  41% {
    border-color: rgb(22 128 76 / 0.55);
  }
}
@keyframes ap-cur {
  0%,
  46% {
    opacity: 0;
    translate: 120px 70px;
  }
  49% {
    opacity: 1;
  }
  56%,
  84% {
    opacity: 1;
    translate: 0 0;
  }
  90%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}
@keyframes ap-tip {
  0%,
  57% {
    opacity: 0;
    translate: 0 6px;
  }
  60%,
  90% {
    opacity: 1;
    translate: 0 0;
  }
  94%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}
/* El historial suma cada renglón cuando pasa. */
@keyframes ap-ev-1 {
  0%,
  2% {
    opacity: 0;
    translate: 0 -6px;
  }
  5%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-ev-2 {
  0%,
  12% {
    opacity: 0;
    translate: 0 -6px;
  }
  15%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-ev-3 {
  0%,
  20% {
    opacity: 0;
    translate: 0 -6px;
  }
  23%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-ev-4 {
  0%,
  33% {
    opacity: 0;
    translate: 0 -6px;
  }
  36%,
  96% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
@keyframes ap-tick {
  0%,
  4% {
    opacity: 0.25;
  }
  15%,
  100% {
    opacity: 1;
  }
}

/* Paso 1: el ícono de Redactar se prende con el clic. */
.ap-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
}
.ap-compose small {
  color: var(--ink-3);
}
.ap-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-send {
  padding: 8px 16px;
  border-radius: 99px;
  background: #0b57d0;
  color: #fff;
  font-style: normal;
  font-weight: 600;
}
.ap-eye {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e5f2e8;
  color: var(--ok);
}
.ap-eye > * {
  grid-area: 1 / 1;
}
.ap-eye .was {
  opacity: 0;
  color: #9aa69f;
}
.rdr-fx .ap-eye svg {
  width: 16px;
  height: 16px;
}
.ap-say {
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
}
.ap-fx-on .rdr-cur {
  left: 118px;
  top: 104px;
}
.ap-fx-sent .ap-row,
.ap-fx-open .ap-row {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  min-height: 40px;
  padding: 0 10px;
  font-size: 12px;
}
.ap-fx-sent .ap-row small,
.ap-fx-open .ap-row small {
  display: none;
}
.ap-note {
  color: var(--ink-3);
  font-size: 11.5px;
  white-space: normal;
}
/* En el paso 2 el correo todavía no se abrió: el check queda gris. */
.ap-fx-sent .ap-ck .was,
.ap-fx-sent .ap-when .was {
  opacity: 1;
}
.ap-fx-sent .ap-ck .now,
.ap-fx-sent .ap-when .now {
  opacity: 0;
}
.ap-fx-sent .ap-when .now {
  color: var(--ink-3);
  font-weight: 400;
}
.ap-hover {
  display: grid;
  align-self: flex-start;
  gap: 1px;
  margin-left: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
}
.ap-hover small {
  color: #c5d8cf;
}

@media (prefers-reduced-motion: no-preference) {
  .ap-fx-on .ap-eye .was,
  .ap-fx-on .ap-eye {
    animation: ap-step-was var(--s) infinite both;
  }
  .ap-fx-on .ap-eye .now {
    animation: ap-step-now var(--s) infinite both;
  }
  .ap-fx-on .ap-eye {
    animation-name: ap-step-bg;
  }
  .ap-fx-on .ap-say,
  .ap-fx-open .ap-hover {
    animation: ap-step-pop var(--s) infinite both;
  }
  .ap-fx-sent .ap-when .was {
    animation: ap-step-out var(--s) infinite both;
  }
  .ap-fx-sent .ap-when .now {
    animation: ap-step-in var(--s) infinite both;
  }
  .ap-fx-open .ap-ck .was,
  .ap-fx-open .ap-when .was {
    animation: ap-step-was var(--s) infinite both;
  }
  .ap-fx-open .ap-ck .now,
  .ap-fx-open .ap-when .now {
    animation: ap-step-now var(--s) infinite both;
  }
}
@keyframes ap-step-was {
  0%,
  44% {
    opacity: 1;
  }
  48%,
  100% {
    opacity: 0;
  }
}
@keyframes ap-step-now {
  0%,
  44% {
    opacity: 0;
  }
  48%,
  100% {
    opacity: 1;
  }
}
@keyframes ap-step-bg {
  0%,
  44% {
    background: #eef1ee;
  }
  48%,
  100% {
    background: #e5f2e8;
  }
}
@keyframes ap-step-pop {
  0%,
  48% {
    opacity: 0;
    translate: 0 6px;
  }
  54%,
  92% {
    opacity: 1;
    translate: 0 0;
  }
  98%,
  100% {
    opacity: 0;
  }
}
/* «Enviado» pasa a «Envío confirmado» a mitad de la escena. */
@keyframes ap-step-out {
  0%,
  46% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
@keyframes ap-step-in {
  0%,
  46% {
    opacity: 0;
  }
  50%,
  100% {
    opacity: 1;
  }
}

/* Correos a varias personas: un check por destinatario y cuántos abrieron. */
.ap-group {
  display: grid;
  gap: 8px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  font-size: 13px;
}
.ap-gh {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.ap-gh > b {
  font-size: 15px;
  letter-spacing: -0.02em;
}
.ap-pill {
  padding: 5px 11px;
  border-radius: 99px;
  background: #e5f2e8;
  color: var(--ok);
  font-size: 12.5px;
  white-space: nowrap;
}
.ap-to {
  display: grid;
  grid-template-columns: 22px 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f6f8f3;
}
.ap-to > i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e7eef8;
  color: #2f5f9e;
  font-style: normal;
  font-weight: 700;
}
.ap-to > span:not(.ap-ck) {
  display: grid;
  min-width: 0;
}
.ap-to small {
  overflow: hidden;
  color: var(--ink-3);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ap-n {
  display: inline-grid;
}
.ap-n > * {
  grid-area: 1 / 1;
  font-style: normal;
}
.ap-n .was {
  opacity: 0;
}
.ap-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}
.ap-toast svg {
  flex: none;
  width: 16px;
  height: 16px;
}
@media (prefers-reduced-motion: no-preference) {
  .ap-group {
    --T: 9s;
  }
  .ap-group .g2 :is(.ap-ck, .ap-when) .was,
  .ap-n .was {
    animation: ap-was-g var(--T) infinite both;
  }
  .ap-group .g2 :is(.ap-ck, .ap-when) .now,
  .ap-n .now {
    animation: ap-now-g var(--T) infinite both;
  }
}
@keyframes ap-was-g {
  0%,
  55% {
    opacity: 1;
  }
  57%,
  96% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes ap-now-g {
  0%,
  55% {
    opacity: 0;
    scale: 0.6;
  }
  57% {
    opacity: 1;
    scale: 1.15;
  }
  60%,
  96% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
  }
}

/* El historial de cada correo: lo que se ve en cada columna. */
.ap-mini {
  margin-top: auto;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6f8f3;
}
.ap-tags {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  padding: 0;
}
.fp-col .ap-tags li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #f6f8f3;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
}
.fp-col .ap-tags svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--ok);
}

@media (max-width: 900px) {
  .ap-live {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .ap-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }
  .ap-row small {
    display: none;
  }
  .ap-stats b {
    font-size: 16px;
  }
}
