/* ===================================================
   WatchTower.AI — Animação 2: Alertas (WhatsApp Pro)
   Premium Stylized Design
   =================================================== */

/* ===== SECTION WRAPPER ===== */
#alerts-demo {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

#alerts-demo .section-bg-alerts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 80% 50%, rgba(37,211,102,0.06) 0%, transparent 65%),
    radial-gradient(ellipse 45% 40% at 20% 30%, rgba(18,140,126,0.05) 0%, transparent 65%);
}

#alerts-demo .section-divider-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37,211,102,0.25), transparent);
}

/* ===== LAYOUT ===== */
.alerts-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

/* ===== RIGHT COPY ===== */
.alerts-demo-copy {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.alerts-demo-copy .section-title {
  text-align: left;
}

.alerts-demo-copy .section-subtitle {
  text-align: left;
}

.alerts-demo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}

.alerts-stat-box {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 1rem 0.75rem;
  text-align: center;
  transition: border-color 0.3s;
}

.alerts-stat-box:hover {
  border-color: rgba(37,211,102,0.2);
}

.alerts-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  display: block;
  line-height: 1;
}

.alerts-stat-label {
  font-size: 0.72rem;
  color: #8888AA;
  margin-top: 0.35rem;
  display: block;
}

/* ===== BADGE VARIANT ===== */
.badge-alerts {
  background: rgba(37,211,102,0.1);
  border-color: rgba(37,211,102,0.25);
  color: #25D366;
}

/* ===== FEATURE ICON COLOR VARIANTS ===== */
.feature-icon-red {
  background: linear-gradient(135deg, rgba(248,113,113,0.2), rgba(248,113,113,0.08));
  border-color: rgba(248,113,113,0.25);
  color: #F87171;
}

.feature-icon-yellow {
  background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(251,191,36,0.06));
  border-color: rgba(251,191,36,0.25);
  color: #FBBF24;
}

.feature-icon-green {
  background: linear-gradient(135deg, rgba(37,211,102,0.15), rgba(37,211,102,0.06));
  border-color: rgba(37,211,102,0.25);
  color: #25D366;
}

/* ===================================================
   PREMIUM PHONE MOCKUP — Alerts Chat
   =================================================== */

.wa-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Ambient glow */
.wa-phone-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107,43,255,0.22) 0%, transparent 68%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  filter: blur(12px);
}

/* Phone frame */
.wa-phone {
  position: relative;
  z-index: 1;
  width: 300px;
  background: #0D1117;
  border-radius: 36px;
  border: 1px solid transparent;
  outline: 1px solid rgba(107,43,255,0.35);
  outline-offset: 0;
  box-shadow:
    0 0 40px rgba(107,43,255,0.30),
    0 40px 90px rgba(0,0,0,0.70),
    inset 0 1px 0 rgba(255,255,255,0.06);
  overflow: hidden;
  height: 580px;
  display: flex;
  flex-direction: column;
}

/* ===== STATUS BAR ===== */
.wa-status-bar {
  background: #0D1117;
  padding: 8px 18px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(107,43,255,0.12);
}

.wa-status-time {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.wa-status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wa-status-icon {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0.85;
}

/* ===== CHAT HEADER ===== */
.wa-chat-header {
  background: #111827;
  padding: 8px 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(107,43,255,0.15);
  flex-shrink: 0;
}

.wa-back-arrow {
  color: rgba(107,43,255,0.8);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.wa-back-arrow svg {
  width: 18px;
  height: 18px;
}

.wa-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6B2BFF, #2E8BFF);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 14px rgba(107,43,255,0.55);
}

.wa-avatar-online {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #25D366;
  border: 2px solid #111827;
  box-shadow: 0 0 5px rgba(37,211,102,0.8);
}

.wa-contact-info {
  flex: 1;
  min-width: 0;
}

.wa-contact-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-contact-status {
  font-size: 0.63rem;
  color: #25D366;
  margin-top: 2px;
}

.wa-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.45);
  flex-shrink: 0;
}

.wa-header-actions svg {
  width: 18px;
  height: 18px;
}

/* ===== CHAT BODY ===== */
.wa-chat-body {
  flex: 1;
  overflow: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #0D1117;
  position: relative;
}

/* Subtle dot grid wallpaper */
.wa-chat-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(107,43,255,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

/* Date chip */
.wa-date-chip {
  align-self: center;
  background: rgba(13,17,23,0.85);
  border: 1px solid rgba(107,43,255,0.18);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* ===== MESSAGE BUBBLES ===== */

/* Bot/WatchTower message (left) */
.wa-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-14px) translateY(4px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34,1.3,0.64,1);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wa-msg.wa-msg-visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* User reply (right) */
.wa-msg.wa-msg-user {
  align-items: flex-end;
  transform: translateX(14px) translateY(4px);
}

.wa-msg.wa-msg-user.wa-msg-visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

/* Bot bubble (received) */
.wa-bubble {
  background: #1E2730;
  border-radius: 16px 16px 16px 4px;
  padding: 8px 10px 6px;
  max-width: 88%;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(107,43,255,0.1);
}

/* Left tail */
.wa-bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  border-width: 0 6px 6px 0;
  border-style: solid;
  border-color: transparent #1E2730 transparent transparent;
}

/* User bubble (sent) */
.wa-bubble-user {
  background: linear-gradient(135deg, #6B2BFF, #2E8BFF);
  border-radius: 16px 16px 4px 16px;
  padding: 8px 10px 6px;
  max-width: 88%;
  position: relative;
  box-shadow: 0 3px 14px rgba(107,43,255,0.35);
}

/* Right tail */
.wa-bubble-user::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -5px;
  border-width: 0 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent #2E8BFF transparent;
}

.wa-bubble-text {
  font-size: 0.72rem;
  color: #E8EDF2;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-bubble-user .wa-bubble-text {
  color: #fff;
}

/* Bold inside bubble */
.wa-bubble-text strong {
  font-weight: 700;
  color: #fff;
}

.wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 3px;
}

.wa-bubble-time {
  font-size: 0.56rem;
  color: rgba(255,255,255,0.35);
}

.wa-bubble-user .wa-bubble-time {
  color: rgba(255,255,255,0.55);
}

/* Double checkmarks */
.wa-bubble-check {
  display: flex;
  align-items: center;
  color: #8FC4FF;
}

.wa-bubble-check svg {
  width: 12px;
  height: 12px;
}

/* ===== TYPING INDICATOR ===== */
.wa-typing {
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transform: translateX(-10px) translateY(4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wa-typing.wa-typing-visible {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.wa-typing-bubble {
  background: #1E2730;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: 1px solid rgba(107,43,255,0.1);
}

.wa-typing-bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  border-width: 0 6px 6px 0;
  border-style: solid;
  border-color: transparent #1E2730 transparent transparent;
}

.wa-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

.wa-dot:nth-child(1) { animation: wa-bounce 1.2s ease infinite 0ms; }
.wa-dot:nth-child(2) { animation: wa-bounce 1.2s ease infinite 180ms; }
.wa-dot:nth-child(3) { animation: wa-bounce 1.2s ease infinite 360ms; }

@keyframes wa-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

/* ===== CHAT INPUT BAR (decorative) ===== */
.wa-input-bar {
  background: #111827;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(107,43,255,0.15);
  flex-shrink: 0;
}

.wa-input-field {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(107,43,255,0.2);
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  user-select: none;
}

.wa-input-emoji,
.wa-input-send {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
}

.wa-input-send {
  background: linear-gradient(135deg, #6B2BFF, #2E8BFF);
  color: #fff;
  box-shadow: 0 0 12px rgba(107,43,255,0.45);
}

.wa-input-emoji svg,
.wa-input-send svg {
  width: 16px;
  height: 16px;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 900px) {
  .alerts-demo-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .wa-phone-wrap {
    order: -1;
  }

  .alerts-demo-copy .section-title,
  .alerts-demo-copy .section-subtitle {
    text-align: center;
  }

  .alerts-demo-copy {
    align-items: center;
    text-align: center;
  }

  .alerts-demo-stats {
    justify-items: center;
  }
}

@media (max-width: 400px) {
  .wa-phone {
    width: 272px;
    height: 520px;
  }
}
