/* ==================================================
   SMART OTP PAGE (/otp) — scenes only. Shared product-page pieces are in product-v3.css,
   the base design in home-v2.css. Accent: the panel's OTP teal (.pv-page--otp, #12AA9E).
   ================================================== */

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

/* SMS attempt → marked failed → WhatsApp fallback → verified; loop 10 s */
.otp3-msg { opacity: 0; transform: translateY(10px); transform-box: fill-box; animation: otp3-pop 10s ease-out infinite; }
.otp3-msg--sms { animation-delay: 1.2s; }
.otp3-msg--wa  { animation-delay: 4.2s; }
.otp3-msg--ok  { animation-delay: 6.6s; }
@keyframes otp3-pop { 0% { opacity: 0; transform: translateY(10px); } 4%, 88% { opacity: 1; transform: translateY(0); } 96%, 100% { opacity: 0; transform: translateY(0); } }

.otp3-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: otp3-float-in 10s ease-out infinite;
}
.otp3-float__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; }
.otp3-float__icon--api { background: #F2F4F7; }
.otp3-float__icon--sms { background: #EFF4FF; }
.otp3-float__icon--wa  { background: #EDF8EF; flex-basis: 30px; width: 30px; height: 30px; }
.otp3-float__icon--ok  { background: #E6F7F5; }
.otp3-float__icon img { display: block; }
.otp3-float__body { display: flex; flex-direction: column; line-height: 1.25; }
.otp3-float__body strong { font-size: 13px; font-weight: 600; color: var(--f2h-ink); }
.otp3-float__body em { font-size: 12px; font-style: normal; color: var(--f2h-muted); font-family: 'Inter', ui-monospace, monospace; }
.otp3-float__dot { width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: #12AA9E; animation: otp3-ping 1.2s ease-out infinite; }
.otp3-float--api { left: -12px; top: 64px;    animation-delay: 0.2s; }
.otp3-float--fb  { right: -14px; top: 300px;  animation-delay: 3.4s; }
.otp3-float--ok  { left: -4px;  bottom: 96px; animation-delay: 6.9s; }
@keyframes otp3-float-in { 0% { opacity: 0; transform: translateY(8px); } 4%, 90% { opacity: 1; transform: translateY(0); } 97%, 100% { opacity: 0; transform: translateY(0); } }
@keyframes otp3-ping { 0% { box-shadow: 0 0 0 0 rgba(18, 170, 158, 0.5); } 100% { box-shadow: 0 0 0 10px rgba(18, 170, 158, 0); } }

/* fallback journey strip */
.otp3-journey { padding: 28px 32px 22px; border-radius: var(--f2h-radius); }
.otp3-journey .pv-scene { max-width: 1000px; margin: 0 auto; }
.otp3-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; }
.otp3-journey__legend li { display: inline-flex; align-items: center; gap: 8px; }
.otp3-journey__legend i { width: 10px; height: 10px; border-radius: 50%; }

/* template list mock: channel tabs + add button */
.otp3-tabs { display: flex; align-items: center; gap: 6px; padding: 12px 14px 4px; font-size: 12px; }
.otp3-tabs b { padding: 5px 12px; border-radius: 20px; font-weight: 600; color: #475467; background: #F2F4F7; }
.otp3-tabs b.is-active { background: #E6F7F5; color: #0E8A80; }
.otp3-tabs__btn { margin-left: auto; padding: 6px 12px; border-radius: 8px; background: #12AA9E; color: #FFFFFF; font-weight: 600; font-size: 11.5px; }
.otp3-table td:first-child { font-weight: 600; color: var(--f2h-ink); }
.otp3-link { font-style: normal; font-weight: 600; color: #12AA9E; }

/* the Configure Channel Fallback drawer, laid over the list */
.otp3-modal { margin: 10px 14px 14px; padding: 12px; border-radius: 12px; background: #F8F9FC; border: 1px solid #EEF0F4; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px 12px; }
.otp3-modal__head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--f2h-ink); }
.otp3-modal__head i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--f2h-muted); }
.otp3-modal .pv-field { background: #FFFFFF; }
.otp3-modal .pv-form label { margin-bottom: 8px; }
.otp3-modal .pv-preview { background: #FFFFFF; }
.otp3-modal .pv-form__foot { grid-column: 1 / -1; }
.otp3-modal .pv-bubble u { background: #FFF1F0; }

@media (max-width: 1200px) {
    .otp3-demo { max-width: 460px; min-height: 520px; }
    .otp3-float--api, .otp3-float--ok { left: 0; }
    .otp3-float--fb { right: 0; }
}
@media (max-width: 1024px) {
    .otp3-demo { min-height: 0; padding: 20px 0 8px; }
    .otp3-demo__phone { width: 240px; }
    .otp3-float--api { left: 0;  top: 30px; }
    .otp3-float--fb  { right: 0; top: 200px; }
    .otp3-float--ok  { left: 0;  bottom: 60px; }
    .otp3-modal { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
    .otp3-demo__phone { width: 210px; }
    .otp3-float { padding: 8px 12px 8px 8px; }
    .otp3-float__body strong { font-size: 12px; }
    .otp3-float__body em { font-size: 11px; }
    .otp3-float--api { top: 10px; }
    .otp3-float--fb  { top: 170px; }
    .otp3-float--ok  { bottom: 30px; }
    .otp3-journey { padding: 18px 14px 14px; }
    .otp3-tabs { flex-wrap: wrap; }
    .otp3-tabs__btn { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .otp3-msg, .otp3-float { opacity: 1; transform: none; animation: none; }
    .otp3-float__dot { animation: none; }
}
