/* Topic decoration for SMS and voice pages (markup: lib/topicfloat.mjs). Shares the gutter positions and float animation of the WhatsApp layer (.waf in site-soft.css). */

/* SMS: plain text-message look (blue/grey bubbles, envelope, STOP chip) */
.waf-sms .waf-in { background: #e9eef6; color: #0d2a4a; }
.waf-sms .waf-out { background: #2f7bf6; color: #fff; }
.waf-sms .waf-out .waf-sk { background: rgb(255 255 255 / .55); }
.waf-sms .waf-in .waf-sk { background: rgb(13 42 74 / .22); }
.waf-sms .waf-out .waf-ticks { color: rgb(255 255 255 / .85); }
.waf-code { font: 700 .95em/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .12em; padding: .15em .1em; }
.waf-sms .waf-count { background: #2f7bf6; box-shadow: 0 .9em 1.8em -.9em rgb(47 123 246 / .7); }

/* shared chips */
.waf-chip, .waf-pill, .waf-key { display: inline-flex; align-items: center; justify-content: center; gap: .45em; background: #fff; color: #0a7f69; box-shadow: 0 1px 1px rgb(11 20 26 / .12), 0 1.2em 2.4em -1.2em rgb(11 20 26 / .3); }
.waf-chip { width: 3.4em; height: 3.4em; border-radius: 1.1em; }
.waf-pill { padding: .55em .9em; border-radius: 9em; font-weight: 700; font-size: .8em; }
.waf-pill .waf-sk { display: inline-block; height: .55em; border-radius: 9em; }
.waf-sms .waf-chip, .waf-sms .waf-pill { color: #2f7bf6; }
.waf-stop { color: #d2433b !important; letter-spacing: .08em; }

/* voice: call elements (ring, keypad keys, timer, waveform, hang up) */
.waf-voice .waf-chip { color: #0a7f69; }
.waf-ring { color: #fff !important; background: #12a88a; box-shadow: 0 0 0 .5em rgb(18 168 138 / .16), 0 0 0 1.1em rgb(18 168 138 / .08); }
.waf-end { color: #fff !important; background: #e5484d; transform: rotate(0); }
.waf-key { flex-direction: column; gap: .1em; width: 3.5em; height: 3.5em; border-radius: 50%; }
.waf-key b { font-size: 1.35em; line-height: 1; } .waf-key small { font-size: .6em; opacity: .65; letter-spacing: .08em; }
.waf-voice-b { padding: .5em .8em; } .waf-voice-b .waf-wave { display: flex; align-items: center; gap: .18em; height: 1.6em; }
.waf-voice-b .waf-wave i { width: .22em; height: calc(var(--h, .5) * 100%); border-radius: 9em; background: #12a88a; opacity: .75; }
.waf-voice .waf-in { background: #fff; } .waf-voice .waf-out { background: #dff5ee; }

/* the page wallpaper for these pages: a faint pattern of their own instead of the WhatsApp doodles */
body.x-topic-sms::before, body[data-page="sms"]::before, body[data-page="pricing-sms"]::before {
  background:
    radial-gradient(60rem 28rem at 6% -6%, rgb(47 123 246 / .10), transparent 62%),
    radial-gradient(54rem 26rem at 98% -4%, rgb(18 168 138 / .09), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%232f7bf6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.07'%3E%3Cg transform='translate(20 24)'%3E%3Crect x='0' y='0' width='30' height='22' rx='4'/%3E%3Cpath d='m2 3 13 9 13-9'/%3E%3C/g%3E%3Cg transform='translate(120 70)'%3E%3Cpath d='M0 0h34v22H14l-8 7v-7H0z'/%3E%3Cpath d='M8 8h18M8 14h11'/%3E%3C/g%3E%3Cg transform='translate(40 140)'%3E%3Cpath d='M0 0h30v20H12l-7 6v-6H0z'/%3E%3C/g%3E%3Cg transform='translate(150 160)'%3E%3Cpath d='m0 8 7 7 14-15'/%3E%3C/g%3E%3C/svg%3E");
}
body.x-topic-voice::before, body[data-page="voice"]::before, body[data-page="pricing-voice"]::before {
  background:
    radial-gradient(60rem 28rem at 6% -6%, rgb(18 168 138 / .12), transparent 62%),
    radial-gradient(54rem 26rem at 98% -4%, rgb(229 72 77 / .06), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220' fill='none' stroke='%230a7f69' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' opacity='.075'%3E%3Cg transform='translate(24 26)'%3E%3Cpath d='M4 0h7l3 8-4 3a22 22 0 0 0 10 10l3-4 8 3v7a4 4 0 0 1-4 4A26 26 0 0 1 0 4a4 4 0 0 1 4-4z'/%3E%3C/g%3E%3Cg transform='translate(110 60)'%3E%3Cpath d='M0 12v6M8 6v18M16 2v26M24 8v14M32 12v6'/%3E%3C/g%3E%3Cg transform='translate(50 150)'%3E%3Crect x='0' y='0' width='9' height='9' rx='2'/%3E%3Crect x='14' y='0' width='9' height='9' rx='2'/%3E%3Crect x='28' y='0' width='9' height='9' rx='2'/%3E%3Crect x='0' y='14' width='9' height='9' rx='2'/%3E%3Crect x='14' y='14' width='9' height='9' rx='2'/%3E%3Crect x='28' y='14' width='9' height='9' rx='2'/%3E%3C/g%3E%3Cg transform='translate(150 150)'%3E%3Ccircle cx='10' cy='10' r='9'/%3E%3Cpath d='M10 5v5l3 2'/%3E%3C/g%3E%3C/svg%3E");
}

/* SMS and voice pages show their own decoration, so re-enable the layer that the generic "no WhatsApp doodles" rule hid */
body[data-page="sms"] .waf.waf-sms, body[data-page="pricing-sms"] .waf.waf-sms, body[data-page="voice"] .waf.waf-voice, body[data-page="pricing-voice"] .waf.waf-voice { display: block !important; }

/* voice page: keep the timer and the hang-up chip out of the headline/button area */
.waf-voice .waf-p4, .waf-voice .waf-p10 { display: none; }
