/* ============================================================
   Integración con Mercado Libre
   ============================================================ */

.mlint {
  position: relative;
}

.mlint::before {
  content: "";
  position: absolute;
  inset: clamp(24px, 4vw, 48px) 0;
  max-width: 1240px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(139, 92, 246, 0.22);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(ellipse at 90% 100%, rgba(34, 211, 238, 0.1), transparent 55%),
    rgba(255, 255, 255, 0.015);
  pointer-events: none;
}

.mlint-wrapper {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(32px, 5vw, 60px);
  padding: clamp(16px, 3vw, 40px) 0;
}

.mlint-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.mlint-content .section-title {
  max-width: 15ch;
}

.mlint-text {
  font-size: 15.5px;
  color: var(--text-secondary);
  max-width: 58ch;
}

.mlint-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  margin: 6px 0;
}

.mlint-points li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 34px;
}

.mlint-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: var(--primary-light);
}

.mlint-points li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  width: 8px;
  height: 5px;
  border-left: 2px solid var(--primary-soft);
  border-bottom: 2px solid var(--primary-soft);
  transform: rotate(-45deg);
}

.mlint-points strong {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-tertiary);
}

.mlint-points span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* --- Visual: feed de webhooks --- */

.mlint-visual {
  position: relative;
}

.mlint-feed {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, #16132a, #0b0915 75%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mlint-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
}

.mlint-feed__meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.mlint-feed__list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.mlint-feed__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 13.5px;
  animation: feedIn 0.6s var(--ease) backwards;
}

.mlint-feed__list li:nth-child(1) { animation-delay: 0.1s; }
.mlint-feed__list li:nth-child(2) { animation-delay: 0.3s; }
.mlint-feed__list li:nth-child(3) { animation-delay: 0.5s; }
.mlint-feed__list li:nth-child(4) { animation-delay: 0.7s; }

@keyframes feedIn {
  from { opacity: 0; transform: translateX(-14px); }
  to { opacity: 1; transform: none; }
}

.feed-time {
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--text-muted);
  flex: none;
}

.feed-body {
  color: var(--text-secondary);
}

.feed-body b {
  font-family: var(--font-display);
  color: var(--text-primary);
}

.feed-body i {
  font-style: normal;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
}

.feed-body i.ok {
  color: #86efac;
  background: rgba(74, 222, 128, 0.13);
}

.feed-body i.warn {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.13);
}

.feed-body i.new {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
}

.mlint-feed__foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.latency {
  font-size: 12.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.latency b {
  color: var(--secondary);
  font-family: var(--font-display);
}

.latency-bar {
  flex: 1;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.latency-bar i {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: inherit;
  background: var(--gradient-brand);
  animation: latencySlide 2.6s var(--ease) infinite;
}

@keyframes latencySlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(250%); }
}

/* --- Robot --- */
.robotito {
  position: absolute;
  right: -18px;
  bottom: -66px;
  width: 150px;
  height: 150px;
  background-image: url(../css/gifs/RobotAnimado.gif);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.7));
  pointer-events: none;
}

@media (max-width: 980px) {
  .mlint-wrapper {
    grid-template-columns: 1fr;
  }

  .mlint::before {
    inset: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .robotito {
    width: 110px;
    height: 110px;
    right: -6px;
    bottom: -48px;
  }
}

@media (max-width: 560px) {
  .mlint-feed__list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .robotito {
    display: none;
  }
}
