PluginProbe
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor / 2.0.11
Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor v2.0.11
2.0.13 2.0.12 2.0.11 2.0.10 2.0.9 trunk 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8
blockenberg / blocks / phone-button / style.css

style.css in Blockenberg — 600+ Advanced Gutenberg Blocks & AI Agent for WordPress Block Editor 2.0.11, at blocks/phone-button/style.css

178 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ===================================================
2 Phone Button — bkbg-phb-* (style.css)
3 =================================================== */
4
5 /* ── Floating container ────────────────────────────────────────────── */
6 .bkbg-phb-float {
7 position: fixed;
8 z-index: 99998;
9 display: flex;
10 flex-direction: column;
11 align-items: center;
12 gap: var(--phb-gap, 14px);
13 pointer-events: none;
14 /* hidden by default when scrollOffset > 0; frontend.js reveals */
15 }
16
17 .bkbg-phb-float.bkbg-phb-visible {
18 pointer-events: auto;
19 }
20
21 /* Position variants */
22 .bkbg-phb-float.bkbg-phb-bottom-right {
23 bottom: 24px;
24 right: 24px;
25 align-items: flex-end;
26 }
27 .bkbg-phb-float.bkbg-phb-bottom-left {
28 bottom: 24px;
29 left: 24px;
30 align-items: flex-start;
31 }
32 .bkbg-phb-float.bkbg-phb-bottom-center {
33 bottom: 24px;
34 left: 50%;
35 transform: translateX(-50%);
36 }
37 .bkbg-phb-float.bkbg-phb-top-right {
38 top: 24px;
39 right: 24px;
40 align-items: flex-end;
41 }
42 .bkbg-phb-float.bkbg-phb-top-left {
43 top: 24px;
44 left: 24px;
45 align-items: flex-start;
46 }
47
48 /* ── Inline container ──────────────────────────────────────────────── */
49 .bkbg-phb-inline {
50 display: flex;
51 flex-wrap: wrap;
52 align-items: center;
53 justify-content: center;
54 gap: var(--phb-gap, 14px);
55 }
56
57 /* ── Single button item ────────────────────────────────────────────── */
58 .bkbg-phb-item {
59 position: relative;
60 display: flex;
61 flex-direction: column;
62 align-items: center;
63 gap: 6px;
64 pointer-events: auto;
65 }
66
67 /* ── Pulse ring ────────────────────────────────────────────────────── */
68 .bkbg-phb-pulse {
69 position: absolute;
70 inset: -8px;
71 border-radius: inherit;
72 animation: bkbg-phb-pulse 2s ease-out infinite;
73 pointer-events: none;
74 }
75 .bkbg-phb-phone .bkbg-phb-pulse { background: var(--phb-phone-pulse, #6366f1); }
76 .bkbg-phb-whatsapp .bkbg-phb-pulse { background: var(--phb-wa-pulse, #25d366); }
77
78 @keyframes bkbg-phb-pulse {
79 0% { transform: scale(1); opacity: 0.45; }
80 70% { transform: scale(1.7); opacity: 0; }
81 100% { transform: scale(1.7); opacity: 0; }
82 }
83
84 /* ── The button itself ─────────────────────────────────────────────── */
85 .bkbg-phb-btn {
86 position: relative;
87 display: flex;
88 align-items: center;
89 justify-content: center;
90 text-decoration: none;
91 cursor: pointer;
92 border: none;
93 outline: none;
94 z-index: 1;
95 transition: transform 0.18s cubic-bezier(.34,1.56,.64,1),
96 box-shadow 0.18s ease;
97 will-change: transform;
98 flex-shrink: 0;
99 }
100
101 .bkbg-phb-btn:hover,
102 .bkbg-phb-btn:focus-visible {
103 transform: scale(1.12) translateY(-2px);
104 }
105
106 .bkbg-phb-btn:active {
107 transform: scale(0.96);
108 }
109
110 /* ── Label ─────────────────────────────────────────────────────────── */
111 .bkbg-phb-label {
112 white-space: nowrap;
113 padding: 3px 10px;
114 border-radius: 99px;
115 pointer-events: none;
116 user-select: none;
117 }
118
119 /* ── Label typography ──────────────────────────────────────────────── */
120 .bkbg-phb-label {
121 font-family: var(--bkbg-phb-lb-font-family, inherit);
122 font-size: var(--bkbg-phb-lb-font-size-d, 14px);
123 font-weight: var(--bkbg-phb-lb-font-weight, 600);
124 font-style: var(--bkbg-phb-lb-font-style, normal);
125 text-decoration: var(--bkbg-phb-lb-text-decoration, none);
126 text-transform: var(--bkbg-phb-lb-text-transform, none);
127 line-height: var(--bkbg-phb-lb-line-height-d, 1.2);
128 letter-spacing: var(--bkbg-phb-lb-letter-spacing-d, 0.01em);
129 word-spacing: var(--bkbg-phb-lb-word-spacing-d, normal);
130 }
131
132 @media (max-width: 1024px) {
133 .bkbg-phb-label {
134 font-size: var(--bkbg-phb-lb-font-size-t, var(--bkbg-phb-lb-font-size-d, 14px));
135 line-height: var(--bkbg-phb-lb-line-height-t, var(--bkbg-phb-lb-line-height-d, 1.2));
136 letter-spacing: var(--bkbg-phb-lb-letter-spacing-t, var(--bkbg-phb-lb-letter-spacing-d, 0.01em));
137 word-spacing: var(--bkbg-phb-lb-word-spacing-t, var(--bkbg-phb-lb-word-spacing-d, normal));
138 }
139 }
140 @media (max-width: 767px) {
141 .bkbg-phb-label {
142 font-size: var(--bkbg-phb-lb-font-size-m, var(--bkbg-phb-lb-font-size-t, var(--bkbg-phb-lb-font-size-d, 14px)));
143 line-height: var(--bkbg-phb-lb-line-height-m, var(--bkbg-phb-lb-line-height-t, var(--bkbg-phb-lb-line-height-d, 1.2)));
144 letter-spacing: var(--bkbg-phb-lb-letter-spacing-m, var(--bkbg-phb-lb-letter-spacing-t, var(--bkbg-phb-lb-letter-spacing-d, 0.01em)));
145 word-spacing: var(--bkbg-phb-lb-word-spacing-m, var(--bkbg-phb-lb-word-spacing-t, var(--bkbg-phb-lb-word-spacing-d, normal)));
146 }
147 }
148
149 /* ── Floating label floats beside the button ───────────────────────── */
150 .bkbg-phb-float .bkbg-phb-item {
151 flex-direction: row;
152 align-items: center;
153 gap: 8px;
154 }
155 .bkbg-phb-float.bkbg-phb-bottom-right .bkbg-phb-item,
156 .bkbg-phb-float.bkbg-phb-top-right .bkbg-phb-item {
157 flex-direction: row-reverse; /* label on left, button on right */
158 }
159
160 /* ── Editor preview wrapper (no real behaviour) ────────────────────── */
161 .bkbg-phb-editor-wrap {
162 padding: 8px;
163 }
164 .bkbg-phb-preview a {
165 pointer-events: none;
166 }
167
168 /* ── Reduced motion ────────────────────────────────────────────────── */
169 @media (prefers-reduced-motion: reduce) {
170 .bkbg-phb-pulse { animation: none; opacity: 0; }
171 .bkbg-phb-btn { transition: none; }
172 }
173
174 /* ── Print ─────────────────────────────────────────────────────────── */
175 @media print {
176 .bkbg-phb-float { display: none !important; }
177 }
178