@gecko-ui-kit/components 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -0
- package/index.js +27 -0
- package/package.json +3 -3
- package/src/activity.js +218 -0
- package/src/beforeafter.js +141 -0
- package/src/bell.js +137 -0
- package/src/like.js +208 -0
- package/src/pay.js +162 -0
- package/src/pricing.js +189 -0
- package/src/radiocards.js +101 -0
- package/src/speeddial.js +128 -0
- package/src/subscribe.js +173 -0
- package/src/typing.js +93 -0
- package/style.css +331 -0
package/src/typing.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/* Typing indicator: three dots that bounce one after another in a small chat bubble, to say the
|
|
2
|
+
other side is writing. Optional text beside it — “Pim is typing…”, “Pim and Mali are typing…”,
|
|
3
|
+
“Several people are typing…” — in any language through words. show() pops the bubble up from
|
|
4
|
+
its tail corner with a little overshoot and the text slides in after it; hide() shrinks it away,
|
|
5
|
+
and the row it sat in closes up so a chat does not keep an empty gap. The dots bounce with CSS,
|
|
6
|
+
so they keep going while the page is busy. Screen readers hear the same text once from a polite
|
|
7
|
+
role="status". With reduced motion the dots only fade in turn and show / hide is a soft fade. */
|
|
8
|
+
import * as M from '@gecko-ui-kit/motion';
|
|
9
|
+
import { esc } from '../index.js';
|
|
10
|
+
|
|
11
|
+
const { g, RM, $$ } = M;
|
|
12
|
+
const WORDS = {
|
|
13
|
+
anon: 'Typing…', // no name given
|
|
14
|
+
one: (name) => `${name} is typing…`,
|
|
15
|
+
two: (a, b) => `${a} and ${b} are typing…`,
|
|
16
|
+
many: () => 'Several people are typing…', // three or more (gets the names array)
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* const t = typing(el, {
|
|
21
|
+
* names: [], // who is typing: 'Pim' or ['Pim', 'Mali'] (empty = no name)
|
|
22
|
+
* text: true, // show the text beside the bubble (screen readers hear it either way)
|
|
23
|
+
* bubble: true, // false: only the dots, for inside a list row or a button
|
|
24
|
+
* size: '' | 'sm' | 'lg',
|
|
25
|
+
* tone: 'muted' | 'accent' | 'ink', // colour of the dots
|
|
26
|
+
* collapse: true, // the row closes up when hidden (and opens when shown)
|
|
27
|
+
* visible: false, // start shown
|
|
28
|
+
* words: { anon, one, two, many },
|
|
29
|
+
* })
|
|
30
|
+
* t.show(names?) · t.hide() · t.toggle(on?) · t.set(names) (change who, while shown or not)
|
|
31
|
+
* t.visible · t.text · t.root · t.destroy()
|
|
32
|
+
*/
|
|
33
|
+
export const typing = (el, opts = {}) => {
|
|
34
|
+
el = $$(el)[0];
|
|
35
|
+
if (!el) return null;
|
|
36
|
+
const o = { names: [], text: true, bubble: true, size: '', tone: 'muted', collapse: true, visible: false, words: null, ...opts };
|
|
37
|
+
const W = { ...WORDS, ...o.words };
|
|
38
|
+
const list = (v) => (v == null || v === '' ? [] : (Array.isArray(v) ? v : [v]).map(String).filter(Boolean));
|
|
39
|
+
let names = list(o.names), on = false, dead = false;
|
|
40
|
+
const words = () => (names.length === 0 ? W.anon : names.length === 1 ? W.one(names[0]) : names.length === 2 ? W.two(names[0], names[1]) : W.many(names));
|
|
41
|
+
|
|
42
|
+
const cls = ['typing', o.bubble ? '' : 'typing--bare', o.size ? `typing--${o.size}` : '', o.tone && o.tone !== 'muted' ? `typing--${o.tone}` : '', RM() ? 'typing--still' : ''].filter(Boolean).join(' ');
|
|
43
|
+
el.innerHTML = `<div class="${esc(cls)}" hidden><span class="typing__bubble" aria-hidden="true"><i></i><i></i><i></i></span>`
|
|
44
|
+
+ `${o.text ? '<span class="typing__text" aria-hidden="true"></span>' : ''}</div><span class="typing__sr" role="status" aria-live="polite"></span>`;
|
|
45
|
+
const root = el.firstElementChild, bubble = root.querySelector('.typing__bubble'), textEl = root.querySelector('.typing__text'), live = el.querySelector('.typing__sr');
|
|
46
|
+
const paint = () => {
|
|
47
|
+
const t = words();
|
|
48
|
+
if (textEl) textEl.textContent = t;
|
|
49
|
+
if (on) { live.textContent = ''; requestAnimationFrame(() => { if (!dead && on) live.textContent = t; }); }
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const show = (who) => {
|
|
53
|
+
if (who !== undefined) names = list(who);
|
|
54
|
+
if (dead) return api;
|
|
55
|
+
const was = on;
|
|
56
|
+
on = true; paint();
|
|
57
|
+
if (was) return api;
|
|
58
|
+
g.killTweensOf([root, bubble, textEl].filter(Boolean));
|
|
59
|
+
root.hidden = false;
|
|
60
|
+
if (RM()) { g.set([root, bubble, textEl].filter(Boolean), { clearProps: 'all' }); g.fromTo(root, { opacity: 0 }, { opacity: 1, duration: 0.25, ease: 'none', clearProps: 'opacity' }); return api; }
|
|
61
|
+
if (o.collapse) g.fromTo(root, { height: 0 }, { height: root.scrollHeight, duration: 0.3, ease: 'power2.out', clearProps: 'height' });
|
|
62
|
+
g.fromTo(bubble, { scale: 0.4, opacity: 0 }, { scale: 1, opacity: 1, duration: 0.5, ease: 'back.out(2.6)', clearProps: 'transform,opacity' });
|
|
63
|
+
if (textEl) g.fromTo(textEl, { opacity: 0, x: -6 }, { opacity: 1, x: 0, duration: 0.35, delay: 0.12, ease: 'power3.out', clearProps: 'transform,opacity' });
|
|
64
|
+
return api;
|
|
65
|
+
};
|
|
66
|
+
const hide = () => {
|
|
67
|
+
if (!on || dead) return api;
|
|
68
|
+
on = false;
|
|
69
|
+
live.textContent = '';
|
|
70
|
+
const done = () => { if (!on) { root.hidden = true; g.set([root, bubble, textEl].filter(Boolean), { clearProps: 'all' }); } };
|
|
71
|
+
g.killTweensOf([root, bubble, textEl].filter(Boolean));
|
|
72
|
+
if (RM()) { g.to(root, { opacity: 0, duration: 0.2, ease: 'none', onComplete: done }); return api; }
|
|
73
|
+
if (textEl) g.to(textEl, { opacity: 0, duration: 0.15, ease: 'power1.in' });
|
|
74
|
+
g.to(bubble, { scale: 0.6, opacity: 0, duration: 0.22, ease: 'power2.in' });
|
|
75
|
+
if (o.collapse) g.to(root, { height: 0, duration: 0.25, delay: 0.12, ease: 'power2.inOut', onComplete: done });
|
|
76
|
+
else g.delayedCall(0.22, done);
|
|
77
|
+
return api;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
paint();
|
|
81
|
+
if (o.visible) { on = true; root.hidden = false; paint(); }
|
|
82
|
+
|
|
83
|
+
const api = {
|
|
84
|
+
root,
|
|
85
|
+
get visible() { return on; },
|
|
86
|
+
get text() { return words(); },
|
|
87
|
+
show, hide,
|
|
88
|
+
toggle(v = !on) { return v ? show() : hide(); },
|
|
89
|
+
set(who) { names = list(who); paint(); return api; },
|
|
90
|
+
destroy() { dead = true; g.killTweensOf([root, bubble, textEl].filter(Boolean)); el.innerHTML = ''; },
|
|
91
|
+
};
|
|
92
|
+
return api;
|
|
93
|
+
};
|
package/style.css
CHANGED
|
@@ -1759,3 +1759,334 @@ a.bc__crumb:hover, button.bc__crumb:hover { color: var(--ink); background: color
|
|
|
1759
1759
|
.lbd__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--lbd-c); }
|
|
1760
1760
|
.lbd__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1761
1761
|
@media (max-width: 420px) { .lbd__row { gap: 8px; padding: 8px; } .lbd__body { column-gap: 8px; } .lbd__name, .lbd__val { font-size: var(--fs-sm); } }
|
|
1762
|
+
|
|
1763
|
+
/* ---------- radio cards (radioCards) ----------
|
|
1764
|
+
Real radios inside a <fieldset>. .rcards--list: one card per row, mark on the left;
|
|
1765
|
+
.rcards--grid: cards side by side (--rc-min = narrowest card), mark in the top corner.
|
|
1766
|
+
--rc-c: the picked colour (accent). */
|
|
1767
|
+
.rcards { --rc-c: var(--accent); min-width: 0; margin: 0; padding: 0; border: 0; color: var(--ink); }
|
|
1768
|
+
.rcards__legend { margin: 0 0 10px; padding: 0; font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
|
|
1769
|
+
.rcards__vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1770
|
+
.rcards__list { display: grid; gap: 8px; }
|
|
1771
|
+
.rcards--grid .rcards__list { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--rc-min, 160px)), 1fr)); gap: 10px; }
|
|
1772
|
+
.rcard { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px 16px; border-radius: var(--r); background: var(--card);
|
|
1773
|
+
box-shadow: inset 0 0 0 1px var(--line-2); cursor: pointer; -webkit-tap-highlight-color: transparent;
|
|
1774
|
+
transition: box-shadow .25s, background-color .25s, transform .3s cubic-bezier(.3, 1.5, .5, 1); }
|
|
1775
|
+
.rcard:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc-c) 40%, var(--line-2)); }
|
|
1776
|
+
.rcard:active { transform: scale(.985); }
|
|
1777
|
+
.rcard:has(.rcard__input:checked) { box-shadow: inset 0 0 0 2px var(--rc-c); background: color-mix(in srgb, var(--rc-c) 7%, var(--card)); }
|
|
1778
|
+
.rcard:has(.rcard__input:focus-visible) { outline: 2px solid var(--rc-c); outline-offset: 3px; }
|
|
1779
|
+
.rcard:has(.rcard__input:disabled) { opacity: .5; cursor: not-allowed; }
|
|
1780
|
+
.rcard:has(.rcard__input:disabled):active { transform: none; }
|
|
1781
|
+
.rcard__input { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
|
|
1782
|
+
.rcard__mark { position: relative; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
|
|
1783
|
+
box-shadow: inset 0 0 0 2px var(--line-2); transition: box-shadow .25s; }
|
|
1784
|
+
.rcard__mark::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--rc-c); transform: scale(0);
|
|
1785
|
+
transition: transform .42s cubic-bezier(.3, 1.8, .5, 1); }
|
|
1786
|
+
.rcard__mark svg { position: relative; width: 14px; height: 14px; fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
|
|
1787
|
+
stroke-dasharray: 13; stroke-dashoffset: 13; transition: stroke-dashoffset .28s ease-out; }
|
|
1788
|
+
.rcard__input:checked + .rcard__mark { box-shadow: inset 0 0 0 2px var(--rc-c); }
|
|
1789
|
+
.rcard__input:checked + .rcard__mark::before { transform: scale(1); }
|
|
1790
|
+
.rcard__input:checked + .rcard__mark svg { stroke-dashoffset: 0; transition-delay: .12s; }
|
|
1791
|
+
.rcard__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--bg-2); color: var(--ink-2); transition: background-color .25s, color .25s; }
|
|
1792
|
+
.rcard__icon svg { width: 19px; height: 19px; }
|
|
1793
|
+
.rcard:has(.rcard__input:checked) .rcard__icon { background: color-mix(in srgb, var(--rc-c) 14%, var(--card)); color: var(--rc-c); }
|
|
1794
|
+
.rcard__text { flex: 1; display: grid; align-content: start; gap: 2px; min-width: 0; }
|
|
1795
|
+
.rcard__title { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; font-size: var(--fs); font-weight: 650; color: var(--ink); line-height: 1.35; }
|
|
1796
|
+
.rcard__badge { display: inline-block; padding: 1px 7px; border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 700; line-height: 1.5; white-space: nowrap; }
|
|
1797
|
+
.rcard__desc { font-size: var(--fs-sm); color: var(--muted); line-height: 1.4; }
|
|
1798
|
+
.rcard__price { flex: none; font-size: var(--fs); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
1799
|
+
.rcards--grid .rcard { flex-direction: column; align-items: stretch; gap: 10px; padding: 16px; }
|
|
1800
|
+
.rcards--grid .rcard__icon { align-self: flex-start; }
|
|
1801
|
+
.rcards--grid .rcard__mark { position: absolute; top: 14px; right: 14px; }
|
|
1802
|
+
.rcards--grid .rcard:not(.rcard--icon) .rcard__text { padding-right: 30px; }
|
|
1803
|
+
.rcards--grid .rcard__price { margin-top: auto; font-size: var(--fs-md); }
|
|
1804
|
+
[dir="rtl"] .rcards--grid .rcard__mark { right: auto; left: 14px; }
|
|
1805
|
+
.rcards--still .rcard, .rcards--still .rcard__mark, .rcards--still .rcard__mark::before, .rcards--still .rcard__mark svg, .rcards--still .rcard__icon { transition: none; }
|
|
1806
|
+
.rcards--still .rcard:active { transform: none; }
|
|
1807
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1808
|
+
.rcard, .rcard__mark, .rcard__mark::before, .rcard__mark svg, .rcard__icon { transition: none; }
|
|
1809
|
+
.rcard:active { transform: none; }
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
/* ---------- pricing toggle (pricingToggle) ----------
|
|
1813
|
+
The period switch is a .seg (stretchy thumb). Plans sit in a grid (--pr-min = narrowest card).
|
|
1814
|
+
.is-featured rings a plan in the accent colour. Prices use the odometer (.odo) from motion.css. */
|
|
1815
|
+
.pricing { --pr-min: 210px; container: pricing / inline-size; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 18px; min-width: 0; width: 100%; color: var(--ink); }
|
|
1816
|
+
.pricing__switch.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 100%; }
|
|
1817
|
+
.pricing__switch button { justify-content: center; height: 36px; padding: 0 16px; font-size: var(--fs-sm); }
|
|
1818
|
+
.pricing__save { padding: 1px 7px; border-radius: var(--r-full); background: var(--good-soft); color: var(--good); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
|
|
1819
|
+
.pricing__plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--pr-min)), 1fr)); gap: 12px; width: 100%; }
|
|
1820
|
+
.pricing__plan { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 18px; border-radius: var(--r-lg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
|
|
1821
|
+
.pricing__plan.is-featured { box-shadow: inset 0 0 0 2px var(--accent), var(--shadow-2); }
|
|
1822
|
+
.pricing__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
|
|
1823
|
+
.pricing__name { margin: 0; font-size: var(--fs-md); font-weight: 700; color: var(--ink); }
|
|
1824
|
+
.pricing__tag { padding: 2px 8px; border-radius: var(--r-full); background: var(--accent); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
|
|
1825
|
+
.pricing__desc { margin: 0; font-size: var(--fs-sm); color: var(--muted); }
|
|
1826
|
+
.pricing__price { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 6px; margin: 10px 0 0; line-height: 1.1; }
|
|
1827
|
+
.pricing__amount { font-size: 40px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
|
|
1828
|
+
.pricing__amount.odo { --odo-lh: 1.1; }
|
|
1829
|
+
.pricing__per { font-size: var(--fs); font-weight: 600; color: var(--muted); }
|
|
1830
|
+
.pricing__per:empty { display: none; }
|
|
1831
|
+
.pricing__was { order: -1; align-self: center; font-size: var(--fs-md); font-weight: 600; color: var(--muted); text-decoration-thickness: 1.5px; }
|
|
1832
|
+
.pricing__was[hidden] { display: none; }
|
|
1833
|
+
.pricing__note { min-height: 1.45em; margin: 2px 0 0; font-size: var(--fs-sm); color: var(--muted); }
|
|
1834
|
+
.pricing__features { display: grid; gap: 8px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: var(--fs-sm); color: var(--ink-2); }
|
|
1835
|
+
.pricing__features li { display: flex; align-items: flex-start; gap: 8px; }
|
|
1836
|
+
.pricing__features svg { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--good); }
|
|
1837
|
+
.pricing__go { margin-top: auto; }
|
|
1838
|
+
.pricing__plan > :has(+ .pricing__go) { margin-bottom: 14px; }
|
|
1839
|
+
.pricing__switch button > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
|
1840
|
+
@container pricing (max-width: 460px) { /* narrow: each badge goes under its label so the switch fits */
|
|
1841
|
+
.pricing__switch.seg { width: 100%; border-radius: var(--r); }
|
|
1842
|
+
.pricing__switch button { flex-direction: column; gap: 3px; height: auto; min-height: 36px; padding: 6px 8px; border-radius: calc(var(--r) - 3px); line-height: 1.2; white-space: normal; text-align: center; }
|
|
1843
|
+
.pricing__switch button > span:first-child { overflow: visible; }
|
|
1844
|
+
.pricing__amount { font-size: 36px; }
|
|
1845
|
+
}
|
|
1846
|
+
.pricing__vh, .pricing__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1847
|
+
.pricing__sr { margin: 0; }
|
|
1848
|
+
|
|
1849
|
+
/* ---------- email subscribe (subscribeForm) ----------
|
|
1850
|
+
Floating label inside the field, a drawn tick when the address looks right, a busy spinner in the
|
|
1851
|
+
button, then .subscribe__done laid over the row (it grows out of the button). */
|
|
1852
|
+
.subscribe { container: subscribe / inline-size; display: grid; gap: 8px; width: min(440px, 100%); min-width: 0; }
|
|
1853
|
+
.subscribe__stage { position: relative; }
|
|
1854
|
+
.subscribe__row { display: flex; flex-wrap: wrap; gap: 8px; }
|
|
1855
|
+
.subscribe__box { position: relative; flex: 1 1 210px; min-width: 0; }
|
|
1856
|
+
.subscribe--stack .subscribe__box { flex-basis: 100%; }
|
|
1857
|
+
.subscribe .subscribe__input { height: 52px; padding: 20px 40px 4px 14px; font-size: var(--fs-md); }
|
|
1858
|
+
.subscribe--icon .subscribe__input { padding-left: 42px; }
|
|
1859
|
+
.subscribe__label { position: absolute; top: 16px; left: 15px; max-width: calc(100% - 56px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
1860
|
+
font-size: var(--fs-md); color: var(--muted); pointer-events: none; transform-origin: left top; transition: transform .22s cubic-bezier(.3, 1.3, .5, 1), color .2s; }
|
|
1861
|
+
.subscribe--icon .subscribe__label { left: 43px; }
|
|
1862
|
+
.subscribe__input:focus + .subscribe__label, .subscribe__input:not(:placeholder-shown) + .subscribe__label { transform: translateY(-9px) scale(.76); font-weight: 600; }
|
|
1863
|
+
.subscribe__input:focus + .subscribe__label { color: var(--accent); }
|
|
1864
|
+
.subscribe__ic { position: absolute; top: 0; bottom: 0; left: 14px; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
|
|
1865
|
+
.subscribe__ic svg { width: 18px; height: 18px; }
|
|
1866
|
+
.subscribe__ok { position: absolute; top: 16px; right: 14px; width: 20px; height: 20px; fill: none; stroke: var(--good); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
|
|
1867
|
+
stroke-dasharray: 16; stroke-dashoffset: 16; transition: stroke-dashoffset .3s ease-out; pointer-events: none; }
|
|
1868
|
+
.subscribe.is-valid:not(.is-bad) .subscribe__ok { stroke-dashoffset: 0; }
|
|
1869
|
+
.subscribe.is-bad .subscribe__input { border-color: var(--bad); }
|
|
1870
|
+
.subscribe.is-bad .subscribe__input:focus { box-shadow: 0 0 0 4px var(--bad-soft); }
|
|
1871
|
+
.subscribe.is-bad .subscribe__label { color: var(--bad); }
|
|
1872
|
+
.subscribe .subscribe__go { position: relative; flex: 0 0 auto; height: 52px; padding: 0 22px; border-radius: 11px; font-size: var(--fs); }
|
|
1873
|
+
.subscribe--stack .subscribe__go { flex-basis: 100%; }
|
|
1874
|
+
@container subscribe (max-width: 360px) { .subscribe__box, .subscribe .subscribe__go { flex-basis: 100%; } } /* narrow: the button goes full width under the field */
|
|
1875
|
+
.subscribe__go-text { transition: opacity .2s; }
|
|
1876
|
+
.subscribe__spin { position: absolute; inset: 0; display: none; place-items: center; }
|
|
1877
|
+
.subscribe.is-busy .subscribe__go { cursor: progress; }
|
|
1878
|
+
.subscribe.is-busy .subscribe__go-text { opacity: 0; }
|
|
1879
|
+
.subscribe.is-busy .subscribe__spin { display: grid; }
|
|
1880
|
+
.subscribe.is-busy .subscribe__input { cursor: progress; }
|
|
1881
|
+
.subscribe__done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 16px; border-radius: 11px;
|
|
1882
|
+
background: var(--good-soft); color: var(--good); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 35%, transparent); font-size: var(--fs-md); font-weight: 700; outline: none; }
|
|
1883
|
+
.subscribe__done[hidden] { display: none; }
|
|
1884
|
+
.subscribe__done:focus-visible { outline: 2px solid var(--good); outline-offset: 3px; }
|
|
1885
|
+
.subscribe__tick { flex: none; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
1886
|
+
.subscribe__tick circle { stroke-dasharray: 63; }
|
|
1887
|
+
.subscribe__tick path { stroke-dasharray: 14; stroke-width: 2.4; }
|
|
1888
|
+
.subscribe__done-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1889
|
+
.subscribe__hint { min-height: 1.45em; margin: 0; font-size: var(--fs-sm); color: var(--muted); }
|
|
1890
|
+
.subscribe__hint.is-bad { color: var(--bad); font-weight: 600; }
|
|
1891
|
+
.subscribe__hint.is-good { color: var(--good); font-weight: 600; }
|
|
1892
|
+
.subscribe__sr { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
1893
|
+
[dir="rtl"] .subscribe .subscribe__input { padding: 20px 14px 4px 40px; }
|
|
1894
|
+
[dir="rtl"] .subscribe__label { left: auto; right: 15px; transform-origin: right top; }
|
|
1895
|
+
[dir="rtl"] .subscribe__ok { right: auto; left: 14px; }
|
|
1896
|
+
.subscribe--still .subscribe__label, .subscribe--still .subscribe__ok { transition: none; }
|
|
1897
|
+
@media (prefers-reduced-motion: reduce) { .subscribe__label, .subscribe__ok, .subscribe__go-text { transition: none; } }
|
|
1898
|
+
|
|
1899
|
+
/* ---------- activity timeline (activity) ----------
|
|
1900
|
+
--act-mark: size of the round marks · --act-gap: space between events · --act-bg: the surface it sits on
|
|
1901
|
+
(the marks cut a gap in the line with it) · --act-line: colour of the line. */
|
|
1902
|
+
.act { --act-mark: 30px; --act-gap: 18px; --act-bg: var(--card); --act-line: var(--line-2); position: relative; }
|
|
1903
|
+
.act__list { position: relative; display: grid; margin: 0; padding: 0; list-style: none; }
|
|
1904
|
+
.act__row { position: relative; display: grid; grid-template-columns: var(--act-mark) minmax(0, 1fr); column-gap: 12px; padding-bottom: var(--act-gap); }
|
|
1905
|
+
.act__row:last-child { padding-bottom: 0; }
|
|
1906
|
+
.act__row.is-leaving { overflow: hidden; pointer-events: none; }
|
|
1907
|
+
.act__rail { position: relative; display: flex; justify-content: center; align-items: flex-start; }
|
|
1908
|
+
.act__seg { position: absolute; z-index: 0; left: calc(50% - 1px); top: calc(var(--act-mark) / 2); bottom: calc(var(--act-mark) / -2); width: 2px; border-radius: 1px; background: var(--act-line); transform-origin: 50% 0; }
|
|
1909
|
+
.act__row:last-child .act__seg, .act__row.is-leaving .act__seg { display: none; }
|
|
1910
|
+
.act__mark { position: relative; z-index: 1; width: var(--act-mark); height: var(--act-mark); flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--c);
|
|
1911
|
+
background: color-mix(in oklab, var(--c) 15%, var(--act-bg)); box-shadow: 0 0 0 3px var(--act-bg); transition: box-shadow .45s var(--ease); }
|
|
1912
|
+
.act__mark svg { width: 15px !important; height: 15px !important; }
|
|
1913
|
+
.act__mark--dot { width: 12px; height: 12px; margin-top: calc((var(--act-mark) - 12px) / 2); background: var(--act-bg); box-shadow: inset 0 0 0 2.5px var(--c), 0 0 0 3px var(--act-bg); }
|
|
1914
|
+
.act__mark--av { --c: var(--accent); background: none; }
|
|
1915
|
+
.act__mark--av .av { width: var(--act-mark); height: var(--act-mark); font-size: 10.5px; }
|
|
1916
|
+
.act--latest .is-latest .act__mark { box-shadow: 0 0 0 3px var(--act-bg), 0 0 0 6px color-mix(in oklab, var(--c) 30%, transparent); }
|
|
1917
|
+
.act--latest .is-latest .act__mark--dot { background: var(--c); box-shadow: 0 0 0 3px var(--act-bg), 0 0 0 6px color-mix(in oklab, var(--c) 30%, transparent); }
|
|
1918
|
+
.act__tone--accent { --c: var(--accent); } .act__tone--good { --c: var(--good); } .act__tone--warn { --c: var(--warn); } .act__tone--bad { --c: var(--bad); } .act__tone--plain { --c: var(--muted); }
|
|
1919
|
+
.act__tone--indigo { --c: var(--hue-indigo); } .act__tone--teal { --c: var(--hue-teal); } .act__tone--rose { --c: var(--hue-rose); } .act__tone--amber { --c: var(--hue-amber); }
|
|
1920
|
+
.act__tone--violet { --c: var(--hue-violet); } .act__tone--green { --c: var(--hue-green); } .act__tone--slate { --c: var(--hue-slate); } .act__tone--sky { --c: var(--hue-sky); }
|
|
1921
|
+
.act__body { min-width: 0; padding-top: calc((var(--act-mark) - 20px) / 2); }
|
|
1922
|
+
.act__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
|
|
1923
|
+
.act__text { flex: 1 1 150px; min-width: 0; margin: 0; font-size: var(--fs); line-height: 20px; color: var(--ink-2); overflow-wrap: anywhere; }
|
|
1924
|
+
.act__text b { font-weight: 700; color: var(--ink); }
|
|
1925
|
+
.act__time { flex: none; font-size: var(--fs-xs); font-weight: 600; line-height: 20px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
1926
|
+
.act__detail { margin: 2px 0 0; font-size: var(--fs-sm); line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
|
|
1927
|
+
.act__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
|
|
1928
|
+
@media (prefers-reduced-motion: reduce) { .act__mark { transition: none; } }
|
|
1929
|
+
|
|
1930
|
+
/* ---------- typing indicator (typing) ----------
|
|
1931
|
+
--typing-c: the dots · --typing-bg: the bubble · --typing-dot: dot size · --typing-speed: one bounce round. */
|
|
1932
|
+
.typing { --typing-c: var(--muted); --typing-bg: var(--card-2); --typing-dot: 7px; --typing-speed: 1.2s; display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
1933
|
+
.typing[hidden] { display: none; }
|
|
1934
|
+
.typing--accent { --typing-c: var(--accent); }
|
|
1935
|
+
.typing--ink { --typing-c: var(--ink); }
|
|
1936
|
+
.typing--sm { --typing-dot: 5px; gap: 8px; }
|
|
1937
|
+
.typing--lg { --typing-dot: 9px; }
|
|
1938
|
+
.typing__bubble { display: inline-flex; align-items: center; gap: calc(var(--typing-dot) * .7); flex: none; padding: calc(var(--typing-dot) * 1.55) calc(var(--typing-dot) * 1.9);
|
|
1939
|
+
border-radius: calc(var(--typing-dot) * 3) calc(var(--typing-dot) * 3) calc(var(--typing-dot) * 3) calc(var(--typing-dot) * .9);
|
|
1940
|
+
background: var(--typing-bg); box-shadow: inset 0 0 0 1px var(--line); transform-origin: 0 100%; }
|
|
1941
|
+
.typing--bare .typing__bubble { padding: calc(var(--typing-dot) * .6) 0; border-radius: 0; background: none; box-shadow: none; }
|
|
1942
|
+
.typing__bubble i { width: var(--typing-dot); height: var(--typing-dot); border-radius: 50%; background: var(--typing-c); opacity: .45; animation: typing-hop var(--typing-speed) ease-in-out infinite; }
|
|
1943
|
+
.typing__bubble i:nth-child(2) { animation-delay: calc(var(--typing-speed) * .13); }
|
|
1944
|
+
.typing__bubble i:nth-child(3) { animation-delay: calc(var(--typing-speed) * .26); }
|
|
1945
|
+
.typing__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); }
|
|
1946
|
+
.typing__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
|
|
1947
|
+
@keyframes typing-hop { 0%, 55%, 100% { transform: none; opacity: .45; } 25% { transform: translateY(calc(var(--typing-dot) * -.85)); opacity: 1; } }
|
|
1948
|
+
@keyframes typing-fade { 0%, 55%, 100% { opacity: .3; } 25% { opacity: 1; } }
|
|
1949
|
+
.typing--still .typing__bubble i { animation-name: typing-fade; animation-duration: calc(var(--typing-speed) * 1.6); }
|
|
1950
|
+
@media (prefers-reduced-motion: reduce) { .typing__bubble i { animation-name: typing-fade; animation-duration: calc(var(--typing-speed) * 1.6); } }
|
|
1951
|
+
|
|
1952
|
+
/* ---------- before / after (beforeAfter) ----------
|
|
1953
|
+
--ba-line: the divider and knob colour · --ba-knob: knob size · --ba-pos: where the divider is (set by JS). */
|
|
1954
|
+
.ba { --ba-pos: 50%; --ba-line: var(--card); --ba-knob: 44px; position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r-lg); background: var(--card-2);
|
|
1955
|
+
cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
|
|
1956
|
+
.ba__pane { position: absolute; inset: 0; overflow: hidden; }
|
|
1957
|
+
.ba--auto .ba__after { position: relative; }
|
|
1958
|
+
.ba__pane > img, .ba__pane > video, .ba__pane > picture, .ba__pane > picture img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
|
|
1959
|
+
.ba__before { z-index: 1; clip-path: inset(0 calc(100% - var(--ba-pos)) 0 0); }
|
|
1960
|
+
.ba__tag { position: absolute; z-index: 2; top: 12px; padding: 4px 10px; border-radius: var(--r-full); background: rgba(14, 16, 22, .68); color: #fff; backdrop-filter: blur(6px);
|
|
1961
|
+
font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; pointer-events: none; transition: opacity .25s, transform .35s var(--ease); }
|
|
1962
|
+
.ba__tag--before { left: 12px; }
|
|
1963
|
+
.ba__tag--after { right: 12px; }
|
|
1964
|
+
.ba__tag--before.is-away { opacity: 0; transform: translateX(-8px); }
|
|
1965
|
+
.ba__tag--after.is-away { opacity: 0; transform: translateX(8px); }
|
|
1966
|
+
.ba__handle { position: absolute; z-index: 3; top: 0; bottom: 0; left: var(--ba-pos); width: 3px; margin-left: -1.5px; background: var(--ba-line); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 0 10px rgba(0, 0, 0, .3); outline: none; }
|
|
1967
|
+
.ba__knob { position: absolute; top: 50%; left: 50%; display: flex; align-items: center; justify-content: center; width: var(--ba-knob); height: var(--ba-knob); margin: calc(var(--ba-knob) / -2);
|
|
1968
|
+
border-radius: 50%; background: var(--ba-line); color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 14%, transparent), 0 6px 16px -4px rgba(0, 0, 0, .4); transition: box-shadow .2s; }
|
|
1969
|
+
.ba__knob svg { width: 15px !important; height: 15px !important; margin: 0 -2px; stroke-width: 2.4; }
|
|
1970
|
+
.ba__handle:focus-visible .ba__knob { box-shadow: 0 0 0 3px var(--accent), 0 6px 16px -4px rgba(0, 0, 0, .4); }
|
|
1971
|
+
.ba.is-drag { cursor: grabbing; }
|
|
1972
|
+
@media (prefers-reduced-motion: reduce) { .ba__tag { transition: none; } }
|
|
1973
|
+
|
|
1974
|
+
/* ---------- like & bookmark (likeBtn, likeButton) ----------
|
|
1975
|
+
--lk-c: the "on" colour (heart rose, star amber, bookmark accent); --lk-c2: the second burst colour;
|
|
1976
|
+
--lk-s: icon size. The burst parts (.lk__ring, .lk__bits i) rest invisible and are moved by GSAP. */
|
|
1977
|
+
.lk { --lk-c: var(--hue-rose); --lk-c2: var(--hue-amber); --lk-s: 20px; position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
|
|
1978
|
+
border: 1px solid var(--line-2); border-radius: var(--r-full); background: var(--card); color: var(--ink-2); font: inherit; font-size: var(--fs); font-weight: 650; white-space: nowrap;
|
|
1979
|
+
cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .25s, background-color .25s, color .25s; }
|
|
1980
|
+
.lk:hover { background: var(--card-2); }
|
|
1981
|
+
.lk:active { scale: .96; }
|
|
1982
|
+
.lk[aria-pressed="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--lk-c) 50%, var(--line-2)); background: color-mix(in srgb, var(--lk-c) 9%, var(--card)); }
|
|
1983
|
+
.lk--star { --lk-c: var(--hue-amber); --lk-c2: var(--hue-rose); }
|
|
1984
|
+
.lk--bookmark { --lk-c: var(--accent); }
|
|
1985
|
+
.lk--sm { --lk-s: 16px; height: 32px; padding: 0 12px 0 9px; gap: 6px; font-size: var(--fs-sm); }
|
|
1986
|
+
.lk--lg { --lk-s: 24px; height: 48px; padding: 0 20px 0 15px; gap: 10px; font-size: var(--fs-md); }
|
|
1987
|
+
.lk--icon { width: 44px; height: 44px; padding: 0; justify-content: center; }
|
|
1988
|
+
.lk--icon.lk--sm { width: 34px; height: 34px; padding: 0; }
|
|
1989
|
+
.lk--icon.lk--lg { width: 52px; height: 52px; padding: 0; }
|
|
1990
|
+
.lk__icon { position: relative; display: grid; place-items: center; flex: none; width: var(--lk-s); height: var(--lk-s); }
|
|
1991
|
+
.lk__glyph { position: relative; display: block; width: var(--lk-s); height: var(--lk-s); }
|
|
1992
|
+
.lk__bits { position: absolute; inset: 0; pointer-events: none; }
|
|
1993
|
+
.lk__line, .lk__solid { position: absolute; inset: 0; display: block; }
|
|
1994
|
+
.lk__glyph svg { display: block; width: 100%; height: 100%; overflow: visible; stroke-width: 1.8; stroke-linejoin: round; }
|
|
1995
|
+
.lk__line svg { fill: none; stroke: currentColor; transition: stroke .2s; }
|
|
1996
|
+
.lk__solid { opacity: 0; transition: opacity .15s; }
|
|
1997
|
+
.lk__solid svg { fill: var(--lk-c); stroke: var(--lk-c); }
|
|
1998
|
+
.lk[aria-pressed="true"] .lk__line svg { stroke: var(--lk-c); }
|
|
1999
|
+
.lk[aria-pressed="true"] .lk__solid { opacity: 1; }
|
|
2000
|
+
.lk--bookmark .lk__solid { opacity: 1; transition: none; clip-path: inset(0 0 100% 0); }
|
|
2001
|
+
.lk--bookmark[aria-pressed="true"] .lk__solid { clip-path: inset(0); }
|
|
2002
|
+
.lk__ring { position: absolute; left: 50%; top: 50%; width: calc(var(--lk-s) + 16px); height: calc(var(--lk-s) + 16px); translate: -50% -50%; box-sizing: border-box;
|
|
2003
|
+
border: 0 solid var(--lk-c); border-radius: 50%; opacity: 0; pointer-events: none; }
|
|
2004
|
+
.lk__bits i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--lk-c); opacity: 0; pointer-events: none; }
|
|
2005
|
+
.lk__bits i:nth-child(even) { width: 4px; height: 4px; margin: -2px; background: var(--lk-c2); }
|
|
2006
|
+
.lk--bookmark .lk__bits i, .lk--bookmark .lk__bits i:nth-child(even) { top: 12%; width: 2px; height: 7px; margin: -3.5px -1px; border-radius: 1px; background: var(--lk-c); }
|
|
2007
|
+
.lk__label { display: inline-block; }
|
|
2008
|
+
.lk__count { display: inline-block; min-width: 2ch; overflow: hidden; font-variant-numeric: tabular-nums; color: var(--muted); transition: color .25s; }
|
|
2009
|
+
.lk[aria-pressed="true"] .lk__count { color: var(--ink-2); }
|
|
2010
|
+
.lk__num { display: inline-block; }
|
|
2011
|
+
.lk__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
2012
|
+
@media (prefers-reduced-motion: reduce) { .lk, .lk * { transition: none !important; } .lk:active { scale: none; } }
|
|
2013
|
+
|
|
2014
|
+
/* ---------- notification bell (bellBtn, bellSwitch) ----------
|
|
2015
|
+
--nb-c: the "on" colour. --nb-bg: the circle behind the bell; the slash's halo uses it too, so the slash
|
|
2016
|
+
cuts a clean gap through the bell. */
|
|
2017
|
+
.nbell { --nb-c: var(--accent); --nb-bg: color-mix(in srgb, var(--ink) 7%, var(--card)); display: inline-flex; align-items: center; gap: 12px; padding: 6px 18px 6px 6px;
|
|
2018
|
+
border: 1px solid var(--line-2); border-radius: var(--r-full); background: var(--card); color: var(--ink); font: inherit; text-align: left;
|
|
2019
|
+
cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .25s, background-color .25s; }
|
|
2020
|
+
.nbell:hover { background: var(--card-2); }
|
|
2021
|
+
.nbell[aria-checked="true"] { border-color: color-mix(in srgb, var(--nb-c) 50%, var(--line-2)); }
|
|
2022
|
+
.nbell__icon { --nb-ink: var(--muted); display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--nb-bg); color: var(--nb-ink); transition: background-color .25s, color .25s; }
|
|
2023
|
+
.nbell[aria-checked="true"] .nbell__icon { --nb-bg: var(--nb-c); --nb-ink: var(--accent-ink); }
|
|
2024
|
+
.nbell svg { display: block; width: 22px; height: 22px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
|
2025
|
+
.nbell__halo { stroke: var(--nb-bg); stroke-width: 5; transition: stroke .25s; }
|
|
2026
|
+
.nbell__waves path { opacity: 0; stroke-width: 1.6; }
|
|
2027
|
+
.nbell__text { display: grid; min-width: 0; line-height: 1.3; }
|
|
2028
|
+
.nbell__label { font-size: var(--fs); font-weight: 650; }
|
|
2029
|
+
.nbell__state { display: block; overflow: hidden; font-size: var(--fs-sm); color: var(--muted); }
|
|
2030
|
+
.nbell__state span { display: inline-block; }
|
|
2031
|
+
.nbell[aria-checked="true"] .nbell__state { color: var(--nb-c); }
|
|
2032
|
+
.nbell--icon { padding: 0; border: 0; background: none; border-radius: 50%; }
|
|
2033
|
+
.nbell--icon:hover { background: none; }
|
|
2034
|
+
.nbell--icon .nbell__icon { width: 44px; height: 44px; }
|
|
2035
|
+
@media (prefers-reduced-motion: reduce) { .nbell, .nbell * { transition: none !important; } }
|
|
2036
|
+
|
|
2037
|
+
/* ---------- pay button (payBtn, payButton) ----------
|
|
2038
|
+
Builds on .btn (variant / size / block). The faces sit on top of each other in one grid cell, so the
|
|
2039
|
+
button is as wide as the longest. --pay-card: the card's colour; is-done / is-failed tint the button. */
|
|
2040
|
+
.pay { --pay-card: var(--accent); position: relative; display: inline-grid; place-items: center; min-width: 190px; overflow: hidden; isolation: isolate; transition: background-color .3s, color .3s, box-shadow .3s; }
|
|
2041
|
+
.pay.btn--primary { --pay-card: var(--accent-ink); }
|
|
2042
|
+
.pay.btn--block { display: grid; }
|
|
2043
|
+
.pay[aria-busy="true"] { cursor: progress; }
|
|
2044
|
+
.pay__face { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
|
|
2045
|
+
.pay__face:not(.pay__idle) { opacity: 0; visibility: hidden; }
|
|
2046
|
+
.pay__face svg { flex: none; }
|
|
2047
|
+
.pay__dots { display: inline-flex; gap: 3px; align-self: flex-end; margin: 0 0 .5em 1px; }
|
|
2048
|
+
.pay__dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: pay-dot .9s ease-in-out infinite; }
|
|
2049
|
+
.pay__dots i:nth-child(2) { animation-delay: .15s; }
|
|
2050
|
+
.pay__dots i:nth-child(3) { animation-delay: .3s; }
|
|
2051
|
+
@keyframes pay-dot { 0%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
|
|
2052
|
+
.pay.is-still .pay__dots i { animation: none; opacity: .7; }
|
|
2053
|
+
.pay__tick { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
|
|
2054
|
+
.pay__slot { position: absolute; left: 50%; top: 22%; bottom: 22%; width: 3px; margin-left: -1.5px; border-radius: 2px; background: color-mix(in srgb, currentColor 35%, transparent); opacity: 0; visibility: hidden; pointer-events: none; }
|
|
2055
|
+
.pay__slot i { position: absolute; inset: 0; border-radius: inherit; background: var(--pay-card); box-shadow: 0 0 12px 2px var(--pay-card); opacity: 0; }
|
|
2056
|
+
.pay__card { position: absolute; left: 50%; top: 50%; width: 30px; height: 20px; margin: -10px 0 0 -15px; border-radius: 4px; background: var(--pay-card); opacity: 0; visibility: hidden; pointer-events: none;
|
|
2057
|
+
box-shadow: 0 4px 10px -4px color-mix(in srgb, #000 50%, transparent); }
|
|
2058
|
+
.pay__card::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 4px; background: color-mix(in srgb, #000 32%, transparent); }
|
|
2059
|
+
.pay__card::after { content: ""; position: absolute; left: 4px; bottom: 4px; width: 7px; height: 5px; border-radius: 1.5px; background: color-mix(in srgb, var(--pay-card) 35%, #fff); }
|
|
2060
|
+
.pay.is-done, .pay.is-done:hover { background: color-mix(in srgb, var(--good) 84%, var(--ink)); color: var(--bg); border-color: transparent; box-shadow: 0 8px 20px -10px var(--good); }
|
|
2061
|
+
.pay.is-failed, .pay.is-failed:hover { background: color-mix(in srgb, var(--bad) 84%, var(--ink)); color: var(--bg); border-color: transparent; box-shadow: 0 8px 20px -10px var(--bad); }
|
|
2062
|
+
.pay__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
2063
|
+
@media (prefers-reduced-motion: reduce) { .pay { transition: none; } .pay__dots i { animation: none; opacity: .7; } }
|
|
2064
|
+
|
|
2065
|
+
/* ---------- speed dial (speedDial) ----------
|
|
2066
|
+
The list is placed above (or below, --down) the round button, so the dial only takes the button's room.
|
|
2067
|
+
--sd-c: the main colour; --sd-x / --sd-y: the gap to the screen corner with fixed: true. */
|
|
2068
|
+
.sdial { --sd-c: var(--accent); --sd-x: 20px; --sd-y: 20px; position: relative; display: inline-grid; width: max-content; }
|
|
2069
|
+
.sdial--fixed { position: fixed; right: var(--sd-x); bottom: var(--sd-y); z-index: 40; }
|
|
2070
|
+
.sdial--fixed.sdial--left { right: auto; left: var(--sd-x); }
|
|
2071
|
+
.sdial--fixed.sdial--down { bottom: auto; top: var(--sd-y); }
|
|
2072
|
+
.sdial__fab { display: grid; place-items: center; width: 58px; height: 58px; padding: 0; border: 0; border-radius: 50%; background: var(--sd-c); color: var(--accent-ink);
|
|
2073
|
+
box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--sd-c) 75%, transparent), var(--shadow-1); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background-color .2s, scale .15s; }
|
|
2074
|
+
.sdial__fab:hover { background: var(--accent-2); }
|
|
2075
|
+
.sdial__fab:active { scale: .94; }
|
|
2076
|
+
.sdial__fab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 50%; }
|
|
2077
|
+
.sdial__plus { display: grid; place-items: center; }
|
|
2078
|
+
.sdial__plus svg { width: 26px; height: 26px; stroke-width: 2.4; }
|
|
2079
|
+
.sdial__list { position: absolute; right: 6px; bottom: calc(100% + 14px); display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 10px; margin: 0; padding: 0; list-style: none; }
|
|
2080
|
+
.sdial__list[hidden] { display: none; }
|
|
2081
|
+
.sdial--down .sdial__list { bottom: auto; top: calc(100% + 14px); flex-direction: column; }
|
|
2082
|
+
.sdial--left .sdial__list { right: auto; left: 6px; align-items: flex-start; }
|
|
2083
|
+
.sdial__list li { display: flex; }
|
|
2084
|
+
.sdial__act { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
|
|
2085
|
+
.sdial--left .sdial__act { flex-direction: row-reverse; }
|
|
2086
|
+
.sdial__label { padding: 5px 11px; border-radius: var(--r-xs); background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow-2); font-size: var(--fs-sm); font-weight: 650; white-space: nowrap; }
|
|
2087
|
+
.sdial__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--card); color: var(--ink-2); box-shadow: 0 0 0 1px var(--line), var(--shadow-2); transition: background-color .2s, color .2s; }
|
|
2088
|
+
.sdial__ic svg { width: 20px; height: 20px; }
|
|
2089
|
+
.sdial__act:hover .sdial__ic, .sdial__act:focus-visible .sdial__ic { background: var(--sd-c); color: var(--accent-ink); }
|
|
2090
|
+
.sdial__act:focus-visible { outline: none; }
|
|
2091
|
+
.sdial__act:focus-visible .sdial__ic { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--sd-c); }
|
|
2092
|
+
@media (prefers-reduced-motion: reduce) { .sdial__fab, .sdial__ic { transition: none; } .sdial__fab:active { scale: none; } }
|