/* ==========================================================================
   Skora Súper — Upsell Full-Screen Modal
   3-Step Conversion Flow: Tabla → Timeline → Planes
   ========================================================================== */

/* ── Overlay ── */
.upsell-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 5, 30, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.upsell-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal Container ── */
.upsell-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(255, 111, 0, 0.2), rgba(213, 0, 249, 0.15) 40%, transparent 70%),
              radial-gradient(circle at bottom left, rgba(0, 229, 255, 0.15), rgba(108, 43, 255, 0.1) 40%, transparent 70%),
              linear-gradient(145deg, #0a1128 0%, #15083a 50%, #0a1128 100%);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.upsell-overlay.open .upsell-modal {
  opacity: 1;
  transform: scale(1);
}

/* ── Close Button ── */
.upsell-close {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: none; /* JS will toggle to flex */
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
}

.upsell-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ── Fixed Logo ── */
.upsell-fixed-logo {
  position: fixed;
  top: 24px;
  right: 24px;
  height: 36px;
  z-index: 9999;
}

/* ── Super Badge (gradient text) ── */
.upsell-super-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.upsell-super-badge span {
  background: linear-gradient(135deg, #FF6F00, #D500F9, #00E5FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Step Container ── */
.upsell-steps {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.upsell-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 32px;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(100%);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.upsell-step.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

.upsell-step.exit-left {
  opacity: 0;
  transform: translateX(-100%);
}

.upsell-step-content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.upsell-step-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

/* ── Step Dots ── */
.upsell-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0 0;
}

.upsell-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.upsell-dot.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(135deg, #FF6F00, #D500F9);
}

/* ── Headings ── */
.upsell-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  margin-bottom: 24px;
}

.upsell-title em {
  font-style: normal;
  background: linear-gradient(135deg, #FF6F00, #D500F9, #00E5FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Comparison Table ── */
.upsell-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  margin-bottom: 20px;
}

.upsell-table thead th {
  padding: 14px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.upsell-table thead th:first-child {
  text-align: left;
  color: rgba(255, 255, 255, 0.4);
  width: 50%;
}

.upsell-table thead th:nth-child(2) {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.upsell-table thead th:nth-child(3) {
  text-align: center;
}

.upsell-table-super-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FF6F00, #D500F9, #00E5FF);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.upsell-table-super-badge span {
  color: inherit;
}

.upsell-table tbody td {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  height: 56px;
}

.upsell-table tbody td:first-child {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.upsell-table tbody td:nth-child(2) {
  text-align: center;
}

.upsell-table tbody td:nth-child(3) {
  text-align: center;
  padding: 16px 24px; /* Increased padding for the box */
}

.upsell-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Super Column Card Effect ── */
.upsell-table th:nth-child(3),
.upsell-table td:nth-child(3) {
  background: rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2); /* Floating effect */
}

.upsell-table tbody td:nth-child(3) {
  border-bottom: none; /* Cleaner look without internal horizontal lines */
}

.upsell-table th:nth-child(3) {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  padding: 16px 24px;
}

.upsell-table tr:last-child td:nth-child(3) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* ── Gratis Column Dimming ── */
.upsell-table th:nth-child(2),
.upsell-table td:nth-child(2) {
  color: rgba(255, 255, 255, 0.5);
}

/* Check / Dash icons */
.upsell-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.upsell-check--yes {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
}

.upsell-check--super {
  background: transparent;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.3);
}

.upsell-check--no {
  color: rgba(255, 255, 255, 0.2);
  font-size: 20px;
}

.upsell-table tbody td .upsell-limit {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  display: block;
  margin-top: 2px;
}

/* ── Timeline ── */
.upsell-timeline {
  position: relative;
  padding: 0 0 0 40px;
  margin: 8px 0 24px;
}

.upsell-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(180deg, #D500F9, #6C2BFF, rgba(108, 43, 255, 0.2));
  border-radius: 1px;
}

.upsell-timeline-item {
  position: relative;
  padding: 16px 0;
}

.upsell-timeline-dot {
  position: absolute;
  left: -33px;
  top: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  background: #1a0b3e;
  border: 2px solid rgba(213, 0, 249, 0.4);
  z-index: 2;
}

.upsell-timeline-dot--unlock {
  background: linear-gradient(135deg, #D500F9, #6C2BFF);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 16px rgba(213, 0, 249, 0.4);
}

.upsell-timeline-dot--bell {
  color: #FFB300;
  border-color: rgba(255, 179, 0, 0.4);
}

.upsell-timeline-dot--check {
  color: #22C55E;
  border-color: rgba(34, 197, 94, 0.4);
}

.upsell-timeline-day {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.upsell-timeline-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.4;
}

/* ── Timeline Mascot ── */
.upsell-timeline-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin: 30px auto;
  max-width: 600px;
}

.upsell-timeline-mascot {
  width: 300px;
  min-width: 280px;
  max-width: 45vw;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

/* ── Plan Cards ── */
.upsell-plans {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.upsell-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
  border-radius: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  height: auto;
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.05);
}

.upsell-plan:hover {
  background: rgba(255, 255, 255, 0.06);
}

.upsell-plan:active {
  transform: translateY(4px);
  box-shadow: none;
}

.upsell-plan.selected {
  border: 3px solid #D500F9;
  background: rgba(213, 0, 249, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 rgba(213, 0, 249, 0.3);
}

.upsell-plan.selected:active {
  transform: translateY(4px);
  box-shadow: none;
}

.upsell-plan--featured.selected {
  border: 3px solid transparent !important;
  background: linear-gradient(135deg, rgba(255, 111, 0, 0.9), rgba(213, 0, 249, 0.9)) !important;
}

.upsell-plan--featured::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 18px;
  background: linear-gradient(135deg, #FF6F00, #D500F9, #00E5FF);
  z-index: -1;
  opacity: 0.5;
}

.upsell-plan--featured::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 111, 0, 0.06), rgba(213, 0, 249, 0.1), rgba(0, 229, 255, 0.06));
  z-index: -1;
}

.upsell-plan-radio {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-right: 14px;
}

.upsell-plan.selected .upsell-plan-radio {
  border-color: #D500F9;
  background: #D500F9;
}

.upsell-plan.selected .upsell-plan-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}

.upsell-plan-info {
  flex: 1;
  min-width: 0;
}

.upsell-plan-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.upsell-plan-price {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
}

.upsell-plan-badge {
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #FF6F00, #D500F9);
  color: #fff;
  white-space: nowrap;
}

/* ── CTAs ── */
.upsell-cta {
  display: flex;
  width: 100%;
  padding: 16px 24px;
  border-radius: 16px;
  border: none;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
  text-decoration: none;
  margin: 0 auto;
}

.upsell-cta--primary {
  background: #ffffff;
  color: #1a0b3e;
  box-shadow: 0 4px 0 #E5E5E5;
}
.upsell-cta--primary:hover {
  background: #f8f8f8;
}
.upsell-cta--primary:active {
  transform: translateY(4px);
  box-shadow: none;
}

.upsell-cta--mercadopago {
  background: #ffffff;
  color: #1a0b3e;
  box-shadow: 0 4px 0 #E5E5E5;
}
.upsell-cta--mercadopago:hover {
  background: #f8f8f8;
}
.upsell-cta--mercadopago:active {
  transform: translateY(4px);
  box-shadow: none;
}

.upsell-dismiss {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.upsell-dismiss:hover {
  color: rgba(255, 255, 255, 0.6);
}

.upsell-fine-print {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.4;
  margin-top: 12px;
}

/* ── MercadoPago Logo Inline ── */
.upsell-mp-logo {
  height: 18px;
  width: auto;
  vertical-align: middle;
  filter: brightness(10);
  margin-left: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .upsell-timeline-area {
    flex-direction: column;
    gap: 30px;
  }

  .upsell-timeline-mascot {
    width: 180px;
  }
}

@media (max-width: 560px) {
  .upsell-step {
    padding: 70px 20px 24px;
  }

  .upsell-title {
    font-size: 1.4rem;
  }

  .upsell-timeline-mascot {
    display: none;
  }
}

/* ── Animations ── */
.animate-up {
  opacity: 0;
  transform: translateY(25px) scale(0.95);
  animation: fadeInUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Super Column Animation Target */
.upsell-table.animated th:nth-child(3),
.upsell-table.animated td:nth-child(3) {
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transform: translateY(-10px);
  animation: dropInSuper 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: 500ms;
}

@keyframes dropInSuper {
  0% {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

/* Glow effect for the Super badge at the end of the drop */
.upsell-table.animated th:nth-child(3) .upsell-table-super-badge {
  animation: pulseGlow 1s ease-in-out 1s infinite alternate;
}

@keyframes pulseGlow {
  from {
    box-shadow: 0 0 0 rgba(213, 0, 249, 0);
  }
  to {
    box-shadow: 0 0 20px rgba(213, 0, 249, 0.4);
  }
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }