/*
 * Avisos en Gmail (centr.ar/avisos/). La portada: Gmail abierto y, abajo a la izquierda, los avisos
 * que llegan y se apilan. Ciclo de 12 s: el primero al 8 %, el segundo al 30 % y el tercero al 52 %;
 * todos se van al final para volver a empezar.
 */
.av-live {
  --T: 12s;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(12px, 2vw, 22px);
  background:
    radial-gradient(420px 260px at 0 100%, rgb(22 128 76 / 0.07), transparent 70%),
    #fff;
}

/* Gmail, en borrador: la barra, el menú y las filas apenas marcadas. */
.av-gmail {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f6f8fc;
  color: #202124;
  font-size: 13px;
}
.av-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}
.av-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 520px;
  padding: 10px 16px;
  border-radius: 99px;
  background: #e9eef6;
  color: #5f6368;
}
.av-search svg,
.av-side svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.av-me {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.av-body {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px;
  padding: 0 12px 12px 8px;
}
.av-side {
  display: grid;
  align-content: start;
  gap: 2px;
}
.av-side span {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 0 99px 99px 0;
  color: #444746;
}
.av-side .on {
  background: #d3e3fd;
  color: #041e49;
  font-weight: 650;
}
.av-side .av-new {
  width: max-content;
  margin-bottom: 8px;
  padding: 14px 20px;
  border-radius: 16px;
  background: #c2e7ff;
  color: #001d35;
  font-weight: 600;
}
.av-list {
  display: grid;
  align-content: start;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.av-line {
  display: grid;
  grid-template-columns: 14px minmax(0, 0.32fr) minmax(0, 1fr) 40px;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f3f4;
}
.av-line i,
.av-line b,
.av-line em {
  height: 8px;
  border-radius: 99px;
  background: #e3e7e3;
}
.av-line i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: none;
  outline: 1.5px solid #d4d9d4;
  outline-offset: -2px;
}
.av-line b {
  background: #cfd6d0;
}
.av-line.w1 em {
  width: 78%;
}
.av-line.w2 em {
  width: 62%;
}
.av-line.w3 em {
  width: 88%;
}
.av-line.w4 em {
  width: 54%;
}

/* El aviso: oscuro, con el logo y la marca de lo que pasó, como el de la extensión. */
.av-stack {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 36px));
}
.av-toast {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
}
.av-pic {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
}
.av-pic img {
  border-radius: 50%;
}
.av-pic > i {
  position: absolute;
  right: -4px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #2fb76f;
  color: #fff;
}
.av-pic > i svg {
  width: 11px;
  height: 11px;
}
.av-grp {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e7eef8;
  color: #2f5f9e;
}
.av-grp svg {
  width: 18px;
  height: 18px;
}
.av-txt {
  display: grid;
  min-width: 0;
}
.av-txt > * {
  overflow: hidden;
  text-overflow: ellipsis;
}
.av-txt > span {
  color: #e4ece8;
}
.av-txt small {
  display: flex;
  gap: 10px;
  color: #9cc4b2;
  font-size: 12px;
}
.av-txt u {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.fp-col .av-toast {
  margin-top: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .av-live .t1 {
    animation: av-in-1 var(--T) infinite both;
  }
  .av-live .t2 {
    animation: av-in-2 var(--T) infinite both;
  }
  .av-live .t3 {
    animation: av-in-3 var(--T) infinite both;
  }
  .av-live .t1 .av-pic > i {
    animation: av-badge-1 var(--T) infinite both;
  }
  .av-live .t2 .av-pic > i {
    animation: av-badge-2 var(--T) infinite both;
  }
  .av-live .t3 .av-pic > i {
    animation: av-badge-3 var(--T) infinite both;
  }
}
/* Entra desde abajo a la izquierda y empuja hacia arriba a los anteriores. */
@keyframes av-in-1 {
  0%,
  6% {
    opacity: 0;
    translate: -24px 12px;
    scale: 0.96;
  }
  10%,
  92% {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
  97%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}
@keyframes av-in-2 {
  0%,
  28% {
    opacity: 0;
    translate: -24px 12px;
    scale: 0.96;
  }
  32%,
  92% {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
  97%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}
@keyframes av-in-3 {
  0%,
  50% {
    opacity: 0;
    translate: -24px 12px;
    scale: 0.96;
  }
  54%,
  92% {
    opacity: 1;
    translate: 0 0;
    scale: 1;
  }
  97%,
  100% {
    opacity: 0;
    translate: 0 0;
  }
}
/* La marca late cuando llega su aviso. */
@keyframes av-badge-1 {
  0%,
  10% {
    scale: 0.4;
  }
  13% {
    scale: 1.25;
  }
  16%,
  100% {
    scale: 1;
  }
}
@keyframes av-badge-2 {
  0%,
  32% {
    scale: 0.4;
  }
  35% {
    scale: 1.25;
  }
  38%,
  100% {
    scale: 1;
  }
}
@keyframes av-badge-3 {
  0%,
  54% {
    scale: 0.4;
  }
  57% {
    scale: 1.25;
  }
  60%,
  100% {
    scale: 1;
  }
}

/* Paso 1: el interruptor está prendido y el clic elige un sonido. */
.av-sw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
  white-space: normal;
}
.av-sw > span {
  display: grid;
  min-width: 0;
}
.av-sw small {
  color: var(--ink-3);
}
.av-sw > i {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 99px;
  background: var(--ok);
}
.av-sw > i::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}
.av-pick {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
}
.av-pick small {
  color: var(--ink-3);
}
.av-pick > b {
  display: inline-grid;
  justify-items: end;
  padding: 4px 10px;
  border-radius: 99px;
  background: #e5f2e8;
  color: var(--ok);
}
.av-pick > b > i {
  grid-area: 1 / 1;
  font-style: normal;
}
.av-pick .was {
  opacity: 0;
}
.av-fx-set .rdr-cur {
  left: auto;
  right: 34px;
  top: 112px;
}

/* Paso 2: la bandeja y el aviso que aparece abajo a la izquierda. */
.av-fx-pop {
  justify-content: flex-end;
  padding-bottom: 14px;
}
.av-rows {
  position: absolute;
  inset: 14px 16px auto;
  display: grid;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}
.av-rows .av-line {
  height: 30px;
  gap: 10px;
  padding: 0 10px;
}
.rdr-fx .av-toast {
  position: relative;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  width: min(250px, 100%);
  padding: 9px 11px;
  font-size: 11.5px;
}
.rdr-fx .av-pic {
  width: 30px;
  height: 30px;
}
.rdr-fx .av-pic > i {
  width: 15px;
  height: 15px;
}
.rdr-fx .av-pic > i svg {
  width: 9px;
  height: 9px;
}
.rdr-fx .av-txt small {
  font-size: 10.5px;
}

/* Paso 3: el clic en el aviso abre el historial de ese correo. */
.av-fx-open {
  align-items: flex-start;
}
.av-hist {
  display: grid;
  gap: 6px;
  width: min(250px, 100%);
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
}
.av-hist > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.av-hist svg {
  color: var(--ok);
}
.av-hist em {
  margin-left: auto;
  color: var(--ink-3);
  font-style: normal;
}
.av-fx-open .rdr-cur {
  left: 150px;
  top: 30px;
}

@media (prefers-reduced-motion: no-preference) {
  .av-fx-set .av-pick .was {
    animation: av-step-was var(--s) infinite both;
  }
  .av-fx-set .av-pick .now {
    animation: av-step-now var(--s) infinite both;
  }
  .av-fx-pop .av-toast {
    animation: av-step-toast var(--s) infinite both;
  }
  .av-fx-open .av-toast {
    animation: av-step-gone var(--s) infinite both;
  }
  .av-fx-open .av-hist {
    animation: av-step-hist var(--s) infinite both;
  }
}
@keyframes av-step-was {
  0%,
  44% {
    opacity: 1;
  }
  48%,
  100% {
    opacity: 0;
  }
}
@keyframes av-step-now {
  0%,
  44% {
    opacity: 0;
  }
  48%,
  100% {
    opacity: 1;
  }
}
@keyframes av-step-toast {
  0%,
  40% {
    opacity: 0;
    translate: -20px 10px;
  }
  46%,
  92% {
    opacity: 1;
    translate: 0 0;
  }
  98%,
  100% {
    opacity: 0;
  }
}
/* El aviso se cierra con el clic y en su lugar queda el historial. */
@keyframes av-step-gone {
  0%,
  46% {
    opacity: 1;
    translate: 0 0;
  }
  52%,
  100% {
    opacity: 0;
    translate: 0 -8px;
  }
}
@keyframes av-step-hist {
  0%,
  48% {
    opacity: 0;
    translate: 0 10px;
  }
  56%,
  94% {
    opacity: 1;
    translate: 0 0;
  }
  100% {
    opacity: 0;
  }
}
/* En el estado final (sin movimiento) el aviso ya se cerró: queda sólo el historial arriba. */
.av-fx-open .av-toast {
  position: absolute;
  left: 16px;
  bottom: 16px;
  opacity: 0;
}
.av-fx-open .av-hist {
  margin-top: 4px;
}

/* Cada aviso: los ajustes del panel con sus seis sonidos. */
.av-panel {
  display: grid;
  gap: 10px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  font-size: 13.5px;
}
.av-panel .av-sw {
  padding: 14px 16px;
  background: #f6f8f3;
}
.av-legend {
  margin: 8px 0 0;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.av-sounds {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
}
.av-sounds li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.av-sounds li.on {
  border-color: rgb(22 128 76 / 0.5);
  background: #f0f7f1;
}
.av-radio {
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #9aa69f;
  border-radius: 50%;
}
.av-sounds .on .av-radio {
  border: 5px solid var(--ok);
}
.av-play {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  color: var(--ink-3);
  font-size: 12px;
}
.av-play svg {
  width: 14px;
  height: 14px;
}
.av-sounds .on .av-play {
  color: var(--ok);
  font-weight: 600;
}
/* La onda del tono elegido. */
.av-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
}
.av-wave i {
  width: 5px;
  height: 18px;
  border-radius: 99px;
  background: #9cc4b2;
}
.av-wave i:nth-child(2n) {
  height: 28px;
}
.av-wave i:nth-child(3n) {
  height: 12px;
}
@media (prefers-reduced-motion: no-preference) {
  .av-wave i {
    animation: av-wave 1.6s ease-in-out infinite both;
  }
  .av-wave i:nth-child(2) {
    animation-delay: 0.1s;
  }
  .av-wave i:nth-child(3) {
    animation-delay: 0.2s;
  }
  .av-wave i:nth-child(4) {
    animation-delay: 0.3s;
  }
  .av-wave i:nth-child(5) {
    animation-delay: 0.4s;
  }
  .av-wave i:nth-child(6) {
    animation-delay: 0.5s;
  }
  .av-wave i:nth-child(7) {
    animation-delay: 0.6s;
  }
}
@keyframes av-wave {
  0%,
  100% {
    scale: 1 0.5;
  }
  50% {
    scale: 1 1;
  }
}

/* Lo que te avisa: las alertas de Pro, en una fila propia que lleva a su página. */
.av-alerts {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: min(860px, 100%);
  margin: 16px auto 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: border-color 0.16s;
}
.av-alerts:hover {
  border-color: #b7cbbb;
}
.av-bell {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fdebe1;
  color: var(--coral);
}
.av-bell svg {
  width: 22px;
  height: 22px;
}
.av-alerts > span:nth-child(2) {
  display: grid;
  gap: 2px;
}
.av-alerts small {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.av-alerts em {
  color: #205d42;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.av-alerts em::after {
  content: ' →';
}

@media (max-width: 760px) {
  .av-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .av-side {
    display: none;
  }
  .av-gmail {
    min-height: 380px;
  }
  .av-search {
    font-size: 12px;
  }
  .av-alerts {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .av-alerts em {
    grid-column: 2;
  }
}
@media (max-width: 480px) {
  .av-sounds {
    grid-template-columns: minmax(0, 1fr);
  }
}
