| 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: #ff4d00; |
| 11 |
--wpsubs-brand-dark: #d93f00; |
| 12 |
--wpsubs-brand-light: #fff1eb; |
| 13 |
--wpsubs-brand-ring: rgba(255, 77, 0, 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: 36px; |
| 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: 36px; |
| 376 |
width: 100%; |
| 377 |
min-width: max-content; |
| 378 |
padding: 0 14px; |
| 379 |
border-radius: var(--wpsubs-radius-sm); |
| 380 |
font-size: 13px; |
| 381 |
font-weight: 500; |
| 382 |
font-family: inherit; |
| 383 |
cursor: pointer; |
| 384 |
white-space: nowrap; |
| 385 |
text-align: left; |
| 386 |
background: var(--wpsubs-surface); |
| 387 |
border: 1px solid var(--wpsubs-border); |
| 388 |
color: var(--wpsubs-text); |
| 389 |
transition: |
| 390 |
background 0.12s, |
| 391 |
border-color 0.12s; |
| 392 |
line-height: 1; |
| 393 |
box-shadow: none; |
| 394 |
} |
| 395 |
|
| 396 |
.wpsubs-adv-select__trigger:hover { |
| 397 |
border-color: var(--wpsubs-border-strong); |
| 398 |
background: var(--wpsubs-surface-muted); |
| 399 |
} |
| 400 |
|
| 401 |
.wpsubs-adv-select__trigger:focus { |
| 402 |
outline: none; |
| 403 |
border-color: var(--wpsubs-brand); |
| 404 |
box-shadow: 0 0 0 3px var(--wpsubs-brand-ring); |
| 405 |
} |
| 406 |
|
| 407 |
.wpsubs-adv-select--open .wpsubs-adv-select__trigger { |
| 408 |
border-color: var(--wpsubs-brand); |
| 409 |
} |
| 410 |
|
| 411 |
.wpsubs-adv-select__label { |
| 412 |
flex: 1; |
| 413 |
overflow: hidden; |
| 414 |
text-overflow: ellipsis; |
| 415 |
white-space: nowrap; |
| 416 |
} |
| 417 |
|
| 418 |
.wpsubs-adv-select__chevron { |
| 419 |
flex-shrink: 0; |
| 420 |
opacity: 0.55; |
| 421 |
transition: transform 0.15s; |
| 422 |
} |
| 423 |
|
| 424 |
.wpsubs-adv-select--open .wpsubs-adv-select__chevron { |
| 425 |
transform: rotate(180deg); |
| 426 |
} |
| 427 |
|
| 428 |
.wpsubs-adv-select__menu { |
| 429 |
display: none; |
| 430 |
position: absolute; |
| 431 |
top: calc(100% + 4px); |
| 432 |
min-width: 100%; |
| 433 |
width: max-content; |
| 434 |
box-sizing: border-box; |
| 435 |
background: var(--wpsubs-surface); |
| 436 |
border: 1px solid var(--wpsubs-border); |
| 437 |
border-radius: var(--wpsubs-radius); |
| 438 |
box-shadow: var(--wpsubs-shadow-md); |
| 439 |
z-index: 9999; |
| 440 |
padding: 4px; |
| 441 |
animation: wpsubs-dropdown-in 0.1s ease; |
| 442 |
} |
| 443 |
|
| 444 |
/* Align variants */ |
| 445 |
.wpsubs-adv-select--left .wpsubs-adv-select__menu { |
| 446 |
left: 0; |
| 447 |
right: auto; |
| 448 |
} |
| 449 |
.wpsubs-adv-select--right .wpsubs-adv-select__menu { |
| 450 |
right: 0; |
| 451 |
left: auto; |
| 452 |
} |
| 453 |
|
| 454 |
/* Default: left-aligned */ |
| 455 |
.wpsubs-adv-select__menu { |
| 456 |
left: 0; |
| 457 |
right: auto; |
| 458 |
} |
| 459 |
|
| 460 |
.wpsubs-adv-select--open .wpsubs-adv-select__menu { |
| 461 |
display: block; |
| 462 |
} |
| 463 |
|
| 464 |
.wpsubs-adv-select__item { |
| 465 |
display: flex; |
| 466 |
align-items: center; |
| 467 |
gap: 8px; |
| 468 |
width: 100%; |
| 469 |
padding: 7px 10px; |
| 470 |
border-radius: var(--wpsubs-radius-sm); |
| 471 |
border: none; |
| 472 |
background: transparent; |
| 473 |
font-size: 13px; |
| 474 |
font-family: inherit; |
| 475 |
color: var(--wpsubs-text); |
| 476 |
cursor: pointer; |
| 477 |
text-align: left; |
| 478 |
text-decoration: none; |
| 479 |
white-space: nowrap; |
| 480 |
transition: background 0.1s; |
| 481 |
box-sizing: border-box; |
| 482 |
line-height: 1.4; |
| 483 |
} |
| 484 |
|
| 485 |
.wpsubs-adv-select__item:hover { |
| 486 |
background: var(--wpsubs-surface-muted); |
| 487 |
color: var(--wpsubs-text); |
| 488 |
text-decoration: none; |
| 489 |
} |
| 490 |
|
| 491 |
.wpsubs-adv-select__item[data-disabled] { |
| 492 |
opacity: 0.45; |
| 493 |
cursor: not-allowed; |
| 494 |
} |
| 495 |
|
| 496 |
.wpsubs-adv-select__item--danger { |
| 497 |
color: #dc2626; |
| 498 |
} |
| 499 |
.wpsubs-adv-select__item--danger:hover { |
| 500 |
background: #fee2e2; |
| 501 |
color: #b91c1c; |
| 502 |
} |
| 503 |
|
| 504 |
.wpsubs-adv-select__divider { |
| 505 |
height: 1px; |
| 506 |
background: var(--wpsubs-border); |
| 507 |
margin: 4px 0; |
| 508 |
} |
| 509 |
|
| 510 |
/* -------------------------------------------------------------------------- |
| 511 |
Select control |
| 512 |
-------------------------------------------------------------------------- */ |
| 513 |
.wpsubs-select { |
| 514 |
height: 36px; |
| 515 |
padding: 0 28px 0 10px; |
| 516 |
border: 1px solid var(--wpsubs-border) !important; |
| 517 |
border-radius: var(--wpsubs-radius-sm) !important; |
| 518 |
background: var(--wpsubs-surface) !important; |
| 519 |
font-size: 13px !important; |
| 520 |
font-family: inherit !important; |
| 521 |
color: var(--wpsubs-text) !important; |
| 522 |
outline: none !important; |
| 523 |
box-shadow: none !important; |
| 524 |
cursor: pointer; |
| 525 |
appearance: none; |
| 526 |
-webkit-appearance: none; |
| 527 |
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; |
| 528 |
background-repeat: no-repeat !important; |
| 529 |
background-position: right 9px center !important; |
| 530 |
transition: border-color 0.15s; |
| 531 |
vertical-align: middle; |
| 532 |
line-height: 1; |
| 533 |
} |
| 534 |
|
| 535 |
.wpsubs-select:focus { |
| 536 |
border-color: var(--wpsubs-brand) !important; |
| 537 |
box-shadow: 0 0 0 3px var(--wpsubs-brand-ring) !important; |
| 538 |
} |
| 539 |
|
| 540 |
/* -------------------------------------------------------------------------- |
| 541 |
Custom checkbox |
| 542 |
-------------------------------------------------------------------------- */ |
| 543 |
input[type="checkbox"].wpsubs-checkbox { |
| 544 |
-webkit-appearance: none !important; |
| 545 |
appearance: none !important; |
| 546 |
display: inline-block !important; |
| 547 |
box-sizing: border-box !important; |
| 548 |
width: 16px !important; |
| 549 |
height: 16px !important; |
| 550 |
min-width: 16px !important; |
| 551 |
padding: 0 !important; |
| 552 |
margin: 0 !important; |
| 553 |
border: 1.5px solid var(--wpsubs-border-strong) !important; |
| 554 |
border-radius: 4px !important; |
| 555 |
background: var(--wpsubs-surface) !important; |
| 556 |
box-shadow: none !important; |
| 557 |
outline: none !important; |
| 558 |
cursor: pointer; |
| 559 |
flex-shrink: 0; |
| 560 |
vertical-align: middle; |
| 561 |
transition: |
| 562 |
background 0.12s, |
| 563 |
border-color 0.12s; |
| 564 |
} |
| 565 |
|
| 566 |
input[type="checkbox"].wpsubs-checkbox:hover { |
| 567 |
border-color: var(--wpsubs-brand) !important; |
| 568 |
} |
| 569 |
|
| 570 |
input[type="checkbox"].wpsubs-checkbox:checked { |
| 571 |
background-color: var(--wpsubs-brand) !important; |
| 572 |
border-color: var(--wpsubs-brand) !important; |
| 573 |
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; |
| 574 |
background-repeat: no-repeat !important; |
| 575 |
background-position: center !important; |
| 576 |
} |
| 577 |
|
| 578 |
/* Suppress WP admin's ::before blue checkmark overlay */ |
| 579 |
input[type="checkbox"].wpsubs-checkbox:checked::before, |
| 580 |
input[type="checkbox"].wpsubs-checkbox:checked::after { |
| 581 |
display: none !important; |
| 582 |
} |
| 583 |
|
| 584 |
input[type="checkbox"].wpsubs-checkbox:indeterminate { |
| 585 |
background-color: var(--wpsubs-brand) !important; |
| 586 |
border-color: var(--wpsubs-brand) !important; |
| 587 |
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; |
| 588 |
background-repeat: no-repeat !important; |
| 589 |
background-position: center !important; |
| 590 |
background-size: 11px 11px !important; |
| 591 |
} |
| 592 |
|
| 593 |
input[type="checkbox"].wpsubs-checkbox:indeterminate::before, |
| 594 |
input[type="checkbox"].wpsubs-checkbox:indeterminate::after { |
| 595 |
display: none !important; |
| 596 |
} |
| 597 |
|
| 598 |
input[type="checkbox"].wpsubs-checkbox:focus { |
| 599 |
outline: none !important; |
| 600 |
box-shadow: |
| 601 |
0 0 0 2px #fff, |
| 602 |
0 0 0 4px var(--wpsubs-brand) !important; |
| 603 |
} |
| 604 |
|
| 605 |
/* -------------------------------------------------------------------------- |
| 606 |
Table card (white card wrapping table + footer) |
| 607 |
-------------------------------------------------------------------------- */ |
| 608 |
.wpsubs-table-card { |
| 609 |
background: var(--wpsubs-surface); |
| 610 |
border: 1px solid var(--wpsubs-border); |
| 611 |
border-radius: var(--wpsubs-radius); |
| 612 |
} |
| 613 |
|
| 614 |
/* -------------------------------------------------------------------------- |
| 615 |
Table |
| 616 |
-------------------------------------------------------------------------- */ |
| 617 |
.wpsubs-table { |
| 618 |
width: 100%; |
| 619 |
border-collapse: separate; |
| 620 |
border-spacing: 0; |
| 621 |
font-size: 13.5px; |
| 622 |
margin: 0; |
| 623 |
} |
| 624 |
|
| 625 |
/* Header */ |
| 626 |
.wpsubs-table thead { |
| 627 |
background: var(--wpsubs-surface-muted); |
| 628 |
} |
| 629 |
|
| 630 |
.wpsubs-table thead th { |
| 631 |
padding: 13px 18px; |
| 632 |
text-align: left; |
| 633 |
font-size: 11px; |
| 634 |
font-weight: 600; |
| 635 |
color: var(--wpsubs-text-muted); |
| 636 |
text-transform: uppercase; |
| 637 |
letter-spacing: 0.07em; |
| 638 |
white-space: nowrap; |
| 639 |
background: transparent; |
| 640 |
border: none; |
| 641 |
border-bottom: 1px solid var(--wpsubs-border); |
| 642 |
box-shadow: none; |
| 643 |
vertical-align: middle; |
| 644 |
} |
| 645 |
|
| 646 |
/* Round the thead top corners so they follow the card's border-radius */ |
| 647 |
.wpsubs-table thead tr:first-child th:first-child { |
| 648 |
border-top-left-radius: calc(var(--wpsubs-radius) - 1px); |
| 649 |
} |
| 650 |
.wpsubs-table thead tr:first-child th:last-child { |
| 651 |
border-top-right-radius: calc(var(--wpsubs-radius) - 1px); |
| 652 |
} |
| 653 |
|
| 654 |
/* Column modifiers */ |
| 655 |
.wpsubs-col--check { |
| 656 |
width: 20px !important; |
| 657 |
padding-right: 4px !important; |
| 658 |
} |
| 659 |
.wpsubs-col--actions { |
| 660 |
width: 44px; |
| 661 |
text-align: right !important; |
| 662 |
} |
| 663 |
.wpsubs-col--nowrap { |
| 664 |
white-space: nowrap; |
| 665 |
} |
| 666 |
|
| 667 |
/* Body rows */ |
| 668 |
.wpsubs-table tbody tr { |
| 669 |
transition: background 0.1s; |
| 670 |
background: transparent; |
| 671 |
} |
| 672 |
|
| 673 |
.wpsubs-table tbody tr:hover { |
| 674 |
background: var(--wpsubs-surface-muted); |
| 675 |
} |
| 676 |
|
| 677 |
.wpsubs-table tbody tr.wpsubs-row--selected { |
| 678 |
background: var(--wpsubs-brand-light); |
| 679 |
} |
| 680 |
|
| 681 |
/* Cells — border on td instead of tr (required for border-collapse: separate) */ |
| 682 |
.wpsubs-table td { |
| 683 |
padding: 18px; |
| 684 |
color: var(--wpsubs-text); |
| 685 |
vertical-align: middle; |
| 686 |
border: none; |
| 687 |
border-bottom: 1px solid var(--wpsubs-border); |
| 688 |
box-shadow: none; |
| 689 |
} |
| 690 |
|
| 691 |
.wpsubs-table tbody tr:last-child td { |
| 692 |
border-bottom: none; |
| 693 |
} |
| 694 |
|
| 695 |
.wpsubs-table td.wpsubs-col--check { |
| 696 |
padding-right: 4px; |
| 697 |
} |
| 698 |
|
| 699 |
.wpsubs-table td.wpsubs-cell--muted { |
| 700 |
color: var(--wpsubs-text-muted); |
| 701 |
font-size: 12.5px; |
| 702 |
} |
| 703 |
|
| 704 |
.wpsubs-table td.wpsubs-cell--actions { |
| 705 |
width: 1%; |
| 706 |
white-space: nowrap; |
| 707 |
padding: 0 10px 0 4px; |
| 708 |
} |
| 709 |
|
| 710 |
/* -------------------------------------------------------------------------- |
| 711 |
Avatar — light bg + dark text, 8 deterministic colors |
| 712 |
-------------------------------------------------------------------------- */ |
| 713 |
.wpsubs-customer { |
| 714 |
display: flex; |
| 715 |
align-items: center; |
| 716 |
gap: 10px; |
| 717 |
min-width: 0; |
| 718 |
} |
| 719 |
|
| 720 |
.wpsubs-customer__info { |
| 721 |
min-width: 0; |
| 722 |
} |
| 723 |
|
| 724 |
.wpsubs-customer__name { |
| 725 |
font-weight: 400; |
| 726 |
color: var(--wpsubs-text); |
| 727 |
font-size: 13.5px; |
| 728 |
line-height: 1.3; |
| 729 |
white-space: nowrap; |
| 730 |
overflow: hidden; |
| 731 |
text-overflow: ellipsis; |
| 732 |
text-decoration: none; |
| 733 |
display: block; |
| 734 |
} |
| 735 |
|
| 736 |
a.wpsubs-customer__name:hover { |
| 737 |
color: var(--wpsubs-brand); |
| 738 |
text-decoration: none; |
| 739 |
} |
| 740 |
|
| 741 |
.wpsubs-customer__sub { |
| 742 |
font-size: 12px; |
| 743 |
color: var(--wpsubs-text-muted); |
| 744 |
line-height: 1.3; |
| 745 |
white-space: nowrap; |
| 746 |
overflow: hidden; |
| 747 |
text-overflow: ellipsis; |
| 748 |
display: block; |
| 749 |
} |
| 750 |
|
| 751 |
.wpsubs-avatar { |
| 752 |
width: 36px; |
| 753 |
height: 36px; |
| 754 |
border-radius: 50%; |
| 755 |
display: flex; |
| 756 |
align-items: center; |
| 757 |
justify-content: center; |
| 758 |
font-size: 11px; |
| 759 |
font-weight: 700; |
| 760 |
flex-shrink: 0; |
| 761 |
text-transform: uppercase; |
| 762 |
letter-spacing: 0.03em; |
| 763 |
user-select: none; |
| 764 |
background: var(--wpsubs-surface-muted); |
| 765 |
color: var(--wpsubs-text-muted); |
| 766 |
} |
| 767 |
|
| 768 |
.wpsubs-avatar[data-color="0"] { |
| 769 |
background: #dbeafe; |
| 770 |
color: #1d4ed8; |
| 771 |
} |
| 772 |
.wpsubs-avatar[data-color="1"] { |
| 773 |
background: #d1fae5; |
| 774 |
color: #065f46; |
| 775 |
} |
| 776 |
.wpsubs-avatar[data-color="2"] { |
| 777 |
background: #fce7f3; |
| 778 |
color: #9d174d; |
| 779 |
} |
| 780 |
.wpsubs-avatar[data-color="3"] { |
| 781 |
background: #e0e7ff; |
| 782 |
color: #4338ca; |
| 783 |
} |
| 784 |
.wpsubs-avatar[data-color="4"] { |
| 785 |
background: #fef3c7; |
| 786 |
color: #92400e; |
| 787 |
} |
| 788 |
.wpsubs-avatar[data-color="5"] { |
| 789 |
background: #fee2e2; |
| 790 |
color: #991b1b; |
| 791 |
} |
| 792 |
.wpsubs-avatar[data-color="6"] { |
| 793 |
background: #f3e8ff; |
| 794 |
color: #6b21a8; |
| 795 |
} |
| 796 |
.wpsubs-avatar[data-color="7"] { |
| 797 |
background: #ccfbf1; |
| 798 |
color: #134e4a; |
| 799 |
} |
| 800 |
|
| 801 |
/* -------------------------------------------------------------------------- |
| 802 |
Cell: product title + id below |
| 803 |
-------------------------------------------------------------------------- */ |
| 804 |
.wpsubs-cell-title { |
| 805 |
font-weight: 400; |
| 806 |
color: var(--wpsubs-text); |
| 807 |
font-size: 13.5px; |
| 808 |
line-height: 1.3; |
| 809 |
white-space: nowrap; |
| 810 |
overflow: hidden; |
| 811 |
text-overflow: ellipsis; |
| 812 |
text-decoration: none; |
| 813 |
display: block; |
| 814 |
} |
| 815 |
|
| 816 |
a.wpsubs-cell-title:hover { |
| 817 |
color: var(--wpsubs-brand); |
| 818 |
text-decoration: none; |
| 819 |
} |
| 820 |
|
| 821 |
.wpsubs-cell-id { |
| 822 |
font-size: 12px; |
| 823 |
color: var(--wpsubs-text-muted); |
| 824 |
line-height: 1.3; |
| 825 |
display: block; |
| 826 |
} |
| 827 |
|
| 828 |
/* -------------------------------------------------------------------------- |
| 829 |
Status badge with dot |
| 830 |
-------------------------------------------------------------------------- */ |
| 831 |
.wpsubs-badge { |
| 832 |
display: inline-flex; |
| 833 |
align-items: center; |
| 834 |
gap: 5px; |
| 835 |
padding: 2px 10px; |
| 836 |
border-radius: 9999px; |
| 837 |
font-size: 12px; |
| 838 |
font-weight: 500; |
| 839 |
white-space: nowrap; |
| 840 |
line-height: 1.6; |
| 841 |
border: 1px solid transparent; |
| 842 |
} |
| 843 |
|
| 844 |
.wpsubs-badge__dot { |
| 845 |
width: 6px; |
| 846 |
height: 6px; |
| 847 |
border-radius: 50%; |
| 848 |
flex-shrink: 0; |
| 849 |
} |
| 850 |
|
| 851 |
.wpsubs-badge--active { |
| 852 |
background: #dcfce7; |
| 853 |
color: #15803d; |
| 854 |
border-color: #bbf7d0; |
| 855 |
} |
| 856 |
.wpsubs-badge--active .wpsubs-badge__dot { |
| 857 |
background: #16a34a; |
| 858 |
} |
| 859 |
|
| 860 |
.wpsubs-badge--pending { |
| 861 |
background: #eff6ff; |
| 862 |
color: #1d4ed8; |
| 863 |
border-color: #bfdbfe; |
| 864 |
} |
| 865 |
.wpsubs-badge--pending .wpsubs-badge__dot { |
| 866 |
background: #3b82f6; |
| 867 |
} |
| 868 |
|
| 869 |
.wpsubs-badge--pending-cancel { |
| 870 |
background: #fefce8; |
| 871 |
color: #854d0e; |
| 872 |
border-color: #fde68a; |
| 873 |
} |
| 874 |
.wpsubs-badge--pending-cancel .wpsubs-badge__dot { |
| 875 |
background: #ca8a04; |
| 876 |
} |
| 877 |
|
| 878 |
.wpsubs-badge--cancelled { |
| 879 |
background: #f3f4f6; |
| 880 |
color: #4b5563; |
| 881 |
border-color: #e5e7eb; |
| 882 |
} |
| 883 |
.wpsubs-badge--cancelled .wpsubs-badge__dot { |
| 884 |
background: #9ca3af; |
| 885 |
} |
| 886 |
|
| 887 |
.wpsubs-badge--expired, |
| 888 |
.wpsubs-badge--draft { |
| 889 |
background: #fee2e2; |
| 890 |
color: #991b1b; |
| 891 |
border-color: #fca5a5; |
| 892 |
} |
| 893 |
.wpsubs-badge--expired .wpsubs-badge__dot, |
| 894 |
.wpsubs-badge--draft .wpsubs-badge__dot { |
| 895 |
background: #dc2626; |
| 896 |
} |
| 897 |
|
| 898 |
.wpsubs-badge--trash { |
| 899 |
background: #fee2e2; |
| 900 |
color: #991b1b; |
| 901 |
border-color: #fca5a5; |
| 902 |
} |
| 903 |
.wpsubs-badge--trash .wpsubs-badge__dot { |
| 904 |
background: #ef4444; |
| 905 |
} |
| 906 |
|
| 907 |
/* -------------------------------------------------------------------------- |
| 908 |
Row actions (three-dot dropdown) |
| 909 |
-------------------------------------------------------------------------- */ |
| 910 |
.wpsubs-row-actions { |
| 911 |
position: relative; |
| 912 |
display: flex; |
| 913 |
justify-content: flex-end; |
| 914 |
} |
| 915 |
|
| 916 |
.wpsubs-row-actions__trigger { |
| 917 |
display: flex; |
| 918 |
align-items: center; |
| 919 |
justify-content: center; |
| 920 |
width: 30px; |
| 921 |
height: 30px; |
| 922 |
border-radius: var(--wpsubs-radius-sm); |
| 923 |
border: none; |
| 924 |
background: transparent; |
| 925 |
cursor: pointer; |
| 926 |
color: var(--wpsubs-text-subtle); |
| 927 |
transition: |
| 928 |
background 0.12s, |
| 929 |
color 0.12s; |
| 930 |
padding: 0; |
| 931 |
font-size: 18px; |
| 932 |
letter-spacing: 1px; |
| 933 |
line-height: 1; |
| 934 |
} |
| 935 |
|
| 936 |
.wpsubs-row-actions__trigger:hover, |
| 937 |
.wpsubs-row-actions--open .wpsubs-row-actions__trigger { |
| 938 |
background: var(--wpsubs-surface-muted); |
| 939 |
color: var(--wpsubs-text); |
| 940 |
outline: none; |
| 941 |
} |
| 942 |
|
| 943 |
@keyframes wpsubs-dropdown-in { |
| 944 |
from { |
| 945 |
opacity: 0; |
| 946 |
transform: translateY(-4px); |
| 947 |
} |
| 948 |
to { |
| 949 |
opacity: 1; |
| 950 |
transform: translateY(0); |
| 951 |
} |
| 952 |
} |
| 953 |
|
| 954 |
.wpsubs-dropdown { |
| 955 |
display: none; |
| 956 |
position: absolute; |
| 957 |
right: 0; |
| 958 |
top: calc(100% + 4px); |
| 959 |
width: max-content; |
| 960 |
box-sizing: border-box; |
| 961 |
background: var(--wpsubs-surface); |
| 962 |
border: 1px solid var(--wpsubs-border); |
| 963 |
border-radius: var(--wpsubs-radius); |
| 964 |
box-shadow: var(--wpsubs-shadow-md); |
| 965 |
z-index: 9999; |
| 966 |
padding: 4px; |
| 967 |
} |
| 968 |
|
| 969 |
.wpsubs-dropdown--open { |
| 970 |
display: block; |
| 971 |
animation: wpsubs-dropdown-in 0.1s ease; |
| 972 |
} |
| 973 |
|
| 974 |
.wpsubs-dropdown__item { |
| 975 |
display: flex; |
| 976 |
align-items: center; |
| 977 |
gap: 8px; |
| 978 |
width: 100%; |
| 979 |
padding: 7px 10px; |
| 980 |
border-radius: var(--wpsubs-radius-sm); |
| 981 |
border: none; |
| 982 |
background: transparent; |
| 983 |
font-size: 13px; |
| 984 |
font-family: inherit; |
| 985 |
color: var(--wpsubs-text); |
| 986 |
cursor: pointer; |
| 987 |
text-align: left; |
| 988 |
text-decoration: none; |
| 989 |
white-space: nowrap; |
| 990 |
transition: background 0.1s; |
| 991 |
box-sizing: border-box; |
| 992 |
line-height: 1.4; |
| 993 |
} |
| 994 |
|
| 995 |
.wpsubs-dropdown__item:hover { |
| 996 |
background: var(--wpsubs-surface-muted); |
| 997 |
color: var(--wpsubs-text); |
| 998 |
text-decoration: none; |
| 999 |
} |
| 1000 |
|
| 1001 |
.wpsubs-dropdown__item:disabled { |
| 1002 |
color: var(--wpsubs-text-subtle); |
| 1003 |
cursor: not-allowed; |
| 1004 |
} |
| 1005 |
|
| 1006 |
.wpsubs-dropdown__item--danger { |
| 1007 |
color: #dc2626; |
| 1008 |
} |
| 1009 |
.wpsubs-dropdown__item--danger:hover { |
| 1010 |
background: #fee2e2; |
| 1011 |
color: #b91c1c; |
| 1012 |
} |
| 1013 |
|
| 1014 |
.wpsubs-dropdown__divider { |
| 1015 |
height: 1px; |
| 1016 |
background: var(--wpsubs-border); |
| 1017 |
margin: 4px 0; |
| 1018 |
} |
| 1019 |
|
| 1020 |
/* -------------------------------------------------------------------------- |
| 1021 |
Pagination footer (inside table card) |
| 1022 |
-------------------------------------------------------------------------- */ |
| 1023 |
.wpsubs-pagination { |
| 1024 |
display: flex; |
| 1025 |
align-items: center; |
| 1026 |
justify-content: space-between; |
| 1027 |
padding: 12px 16px; |
| 1028 |
border-top: 1px solid var(--wpsubs-border); |
| 1029 |
flex-wrap: wrap; |
| 1030 |
gap: 8px; |
| 1031 |
} |
| 1032 |
|
| 1033 |
.wpsubs-pagination__info { |
| 1034 |
font-size: 12.5px; |
| 1035 |
color: var(--wpsubs-text-muted); |
| 1036 |
} |
| 1037 |
|
| 1038 |
.wpsubs-pagination__nav { |
| 1039 |
display: flex; |
| 1040 |
align-items: center; |
| 1041 |
gap: 4px; |
| 1042 |
} |
| 1043 |
|
| 1044 |
.wpsubs-pagination__btn { |
| 1045 |
display: inline-flex; |
| 1046 |
align-items: center; |
| 1047 |
justify-content: center; |
| 1048 |
width: 26px; |
| 1049 |
height: 26px; |
| 1050 |
padding: 0; |
| 1051 |
border: 1px solid var(--wpsubs-border); |
| 1052 |
border-radius: var(--wpsubs-radius-sm); |
| 1053 |
background: var(--wpsubs-surface); |
| 1054 |
cursor: pointer; |
| 1055 |
font-size: 12px; |
| 1056 |
font-weight: 500; |
| 1057 |
color: var(--wpsubs-text-muted); |
| 1058 |
transition: |
| 1059 |
border-color 0.12s, |
| 1060 |
color 0.12s, |
| 1061 |
background 0.12s; |
| 1062 |
text-decoration: none; |
| 1063 |
line-height: 1; |
| 1064 |
flex-shrink: 0; |
| 1065 |
} |
| 1066 |
|
| 1067 |
.wpsubs-pagination__btn:hover { |
| 1068 |
border-color: var(--wpsubs-brand); |
| 1069 |
color: var(--wpsubs-brand); |
| 1070 |
text-decoration: none; |
| 1071 |
} |
| 1072 |
|
| 1073 |
.wpsubs-pagination__btn--disabled { |
| 1074 |
opacity: 0.35; |
| 1075 |
cursor: not-allowed; |
| 1076 |
pointer-events: none; |
| 1077 |
} |
| 1078 |
|
| 1079 |
.wpsubs-pagination__btn--active { |
| 1080 |
background: var(--wpsubs-brand); |
| 1081 |
border-color: var(--wpsubs-brand); |
| 1082 |
color: #fff; |
| 1083 |
font-weight: 600; |
| 1084 |
cursor: default; |
| 1085 |
pointer-events: none; |
| 1086 |
} |
| 1087 |
|
| 1088 |
.wpsubs-pagination__ellipsis { |
| 1089 |
display: inline-flex; |
| 1090 |
align-items: center; |
| 1091 |
justify-content: center; |
| 1092 |
width: 26px; |
| 1093 |
height: 26px; |
| 1094 |
font-size: 12px; |
| 1095 |
color: var(--wpsubs-text-subtle); |
| 1096 |
user-select: none; |
| 1097 |
} |
| 1098 |
|
| 1099 |
/* -------------------------------------------------------------------------- |
| 1100 |
Empty state |
| 1101 |
-------------------------------------------------------------------------- */ |
| 1102 |
.wpsubs-empty { |
| 1103 |
display: flex; |
| 1104 |
flex-direction: column; |
| 1105 |
align-items: center; |
| 1106 |
justify-content: center; |
| 1107 |
padding: 64px 24px; |
| 1108 |
text-align: center; |
| 1109 |
} |
| 1110 |
|
| 1111 |
.wpsubs-empty__icon { |
| 1112 |
font-size: 2.5rem; |
| 1113 |
margin-bottom: 14px; |
| 1114 |
opacity: 0.45; |
| 1115 |
line-height: 1; |
| 1116 |
} |
| 1117 |
|
| 1118 |
.wpsubs-empty__title { |
| 1119 |
font-size: 15px; |
| 1120 |
font-weight: 600; |
| 1121 |
color: var(--wpsubs-text); |
| 1122 |
margin: 0 0 6px; |
| 1123 |
} |
| 1124 |
|
| 1125 |
.wpsubs-empty__desc { |
| 1126 |
font-size: 13px; |
| 1127 |
color: var(--wpsubs-text-muted); |
| 1128 |
margin: 0; |
| 1129 |
line-height: 1.6; |
| 1130 |
} |
| 1131 |
|
| 1132 |
/* -------------------------------------------------------------------------- |
| 1133 |
Toggle switch (wpsubs-toggle + wpsubs-toggle-ui) |
| 1134 |
|
| 1135 |
Usage: |
| 1136 |
<input type="checkbox" class="wpsubs-toggle" id="my-toggle"> |
| 1137 |
<span class="wpsubs-toggle-ui" aria-hidden="true"></span> |
| 1138 |
-------------------------------------------------------------------------- */ |
| 1139 |
.wpsubs-toggle { |
| 1140 |
position: absolute !important; |
| 1141 |
opacity: 0 !important; |
| 1142 |
width: 0 !important; |
| 1143 |
height: 0 !important; |
| 1144 |
margin: 0 !important; |
| 1145 |
padding: 0 !important; |
| 1146 |
border: 0 !important; |
| 1147 |
overflow: hidden; |
| 1148 |
clip: rect(0 0 0 0); |
| 1149 |
pointer-events: none; |
| 1150 |
} |
| 1151 |
|
| 1152 |
.wpsubs-toggle + .wpsubs-toggle-ui { |
| 1153 |
position: relative; |
| 1154 |
display: inline-block; |
| 1155 |
width: 40px; |
| 1156 |
height: 20px; |
| 1157 |
border-radius: 999px; |
| 1158 |
background: #cbd5e1; |
| 1159 |
transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51); |
| 1160 |
vertical-align: middle; |
| 1161 |
cursor: pointer; |
| 1162 |
} |
| 1163 |
|
| 1164 |
.wpsubs-toggle + .wpsubs-toggle-ui::after { |
| 1165 |
content: ""; |
| 1166 |
position: absolute; |
| 1167 |
top: 2px; |
| 1168 |
left: 2px; |
| 1169 |
width: 16px; |
| 1170 |
height: 16px; |
| 1171 |
border-radius: 50%; |
| 1172 |
background: #fff; |
| 1173 |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); |
| 1174 |
transition: all 0.2s cubic-bezier(0.27, 0.2, 0.25, 1.51); |
| 1175 |
} |
| 1176 |
|
| 1177 |
.wpsubs-toggle:checked + .wpsubs-toggle-ui { |
| 1178 |
background: var(--wpsubs-brand); |
| 1179 |
} |
| 1180 |
|
| 1181 |
.wpsubs-toggle:checked + .wpsubs-toggle-ui::after { |
| 1182 |
transform: translateX(20px); |
| 1183 |
} |
| 1184 |
|
| 1185 |
.wpsubs-toggle:focus + .wpsubs-toggle-ui { |
| 1186 |
outline: none; |
| 1187 |
} |
| 1188 |
|
| 1189 |
.wpsubs-toggle:disabled + .wpsubs-toggle-ui { |
| 1190 |
background: #e5e7eb; |
| 1191 |
cursor: not-allowed; |
| 1192 |
} |
| 1193 |
|
| 1194 |
/* -------------------------------------------------------------------------- |
| 1195 |
Settings layout (wpsubs-settings-*) |
| 1196 |
|
| 1197 |
Heading — full-width section label at the top of a card group. |
| 1198 |
Field — two-column row: fixed-width label on left, control on right. |
| 1199 |
-------------------------------------------------------------------------- */ |
| 1200 |
|
| 1201 |
/* Heading: spans full width of the card by pulling out of card padding (20px 24px) */ |
| 1202 |
.wpsubs-settings-heading { |
| 1203 |
background: var(--wpsubs-surface-muted); |
| 1204 |
border-bottom: 1px solid var(--wpsubs-border); |
| 1205 |
border-radius: calc(var(--wpsubs-radius) - 1px) calc(var(--wpsubs-radius) - 1px) 0 0; |
| 1206 |
margin: -20px -24px 20px; |
| 1207 |
padding: 13px 24px; |
| 1208 |
} |
| 1209 |
|
| 1210 |
.wpsubs-settings-heading__title { |
| 1211 |
font-size: 12px !important; |
| 1212 |
font-weight: 600 !important; |
| 1213 |
color: var(--wpsubs-text-muted) !important; |
| 1214 |
text-transform: uppercase; |
| 1215 |
letter-spacing: 0.06em; |
| 1216 |
margin: 0; |
| 1217 |
line-height: 1.4; |
| 1218 |
} |
| 1219 |
|
| 1220 |
.wpsubs-settings-heading__desc { |
| 1221 |
font-size: 12px !important; |
| 1222 |
color: var(--wpsubs-text-muted); |
| 1223 |
margin: 3px 0 0; |
| 1224 |
line-height: 1.5; |
| 1225 |
} |
| 1226 |
|
| 1227 |
/* Field row */ |
| 1228 |
.wpsubs-settings-field { |
| 1229 |
display: flex; |
| 1230 |
align-items: flex-start; |
| 1231 |
gap: 24px; |
| 1232 |
} |
| 1233 |
|
| 1234 |
.wpsubs-settings-field__label { |
| 1235 |
flex: 0 0 220px; |
| 1236 |
font-size: 13px !important; |
| 1237 |
font-weight: 500; |
| 1238 |
color: var(--wpsubs-text); |
| 1239 |
line-height: 1.4; |
| 1240 |
padding-top: 8px; /* visually align with single-line input height */ |
| 1241 |
} |
| 1242 |
|
| 1243 |
.wpsubs-settings-field__control { |
| 1244 |
flex: 1; |
| 1245 |
min-width: 0; |
| 1246 |
} |
| 1247 |
|
| 1248 |
/* Constrain and normalise control widths */ |
| 1249 |
.wpsubs-settings-field__control .wpsubs-input, |
| 1250 |
.wpsubs-settings-field__control .wpsubs-select { |
| 1251 |
min-width: 260px; |
| 1252 |
max-width: 400px; |
| 1253 |
} |
| 1254 |
|
| 1255 |
.wpsubs-settings-field__control .wpsubs-adv-select__trigger { |
| 1256 |
min-width: 260px; |
| 1257 |
} |
| 1258 |
|
| 1259 |
.wpsubs-settings-field__control .wpsubs-tag-select { |
| 1260 |
min-width: 260px; |
| 1261 |
max-width: 400px; |
| 1262 |
} |
| 1263 |
|
| 1264 |
/* Input group (joined fields) — constrain width as a whole */ |
| 1265 |
.wpsubs-settings-field__control .wpsubs-input-group { |
| 1266 |
max-width: 420px; |
| 1267 |
} |
| 1268 |
|
| 1269 |
/* Hint / description below the control */ |
| 1270 |
.wpsubs-settings-field__hint { |
| 1271 |
font-size: 12px !important; |
| 1272 |
color: var(--wpsubs-text-muted); |
| 1273 |
margin: 6px 0 0; |
| 1274 |
line-height: 1.5; |
| 1275 |
} |
| 1276 |
|
| 1277 |
/* Toggle label — wraps the switch + inline label text */ |
| 1278 |
.wpsubs-settings-toggle-label { |
| 1279 |
display: inline-flex; |
| 1280 |
align-items: center; |
| 1281 |
gap: 10px; |
| 1282 |
cursor: pointer; |
| 1283 |
line-height: 1; |
| 1284 |
padding-top: 0; |
| 1285 |
position: relative; |
| 1286 |
} |
| 1287 |
|
| 1288 |
.wpsubs-settings-toggle-label__text { |
| 1289 |
font-size: 13px !important; |
| 1290 |
color: var(--wpsubs-text); |
| 1291 |
} |
| 1292 |
|
| 1293 |
/* -------------------------------------------------------------------------- |
| 1294 |
Tag Select (wpsubs-tag-select) |
| 1295 |
Pill/tag input with an inline filter and a filterable dropdown. |
| 1296 |
Supports single and multi-select. Use wpsubs_render_tag_select() PHP helper. |
| 1297 |
-------------------------------------------------------------------------- */ |
| 1298 |
.wpsubs-tag-select { |
| 1299 |
position: relative; |
| 1300 |
display: block; |
| 1301 |
} |
| 1302 |
|
| 1303 |
/* The visible "input" area: pills + text input + chevron */ |
| 1304 |
.wpsubs-tag-select__field { |
| 1305 |
display: flex; |
| 1306 |
flex-wrap: wrap; |
| 1307 |
align-items: center; |
| 1308 |
gap: 4px; |
| 1309 |
padding: 4px 36px 4px 6px; |
| 1310 |
min-height: 36px; |
| 1311 |
border: 1px solid var(--wpsubs-border); |
| 1312 |
border-radius: var(--wpsubs-radius-sm); |
| 1313 |
background: var(--wpsubs-surface); |
| 1314 |
cursor: text; |
| 1315 |
position: relative; |
| 1316 |
box-sizing: border-box; |
| 1317 |
transition: |
| 1318 |
border-color 0.12s, |
| 1319 |
box-shadow 0.12s; |
| 1320 |
} |
| 1321 |
|
| 1322 |
.wpsubs-tag-select--open .wpsubs-tag-select__field, |
| 1323 |
.wpsubs-tag-select__field:focus-within { |
| 1324 |
border-color: var(--wpsubs-brand); |
| 1325 |
box-shadow: 0 0 0 3px var(--wpsubs-brand-ring); |
| 1326 |
outline: none; |
| 1327 |
} |
| 1328 |
|
| 1329 |
/* Pill (selected item badge) */ |
| 1330 |
.wpsubs-tag-select__pill { |
| 1331 |
display: inline-flex; |
| 1332 |
align-items: center; |
| 1333 |
gap: 3px; |
| 1334 |
padding: 2px 3px 2px 8px; |
| 1335 |
background: var(--wpsubs-brand-light); |
| 1336 |
border: 1px solid var(--wpsubs-brand-ring); |
| 1337 |
border-radius: 4px; |
| 1338 |
font-size: 12px; |
| 1339 |
font-family: inherit; |
| 1340 |
color: var(--wpsubs-text); |
| 1341 |
max-width: 200px; |
| 1342 |
flex-shrink: 0; |
| 1343 |
} |
| 1344 |
|
| 1345 |
.wpsubs-tag-select__pill-label { |
| 1346 |
overflow: hidden; |
| 1347 |
text-overflow: ellipsis; |
| 1348 |
white-space: nowrap; |
| 1349 |
line-height: 1.4; |
| 1350 |
} |
| 1351 |
|
| 1352 |
.wpsubs-tag-select__pill-remove { |
| 1353 |
display: inline-flex; |
| 1354 |
align-items: center; |
| 1355 |
justify-content: center; |
| 1356 |
width: 18px; |
| 1357 |
height: 18px; |
| 1358 |
border: none; |
| 1359 |
background: none; |
| 1360 |
padding: 0; |
| 1361 |
cursor: pointer; |
| 1362 |
color: var(--wpsubs-text-muted); |
| 1363 |
border-radius: 3px; |
| 1364 |
font-size: 15px; |
| 1365 |
line-height: 1; |
| 1366 |
flex-shrink: 0; |
| 1367 |
transition: |
| 1368 |
background 0.1s, |
| 1369 |
color 0.1s; |
| 1370 |
} |
| 1371 |
|
| 1372 |
.wpsubs-tag-select__pill-remove:hover { |
| 1373 |
background: rgba(34, 113, 177, 0.15); |
| 1374 |
color: var(--wpsubs-brand-dark); |
| 1375 |
} |
| 1376 |
|
| 1377 |
/* Inline filter input */ |
| 1378 |
.wpsubs-tag-select__input { |
| 1379 |
flex: 1; |
| 1380 |
min-width: 80px; |
| 1381 |
height: 28px !important; |
| 1382 |
min-height: 28px !important; |
| 1383 |
border: none !important; |
| 1384 |
outline: none !important; |
| 1385 |
background: transparent !important; |
| 1386 |
font-size: 13px !important; |
| 1387 |
font-family: inherit !important; |
| 1388 |
color: var(--wpsubs-text) !important; |
| 1389 |
padding: 0 2px !important; |
| 1390 |
box-shadow: none !important; |
| 1391 |
border-radius: 0 !important; |
| 1392 |
margin: 0 !important; |
| 1393 |
} |
| 1394 |
|
| 1395 |
.wpsubs-tag-select__input::placeholder { |
| 1396 |
color: var(--wpsubs-text-subtle); |
| 1397 |
} |
| 1398 |
|
| 1399 |
/* Chevron icon — absolutely positioned on the right */ |
| 1400 |
.wpsubs-tag-select__chevron { |
| 1401 |
position: absolute; |
| 1402 |
right: 10px; |
| 1403 |
top: 50%; |
| 1404 |
transform: translateY(-50%); |
| 1405 |
pointer-events: none; |
| 1406 |
opacity: 0.5; |
| 1407 |
display: flex; |
| 1408 |
align-items: center; |
| 1409 |
transition: opacity 0.12s; |
| 1410 |
} |
| 1411 |
|
| 1412 |
.wpsubs-tag-select--open .wpsubs-tag-select__chevron { |
| 1413 |
opacity: 0.8; |
| 1414 |
} |
| 1415 |
|
| 1416 |
.wpsubs-tag-select--open .wpsubs-tag-select__chevron svg { |
| 1417 |
transform: rotate(180deg); |
| 1418 |
} |
| 1419 |
|
| 1420 |
/* Dropdown panel */ |
| 1421 |
.wpsubs-tag-select__dropdown { |
| 1422 |
display: none; |
| 1423 |
position: absolute; |
| 1424 |
top: calc(100% + 4px); |
| 1425 |
left: 0; |
| 1426 |
width: 100%; |
| 1427 |
box-sizing: border-box; |
| 1428 |
background: var(--wpsubs-surface); |
| 1429 |
border: 1px solid var(--wpsubs-border); |
| 1430 |
border-radius: var(--wpsubs-radius); |
| 1431 |
box-shadow: var(--wpsubs-shadow-md); |
| 1432 |
z-index: 9999; |
| 1433 |
animation: wpsubs-dropdown-in 0.1s ease; |
| 1434 |
} |
| 1435 |
|
| 1436 |
.wpsubs-tag-select--open .wpsubs-tag-select__dropdown { |
| 1437 |
display: block; |
| 1438 |
} |
| 1439 |
|
| 1440 |
.wpsubs-tag-select__list { |
| 1441 |
max-height: 220px; |
| 1442 |
overflow-y: auto; |
| 1443 |
padding: 4px; |
| 1444 |
} |
| 1445 |
|
| 1446 |
.wpsubs-tag-select__item { |
| 1447 |
display: block; |
| 1448 |
width: 100%; |
| 1449 |
padding: 7px 10px; |
| 1450 |
border-radius: var(--wpsubs-radius-sm); |
| 1451 |
border: none; |
| 1452 |
background: transparent; |
| 1453 |
font-size: 13px; |
| 1454 |
font-family: inherit; |
| 1455 |
color: var(--wpsubs-text); |
| 1456 |
cursor: pointer; |
| 1457 |
text-align: left; |
| 1458 |
white-space: nowrap; |
| 1459 |
overflow: hidden; |
| 1460 |
text-overflow: ellipsis; |
| 1461 |
transition: background 0.1s; |
| 1462 |
box-sizing: border-box; |
| 1463 |
line-height: 1.4; |
| 1464 |
} |
| 1465 |
|
| 1466 |
.wpsubs-tag-select__item:hover { |
| 1467 |
background: var(--wpsubs-surface-muted); |
| 1468 |
color: var(--wpsubs-text); |
| 1469 |
text-decoration: none; |
| 1470 |
} |
| 1471 |
|
| 1472 |
.wpsubs-tag-select__item[data-disabled] { |
| 1473 |
opacity: 0.45; |
| 1474 |
cursor: not-allowed; |
| 1475 |
} |
| 1476 |
|
| 1477 |
.wpsubs-tag-select__empty { |
| 1478 |
display: none; |
| 1479 |
padding: 10px 14px; |
| 1480 |
font-size: 12.5px; |
| 1481 |
color: var(--wpsubs-text-muted); |
| 1482 |
text-align: center; |
| 1483 |
} |
| 1484 |
|
| 1485 |
/* Settings context */ |
| 1486 |
.wpsubs-settings-field__control .wpsubs-tag-select { |
| 1487 |
max-width: 400px; |
| 1488 |
} |
| 1489 |
|