/* =============================================
   Alarmas.dev · Urgencia + Prueba Social
   Sprint 2 · 2026-05-19
   ============================================= */

/* ------- Barra superior de countdown (debajo del header) ------- */
.urgency-bar {
  background: linear-gradient(135deg, #FF7A59 0%, #FF6644 100%);
  color: #ffffff;
  padding: 6px 14px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  display: none;
  position: relative;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(255, 122, 89, 0.18);
  animation: urgency-slide-down 0.35s ease-out;
}
.urgency-bar.is-visible {
  display: block;
}
@keyframes urgency-slide-down {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.urgency-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.urgency-bar-icon {
  font-size: 14px;
  line-height: 1;
}

.urgency-bar-text {
  font-weight: 500;
}

.urgency-bar-text strong {
  font-weight: 700;
}

.urgency-bar-countdown {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.16);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 2px;
}

.urgency-bar-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}
.urgency-bar-unit-num {
  font-size: 13px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}
.urgency-bar-unit-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.urgency-bar-sep {
  opacity: 0.4;
  font-weight: 400;
}

.urgency-bar-close {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  transition: background 0.15s ease;
}
.urgency-bar-close:hover { background: rgba(255, 255, 255, 0.32); }

/* ------- Notificación de prueba social (esquina inferior izquierda en desktop) ------- */
.social-proof {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9990;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(31, 41, 55, 0.18);
  padding: 12px 18px 12px 14px;
  max-width: 340px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.social-proof.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Si hay botones sticky móvil + launcher pill visibles, elevamos la notif en desktop */
.mobile-cta-stack.is-visible ~ .social-proof,
body:has(.mobile-cta-stack.is-visible) .social-proof {
  bottom: 100px;
}

.social-proof-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F7CFF 0%, #6F8DFF 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.social-proof-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-proof-body {
  flex: 1;
  font-size: 13px;
  line-height: 1.35;
  color: #1F2937;
}
.social-proof-body strong { font-weight: 700; color: #1F2937; }
.social-proof-time {
  display: block;
  font-size: 11px;
  color: #6B7280;
  margin-top: 3px;
}

.social-proof-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

/* ------- Mobile adjustments ------- */
@media (max-width: 600px) {
  /* Oculta el contador Segurma en móvil (decisión 2026-05-19) */
  .urgency-bar,
  .urgency-bar.is-visible { display: none !important; }

  /* En móvil, la prueba social aparece ARRIBA debajo del header
     para no chocar con el chat launcher y los botones sticky inferiores */
  .social-proof {
    top: 84px;
    bottom: auto;
    left: 12px;
    right: 12px;
    max-width: none;
    transform: translateY(-20px);
  }
  .social-proof.is-visible { transform: translateY(0); }
  /* Cuando se ve sticky CTA inferior, la notif sigue en top (no la movemos abajo) */
  .mobile-cta-stack.is-visible ~ .social-proof,
  body:has(.mobile-cta-stack.is-visible) .social-proof {
    bottom: auto;
    top: 84px;
  }
}

/* Evita que el chat-launcher (esquina inferior derecha) se solape con la prueba social */
@media (min-width: 601px) {
  .social-proof { right: auto; }
}
