/* ============================================================
   Phone Demo – Interactive iPhone Mockup for Landing Page
   Isolated styles, no conflicts with landing.css
   ============================================================ */

/* --- Section --- */
.lpv2-demo-section {
  text-align: left;
}

/* --- Split Layout: Copy left, Phone right --- */
.lpv2-demo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.lpv2-demo-copy h2 {
  margin-bottom: 14px;
}

.lpv2-demo-desc {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 36px;
  max-width: 480px;
}

.lpv2-demo-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lpv2-demo-feature {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.lpv2-demo-feature-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 106, 14, 0.08);
  border: 1px solid rgba(234, 106, 14, 0.12);
  border-radius: 12px;
}

.lpv2-demo-feature strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.lpv2-demo-feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.lpv2-demo-phone-wrap {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Glow behind phone */
.lpv2-demo-phone-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(234, 106, 14, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
  .lpv2-demo-split {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .lpv2-demo-desc {
    max-width: none;
    margin-inline: auto;
  }
  .lpv2-demo-features {
    gap: 16px;
  }
  .lpv2-demo-feature {
    text-align: left;
  }
  /* Phone smaller on mobile, text first */
  .phone-demo {
    width: clamp(240px, 68vw, 300px);
    max-height: 520px;
  }
}

@media (max-width: 480px) {
  .phone-demo {
    width: clamp(220px, 72vw, 280px);
    max-height: 480px;
    border-radius: 36px;
  }
  .phone-demo::before {
    width: 100px;
    height: 28px;
    top: 10px;
    border-radius: 16px;
  }
}

.lpv2-demo-section .lpv2-section-head {
  max-width: 600px;
  margin: 0 auto clamp(32px, 5vw, 56px);
}

/* --- iPhone Frame --- */
.phone-demo {
  position: relative;
  width: clamp(280px, 42vw, 375px);
  aspect-ratio: 375 / 812;
  margin: 0 auto;
  background: #000;
  border-radius: 44px;
  box-shadow:
    0 0 0 2px #1a1a1a,
    0 0 0 4px #333,
    var(--shadow-panel, 0 28px 60px rgba(2, 8, 20, 0.38));
  overflow: hidden;
  user-select: none;
}

/* Dynamic Island */
.phone-demo::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}

/* Home Indicator */
.phone-demo::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  z-index: 20;
}

/* --- Screen Container --- */
.phone-demo__screen {
  position: absolute;
  inset: 0;
  border-radius: 44px;
  overflow: hidden;
}

/* --- Scenes --- */
.phone-demo__scene {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s ease, visibility 0s 0.5s;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.phone-demo__scene.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0s 0s;
  pointer-events: auto;
  z-index: 2;
}

/* ============================================================
   SCENE 1: WhatsApp Chat
   ============================================================ */

/* Status Bar */
.wa-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 0;
  height: 50px;
  background: #075e54;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}
.wa-statusbar__time { font-size: 13px; font-weight: 700; }
.wa-statusbar__icons { display: flex; gap: 4px; align-items: center; }
.wa-statusbar__icons svg { width: 14px; height: 14px; fill: #fff; }

/* Chat Header */
.wa-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #075e54;
  flex-shrink: 0;
}
.wa-header__back {
  width: 20px;
  height: 20px;
  fill: #fff;
  opacity: 0.7;
}
.wa-header__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F97316, #ea580c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}
.wa-header__info { flex: 1; min-width: 0; }
.wa-header__name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}
.wa-header__status {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.2;
}
.wa-header__actions { display: flex; gap: 16px; }
.wa-header__actions svg { width: 18px; height: 18px; fill: rgba(255, 255, 255, 0.7); }

/* Chat Body */
.wa-chat {
  flex: 1;
  background: #ece5dd;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cdc4' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  overflow-y: hidden;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Date Chip */
.wa-date-chip {
  align-self: center;
  background: rgba(225, 218, 208, 0.9);
  color: #54656f;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 8px;
  margin: 4px 0 8px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06);
}

/* Message Bubbles */
.wa-msg {
  max-width: 82%;
  padding: 4px 7px 2px;
  border-radius: 8px;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  line-height: 1.35;
}
.wa-msg.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Outgoing (User / right) */
.wa-msg--out {
  align-self: flex-end;
  background: #dcf8c6;
  border-radius: 8px 0 8px 8px;
}

/* Incoming (Bot / left) */
.wa-msg--in {
  align-self: flex-start;
  background: #fff;
  border-radius: 0 8px 8px 8px;
}

.wa-msg__text {
  font-size: 13px;
  color: #111b21;
  word-break: break-word;
  padding: 2px 4px;
}

/* Message Meta (time + checks) */
.wa-msg__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  padding: 0 2px 2px;
  font-size: 10px;
  color: #667781;
}
.wa-msg__check {
  color: #53bdeb;
  font-size: 12px;
  line-height: 1;
}

/* Photo in Message */
.wa-msg__photo {
  width: 100%;
  max-height: 140px;
  border-radius: 6px;
  display: block;
  object-fit: cover;
  margin-bottom: 2px;
}

/* Voice Message */
.wa-msg__voice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
}
.wa-msg__voice-play {
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: #075e54;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-msg__voice-play svg { width: 12px; height: 12px; min-width: 12px; min-height: 12px; fill: #fff; }
.wa-msg__voice-wave {
  flex: 1;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.wa-msg__voice-bar {
  width: 3px;
  background: #075e54;
  border-radius: 2px;
  animation: wa-wave 0.8s ease-in-out infinite alternate;
}
.wa-msg__voice-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.wa-msg__voice-bar:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.wa-msg__voice-bar:nth-child(3) { height: 10px; animation-delay: 0.2s; }
.wa-msg__voice-bar:nth-child(4) { height: 20px; animation-delay: 0.3s; }
.wa-msg__voice-bar:nth-child(5) { height: 12px; animation-delay: 0.15s; }
.wa-msg__voice-bar:nth-child(6) { height: 18px; animation-delay: 0.25s; }
.wa-msg__voice-bar:nth-child(7) { height: 8px; animation-delay: 0.35s; }
.wa-msg__voice-bar:nth-child(8) { height: 14px; animation-delay: 0.05s; }
.wa-msg__voice-bar:nth-child(9) { height: 6px; animation-delay: 0.4s; }
.wa-msg__voice-bar:nth-child(10) { height: 10px; animation-delay: 0.2s; }
.wa-msg__voice-dur {
  font-size: 11px;
  color: #667781;
  min-width: 32px;
  text-align: right;
}

@keyframes wa-wave {
  from { transform: scaleY(0.4); }
  to   { transform: scaleY(1); }
}

/* Typing Indicator */
.wa-typing {
  align-self: flex-start;
  background: #fff;
  border-radius: 0 8px 8px 8px;
  padding: 10px 14px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wa-typing.is-visible { opacity: 1; }
.wa-typing__dot {
  width: 7px;
  height: 7px;
  background: #999;
  border-radius: 50%;
  animation: wa-typing-bounce 1.2s ease-in-out infinite;
}
.wa-typing__dot:nth-child(2) { animation-delay: 0.15s; }
.wa-typing__dot:nth-child(3) { animation-delay: 0.3s; }

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

/* Input Bar */
.wa-inputbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #ece5dd;
  flex-shrink: 0;
}
.wa-inputbar__field {
  flex: 1;
  height: 36px;
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  color: #667781;
}
.wa-inputbar__mic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #075e54;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-inputbar__mic svg { width: 16px; height: 16px; fill: #fff; }


/* ============================================================
   SCENE 2: Dashboard Feed
   ============================================================ */

.dash-scene {
  background: #0B1220;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Dashboard Statusbar */
.dash-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 0;
  height: 50px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #9FB0C7);
}

/* Dashboard Header */
.dash-header {
  padding: 8px 16px 12px;
  flex-shrink: 0;
}
.dash-header__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong, #EEF4FB);
}
.dash-header__subtitle {
  font-size: 12px;
  color: var(--text-muted, #9FB0C7);
  margin-top: 2px;
}

/* Feed List */
.dash-feed {
  flex: 1;
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Feed Card */
.dash-card {
  background: linear-gradient(135deg, rgba(18, 26, 41, 0.9), rgba(22, 34, 53, 0.8));
  border: 1px solid rgba(120, 144, 178, 0.12);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.dash-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dash-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dash-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-faint, #6B7E97);
}
.dash-card__badge {
  background: rgba(249, 115, 22, 0.15);
  color: #F97316;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dash-card__dot { opacity: 0.4; }

.dash-card__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong, #EEF4FB);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-card__desc {
  font-size: 11px;
  color: var(--text-muted, #9FB0C7);
  line-height: 1.3;
}

.dash-card__thumb {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(120, 144, 178, 0.08);
}

/* Voice card icon */
.dash-card__voice-icon {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: rgba(120, 144, 178, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dash-card__voice-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--text-faint, #6B7E97);
}

/* Summary bar at top */
.dash-summary {
  display: flex;
  gap: 8px;
  padding: 0 12px 8px;
  flex-shrink: 0;
}
.dash-summary__item {
  flex: 1;
  background: rgba(18, 26, 41, 0.7);
  border: 1px solid rgba(120, 144, 178, 0.1);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.dash-summary__num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong, #EEF4FB);
}
.dash-summary__label {
  font-size: 9px;
  color: var(--text-faint, #6B7E97);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .phone-demo {
    width: clamp(260px, 64vw, 320px);
  }
}
@media (max-width: 480px) {
  .phone-demo {
    width: 78vw;
    max-width: 310px;
  }
  .lpv2-demo-section .lpv2-section-head h2 {
    font-size: 1.4rem;
  }
}
