PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 1.10.1
Subscriptions for WooCommerce with Stripe Recurring Payments v1.10.1
2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 All 61 releases
subscription / assets / css / admin-components.css

admin-components.css in Subscriptions for WooCommerce with Stripe Recurring Payments 1.10.1, at assets/css/admin-components.css

1,487 lines 35.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* ==========================================================================
2 WPSubscription Admin Components (prefix: wpsubs-)
3 Design reference: WP SmartPay sp-layout.css
4 ========================================================================== */
5
6 /* --------------------------------------------------------------------------
7 Design tokens
8 -------------------------------------------------------------------------- */
9 :root {
10 --wpsubs-brand: #2271b1;
11 --wpsubs-brand-dark: #135e96;
12 --wpsubs-brand-light: #eef4fb;
13 --wpsubs-brand-ring: rgba(34, 113, 177, 0.2);
14
15 --wpsubs-surface: #ffffff;
16 --wpsubs-surface-muted: #f9fafb;
17 --wpsubs-border: #e5e7eb;
18 --wpsubs-border-strong: #d1d5db;
19
20 --wpsubs-text: #374151;
21 --wpsubs-text-muted: #6b7280;
22 --wpsubs-text-subtle: #9ca3af;
23
24 --wpsubs-radius: 8px;
25 --wpsubs-radius-sm: 5px;
26 --wpsubs-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
27 --wpsubs-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
28 }
29
30 /* --------------------------------------------------------------------------
31 Page layout wrapper
32 -------------------------------------------------------------------------- */
33 .wpsubs-layout {
34 max-width: 80rem;
35 margin: 0 auto;
36 padding: 24px 0 48px;
37 box-sizing: border-box;
38 }
39
40 /* --------------------------------------------------------------------------
41 Toolbar
42 -------------------------------------------------------------------------- */
43 .wpsubs-toolbar {
44 display: flex;
45 align-items: center;
46 gap: 8px;
47 flex-wrap: wrap;
48 margin-bottom: 16px;
49 }
50
51 .wpsubs-toolbar__spacer {
52 flex: 1;
53 min-width: 8px;
54 }
55
56 /* --------------------------------------------------------------------------
57 Base input
58 -------------------------------------------------------------------------- */
59 .wpsubs-input {
60 display: block;
61 width: 100%;
62 height: 36px;
63 min-height: 36px !important;
64 padding: 0 12px;
65 border: 1px solid var(--wpsubs-border) !important;
66 border-radius: var(--wpsubs-radius-sm) !important;
67 background: var(--wpsubs-surface) !important;
68 font-size: 13px !important;
69 font-family: inherit !important;
70 color: var(--wpsubs-text) !important;
71 outline: none !important;
72 box-shadow: none !important;
73 box-sizing: border-box;
74 transition:
75 border-color 0.15s,
76 box-shadow 0.15s;
77 }
78
79 .wpsubs-input:focus {
80 border-color: var(--wpsubs-brand) !important;
81 box-shadow: 0 0 0 3px var(--wpsubs-brand-ring) !important;
82 }
83
84 .wpsubs-input::placeholder {
85 color: var(--wpsubs-text-subtle) !important;
86 }
87
88 .wpsubs-input:disabled {
89 opacity: 0.55;
90 cursor: not-allowed;
91 background: var(--wpsubs-surface-muted) !important;
92 }
93
94 /* --------------------------------------------------------------------------
95 Input with icon (.wpsubs-input-wrap)
96
97 Usage:
98 <div class="wpsubs-input-wrap wpsubs-input-wrap--icon-l">
99 <svg class="wpsubs-input-icon">...</svg>
100 <input class="wpsubs-input">
101 </div>
102
103 Modifiers: --icon-l (icon on left) --icon-r (icon on right)
104 -------------------------------------------------------------------------- */
105 .wpsubs-input-wrap {
106 position: relative;
107 display: inline-flex;
108 align-items: center;
109 width: 100%;
110 }
111
112 .wpsubs-input-wrap .wpsubs-input-icon {
113 position: absolute;
114 top: 50%;
115 transform: translateY(-50%);
116 width: 15px;
117 height: 15px;
118 color: var(--wpsubs-text-subtle);
119 pointer-events: none;
120 flex-shrink: 0;
121 }
122
123 .wpsubs-input-wrap--icon-l .wpsubs-input-icon {
124 left: 10px;
125 }
126 .wpsubs-input-wrap--icon-l .wpsubs-input {
127 padding-left: 34px !important;
128 }
129
130 .wpsubs-input-wrap--icon-r .wpsubs-input-icon {
131 right: 10px;
132 }
133 .wpsubs-input-wrap--icon-r .wpsubs-input {
134 padding-right: 34px !important;
135 }
136
137 /* --------------------------------------------------------------------------
138 Input group (.wpsubs-input-group)
139
140 A flex row that snaps children edge-to-edge with shared borders.
141 Children: .wpsubs-input, .wpsubs-btn, .wpsubs-select, .wpsubs-adv-select
142
143 Usage:
144 <div class="wpsubs-input-group">
145 <input class="wpsubs-input">
146 <button class="wpsubs-btn wpsubs-btn--outline">Search</button>
147 </div>
148 -------------------------------------------------------------------------- */
149 .wpsubs-input-group {
150 display: inline-flex;
151 align-items: stretch;
152 }
153
154 .wpsubs-input-group > .wpsubs-input,
155 .wpsubs-input-group > .wpsubs-btn,
156 .wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn,
157 .wpsubs-input-group > .wpsubs-select,
158 .wpsubs-input-group > .wpsubs-adv-select > .wpsubs-adv-select__trigger {
159 border-radius: 0 !important;
160 }
161
162 /* Normalise button height to match input height inside a group */
163 .wpsubs-input-group > .wpsubs-btn,
164 .wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn {
165 height: 36px;
166 }
167
168 /* Restore radius on first and last direct children */
169 .wpsubs-input-group > :first-child,
170 .wpsubs-input-group > :first-child > .wpsubs-adv-select__trigger {
171 border-top-left-radius: var(--wpsubs-radius-sm) !important;
172 border-bottom-left-radius: var(--wpsubs-radius-sm) !important;
173 }
174
175 .wpsubs-input-group > :last-child,
176 .wpsubs-input-group > :last-child > .wpsubs-adv-select__trigger,
177 .wpsubs-input-group > :last-child > .wpsubs-btn {
178 border-top-right-radius: var(--wpsubs-radius-sm) !important;
179 border-bottom-right-radius: var(--wpsubs-radius-sm) !important;
180 }
181
182 /* Collapse adjacent borders */
183 .wpsubs-input-group > *:not(:first-child),
184 .wpsubs-input-group > .wpsubs-adv-select:not(:first-child) > .wpsubs-adv-select__trigger {
185 margin-left: -1px;
186 }
187
188 /* Bring focused item to front so its border ring shows fully */
189 .wpsubs-input-group > .wpsubs-input:focus,
190 .wpsubs-input-group > .wpsubs-btn:focus,
191 .wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn:focus,
192 .wpsubs-input-group > .wpsubs-select:focus,
193 .wpsubs-input-group > .wpsubs-adv-select--open > .wpsubs-adv-select__trigger {
194 position: relative;
195 z-index: 1;
196 }
197
198 /* --------------------------------------------------------------------------
199 Search — convenience wrapper around input-wrap (backward compat kept)
200 -------------------------------------------------------------------------- */
201 .wpsubs-search {
202 min-width: 180px;
203 max-width: 280px;
204 }
205
206 .wpsubs-search .wpsubs-input-wrap {
207 width: 100%;
208 }
209
210 /* --------------------------------------------------------------------------
211 Buttons
212 -------------------------------------------------------------------------- */
213 .wpsubs-btn {
214 display: inline-flex;
215 align-items: center;
216 justify-content: center;
217 gap: 5px;
218 height: 40px;
219 padding: 0 14px;
220 border-radius: var(--wpsubs-radius-sm);
221 font-size: 13px;
222 font-weight: 500;
223 font-family: inherit;
224 cursor: pointer;
225 white-space: nowrap;
226 text-decoration: none;
227 transition:
228 background 0.12s,
229 border-color 0.12s,
230 color 0.12s;
231 border: 1px solid transparent;
232 line-height: 1;
233 vertical-align: middle;
234 box-shadow: none;
235 }
236
237 .wpsubs-btn:focus,
238 .wpsubs-btn:focus-visible,
239 .wpsubs-btn:active {
240 outline: none !important;
241 box-shadow: none !important;
242 border-radius: var(--wpsubs-radius-sm) !important;
243 }
244
245 .wpsubs-btn--outline {
246 background: var(--wpsubs-surface);
247 border-color: var(--wpsubs-border);
248 color: var(--wpsubs-text);
249 }
250
251 .wpsubs-btn--outline:hover {
252 border-color: var(--wpsubs-border-strong);
253 background: var(--wpsubs-surface-muted);
254 color: var(--wpsubs-text);
255 text-decoration: none;
256 }
257
258 .wpsubs-btn--primary {
259 background: var(--wpsubs-brand);
260 border-color: var(--wpsubs-brand);
261 color: #fff;
262 }
263
264 .wpsubs-btn--primary:hover {
265 background: var(--wpsubs-brand-dark);
266 border-color: var(--wpsubs-brand-dark);
267 color: #fff;
268 text-decoration: none;
269 }
270
271 /* Icon-only square button */
272 .wpsubs-btn--icon {
273 width: 36px;
274 height: 36px;
275 padding: 0;
276 flex-shrink: 0;
277 }
278
279 .wpsubs-btn--sm {
280 height: 30px;
281 padding: 0 10px;
282 font-size: 12px;
283 }
284
285 /* --------------------------------------------------------------------------
286 Tooltip (wpsubs-tooltip)
287 CSS-only. Wrap any element with .wpsubs-tooltip and set data-tip="text".
288 -------------------------------------------------------------------------- */
289 .wpsubs-tooltip {
290 position: relative;
291 display: inline-flex;
292 }
293
294 .wpsubs-tooltip::after {
295 content: attr(data-tip);
296 position: absolute;
297 bottom: calc(100% + 6px);
298 left: 50%;
299 transform: translateX(-50%);
300 background: #1f2937;
301 color: #fff;
302 font-size: 12px;
303 font-weight: 400;
304 font-family: inherit;
305 line-height: 1.4;
306 padding: 5px 9px;
307 border-radius: 5px;
308 white-space: nowrap;
309 pointer-events: none;
310 opacity: 0;
311 transition: opacity 0.15s;
312 z-index: 9999;
313 }
314
315 /* Arrow — base sits 4px inside the element so tip meets bubble bottom edge exactly */
316 .wpsubs-tooltip::before {
317 content: "";
318 position: absolute;
319 bottom: calc(100% - 4px);
320 left: 50%;
321 transform: translateX(-50%);
322 border: 5px solid transparent;
323 border-top-color: #1f2937;
324 pointer-events: none;
325 opacity: 0;
326 transition: opacity 0.15s;
327 z-index: 9999;
328 }
329
330 .wpsubs-tooltip:hover::after,
331 .wpsubs-tooltip:hover::before {
332 opacity: 1;
333 }
334
335 /* Placement variants */
336 .wpsubs-tooltip--bottom::after {
337 bottom: auto;
338 top: calc(100% + 6px);
339 }
340
341 .wpsubs-tooltip--bottom::before {
342 bottom: auto;
343 top: calc(100% - 4px);
344 border-top-color: transparent;
345 border-bottom-color: #1f2937;
346 }
347
348 .wpsubs-btn--danger {
349 background: var(--wpsubs-surface);
350 border-color: #fca5a5;
351 color: #dc2626;
352 }
353
354 .wpsubs-btn--danger:hover {
355 background: #fef2f2;
356 border-color: #f87171;
357 color: #b91c1c;
358 text-decoration: none;
359 }
360
361 /* --------------------------------------------------------------------------
362 Advanced Select (wpsubs-adv-select)
363 Drop-in replacement for native <select>. Renders a trigger button that
364 opens a styled dropdown menu. Use wpsubs_render_adv_select() PHP helper.
365 -------------------------------------------------------------------------- */
366 .wpsubs-adv-select {
367 position: relative;
368 display: inline-block;
369 }
370
371 .wpsubs-adv-select__trigger {
372 display: inline-flex;
373 align-items: center;
374 gap: 5px;
375 height: 40px;
376 padding: 0 14px;
377 border-radius: var(--wpsubs-radius-sm);
378 font-size: 13px;
379 font-weight: 500;
380 font-family: inherit;
381 cursor: pointer;
382 white-space: nowrap;
383 text-align: left;
384 background: var(--wpsubs-surface);
385 border: 1px solid var(--wpsubs-border);
386 color: var(--wpsubs-text);
387 transition:
388 background 0.12s,
389 border-color 0.12s;
390 line-height: 1;
391 box-shadow: none;
392 }
393
394 .wpsubs-adv-select__trigger:hover {
395 border-color: var(--wpsubs-border-strong);
396 background: var(--wpsubs-surface-muted);
397 }
398
399 .wpsubs-adv-select__trigger:focus {
400 outline: none;
401 border-color: var(--wpsubs-brand);
402 box-shadow: 0 0 0 3px var(--wpsubs-brand-ring);
403 }
404
405 .wpsubs-adv-select--open .wpsubs-adv-select__trigger {
406 border-color: var(--wpsubs-brand);
407 }
408
409 .wpsubs-adv-select__label {
410 flex: 1;
411 overflow: hidden;
412 text-overflow: ellipsis;
413 white-space: nowrap;
414 }
415
416 .wpsubs-adv-select__chevron {
417 flex-shrink: 0;
418 opacity: 0.55;
419 transition: transform 0.15s;
420 }
421
422 .wpsubs-adv-select--open .wpsubs-adv-select__chevron {
423 transform: rotate(180deg);
424 }
425
426 .wpsubs-adv-select__menu {
427 display: none;
428 position: absolute;
429 top: calc(100% + 4px);
430 min-width: 100%;
431 width: max-content;
432 box-sizing: border-box;
433 background: var(--wpsubs-surface);
434 border: 1px solid var(--wpsubs-border);
435 border-radius: var(--wpsubs-radius);
436 box-shadow: var(--wpsubs-shadow-md);
437 z-index: 9999;
438 padding: 4px;
439 animation: wpsubs-dropdown-in 0.1s ease;
440 }
441
442 /* Align variants */
443 .wpsubs-adv-select--left .wpsubs-adv-select__menu {
444 left: 0;
445 right: auto;
446 }
447 .wpsubs-adv-select--right .wpsubs-adv-select__menu {
448 right: 0;
449 left: auto;
450 }
451
452 /* Default: left-aligned */
453 .wpsubs-adv-select__menu {
454 left: 0;
455 right: auto;
456 }
457
458 .wpsubs-adv-select--open .wpsubs-adv-select__menu {
459 display: block;
460 }
461
462 .wpsubs-adv-select__item {
463 display: flex;
464 align-items: center;
465 gap: 8px;
466 width: 100%;
467 padding: 7px 10px;
468 border-radius: var(--wpsubs-radius-sm);
469 border: none;
470 background: transparent;
471 font-size: 13px;
472 font-family: inherit;
473 color: var(--wpsubs-text);
474 cursor: pointer;
475 text-align: left;
476 text-decoration: none;
477 white-space: nowrap;
478 transition: background 0.1s;
479 box-sizing: border-box;
480 line-height: 1.4;
481 }
482
483 .wpsubs-adv-select__item:hover {
484 background: var(--wpsubs-surface-muted);
485 color: var(--wpsubs-text);
486 text-decoration: none;
487 }
488
489 .wpsubs-adv-select__item[data-disabled] {
490 opacity: 0.45;
491 cursor: not-allowed;
492 }
493
494 .wpsubs-adv-select__item--danger {
495 color: #dc2626;
496 }
497 .wpsubs-adv-select__item--danger:hover {
498 background: #fee2e2;
499 color: #b91c1c;
500 }
501
502 .wpsubs-adv-select__divider {
503 height: 1px;
504 background: var(--wpsubs-border);
505 margin: 4px 0;
506 }
507
508 /* --------------------------------------------------------------------------
509 Select control
510 -------------------------------------------------------------------------- */
511 .wpsubs-select {
512 height: 40px;
513 padding: 0 28px 0 10px;
514 border: 1px solid var(--wpsubs-border) !important;
515 border-radius: var(--wpsubs-radius-sm) !important;
516 background: var(--wpsubs-surface) !important;
517 font-size: 13px !important;
518 font-family: inherit !important;
519 color: var(--wpsubs-text) !important;
520 outline: none !important;
521 box-shadow: none !important;
522 cursor: pointer;
523 appearance: none;
524 -webkit-appearance: none;
525 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
526 background-repeat: no-repeat !important;
527 background-position: right 9px center !important;
528 transition: border-color 0.15s;
529 vertical-align: middle;
530 line-height: 1;
531 }
532
533 .wpsubs-select:focus {
534 border-color: var(--wpsubs-brand) !important;
535 box-shadow: 0 0 0 3px var(--wpsubs-brand-ring) !important;
536 }
537
538 /* --------------------------------------------------------------------------
539 Custom checkbox
540 -------------------------------------------------------------------------- */
541 input[type="checkbox"].wpsubs-checkbox {
542 -webkit-appearance: none !important;
543 appearance: none !important;
544 display: inline-block !important;
545 box-sizing: border-box !important;
546 width: 16px !important;
547 height: 16px !important;
548 min-width: 16px !important;
549 padding: 0 !important;
550 margin: 0 !important;
551 border: 1.5px solid var(--wpsubs-border-strong) !important;
552 border-radius: 4px !important;
553 background: var(--wpsubs-surface) !important;
554 box-shadow: none !important;
555 outline: none !important;
556 cursor: pointer;
557 flex-shrink: 0;
558 vertical-align: middle;
559 transition:
560 background 0.12s,
561 border-color 0.12s;
562 }
563
564 input[type="checkbox"].wpsubs-checkbox:hover {
565 border-color: var(--wpsubs-brand) !important;
566 }
567
568 input[type="checkbox"].wpsubs-checkbox:checked {
569 background-color: var(--wpsubs-brand) !important;
570 border-color: var(--wpsubs-brand) !important;
571 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5L6.5 12L13 5' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
572 background-repeat: no-repeat !important;
573 background-position: center !important;
574 }
575
576 /* Suppress WP admin's ::before blue checkmark overlay */
577 input[type="checkbox"].wpsubs-checkbox:checked::before,
578 input[type="checkbox"].wpsubs-checkbox:checked::after {
579 display: none !important;
580 }
581
582 input[type="checkbox"].wpsubs-checkbox:indeterminate {
583 background-color: var(--wpsubs-brand) !important;
584 border-color: var(--wpsubs-brand) !important;
585 background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8H12' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
586 background-repeat: no-repeat !important;
587 background-position: center !important;
588 background-size: 11px 11px !important;
589 }
590
591 input[type="checkbox"].wpsubs-checkbox:indeterminate::before,
592 input[type="checkbox"].wpsubs-checkbox:indeterminate::after {
593 display: none !important;
594 }
595
596 input[type="checkbox"].wpsubs-checkbox:focus {
597 outline: none !important;
598 box-shadow:
599 0 0 0 2px #fff,
600 0 0 0 4px var(--wpsubs-brand) !important;
601 }
602
603 /* --------------------------------------------------------------------------
604 Table card (white card wrapping table + footer)
605 -------------------------------------------------------------------------- */
606 .wpsubs-table-card {
607 background: var(--wpsubs-surface);
608 border: 1px solid var(--wpsubs-border);
609 border-radius: var(--wpsubs-radius);
610 }
611
612 /* --------------------------------------------------------------------------
613 Table
614 -------------------------------------------------------------------------- */
615 .wpsubs-table {
616 width: 100%;
617 border-collapse: separate;
618 border-spacing: 0;
619 font-size: 13.5px;
620 margin: 0;
621 }
622
623 /* Header */
624 .wpsubs-table thead {
625 background: var(--wpsubs-surface-muted);
626 }
627
628 .wpsubs-table thead th {
629 padding: 13px 18px;
630 text-align: left;
631 font-size: 11px;
632 font-weight: 600;
633 color: var(--wpsubs-text-muted);
634 text-transform: uppercase;
635 letter-spacing: 0.07em;
636 white-space: nowrap;
637 background: transparent;
638 border: none;
639 border-bottom: 1px solid var(--wpsubs-border);
640 box-shadow: none;
641 vertical-align: middle;
642 }
643
644 /* Round the thead top corners so they follow the card's border-radius */
645 .wpsubs-table thead tr:first-child th:first-child {
646 border-top-left-radius: calc(var(--wpsubs-radius) - 1px);
647 }
648 .wpsubs-table thead tr:first-child th:last-child {
649 border-top-right-radius: calc(var(--wpsubs-radius) - 1px);
650 }
651
652 /* Column modifiers */
653 .wpsubs-col--check {
654 width: 20px !important;
655 padding-right: 4px !important;
656 }
657 .wpsubs-col--actions {
658 width: 44px;
659 text-align: right !important;
660 }
661 .wpsubs-col--nowrap {
662 white-space: nowrap;
663 }
664
665 /* Body rows */
666 .wpsubs-table tbody tr {
667 transition: background 0.1s;
668 background: transparent;
669 }
670
671 .wpsubs-table tbody tr:hover {
672 background: var(--wpsubs-surface-muted);
673 }
674
675 .wpsubs-table tbody tr.wpsubs-row--selected {
676 background: var(--wpsubs-brand-light);
677 }
678
679 /* Cells — border on td instead of tr (required for border-collapse: separate) */
680 .wpsubs-table td {
681 padding: 18px;
682 color: var(--wpsubs-text);
683 vertical-align: middle;
684 border: none;
685 border-bottom: 1px solid var(--wpsubs-border);
686 box-shadow: none;
687 }
688
689 .wpsubs-table tbody tr:last-child td {
690 border-bottom: none;
691 }
692
693 .wpsubs-table td.wpsubs-col--check {
694 padding-right: 4px;
695 }
696
697 .wpsubs-table td.wpsubs-cell--muted {
698 color: var(--wpsubs-text-muted);
699 font-size: 12.5px;
700 }
701
702 .wpsubs-table td.wpsubs-cell--actions {
703 width: 1%;
704 white-space: nowrap;
705 padding: 0 10px 0 4px;
706 }
707
708 /* --------------------------------------------------------------------------
709 Avatar — light bg + dark text, 8 deterministic colors
710 -------------------------------------------------------------------------- */
711 .wpsubs-customer {
712 display: flex;
713 align-items: center;
714 gap: 10px;
715 min-width: 0;
716 }
717
718 .wpsubs-customer__info {
719 min-width: 0;
720 }
721
722 .wpsubs-customer__name {
723 font-weight: 400;
724 color: var(--wpsubs-text);
725 font-size: 13.5px;
726 line-height: 1.3;
727 white-space: nowrap;
728 overflow: hidden;
729 text-overflow: ellipsis;
730 text-decoration: none;
731 display: block;
732 }
733
734 a.wpsubs-customer__name:hover {
735 color: var(--wpsubs-brand);
736 text-decoration: none;
737 }
738
739 .wpsubs-customer__sub {
740 font-size: 12px;
741 color: var(--wpsubs-text-muted);
742 line-height: 1.3;
743 white-space: nowrap;
744 overflow: hidden;
745 text-overflow: ellipsis;
746 display: block;
747 }
748
749 .wpsubs-avatar {
750 width: 36px;
751 height: 36px;
752 border-radius: 50%;
753 display: flex;
754 align-items: center;
755 justify-content: center;
756 font-size: 11px;
757 font-weight: 700;
758 flex-shrink: 0;
759 text-transform: uppercase;
760 letter-spacing: 0.03em;
761 user-select: none;
762 background: var(--wpsubs-surface-muted);
763 color: var(--wpsubs-text-muted);
764 }
765
766 .wpsubs-avatar[data-color="0"] {
767 background: #dbeafe;
768 color: #1d4ed8;
769 }
770 .wpsubs-avatar[data-color="1"] {
771 background: #d1fae5;
772 color: #065f46;
773 }
774 .wpsubs-avatar[data-color="2"] {
775 background: #fce7f3;
776 color: #9d174d;
777 }
778 .wpsubs-avatar[data-color="3"] {
779 background: #e0e7ff;
780 color: #4338ca;
781 }
782 .wpsubs-avatar[data-color="4"] {
783 background: #fef3c7;
784 color: #92400e;
785 }
786 .wpsubs-avatar[data-color="5"] {
787 background: #fee2e2;
788 color: #991b1b;
789 }
790 .wpsubs-avatar[data-color="6"] {
791 background: #f3e8ff;
792 color: #6b21a8;
793 }
794 .wpsubs-avatar[data-color="7"] {
795 background: #ccfbf1;
796 color: #134e4a;
797 }
798
799 /* --------------------------------------------------------------------------
800 Cell: product title + id below
801 -------------------------------------------------------------------------- */
802 .wpsubs-cell-title {
803 font-weight: 400;
804 color: var(--wpsubs-text);
805 font-size: 13.5px;
806 line-height: 1.3;
807 white-space: nowrap;
808 overflow: hidden;
809 text-overflow: ellipsis;
810 text-decoration: none;
811 display: block;
812 }
813
814 a.wpsubs-cell-title:hover {
815 color: var(--wpsubs-brand);
816 text-decoration: none;
817 }
818
819 .wpsubs-cell-id {
820 font-size: 12px;
821 color: var(--wpsubs-text-muted);
822 line-height: 1.3;
823 display: block;
824 }
825
826 /* --------------------------------------------------------------------------
827 Status badge with dot
828 -------------------------------------------------------------------------- */
829 .wpsubs-badge {
830 display: inline-flex;
831 align-items: center;
832 gap: 5px;
833 padding: 2px 10px;
834 border-radius: 9999px;
835 font-size: 12px;
836 font-weight: 500;
837 white-space: nowrap;
838 line-height: 1.6;
839 border: 1px solid transparent;
840 }
841
842 .wpsubs-badge__dot {
843 width: 6px;
844 height: 6px;
845 border-radius: 50%;
846 flex-shrink: 0;
847 }
848
849 .wpsubs-badge--active {
850 background: #dcfce7;
851 color: #15803d;
852 border-color: #bbf7d0;
853 }
854 .wpsubs-badge--active .wpsubs-badge__dot {
855 background: #16a34a;
856 }
857
858 .wpsubs-badge--pending {
859 background: #eff6ff;
860 color: #1d4ed8;
861 border-color: #bfdbfe;
862 }
863 .wpsubs-badge--pending .wpsubs-badge__dot {
864 background: #3b82f6;
865 }
866
867 .wpsubs-badge--pending-cancel {
868 background: #fefce8;
869 color: #854d0e;
870 border-color: #fde68a;
871 }
872 .wpsubs-badge--pending-cancel .wpsubs-badge__dot {
873 background: #ca8a04;
874 }
875
876 .wpsubs-badge--cancelled {
877 background: #f3f4f6;
878 color: #4b5563;
879 border-color: #e5e7eb;
880 }
881 .wpsubs-badge--cancelled .wpsubs-badge__dot {
882 background: #9ca3af;
883 }
884
885 .wpsubs-badge--expired,
886 .wpsubs-badge--draft {
887 background: #fee2e2;
888 color: #991b1b;
889 border-color: #fca5a5;
890 }
891 .wpsubs-badge--expired .wpsubs-badge__dot,
892 .wpsubs-badge--draft .wpsubs-badge__dot {
893 background: #dc2626;
894 }
895
896 .wpsubs-badge--trash {
897 background: #fee2e2;
898 color: #991b1b;
899 border-color: #fca5a5;
900 }
901 .wpsubs-badge--trash .wpsubs-badge__dot {
902 background: #ef4444;
903 }
904
905 /* --------------------------------------------------------------------------
906 Row actions (three-dot dropdown)
907 -------------------------------------------------------------------------- */
908 .wpsubs-row-actions {
909 position: relative;
910 display: flex;
911 justify-content: flex-end;
912 }
913
914 .wpsubs-row-actions__trigger {
915 display: flex;
916 align-items: center;
917 justify-content: center;
918 width: 30px;
919 height: 30px;
920 border-radius: var(--wpsubs-radius-sm);
921 border: none;
922 background: transparent;
923 cursor: pointer;
924 color: var(--wpsubs-text-subtle);
925 transition:
926 background 0.12s,
927 color 0.12s;
928 padding: 0;
929 font-size: 18px;
930 letter-spacing: 1px;
931 line-height: 1;
932 }
933
934 .wpsubs-row-actions__trigger:hover,
935 .wpsubs-row-actions--open .wpsubs-row-actions__trigger {
936 background: var(--wpsubs-surface-muted);
937 color: var(--wpsubs-text);
938 outline: none;
939 }
940
941 @keyframes wpsubs-dropdown-in {
942 from {
943 opacity: 0;
944 transform: translateY(-4px);
945 }
946 to {
947 opacity: 1;
948 transform: translateY(0);
949 }
950 }
951
952 .wpsubs-dropdown {
953 display: none;
954 position: absolute;
955 right: 0;
956 top: calc(100% + 4px);
957 width: max-content;
958 box-sizing: border-box;
959 background: var(--wpsubs-surface);
960 border: 1px solid var(--wpsubs-border);
961 border-radius: var(--wpsubs-radius);
962 box-shadow: var(--wpsubs-shadow-md);
963 z-index: 9999;
964 padding: 4px;
965 }
966
967 .wpsubs-dropdown--open {
968 display: block;
969 animation: wpsubs-dropdown-in 0.1s ease;
970 }
971
972 .wpsubs-dropdown__item {
973 display: flex;
974 align-items: center;
975 gap: 8px;
976 width: 100%;
977 padding: 7px 10px;
978 border-radius: var(--wpsubs-radius-sm);
979 border: none;
980 background: transparent;
981 font-size: 13px;
982 font-family: inherit;
983 color: var(--wpsubs-text);
984 cursor: pointer;
985 text-align: left;
986 text-decoration: none;
987 white-space: nowrap;
988 transition: background 0.1s;
989 box-sizing: border-box;
990 line-height: 1.4;
991 }
992
993 .wpsubs-dropdown__item:hover {
994 background: var(--wpsubs-surface-muted);
995 color: var(--wpsubs-text);
996 text-decoration: none;
997 }
998
999 .wpsubs-dropdown__item:disabled {
1000 color: var(--wpsubs-text-subtle);
1001 cursor: not-allowed;
1002 }
1003
1004 .wpsubs-dropdown__item--danger {
1005 color: #dc2626;
1006 }
1007 .wpsubs-dropdown__item--danger:hover {
1008 background: #fee2e2;
1009 color: #b91c1c;
1010 }
1011
1012 .wpsubs-dropdown__divider {
1013 height: 1px;
1014 background: var(--wpsubs-border);
1015 margin: 4px 0;
1016 }
1017
1018 /* --------------------------------------------------------------------------
1019 Pagination footer (inside table card)
1020 -------------------------------------------------------------------------- */
1021 .wpsubs-pagination {
1022 display: flex;
1023 align-items: center;
1024 justify-content: space-between;
1025 padding: 12px 16px;
1026 border-top: 1px solid var(--wpsubs-border);
1027 flex-wrap: wrap;
1028 gap: 8px;
1029 }
1030
1031 .wpsubs-pagination__info {
1032 font-size: 12.5px;
1033 color: var(--wpsubs-text-muted);
1034 }
1035
1036 .wpsubs-pagination__nav {
1037 display: flex;
1038 align-items: center;
1039 gap: 4px;
1040 }
1041
1042 .wpsubs-pagination__btn {
1043 display: inline-flex;
1044 align-items: center;
1045 justify-content: center;
1046 width: 26px;
1047 height: 26px;
1048 padding: 0;
1049 border: 1px solid var(--wpsubs-border);
1050 border-radius: var(--wpsubs-radius-sm);
1051 background: var(--wpsubs-surface);
1052 cursor: pointer;
1053 font-size: 12px;
1054 font-weight: 500;
1055 color: var(--wpsubs-text-muted);
1056 transition:
1057 border-color 0.12s,
1058 color 0.12s,
1059 background 0.12s;
1060 text-decoration: none;
1061 line-height: 1;
1062 flex-shrink: 0;
1063 }
1064
1065 .wpsubs-pagination__btn:hover {
1066 border-color: var(--wpsubs-brand);
1067 color: var(--wpsubs-brand);
1068 text-decoration: none;
1069 }
1070
1071 .wpsubs-pagination__btn--disabled {
1072 opacity: 0.35;
1073 cursor: not-allowed;
1074 pointer-events: none;
1075 }
1076
1077 .wpsubs-pagination__btn--active {
1078 background: var(--wpsubs-brand);
1079 border-color: var(--wpsubs-brand);
1080 color: #fff;
1081 font-weight: 600;
1082 cursor: default;
1083 pointer-events: none;
1084 }
1085
1086 .wpsubs-pagination__ellipsis {
1087 display: inline-flex;
1088 align-items: center;
1089 justify-content: center;
1090 width: 26px;
1091 height: 26px;
1092 font-size: 12px;
1093 color: var(--wpsubs-text-subtle);
1094 user-select: none;
1095 }
1096
1097 /* --------------------------------------------------------------------------
1098 Empty state
1099 -------------------------------------------------------------------------- */
1100 .wpsubs-empty {
1101 display: flex;
1102 flex-direction: column;
1103 align-items: center;
1104 justify-content: center;
1105 padding: 64px 24px;
1106 text-align: center;
1107 }
1108
1109 .wpsubs-empty__icon {
1110 font-size: 2.5rem;
1111 margin-bottom: 14px;
1112 opacity: 0.45;
1113 line-height: 1;
1114 }
1115
1116 .wpsubs-empty__title {
1117 font-size: 15px;
1118 font-weight: 600;
1119 color: var(--wpsubs-text);
1120 margin: 0 0 6px;
1121 }
1122
1123 .wpsubs-empty__desc {
1124 font-size: 13px;
1125 color: var(--wpsubs-text-muted);
1126 margin: 0;
1127 line-height: 1.6;
1128 }
1129
1130 /* --------------------------------------------------------------------------
1131 Toggle switch (wpsubs-toggle + wpsubs-toggle-ui)
1132
1133 Usage:
1134 <input type="checkbox" class="wpsubs-toggle" id="my-toggle">
1135 <span class="wpsubs-toggle-ui" aria-hidden="true"></span>
1136 -------------------------------------------------------------------------- */
1137 .wpsubs-toggle {
1138 position: absolute !important;
1139 opacity: 0 !important;
1140 width: 0 !important;
1141 height: 0 !important;
1142 margin: 0 !important;
1143 padding: 0 !important;
1144 border: 0 !important;
1145 overflow: hidden;
1146 clip: rect(0 0 0 0);
1147 pointer-events: none;
1148 }
1149
1150 .wpsubs-toggle + .wpsubs-toggle-ui {
1151 position: relative;
1152 display: inline-block;
1153 width: 40px;
1154 height: 20px;
1155 border-radius: 999px;
1156 background: #cbd5e1;
1157 transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
1158 vertical-align: middle;
1159 cursor: pointer;
1160 }
1161
1162 .wpsubs-toggle + .wpsubs-toggle-ui::after {
1163 content: "";
1164 position: absolute;
1165 top: 2px;
1166 left: 2px;
1167 width: 16px;
1168 height: 16px;
1169 border-radius: 50%;
1170 background: #fff;
1171 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
1172 transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51);
1173 }
1174
1175 .wpsubs-toggle:checked + .wpsubs-toggle-ui {
1176 background: var(--wpsubs-brand);
1177 }
1178
1179 .wpsubs-toggle:checked + .wpsubs-toggle-ui::after {
1180 transform: translateX(20px);
1181 }
1182
1183 .wpsubs-toggle:focus + .wpsubs-toggle-ui {
1184 outline: none;
1185 }
1186
1187 .wpsubs-toggle:disabled + .wpsubs-toggle-ui {
1188 background: #e5e7eb;
1189 cursor: not-allowed;
1190 }
1191
1192 /* --------------------------------------------------------------------------
1193 Settings layout (wpsubs-settings-*)
1194
1195 Heading — full-width section label at the top of a card group.
1196 Field — two-column row: fixed-width label on left, control on right.
1197 -------------------------------------------------------------------------- */
1198
1199 /* Heading: spans full width of the card by pulling out of card padding (20px 24px) */
1200 .wpsubs-settings-heading {
1201 background: var(--wpsubs-surface-muted);
1202 border-bottom: 1px solid var(--wpsubs-border);
1203 border-radius: calc(var(--wpsubs-radius) - 1px) calc(var(--wpsubs-radius) - 1px) 0 0;
1204 margin: -20px -24px 20px;
1205 padding: 13px 24px;
1206 }
1207
1208 .wpsubs-settings-heading__title {
1209 font-size: 12px !important;
1210 font-weight: 600 !important;
1211 color: var(--wpsubs-text-muted) !important;
1212 text-transform: uppercase;
1213 letter-spacing: 0.06em;
1214 margin: 0;
1215 line-height: 1.4;
1216 }
1217
1218 .wpsubs-settings-heading__desc {
1219 font-size: 12px !important;
1220 color: var(--wpsubs-text-muted);
1221 margin: 3px 0 0;
1222 line-height: 1.5;
1223 }
1224
1225 /* Field row */
1226 .wpsubs-settings-field {
1227 display: flex;
1228 align-items: flex-start;
1229 gap: 24px;
1230 }
1231
1232 .wpsubs-settings-field__label {
1233 flex: 0 0 220px;
1234 font-size: 13px !important;
1235 font-weight: 500;
1236 color: var(--wpsubs-text);
1237 line-height: 1.4;
1238 padding-top: 8px; /* visually align with single-line input height */
1239 }
1240
1241 .wpsubs-settings-field__control {
1242 flex: 1;
1243 min-width: 0;
1244 }
1245
1246 /* Constrain and normalise control widths */
1247 .wpsubs-settings-field__control .wpsubs-input,
1248 .wpsubs-settings-field__control .wpsubs-select {
1249 min-width: 260px;
1250 max-width: 400px;
1251 }
1252
1253 .wpsubs-settings-field__control .wpsubs-adv-select__trigger {
1254 min-width: 260px;
1255 }
1256
1257 .wpsubs-settings-field__control .wpsubs-tag-select {
1258 min-width: 260px;
1259 max-width: 400px;
1260 }
1261
1262 /* Input group (joined fields) — constrain width as a whole */
1263 .wpsubs-settings-field__control .wpsubs-input-group {
1264 max-width: 420px;
1265 }
1266
1267 /* Hint / description below the control */
1268 .wpsubs-settings-field__hint {
1269 font-size: 12px !important;
1270 color: var(--wpsubs-text-muted);
1271 margin: 6px 0 0;
1272 line-height: 1.5;
1273 }
1274
1275 /* Toggle label — wraps the switch + inline label text */
1276 .wpsubs-settings-toggle-label {
1277 display: inline-flex;
1278 align-items: center;
1279 gap: 10px;
1280 cursor: pointer;
1281 line-height: 1;
1282 padding-top: 0;
1283 position: relative;
1284 }
1285
1286 .wpsubs-settings-toggle-label__text {
1287 font-size: 13px !important;
1288 color: var(--wpsubs-text);
1289 }
1290
1291 /* --------------------------------------------------------------------------
1292 Tag Select (wpsubs-tag-select)
1293 Pill/tag input with an inline filter and a filterable dropdown.
1294 Supports single and multi-select. Use wpsubs_render_tag_select() PHP helper.
1295 -------------------------------------------------------------------------- */
1296 .wpsubs-tag-select {
1297 position: relative;
1298 display: block;
1299 }
1300
1301 /* The visible "input" area: pills + text input + chevron */
1302 .wpsubs-tag-select__field {
1303 display: flex;
1304 flex-wrap: wrap;
1305 align-items: center;
1306 gap: 4px;
1307 padding: 4px 36px 4px 6px;
1308 min-height: 36px;
1309 border: 1px solid var(--wpsubs-border);
1310 border-radius: var(--wpsubs-radius-sm);
1311 background: var(--wpsubs-surface);
1312 cursor: text;
1313 position: relative;
1314 box-sizing: border-box;
1315 transition:
1316 border-color 0.12s,
1317 box-shadow 0.12s;
1318 }
1319
1320 .wpsubs-tag-select--open .wpsubs-tag-select__field,
1321 .wpsubs-tag-select__field:focus-within {
1322 border-color: var(--wpsubs-brand);
1323 box-shadow: 0 0 0 3px var(--wpsubs-brand-ring);
1324 outline: none;
1325 }
1326
1327 /* Pill (selected item badge) */
1328 .wpsubs-tag-select__pill {
1329 display: inline-flex;
1330 align-items: center;
1331 gap: 3px;
1332 padding: 2px 3px 2px 8px;
1333 background: var(--wpsubs-brand-light);
1334 border: 1px solid var(--wpsubs-brand-ring);
1335 border-radius: 4px;
1336 font-size: 12px;
1337 font-family: inherit;
1338 color: var(--wpsubs-text);
1339 max-width: 200px;
1340 flex-shrink: 0;
1341 }
1342
1343 .wpsubs-tag-select__pill-label {
1344 overflow: hidden;
1345 text-overflow: ellipsis;
1346 white-space: nowrap;
1347 line-height: 1.4;
1348 }
1349
1350 .wpsubs-tag-select__pill-remove {
1351 display: inline-flex;
1352 align-items: center;
1353 justify-content: center;
1354 width: 18px;
1355 height: 18px;
1356 border: none;
1357 background: none;
1358 padding: 0;
1359 cursor: pointer;
1360 color: var(--wpsubs-text-muted);
1361 border-radius: 3px;
1362 font-size: 15px;
1363 line-height: 1;
1364 flex-shrink: 0;
1365 transition:
1366 background 0.1s,
1367 color 0.1s;
1368 }
1369
1370 .wpsubs-tag-select__pill-remove:hover {
1371 background: rgba(34, 113, 177, 0.15);
1372 color: var(--wpsubs-brand-dark);
1373 }
1374
1375 /* Inline filter input */
1376 .wpsubs-tag-select__input {
1377 flex: 1;
1378 min-width: 80px;
1379 height: 28px !important;
1380 min-height: 28px !important;
1381 border: none !important;
1382 outline: none !important;
1383 background: transparent !important;
1384 font-size: 13px !important;
1385 font-family: inherit !important;
1386 color: var(--wpsubs-text) !important;
1387 padding: 0 2px !important;
1388 box-shadow: none !important;
1389 border-radius: 0 !important;
1390 margin: 0 !important;
1391 }
1392
1393 .wpsubs-tag-select__input::placeholder {
1394 color: var(--wpsubs-text-subtle);
1395 }
1396
1397 /* Chevron icon — absolutely positioned on the right */
1398 .wpsubs-tag-select__chevron {
1399 position: absolute;
1400 right: 10px;
1401 top: 50%;
1402 transform: translateY(-50%);
1403 pointer-events: none;
1404 opacity: 0.5;
1405 display: flex;
1406 align-items: center;
1407 transition: opacity 0.12s;
1408 }
1409
1410 .wpsubs-tag-select--open .wpsubs-tag-select__chevron {
1411 opacity: 0.8;
1412 }
1413
1414 .wpsubs-tag-select--open .wpsubs-tag-select__chevron svg {
1415 transform: rotate(180deg);
1416 }
1417
1418 /* Dropdown panel */
1419 .wpsubs-tag-select__dropdown {
1420 display: none;
1421 position: absolute;
1422 top: calc(100% + 4px);
1423 left: 0;
1424 width: 100%;
1425 box-sizing: border-box;
1426 background: var(--wpsubs-surface);
1427 border: 1px solid var(--wpsubs-border);
1428 border-radius: var(--wpsubs-radius);
1429 box-shadow: var(--wpsubs-shadow-md);
1430 z-index: 9999;
1431 animation: wpsubs-dropdown-in 0.1s ease;
1432 }
1433
1434 .wpsubs-tag-select--open .wpsubs-tag-select__dropdown {
1435 display: block;
1436 }
1437
1438 .wpsubs-tag-select__list {
1439 max-height: 220px;
1440 overflow-y: auto;
1441 padding: 4px;
1442 }
1443
1444 .wpsubs-tag-select__item {
1445 display: block;
1446 width: 100%;
1447 padding: 7px 10px;
1448 border-radius: var(--wpsubs-radius-sm);
1449 border: none;
1450 background: transparent;
1451 font-size: 13px;
1452 font-family: inherit;
1453 color: var(--wpsubs-text);
1454 cursor: pointer;
1455 text-align: left;
1456 white-space: nowrap;
1457 overflow: hidden;
1458 text-overflow: ellipsis;
1459 transition: background 0.1s;
1460 box-sizing: border-box;
1461 line-height: 1.4;
1462 }
1463
1464 .wpsubs-tag-select__item:hover {
1465 background: var(--wpsubs-surface-muted);
1466 color: var(--wpsubs-text);
1467 text-decoration: none;
1468 }
1469
1470 .wpsubs-tag-select__item[data-disabled] {
1471 opacity: 0.45;
1472 cursor: not-allowed;
1473 }
1474
1475 .wpsubs-tag-select__empty {
1476 display: none;
1477 padding: 10px 14px;
1478 font-size: 12.5px;
1479 color: var(--wpsubs-text-muted);
1480 text-align: center;
1481 }
1482
1483 /* Settings context */
1484 .wpsubs-settings-field__control .wpsubs-tag-select {
1485 max-width: 400px;
1486 }
1487