/* Garantia: os três passos à esquerda; à direita a história do reembolso, em ciclo de 9 s. */
.guarantee {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: 2rem clamp(2rem, 5vw, 4.5rem);
}

.guarantee__copy {
  display: grid;
  gap: 1rem;
}

.guarantee__copy > p {
  max-width: 30rem;
  color: var(--nevoa);
  font-size: var(--text-lg);
  line-height: 1.5;
}

.refund-steps {
  display: grid;
  gap: 0.6rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.refund-steps li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--r-control);
  background: var(--ferro);
  box-shadow: var(--depth-card);
  transition: box-shadow 0.3s;
}

.refund-steps b {
  display: grid;
  place-items: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--aco);
  font-weight: 750;
}

.refund-steps span {
  display: grid;
  color: var(--nevoa);
  font-size: var(--text-sm);
  line-height: 1.35;
}

.refund-steps strong {
  color: var(--giz);
  font-size: var(--text-base);
  font-weight: 650;
}

/* ── A telinha ── */
.refund {
  position: relative;
  display: grid;
  gap: 1.5rem;
  min-height: 22rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  overflow: hidden;
  border-radius: var(--r-feature);
  background:
    radial-gradient(80% 70% at 50% 120%, rgb(34 197 94 / 0.16), transparent 65%),
    radial-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1.5px) 0 0 / 16px 16px,
    #0d0e10;
  box-shadow: var(--depth-card), var(--sombra-longa);
  color: #ececee;
}

.refund__label {
  display: grid;
  grid-template-columns: 7fr 1fr;
  margin-bottom: 0.6rem;
  color: #ffc56b;
  font-size: var(--text-xs);
  font-weight: 650;
}

.refund__label span:first-child {
  padding-bottom: 0.45rem;
  border-bottom: 2px solid #ffc56b;
}

.refund__label span:last-child {
  color: #8b8e96;
  text-align: right;
  white-space: nowrap;
}

.refund__days {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--total), minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  padding: 1.6rem 0 0;
  list-style: none;
}

.refund__days li {
  display: flex;
  align-items: flex-end;
  height: 3.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 10px;
  background: rgb(255 197 107 / 0.12);
  box-shadow: inset 0 0 0 1px rgb(255 197 107 / 0.18);
  font-weight: 750;
  font-stretch: 120%;
}

.refund__days li.is-out {
  background: none;
  box-shadow: none;
  outline: 1.5px dashed #3a3d44;
  outline-offset: -1.5px;
  color: #8b8e96;
}

/* O marcador "Hoje" anda do dia 1 ao 3 */
.refund__marker {
  position: absolute;
  top: 0;
  left: calc(100% / var(--total) * 2.5);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  background: #ff5b1f;
  color: #000;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 750;
  transform: translateX(-50%);
}

.refund__marker::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 0.5rem;
  margin-left: -1px;
  background: #ff5b1f;
}

.refund__chat {
  display: grid;
  gap: 0.5rem;
}

.refund__msg {
  max-width: 78%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: 1.35;
}

.refund__msg--out {
  justify-self: end;
  border-bottom-right-radius: 4px;
  background: #1d7a57;
}

.refund__msg--in {
  justify-self: start;
  border-bottom-left-radius: 4px;
  background: #24262b;
}

.refund__notif {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: rgb(248 248 250 / 0.94);
  color: #121316;
  box-shadow: 0 1rem 2rem -0.8rem rgb(0 0 0 / 0.6);
}

.refund__notif > span:last-child {
  display: grid;
  font-size: var(--text-sm);
  line-height: 1.3;
}

.refund__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  background: #22c55e;
  color: #fff;
}

.refund__icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Movimento: 9 s; o passo da esquerda acende junto com a cena da direita ── */
.motion .guarantee.is-in :is(.refund__marker, .refund__msg, .refund__notif, .refund-steps li, .refund-steps b, .refund__days li:not(.is-out)) {
  animation-duration: 9s;
  animation-iteration-count: infinite;
  animation-timing-function: var(--ease-out);
}

.motion .guarantee.is-in .refund__marker { animation-name: rf-walk; }

@keyframes rf-walk {
  0% { left: calc(100% / var(--total) * 0.5); opacity: 0; }
  5% { opacity: 1; }
  25%, 92% { left: calc(100% / var(--total) * 2.5); opacity: 1; }
  100% { left: calc(100% / var(--total) * 2.5); opacity: 0; }
}

/* Os dias que já passaram ficam acesos */
.motion .guarantee.is-in .refund__days li:not(.is-out) {
  animation-name: rf-day;
  animation-delay: calc(var(--d) * 1s - 0.6s);
}

.motion .guarantee.is-in .refund__days li:nth-child(n + 4):not(.is-out) {
  animation: none;
}

@keyframes rf-day {
  0%, 2% { background: rgb(255 197 107 / 0.12); }
  6%, 92% { background: rgb(255 197 107 / 0.32); }
  100% { background: rgb(255 197 107 / 0.12); }
}

.motion .guarantee.is-in .refund__msg--out { animation-name: rf-in-30; }
.motion .guarantee.is-in .refund__msg--in { animation-name: rf-in-45; }
.motion .guarantee.is-in .refund__notif { animation-name: rf-in-60; }

@keyframes rf-in-30 { 0%, 28% { opacity: 0; transform: translateY(10px); } 33%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes rf-in-45 { 0%, 43% { opacity: 0; transform: translateY(10px); } 48%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes rf-in-60 { 0%, 58% { opacity: 0; transform: translateY(14px) scale(0.97); } 64%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Passos da esquerda: 1 no pedido, 2 na resposta, 3 no Pix */
.motion .guarantee.is-in .refund-steps li:nth-child(1) { animation-name: rf-step-1; }
.motion .guarantee.is-in .refund-steps li:nth-child(2) { animation-name: rf-step-2; }
.motion .guarantee.is-in .refund-steps li:nth-child(3) { animation-name: rf-step-3; }
.motion .guarantee.is-in .refund-steps li:nth-child(1) b { animation-name: rf-num-1; }
.motion .guarantee.is-in .refund-steps li:nth-child(2) b { animation-name: rf-num-2; }
.motion .guarantee.is-in .refund-steps li:nth-child(3) b { animation-name: rf-num-3; }

@keyframes rf-step-1 { 0%, 28% { box-shadow: var(--depth-card); } 33%, 92% { box-shadow: var(--depth-card), inset 0 0 0 1.5px var(--brasa); } 100% { box-shadow: var(--depth-card); } }
@keyframes rf-step-2 { 0%, 43% { box-shadow: var(--depth-card); } 48%, 92% { box-shadow: var(--depth-card), inset 0 0 0 1.5px var(--brasa); } 100% { box-shadow: var(--depth-card); } }
@keyframes rf-step-3 { 0%, 58% { box-shadow: var(--depth-card); } 64%, 92% { box-shadow: var(--depth-card), inset 0 0 0 1.5px #22c55e; } 100% { box-shadow: var(--depth-card); } }
@keyframes rf-num-1 { 0%, 28% { background: var(--aco); color: var(--giz); } 33%, 92% { background: var(--brasa); color: #000; } 100% { background: var(--aco); } }
@keyframes rf-num-2 { 0%, 43% { background: var(--aco); color: var(--giz); } 48%, 92% { background: var(--brasa); color: #000; } 100% { background: var(--aco); } }
@keyframes rf-num-3 { 0%, 58% { background: var(--aco); color: var(--giz); } 64%, 92% { background: #22c55e; color: #000; } 100% { background: var(--aco); } }

@media (max-width: 960px) {
  .guarantee {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .refund__days li {
    height: 2.8rem;
    padding: 0.3rem;
    font-size: 0.85rem;
  }
}
