| 1 |
/* -------------------------------------------------------------------------- |
| 2 |
Base input |
| 3 |
-------------------------------------------------------------------------- */ |
| 4 |
.wpsubs-input { |
| 5 |
display: block; |
| 6 |
width: 100%; |
| 7 |
height: 36px; |
| 8 |
min-height: 36px !important; |
| 9 |
padding: 0 12px; |
| 10 |
margin: 0; |
| 11 |
border: 1px solid var(--wpsubs-border) !important; |
| 12 |
border-radius: var(--wpsubs-radius-sm) !important; |
| 13 |
background: var(--wpsubs-surface) !important; |
| 14 |
font-size: 13px !important; |
| 15 |
font-family: inherit !important; |
| 16 |
color: var(--wpsubs-text) !important; |
| 17 |
outline: none !important; |
| 18 |
box-shadow: none !important; |
| 19 |
box-sizing: border-box; |
| 20 |
transition: |
| 21 |
border-color 0.15s, |
| 22 |
box-shadow 0.15s; |
| 23 |
} |
| 24 |
|
| 25 |
.wpsubs-input:focus { |
| 26 |
border-color: var(--wpsubs-brand) !important; |
| 27 |
box-shadow: 0 0 0 3px var(--wpsubs-brand-ring) !important; |
| 28 |
} |
| 29 |
|
| 30 |
.wpsubs-input::placeholder { |
| 31 |
color: var(--wpsubs-text-subtle) !important; |
| 32 |
} |
| 33 |
|
| 34 |
.wpsubs-input:disabled { |
| 35 |
opacity: 0.55; |
| 36 |
cursor: not-allowed; |
| 37 |
background: var(--wpsubs-surface-muted) !important; |
| 38 |
} |
| 39 |
|
| 40 |
/* -------------------------------------------------------------------------- |
| 41 |
Input with icon (.wpsubs-input-wrap) |
| 42 |
|
| 43 |
Usage: |
| 44 |
<div class="wpsubs-input-wrap wpsubs-input-wrap--icon-l"> |
| 45 |
<svg class="wpsubs-input-icon">...</svg> |
| 46 |
<input class="wpsubs-input"> |
| 47 |
</div> |
| 48 |
|
| 49 |
Modifiers: --icon-l (icon on left) --icon-r (icon on right) |
| 50 |
-------------------------------------------------------------------------- */ |
| 51 |
.wpsubs-input-wrap { |
| 52 |
position: relative; |
| 53 |
display: inline-flex; |
| 54 |
align-items: center; |
| 55 |
width: 100%; |
| 56 |
} |
| 57 |
|
| 58 |
.wpsubs-input-wrap .wpsubs-input-icon { |
| 59 |
position: absolute; |
| 60 |
top: 50%; |
| 61 |
transform: translateY(-50%); |
| 62 |
width: 15px; |
| 63 |
height: 15px; |
| 64 |
color: var(--wpsubs-text-subtle); |
| 65 |
pointer-events: none; |
| 66 |
flex-shrink: 0; |
| 67 |
} |
| 68 |
|
| 69 |
.wpsubs-input-wrap--icon-l .wpsubs-input-icon { |
| 70 |
left: 10px; |
| 71 |
} |
| 72 |
.wpsubs-input-wrap--icon-l .wpsubs-input { |
| 73 |
padding-left: 34px !important; |
| 74 |
} |
| 75 |
|
| 76 |
.wpsubs-input-wrap--icon-r .wpsubs-input-icon { |
| 77 |
right: 10px; |
| 78 |
} |
| 79 |
.wpsubs-input-wrap--icon-r .wpsubs-input { |
| 80 |
padding-right: 34px !important; |
| 81 |
} |
| 82 |
|
| 83 |
/* -------------------------------------------------------------------------- |
| 84 |
Input group (.wpsubs-input-group) |
| 85 |
|
| 86 |
A flex row that snaps children edge-to-edge with shared borders. |
| 87 |
Children: .wpsubs-input, .wpsubs-btn, .wpsubs-select, .wpsubs-adv-select |
| 88 |
|
| 89 |
Usage: |
| 90 |
<div class="wpsubs-input-group"> |
| 91 |
<input class="wpsubs-input"> |
| 92 |
<button class="wpsubs-btn wpsubs-btn--outline">Search</button> |
| 93 |
</div> |
| 94 |
-------------------------------------------------------------------------- */ |
| 95 |
.wpsubs-input-group { |
| 96 |
display: inline-flex; |
| 97 |
align-items: stretch; |
| 98 |
} |
| 99 |
|
| 100 |
.wpsubs-input-group > .wpsubs-input, |
| 101 |
.wpsubs-input-group > .wpsubs-btn, |
| 102 |
.wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn, |
| 103 |
.wpsubs-input-group > .wpsubs-select, |
| 104 |
.wpsubs-input-group > .wpsubs-adv-select > .wpsubs-adv-select__trigger { |
| 105 |
border-radius: 0 !important; |
| 106 |
} |
| 107 |
|
| 108 |
/* Normalise button height to match input height inside a group */ |
| 109 |
.wpsubs-input-group > .wpsubs-btn, |
| 110 |
.wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn { |
| 111 |
height: 36px; |
| 112 |
} |
| 113 |
|
| 114 |
/* Restore radius on first and last direct children */ |
| 115 |
.wpsubs-input-group > :first-child, |
| 116 |
.wpsubs-input-group > :first-child > .wpsubs-adv-select__trigger { |
| 117 |
border-top-left-radius: var(--wpsubs-radius-sm) !important; |
| 118 |
border-bottom-left-radius: var(--wpsubs-radius-sm) !important; |
| 119 |
} |
| 120 |
|
| 121 |
.wpsubs-input-group > :last-child, |
| 122 |
.wpsubs-input-group > :last-child > .wpsubs-adv-select__trigger, |
| 123 |
.wpsubs-input-group > :last-child > .wpsubs-btn { |
| 124 |
border-top-right-radius: var(--wpsubs-radius-sm) !important; |
| 125 |
border-bottom-right-radius: var(--wpsubs-radius-sm) !important; |
| 126 |
} |
| 127 |
|
| 128 |
/* Collapse adjacent borders */ |
| 129 |
.wpsubs-input-group > *:not(:first-child), |
| 130 |
.wpsubs-input-group > .wpsubs-adv-select:not(:first-child) > .wpsubs-adv-select__trigger { |
| 131 |
margin-left: -1px; |
| 132 |
} |
| 133 |
|
| 134 |
/* Bring focused item to front so its border ring shows fully */ |
| 135 |
.wpsubs-input-group > .wpsubs-input:focus, |
| 136 |
.wpsubs-input-group > .wpsubs-btn:focus, |
| 137 |
.wpsubs-input-group > .wpsubs-tooltip > .wpsubs-btn:focus, |
| 138 |
.wpsubs-input-group > .wpsubs-select:focus, |
| 139 |
.wpsubs-input-group > .wpsubs-adv-select--open > .wpsubs-adv-select__trigger { |
| 140 |
position: relative; |
| 141 |
z-index: 1; |
| 142 |
} |
| 143 |
|
| 144 |
/* -------------------------------------------------------------------------- |
| 145 |
Search — convenience wrapper around input-wrap (backward compat kept) |
| 146 |
-------------------------------------------------------------------------- */ |
| 147 |
.wpsubs-search { |
| 148 |
min-width: 180px; |
| 149 |
max-width: 280px; |
| 150 |
} |
| 151 |
|
| 152 |
.wpsubs-search .wpsubs-input-wrap { |
| 153 |
width: 100%; |
| 154 |
} |
| 155 |
|
| 156 |
/* -------------------------------------------------------------------------- |
| 157 |
Gated region (subscrpt-gated) |
| 158 |
|
| 159 |
A block of settings switched off by a toggle elsewhere on the screen. Dimmed |
| 160 |
and non-interactive, but still rendered and still submitted: these are meta |
| 161 |
fields on the product form, and disabling them would post nothing and wipe |
| 162 |
the stored values on the next save. The JS pairs this with `inert`, which |
| 163 |
takes them out of the tab order without taking them out of the form. |
| 164 |
-------------------------------------------------------------------------- */ |
| 165 |
.subscrpt-gated { |
| 166 |
opacity: 0.45; |
| 167 |
pointer-events: none; |
| 168 |
user-select: none; |
| 169 |
} |
| 170 |
|