PluginProbe
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management / 1.3.0
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management v1.3.0
1.6.0 1.5.1 1.5.0 1.4.0 1.3.0 trunk 0.0.1 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0
suredonation / assets / css / form-editor.css

form-editor.css in SureDonation – Donation Forms, Fundraising Campaigns & Donor Management 1.3.0, at assets/css/form-editor.css

787 lines 23.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * SureDonation Form Editor Styles
3 *
4 * Styles for the block editor when editing donation forms.
5 * Matches SureForms editor styling patterns.
6 *
7 * @package SureDonation
8 * @since 0.0.1
9 */
10
11 /* ==========================================================================
12 CSS Variables (Editor) - Matches SureForms
13 ========================================================================== */
14
15 :root {
16 /* Base */
17 --sd-font-size: 16px;
18
19 /* Colors - Primary */
20 --sd-color-scheme-primary: #1293B6;
21 --sd-color-scheme-primary-hover: #0F6E8C;
22
23 /* Colors - Input */
24 --sd-color-input-text: #1f2937;
25 --sd-color-input-label: #1f2937;
26 --sd-color-input-description: #6b7280;
27 --sd-color-input-placeholder: #9ca3af;
28 --sd-color-input-background: #ffffff;
29 --sd-color-input-background-hover: #f9fafb;
30 --sd-color-input-border: #d1d5db;
31 --sd-color-input-border-hover: #9ca3af;
32 --sd-color-input-border-focus-glow: rgba(18, 147, 182, 0.15);
33 --sd-color-input-selected: rgba(18, 147, 182, 0.1);
34 --sd-color-multi-choice-svg: #9ca3af;
35 --sd-color-input-prefix: #6b7280;
36
37 /* Colors - Error */
38 --sd-error-color: #dc2626;
39 --sd-error-color-border: rgba(220, 38, 38, 0.65);
40 --sd-error-color-border-glow: rgba(220, 38, 38, 0.15);
41
42 /* Layout - Gaps */
43 --sd-column-gap-between-blocks: 16px;
44 --sd-col-gap-between-fields: 16px;
45 --sd-row-gap-between-blocks: 18px;
46
47 /* Input Field */
48 --sd-input-height: 44px;
49 --sd-input-field-font-size: 16px;
50 --sd-input-field-font-weight: 400;
51 --sd-input-field-line-height: 1.5;
52 --sd-input-field-padding: 10px 14px;
53 --sd-input-field-border-radius: 6px;
54 --sd-input-label-gap: 6px;
55
56 /* Label */
57 --sd-label-font-size: 14px;
58 --sd-label-font-weight: 500;
59 --sd-label-line-height: 20px;
60
61 /* Description */
62 --sd-description-font-size: 13px;
63 --sd-description-font-weight: 400;
64 --sd-description-line-height: 18px;
65 --sd-description-margin-top: 2px;
66
67 /* Error */
68 --sd-error-font-size: 12px;
69 --sd-error-font-weight: 500;
70 --sd-error-line-height: 16px;
71
72 /* Checkbox */
73 --sd-checkbox-size: 18px;
74 --sd-checkbox-input-border-radius: 4px;
75 --sd-check-svg-top: 2px;
76 --sd-check-svg-left: 2px;
77
78 /* Multi-Choice */
79 --sd-gap-between-icon-text: 8px;
80 --sd-multi-choice-horizontal-svg-size: 16px;
81
82 /* Button */
83 --sd-btn-padding: 12px 24px;
84 --sd-btn-font-size: 16px;
85 --sd-btn-font-weight: 500;
86 --sd-btn-line-height: 1.5;
87 --sd-btn-border-radius: 6px;
88 }
89
90 /* ==========================================================================
91 Hide WordPress Default Post Summary Panel
92 ========================================================================== */
93
94 body.post-type-suredonation_form .editor-post-summary {
95 display: none !important;
96 }
97
98 body.post-type-suredonation_form .edit-post-post-status {
99 display: none !important;
100 }
101
102 /* Description panel — remove card padding */
103 .sd-single-form-settings-description .block-editor-block-card {
104 padding: 0;
105 }
106
107 /* Form settings panel — flush tabs against panel edges */
108 .sd-form-settings-panel .sd-inspector-tabs-container {
109 margin: -16px -16px 0;
110 }
111
112 /* Hide the panel toggle title — tabs replace it */
113 .sd-form-settings-panel > .components-panel__body-title {
114 display: none;
115 }
116
117 /* Add breathing room between tab bar and settings content */
118 .sd-form-settings-panel .sd-inspector-tab {
119 padding-top: 16px;
120 }
121
122 /* ==========================================================================
123 Editor Block Wrapper - Root Container Flex Layout
124 ========================================================================== */
125
126 /* Make the root container a flex container for block width support */
127 /* Target any editor containing SD blocks */
128 .is-root-container.block-editor-block-list__layout:has([data-type^="suredonation/"]),
129 .block-editor-inner-blocks .block-editor-block-list__layout:has([data-type^="suredonation/"]) {
130 display: flex;
131 flex-wrap: wrap;
132 gap: var(--sd-row-gap-between-blocks, 18px) var(--sd-col-gap-between-fields, 16px);
133 padding: 0;
134 max-width: 620px;
135 margin: 0 auto;
136 }
137
138 /* Match SureForms block padding (0 6px) — gives breathing room for selection outline */
139 body.post-type-suredonation_form div.is-root-container.block-editor-block-list__layout .block-editor-block-list__block,
140 body.post-type-suredonation_form div.is-root-container.block-editor-block-list__layout .block-list-appender {
141 padding: 0 6px !important;
142 box-sizing: border-box;
143 }
144
145 /* Ensure box-sizing for all SD blocks - critical for height calculations */
146 .is-root-container [data-type^="suredonation/"] *,
147 .editor-styles-wrapper [data-type^="suredonation/"] * {
148 box-sizing: border-box;
149 }
150
151 .editor-styles-wrapper .sd-block-single {
152 display: flex;
153 flex-direction: column;
154 width: 100%;
155 margin-bottom: 0;
156 }
157
158 /* Block placeholder styles - remove margin since gap handles it */
159 .editor-styles-wrapper [data-type^="suredonation/"] {
160 margin: 0;
161 }
162
163 /* Reset margin for last child compatibility */
164 .editor-styles-wrapper [data-type^="suredonation/"]:last-child {
165 margin-bottom: 0;
166 }
167
168 /* ==========================================================================
169 Label & Description (Editor)
170 ========================================================================== */
171
172 .editor-styles-wrapper .sd-label {
173 display: flex;
174 align-items: center;
175 gap: 4px;
176 font-size: var(--sd-label-font-size, 14px);
177 font-weight: var(--sd-label-font-weight);
178 line-height: var(--sd-label-line-height, 20px);
179 color: var(--sd-color-input-label, #1f2937);
180 margin-bottom: var(--sd-input-label-gap, 6px);
181 }
182
183 .editor-styles-wrapper .sd-required {
184 color: var(--sd-error-color);
185 }
186
187 .editor-styles-wrapper .sd-help {
188 font-size: var(--sd-description-font-size, 13px);
189 font-weight: var(--sd-description-font-weight);
190 line-height: var(--sd-description-line-height, 18px);
191 color: var(--sd-color-input-description, #6b7280);
192 margin-top: var(--sd-description-margin-top);
193 margin-bottom: var(--sd-input-label-gap, 6px);
194 }
195
196 .editor-styles-wrapper .sd-block-legend {
197 display: block;
198 font-size: var(--sd-label-font-size, 14px);
199 font-weight: var(--sd-label-font-weight);
200 line-height: var(--sd-label-line-height, 20px);
201 color: var(--sd-color-input-label, #1f2937);
202 word-break: break-word;
203 margin: 0;
204 padding: 0;
205 margin-bottom: var(--sd-input-label-gap, 6px);
206 }
207
208 /* ==========================================================================
209 Input Fields (Editor) - Matches SureForms editor input styles
210 ========================================================================== */
211
212 .editor-styles-wrapper .sd-block-wrap {
213 position: relative;
214 width: 100%;
215 }
216
217 .editor-styles-wrapper .sd-input-common {
218 display: block;
219 width: 100%;
220 height: var(--sd-input-height, 44px);
221 padding: var(--sd-input-field-padding, 10px 14px);
222 font-family: inherit;
223 font-size: var(--sd-input-field-font-size, 16px);
224 font-weight: var(--sd-input-field-font-weight);
225 line-height: var(--sd-input-field-line-height, 1.5);
226 color: var(--sd-color-input-text, #1f2937);
227 background-color: var(--sd-color-input-background, #ffffff);
228 border: 1px solid var(--sd-color-input-border, #d1d5db);
229 border-radius: var(--sd-input-field-border-radius);
230 outline: none;
231 pointer-events: none;
232 }
233
234 .editor-styles-wrapper .sd-input-common::placeholder {
235 color: var(--sd-color-input-placeholder, #9ca3af);
236 }
237
238 /* ==========================================================================
239 Number Block (Editor)
240 ========================================================================== */
241
242 .editor-styles-wrapper .sd-number-block .sd-number-wrap {
243 display: flex;
244 width: 100%;
245 align-items: center;
246 font-family: inherit;
247 font-size: var(--sd-input-field-font-size, 16px);
248 font-weight: var(--sd-input-field-font-weight);
249 line-height: var(--sd-input-field-line-height, 1.5);
250 color: var(--sd-color-input-text, #1f2937);
251 border: 1px solid var(--sd-color-input-border, #d1d5db);
252 border-radius: var(--sd-input-field-border-radius);
253 background-color: var(--sd-color-input-background, #ffffff);
254 height: var(--sd-input-height, 44px);
255 overflow: hidden;
256 }
257
258 .editor-styles-wrapper .sd-number-block .sd-input-number {
259 border: none;
260 border-radius: 0;
261 padding: var(--sd-input-field-padding, 10px 14px);
262 height: 100%;
263 flex: 1;
264 pointer-events: none;
265 }
266
267 .editor-styles-wrapper .sd-currency-symbol {
268 display: flex;
269 align-items: center;
270 height: 100%;
271 padding: 0 12px;
272 white-space: nowrap;
273 color: var(--sd-color-input-prefix, #6b7280);
274 border-right: 1px solid var(--sd-color-input-border, #d1d5db);
275 }
276
277 /* ==========================================================================
278 Error Message (Editor)
279 ========================================================================== */
280
281 .editor-styles-wrapper .suredonation-error {
282 display: none;
283 font-size: var(--sd-error-font-size);
284 font-weight: var(--sd-error-font-weight);
285 line-height: var(--sd-error-line-height);
286 color: var(--sd-error-color);
287 margin-top: 6px;
288 }
289
290 .editor-styles-wrapper .sd-error-wrap {
291 height: var(--sd-error-line-height, 16px);
292 }
293
294 /* ==========================================================================
295 Checkbox Block (Editor) - Matches SureForms checkbox editor styles
296 ========================================================================== */
297
298 .editor-styles-wrapper .sd-checkbox-block .sd-checkbox-wrap,
299 .editor-styles-wrapper .sd-cover-fees-block .sd-checkbox-wrap,
300 .editor-styles-wrapper .sd-anonymous-donation-block .sd-checkbox-wrap {
301 display: flex;
302 align-items: center;
303 }
304
305 .editor-styles-wrapper .sd-checkbox-block .sd-checkbox-label,
306 .editor-styles-wrapper .sd-cover-fees-block .sd-checkbox-label,
307 .editor-styles-wrapper .sd-anonymous-donation-block .sd-checkbox-label {
308 position: relative;
309 display: flex;
310 align-items: center;
311 gap: 10px;
312 cursor: default;
313 }
314
315 .editor-styles-wrapper .sd-checkbox-block .sd-input-checkbox,
316 .editor-styles-wrapper .sd-cover-fees-block .sd-input-checkbox,
317 .editor-styles-wrapper .sd-anonymous-donation-block .sd-input-checkbox {
318 position: relative;
319 flex-shrink: 0;
320 width: var(--sd-checkbox-size, 18px);
321 height: var(--sd-checkbox-size, 18px);
322 padding: 0;
323 border: 1px solid var(--sd-color-input-border, #d1d5db);
324 border-radius: var(--sd-checkbox-input-border-radius);
325 background-color: var(--sd-color-input-background, #ffffff);
326 -webkit-appearance: none;
327 -moz-appearance: none;
328 appearance: none;
329 margin: 0;
330 pointer-events: none;
331 }
332
333 .editor-styles-wrapper .sd-checkbox-block .sd-checkbox-text,
334 .editor-styles-wrapper .sd-cover-fees-block .sd-checkbox-text,
335 .editor-styles-wrapper .sd-anonymous-donation-block .sd-checkbox-text {
336 font-size: var(--sd-input-field-font-size, 16px);
337 line-height: var(--sd-input-field-line-height, 1.5);
338 color: var(--sd-color-input-text, #1f2937);
339 }
340
341 .editor-styles-wrapper .sd-checkbox-block .sd-checkbox-text .sd-required,
342 .editor-styles-wrapper .sd-cover-fees-block .sd-checkbox-text .sd-required,
343 .editor-styles-wrapper .sd-anonymous-donation-block .sd-checkbox-text .sd-required {
344 color: var(--sd-error-color);
345 }
346
347 /* ==========================================================================
348 Multi-Choice Block (Editor) - Matches SureForms multi-choice editor styles
349 ========================================================================== */
350
351 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap {
352 display: flex;
353 flex-wrap: wrap;
354 margin: 0 -4px;
355 width: calc(100% + 8px);
356 padding: var(--sd-multi-choice-outer-padding, 0) 0;
357 }
358
359 /* Layout variations - class on wrap div (matching SureForms pattern) */
360 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap {
361 flex-direction: row;
362 }
363
364 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-vertical-layout {
365 flex-direction: column;
366 }
367
368 /* Single choice item - matches SureForms srfm-multi-choice-single */
369 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-single {
370 padding: 4px;
371 cursor: pointer;
372 margin: 0;
373 }
374
375 /* Choice width variations - controls option width in horizontal layout */
376 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-100 .sd-multi-choice-single {
377 width: 100%;
378 }
379
380 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-75 .sd-multi-choice-single {
381 width: 75%;
382 }
383
384 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-66-66 .sd-multi-choice-single {
385 width: 66.66%;
386 }
387
388 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-50 .sd-multi-choice-single {
389 width: 50%;
390 }
391
392 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-33-33 .sd-multi-choice-single {
393 width: 33.33%;
394 }
395
396 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-choice-width-25 .sd-multi-choice-single {
397 width: 25%;
398 }
399
400 /* Block content wrap - matches SureForms srfm-block-content-wrap */
401 .editor-styles-wrapper .sd-multi-choice-block .sd-block-content-wrap {
402 display: flex;
403 justify-content: space-between;
404 align-items: center;
405 gap: var(--sd-multi-choice-internal-option-gap, 10px);
406 padding: var(--sd-input-field-padding, 10px 14px);
407 font-size: var(--sd-input-field-font-size, 16px);
408 font-weight: var(--sd-input-field-font-weight);
409 line-height: var(--sd-input-field-line-height, 1.5);
410 color: var(--sd-color-input-text, #1f2937);
411 border: 1px solid var(--sd-color-input-border, #d1d5db);
412 border-radius: var(--sd-input-field-border-radius, 6px);
413 background-color: var(--sd-color-input-background, #ffffff);
414 min-height: var(--sd-input-height, 44px);
415 height: auto;
416 margin: 0;
417 transition: 0.2s ease-out;
418 }
419
420 .editor-styles-wrapper .sd-multi-choice-block .sd-block-content-wrap:hover {
421 border-color: var(--sd-color-input-border-hover, #9ca3af);
422 background-color: var(--sd-color-input-background-hover, #f9fafb);
423 }
424
425 /* Selected state */
426 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-single.sd-selected .sd-block-content-wrap {
427 border-color: var(--sd-color-scheme-primary, #1293B6);
428 background-color: var(--sd-color-input-selected, rgba(18, 147, 182, 0.1));
429 }
430
431 /* Option container */
432 .editor-styles-wrapper .sd-multi-choice-block .sd-option-container {
433 display: flex;
434 flex: 1;
435 gap: var(--sd-multi-choice-internal-option-gap, 10px);
436 align-items: center;
437 }
438
439 .editor-styles-wrapper .sd-multi-choice-block .sd-option-container p {
440 font-size: 1em;
441 line-height: var(--sd-input-field-line-height, 1.5);
442 margin: 0;
443 word-break: break-word;
444 flex: 1;
445 }
446
447 /* Icon container */
448 .editor-styles-wrapper .sd-multi-choice-block .sd-icon-container {
449 display: flex;
450 align-items: center;
451 }
452
453 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon,
454 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon-unchecked {
455 display: flex;
456 align-items: center;
457 color: var(--sd-color-input-border, #d1d5db);
458 transition: opacity 0.2s ease-out;
459 }
460
461 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon svg,
462 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon-unchecked svg {
463 width: 20px;
464 height: 20px;
465 }
466
467 /* Unchecked state - show unchecked icon, hide checked icon */
468 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon {
469 opacity: 0;
470 width: 0;
471 overflow: hidden;
472 }
473
474 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-icon-unchecked {
475 opacity: 1;
476 }
477
478 /* Selected state - show checked icon, hide unchecked icon */
479 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-single.sd-selected .sd-multi-choice-icon {
480 opacity: 1;
481 width: auto;
482 color: var(--sd-color-scheme-primary, #1293B6);
483 }
484
485 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-single.sd-selected .sd-multi-choice-icon-unchecked {
486 opacity: 0;
487 width: 0;
488 overflow: hidden;
489 }
490
491 /* Vertical layout specific styles - class on wrap div */
492 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-vertical-layout .sd-block-content-wrap {
493 position: relative;
494 padding: var(--sd-multi-choice-vertical-padding, 16px);
495 min-height: 80px;
496 }
497
498 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-vertical-layout .sd-option-container {
499 flex-direction: column;
500 align-items: center;
501 justify-content: center;
502 text-align: center;
503 }
504
505 .editor-styles-wrapper .sd-multi-choice-block .sd-multi-choice-wrap.sd-vertical-layout .sd-icon-container {
506 position: absolute;
507 top: 8px;
508 right: 8px;
509 }
510
511 /* ==========================================================================
512 Payment Block (Editor) - Matches SureForms payment editor styles
513 ========================================================================== */
514
515 .editor-styles-wrapper .sd-payment-block {
516 width: 100%;
517 }
518
519 .editor-styles-wrapper .sd-payment-wrap {
520 margin-bottom: 16px;
521 }
522
523 .editor-styles-wrapper .sd-payment-element {
524 padding: 16px;
525 border: 1px dashed var(--sd-color-input-border, #d1d5db);
526 border-radius: var(--sd-input-field-border-radius);
527 background-color: #f9fafb;
528 min-height: 80px;
529 display: flex;
530 align-items: center;
531 justify-content: center;
532 }
533
534 .editor-styles-wrapper .sd-payment-placeholder {
535 display: flex;
536 flex-direction: column;
537 align-items: center;
538 gap: 8px;
539 color: var(--sd-color-input-description, #6b7280);
540 font-size: var(--sd-description-font-size, 13px);
541 }
542
543 .editor-styles-wrapper .sd-payment-placeholder svg {
544 width: 32px;
545 height: 32px;
546 opacity: 0.5;
547 }
548
549 .editor-styles-wrapper .sd-payment-not-configured {
550 padding: 16px;
551 background-color: #fffbeb;
552 border: 1px solid #fbbf24;
553 border-radius: var(--sd-input-field-border-radius);
554 color: #92400e;
555 font-size: var(--sd-description-font-size, 13px);
556 }
557
558 /* Payment field wrapper in editor — matches SureForms .srfm-payment-block-wrap */
559 .editor-styles-wrapper .sd-payment-field-wrapper {
560 border: 1px dashed rgba(30, 30, 30, 0.25);
561 border-radius: 6px;
562 padding: 16px;
563 margin-top: var(--sd-input-label-gap, 6px);
564 display: flex;
565 flex-direction: column;
566 gap: 12px;
567 }
568
569 .editor-styles-wrapper .sd-payment-field-wrapper > p {
570 font-weight: 400;
571 font-size: 14px;
572 line-height: 20px;
573 margin: 0;
574 padding: 0;
575 color: rgba(30, 30, 30, 0.65);
576 }
577
578 .editor-styles-wrapper .sd-stripe-payment-error-text {
579 color: #dc2626;
580 }
581
582 .editor-styles-wrapper .sd-stripe-connect-button {
583 background-color: transparent;
584 border-radius: 4px;
585 cursor: pointer;
586 font-size: 12px;
587 font-weight: 600;
588 color: #111827;
589 padding: 8px;
590 width: fit-content;
591 border: 1px solid #d1d5db;
592 box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.05);
593 }
594
595 .editor-styles-wrapper .sd-payment-field-wrapper .sd-offline-info-text {
596 color: #1e40af;
597 }
598
599 /* Submit Button Preview */
600 .editor-styles-wrapper .sd-payment-submit {
601 margin-top: 8px;
602 }
603
604 .editor-styles-wrapper .sd-submit-button {
605 display: inline-flex;
606 align-items: center;
607 justify-content: center;
608 width: 100%;
609 padding: var(--sd-btn-padding, 12px 24px);
610 font-family: inherit;
611 font-size: var(--sd-btn-font-size, 16px);
612 font-weight: var(--sd-btn-font-weight);
613 line-height: var(--sd-btn-line-height, 1.5);
614 color: #ffffff;
615 background-color: var(--sd-color-scheme-primary, #1293B6);
616 border: none;
617 border-radius: var(--sd-btn-border-radius);
618 cursor: default;
619 pointer-events: none;
620 }
621
622 /* ==========================================================================
623 Block Selection States
624 ========================================================================== */
625
626 .editor-styles-wrapper [data-type^="suredonation/"].is-selected .sd-block-single,
627 .editor-styles-wrapper [data-type^="suredonation/"].has-child-selected .sd-block-single {
628 position: relative;
629 }
630
631 /* Subtle highlight on selection */
632 .editor-styles-wrapper [data-type^="suredonation/"].is-selected::after {
633 content: '';
634 position: absolute;
635 top: -4px;
636 left: -4px;
637 right: -4px;
638 bottom: -4px;
639 border: 2px solid var(--sd-color-scheme-primary, #1293B6);
640 border-radius: 4px;
641 pointer-events: none;
642 opacity: 0.5;
643 }
644
645 /* ==========================================================================
646 Block Inserter Panel
647 ========================================================================== */
648
649 /* Style for SD blocks in the inserter */
650 .block-editor-block-types-list__list-item[class*="sd-"] .block-editor-block-types-list__item-icon {
651 color: var(--sd-color-scheme-primary, #1293B6);
652 }
653
654 /* ==========================================================================
655 Responsive Preview
656 ========================================================================== */
657
658 /* Mobile view preview */
659 .editor-styles-wrapper .is-mobile-preview .sd-block-single {
660 flex: 0 1 100% !important;
661 }
662
663 /* ==========================================================================
664 Field Width Previews
665 ========================================================================== */
666
667 /* Block width classes - applied to block wrapper via blockProps className */
668 .is-root-container .sd-block-width-100,
669 .block-editor-block-list__layout .sd-block-width-100 {
670 flex: 0 1 100%;
671 }
672
673 .is-root-container .sd-block-width-75,
674 .block-editor-block-list__layout .sd-block-width-75 {
675 flex: 0 1 calc(75% - 0.25 * var(--sd-col-gap-between-fields, 16px));
676 }
677
678 .is-root-container .sd-block-width-66-66,
679 .block-editor-block-list__layout .sd-block-width-66-66 {
680 flex: 0 1 calc(66.66% - 0.3333 * var(--sd-col-gap-between-fields, 16px));
681 }
682
683 .is-root-container .sd-block-width-50,
684 .block-editor-block-list__layout .sd-block-width-50 {
685 flex: 0 1 calc(50% - 0.5 * var(--sd-col-gap-between-fields, 16px));
686 }
687
688 .is-root-container .sd-block-width-33-33,
689 .block-editor-block-list__layout .sd-block-width-33-33 {
690 flex: 0 1 calc(33.33% - 0.6666 * var(--sd-col-gap-between-fields, 16px));
691 }
692
693 .is-root-container .sd-block-width-25,
694 .block-editor-block-list__layout .sd-block-width-25 {
695 flex: 0 1 calc(25% - 0.75 * var(--sd-col-gap-between-fields, 16px));
696 }
697
698 /* Mobile responsive - all blocks full width */
699 @media (max-width: 576px) {
700 .is-root-container .sd-block-width-25,
701 .is-root-container .sd-block-width-33-33,
702 .is-root-container .sd-block-width-50,
703 .is-root-container .sd-block-width-66-66,
704 .is-root-container .sd-block-width-75,
705 .block-editor-block-list__layout .sd-block-width-25,
706 .block-editor-block-list__layout .sd-block-width-33-33,
707 .block-editor-block-list__layout .sd-block-width-50,
708 .block-editor-block-list__layout .sd-block-width-66-66,
709 .block-editor-block-list__layout .sd-block-width-75 {
710 flex: 0 1 100%;
711 min-width: 100%;
712 }
713 }
714
715 /* ==========================================================================
716 Inspector Controls Enhancements
717 ========================================================================== */
718
719 /* Gateway selection in inspector */
720 .sd-gateway-selector {
721 display: flex;
722 flex-direction: column;
723 gap: 8px;
724 }
725
726 .sd-gateway-option {
727 display: flex;
728 align-items: center;
729 gap: 8px;
730 padding: 12px;
731 border: 1px solid #e5e7eb;
732 border-radius: 6px;
733 cursor: pointer;
734 transition: border-color 0.2s;
735 }
736
737 .sd-gateway-option:hover {
738 border-color: var(--sd-color-scheme-primary, #1293B6);
739 }
740
741 .sd-gateway-option.is-selected {
742 border-color: var(--sd-color-scheme-primary, #1293B6);
743 background-color: rgba(18, 147, 182, 0.05);
744 }
745
746 .sd-gateway-option svg {
747 width: 24px;
748 height: 24px;
749 }
750
751 .sd-gateway-option-label {
752 font-weight: 500;
753 }
754
755 .sd-gateway-option-status {
756 margin-left: auto;
757 font-size: 12px;
758 color: var(--sd-color-input-description, #6b7280);
759 }
760
761 .sd-gateway-option-status.is-configured {
762 color: var(--sd-color-scheme-primary, #1293B6);
763 }
764
765 /* ==========================================================================
766 Test Mode Banner
767 ========================================================================== */
768
769 .sd-test-mode-banner {
770 display: flex;
771 align-items: center;
772 gap: 8px;
773 padding: 8px 12px;
774 background-color: #fffbeb;
775 border: 1px solid #fbbf24;
776 border-radius: 4px;
777 font-size: 13px;
778 color: #92400e;
779 margin-bottom: 12px;
780 }
781
782 .sd-test-mode-banner svg {
783 width: 16px;
784 height: 16px;
785 flex-shrink: 0;
786 }
787