/* ==================================================
   WHATSAPP BUSINESS API PAGE (/whatsapp-api) — scenes only. Shared product-page pieces are in
   product-v3.css, the base design in home-v2.css. Accent: the panel's WhatsApp green (.pv-page--whatsapp).
   ================================================== */

/* hero demo: phone + three floating cards in the hero's right column */
.wa3-demo { position: relative; width: 100%; max-width: 520px; min-height: 560px; margin: 0 auto; }
.wa3-demo__phone { position: relative; width: 268px; margin: 0 auto; filter: drop-shadow(0 24px 40px rgba(62, 145, 65, 0.18)); }

/* messages arrive one after another; the loop is 10 s */
.wa3-msg { opacity: 0; transform: translateY(10px); transform-box: fill-box; animation: wa3-pop 10s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes wa3-pop { 0% { opacity: 0; transform: translateY(10px); } 4%, 88% { opacity: 1; transform: translateY(0); } 96%, 100% { opacity: 0; transform: translateY(0); } }

/* grey ticks turn WhatsApp blue once the message is read */
.wa3-ticks { animation: wa3-ticks 10s linear infinite; animation-delay: var(--d, 0s); }
@keyframes wa3-ticks { 0%, 30% { stroke: #98A2B3; } 36%, 90% { stroke: #34B7F1; } 100% { stroke: #98A2B3; } }

.wa3-dot { animation: wa3-dot 1.2s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
@keyframes wa3-dot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }

.wa3-float {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px 10px 10px;
    border-radius: 14px;
    background: #FFFFFF;
    border: 1px solid #EEF0F4;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.10);
    font-family: 'Inter', sans-serif;
    opacity: 0;
    transform: translateY(8px);
    animation: wa3-float-in 10s ease-out infinite;
}
.wa3-float__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; }
.wa3-float__icon--send { background: #EDF8EF; }
.wa3-float__icon--read { background: #EAF2FE; }
.wa3-float__icon--hook { background: #FDF2F8; }
.wa3-float__icon img { display: block; }
.wa3-float__body { display: flex; flex-direction: column; line-height: 1.25; }
.wa3-float__body strong { font-size: 13px; font-weight: 600; color: var(--f2h-ink); }
.wa3-float__body em { font-size: 12px; font-style: normal; color: var(--f2h-muted); font-family: 'Inter', ui-monospace, monospace; }
.wa3-float__body b { font-weight: 700; color: #3E9141; }
.wa3-float__dot { width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: #3E9141; animation: wa3-ping 1.2s ease-out infinite; }
.wa3-float--send { left: -12px; top: 64px;    animation-delay: 0.2s; }
.wa3-float--read { right: -8px; top: 200px;   animation-delay: 1.9s; }
.wa3-float--hook { left: -4px;  bottom: 96px; animation-delay: 2.6s; }
@keyframes wa3-float-in { 0% { opacity: 0; transform: translateY(8px); } 4%, 90% { opacity: 1; transform: translateY(0); } 97%, 100% { opacity: 0; transform: translateY(0); } }
@keyframes wa3-ping { 0% { box-shadow: 0 0 0 0 rgba(62, 145, 65, 0.5); } 100% { box-shadow: 0 0 0 10px rgba(62, 145, 65, 0); } }

/* message journey strip */
.wa3-journey { padding: 28px 32px 22px; border-radius: var(--f2h-radius); }
.wa3-journey .pv-scene { max-width: 1000px; margin: 0 auto; }
.wa3-journey__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 14px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: #475467; }
.wa3-journey__legend li { display: inline-flex; align-items: center; gap: 8px; }
.wa3-journey__legend i { width: 10px; height: 10px; border-radius: 50%; }

/* template builder mock: form + phone-style preview card */
.wa3-builder { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr); gap: 14px; padding: 14px; }
.wa3-cat { display: flex; gap: 6px; margin-top: 4px; }
.wa3-cat span { flex: 1; padding: 7px 0; border-radius: 8px; border: 1px solid #E4E7EC; text-align: center; font-size: 11.5px; font-weight: 600; color: #475467; text-transform: none; letter-spacing: 0; }
.wa3-cat span.is-on { border-color: #3E9141; background: #EDF8EF; color: #2E7D32; }
.wa3-tpl { padding: 10px; border-radius: 14px 14px 14px 4px; background: #FFFFFF; border: 1px solid #E4E7EC; font-size: 12px; line-height: 18px; color: #111111; }
.wa3-tpl__media { height: 70px; border-radius: 10px; background: linear-gradient(135deg, #3E9141 0%, #9BE3A0 100%); display: flex; align-items: flex-end; padding: 8px 10px; color: #FFFFFF; font-weight: 700; font-size: 14px; }
.wa3-tpl__body { margin-top: 8px; }
.wa3-tpl__foot { margin-top: 6px; font-size: 10.5px; color: #98A2B3; }
.wa3-tpl__btn { display: block; margin-top: 6px; padding: 7px 0 0; border-top: 1px solid #E4E7EC; text-align: center; font-size: 12px; font-weight: 600; color: #1C73E8; }
.wa3-preview { background: #EFE7DD; }

/* live chat inbox mock */
.wa3-inbox { display: grid; grid-template-columns: 150px 1fr; min-height: 230px; }
.wa3-inbox__list { border-right: 1px solid #EEF0F4; }
.wa3-inbox__list div { padding: 10px 12px; border-bottom: 1px solid #F2F4F7; font-size: 12px; color: #344054; }
.wa3-inbox__list div.is-on { background: #EDF8EF; }
.wa3-inbox__list b { display: block; font-size: 12.5px; color: var(--f2h-ink); }
.wa3-inbox__list small { display: block; font-size: 10.5px; color: #98A2B3; }
.wa3-inbox__chat { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #EFE7DD; }
.wa3-inbox__chat .pv-bubble { max-width: 78%; }
.wa3-inbox__chat .pv-bubble.is-out { align-self: flex-end; background: #D9FDD3; border-radius: 14px 14px 4px 14px; }
.wa3-inbox__meta { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #F8F9FC; border-bottom: 1px solid #EEF0F4; font-size: 11.5px; color: #475467; }
.wa3-inbox__meta b { color: var(--f2h-ink); }
.wa3-agent { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 12px; background: #EDF8EF; color: #2E7D32; font-size: 11px; font-weight: 600; }

/* rate cards */
.wa3-rates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.wa3-rate { padding: 14px 16px; border-radius: 14px; background: #FFFFFF; border: 1px solid #EEF0F4; }
.wa3-rate small { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #98A2B3; overflow-wrap: anywhere; }
.wa3-rate strong { display: block; margin-top: 4px; font-size: 20px; font-weight: 700; color: var(--f2h-ink); white-space: nowrap; }
.wa3-rate strong em { margin-left: 3px; font-size: 11.5px; font-style: normal; font-weight: 500; color: var(--f2h-muted); }
.wa3-rate span { display: block; margin-top: 4px; font-size: 12px; line-height: 17px; color: #475467; }

@media (max-width: 1200px) {
    .wa3-demo { max-width: 460px; min-height: 520px; }
    .wa3-float--send, .wa3-float--hook { left: 0; }
}
@media (max-width: 1024px) {
    .wa3-demo { min-height: 0; padding: 20px 0 8px; }
    .wa3-demo__phone { width: 240px; }
    .wa3-float--send { left: 0;  top: 30px; }
    .wa3-float--read { right: 0; top: 160px; }
    .wa3-float--hook { left: 0;  bottom: 60px; }
    .wa3-rates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .wa3-demo__phone { width: 210px; }
    .wa3-float { padding: 8px 12px 8px 8px; }
    .wa3-float__body strong { font-size: 12px; }
    .wa3-float__body em { font-size: 11px; }
    .wa3-float--send { top: 10px; }
    .wa3-float--read { top: 130px; }
    .wa3-float--hook { bottom: 30px; }
    .wa3-journey { padding: 18px 14px 14px; }
    .wa3-builder { grid-template-columns: 1fr; }
    .wa3-inbox { grid-template-columns: 1fr; }
    .wa3-inbox__list { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid #EEF0F4; }
    .wa3-inbox__list div { flex: 0 0 auto; border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .wa3-msg, .wa3-float { opacity: 1; transform: none; animation: none; }
    .wa3-ticks { animation: none; stroke: #34B7F1; }
    .wa3-dot, .wa3-float__dot { animation: none; }
}
