user-profile.css
446 lines
| 1 | /** |
| 2 | * Passkeys User Profile Styles |
| 3 | * |
| 4 | * @package wp2fa |
| 5 | * @since 4.0.0 |
| 6 | */ |
| 7 | |
| 8 | /* ── Add Passkey button ────────────────────────────────────── */ |
| 9 | |
| 10 | .wp-2fa-passkey-add-btn { |
| 11 | margin-bottom: 12px !important; |
| 12 | background-color: #2271b1 !important; |
| 13 | text-decoration: none !important; |
| 14 | color: #fff !important; |
| 15 | } |
| 16 | |
| 17 | /* ── Passkey list table ────────────────────────────────────── */ |
| 18 | |
| 19 | .wp-2fa-passkey-list-table { |
| 20 | border: 1px solid #31333b; |
| 21 | box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); |
| 22 | border-spacing: 0; |
| 23 | border-collapse: collapse; |
| 24 | table-layout: fixed; |
| 25 | } |
| 26 | |
| 27 | /* Column widths for consistent header-cell alignment */ |
| 28 | .wp-2fa-passkey-list-table .column-name { |
| 29 | width: 25%; |
| 30 | } |
| 31 | .wp-2fa-passkey-list-table .column-status { |
| 32 | width: 15%; |
| 33 | } |
| 34 | .wp-2fa-passkey-list-table .column-created-date { |
| 35 | width: 20%; |
| 36 | } |
| 37 | .wp-2fa-passkey-list-table .column-last-used-date { |
| 38 | width: 20%; |
| 39 | } |
| 40 | .wp-2fa-passkey-list-table .column-action { |
| 41 | width: 20%; |
| 42 | } |
| 43 | |
| 44 | /* Header & footer: gray background */ |
| 45 | .wp-2fa-passkey-list-table thead th, |
| 46 | .wp-2fa-passkey-list-table tfoot th { |
| 47 | padding: 10px 16px !important; |
| 48 | font-weight: 600; |
| 49 | text-align:start; |
| 50 | border-bottom: 1px solid #c3c4c7; |
| 51 | border-top: 1px solid #c3c4c7; |
| 52 | font-size: 13px; |
| 53 | line-height: 1.4em; |
| 54 | background: #f6f7f7; |
| 55 | } |
| 56 | |
| 57 | /* Body rows: white background, no striping */ |
| 58 | .wp-2fa-passkey-list-table.striped > tbody > tr:nth-child(odd), |
| 59 | .wp-2fa-passkey-list-table.striped > tbody > tr:nth-child(even), |
| 60 | .wp-2fa-passkey-list-table tbody tr { |
| 61 | background: #fff !important; |
| 62 | } |
| 63 | |
| 64 | .wp-2fa-passkey-list-table tbody tr + tr { |
| 65 | border-top: 1px solid #e1e1e1; |
| 66 | } |
| 67 | |
| 68 | /* Cells */ |
| 69 | .wp-2fa-passkey-list-table td { |
| 70 | padding: 16px 16px !important; |
| 71 | vertical-align: middle !important; |
| 72 | line-height: 1.5 !important; |
| 73 | text-align:start; |
| 74 | font-size: 13px; |
| 75 | } |
| 76 | |
| 77 | /* ── Sortable column headers ───────────────────────────────── */ |
| 78 | |
| 79 | .wp-2fa-passkey-list-table th.sortable a, |
| 80 | .wp-2fa-passkey-list-table th.sorted a { |
| 81 | display: inline-flex; |
| 82 | align-items: center; |
| 83 | gap: 4px; |
| 84 | text-decoration: none; |
| 85 | color: inherit; |
| 86 | cursor: pointer; |
| 87 | padding: 8px 8px 8px 0; |
| 88 | } |
| 89 | |
| 90 | .wp-2fa-passkey-list-table th.sortable a:hover, |
| 91 | .wp-2fa-passkey-list-table th.sorted a:hover { |
| 92 | color: #135e96; |
| 93 | } |
| 94 | |
| 95 | /* ── Action links ──────────────────────────────────────────── */ |
| 96 | |
| 97 | .wp-2fa-passkey-list-table .button-link.enable_styling { |
| 98 | background: none; |
| 99 | border: none; |
| 100 | color: #2271b1; |
| 101 | cursor: pointer; |
| 102 | text-decoration: underline; |
| 103 | padding: 0; |
| 104 | font-size: 13px; |
| 105 | line-height: 1.5; |
| 106 | margin-inline-end: 12px; |
| 107 | } |
| 108 | |
| 109 | .wp-2fa-passkey-list-table .button-link.enable_styling:last-child { |
| 110 | margin-inline-end: 0; |
| 111 | } |
| 112 | |
| 113 | .wp-2fa-passkey-list-table .button-link.enable_styling:hover, |
| 114 | .wp-2fa-passkey-list-table .button-link.enable_styling:focus { |
| 115 | color: #135e96; |
| 116 | text-decoration: underline; |
| 117 | } |
| 118 | |
| 119 | /* ── Status labels ─────────────────────────────────────────── */ |
| 120 | |
| 121 | .wp-2fa-passkey-status { |
| 122 | font-weight: 400; |
| 123 | } |
| 124 | |
| 125 | @media screen and (max-width: 782px) { |
| 126 | .wp-2fa-passkey-list-table thead, |
| 127 | .wp-2fa-passkey-list-table tfoot { |
| 128 | display: none !important; |
| 129 | } |
| 130 | |
| 131 | .wp-2fa-passkey-list-table td::before { |
| 132 | content: attr(data-label) !important; |
| 133 | font-weight: bold !important; |
| 134 | text-align:start !important; |
| 135 | position: absolute !important; |
| 136 | inset-inline-start: 10px !important; |
| 137 | top: 50% !important; |
| 138 | transform: translateY(-50%) !important; |
| 139 | white-space: nowrap !important; |
| 140 | } |
| 141 | |
| 142 | .wp-2fa-passkey-list-table td { |
| 143 | display: block !important; |
| 144 | width: 100% !important; |
| 145 | text-align:end !important; |
| 146 | position: relative !important; |
| 147 | padding-inline-start: 50% !important; |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | td.editing { |
| 152 | background-color: #f0f8ff; |
| 153 | } |
| 154 | |
| 155 | input.invalid { |
| 156 | border: 2px solid #d9534f; |
| 157 | background-color: #ffe6e6; |
| 158 | } |
| 159 | |
| 160 | .cell-error { |
| 161 | color: #d9534f; |
| 162 | font-size: 11px; |
| 163 | margin-top: 4px; |
| 164 | display: block; |
| 165 | } |
| 166 | |
| 167 | /* ── Modal overlay ─────────────────────────────────────────── */ |
| 168 | |
| 169 | .wp2fa-passkey-overlay { |
| 170 | display: none; |
| 171 | position: fixed; |
| 172 | inset: 0; |
| 173 | background: rgba(0, 0, 0, 0.6); |
| 174 | justify-content: center; |
| 175 | align-items: center; |
| 176 | z-index: 100000; |
| 177 | } |
| 178 | |
| 179 | .wp2fa-passkey-overlay.is-visible { |
| 180 | display: flex; |
| 181 | } |
| 182 | |
| 183 | /* ── Modal container ───────────────────────────────────────── */ |
| 184 | |
| 185 | .wp2fa-passkey-modal { |
| 186 | background: #fff; |
| 187 | border-radius: 4px; |
| 188 | width: 640px; |
| 189 | max-width: 90vw; |
| 190 | max-height: 85vh; |
| 191 | overflow-y: auto; |
| 192 | box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3); |
| 193 | position: relative; |
| 194 | display: flex; |
| 195 | flex-direction: column; |
| 196 | } |
| 197 | |
| 198 | /* ── Modal header ──────────────────────────────────────────── */ |
| 199 | |
| 200 | .wp2fa-passkey-modal__header { |
| 201 | display: flex; |
| 202 | align-items: center; |
| 203 | justify-content: space-between; |
| 204 | padding: 20px 24px; |
| 205 | border-bottom: 1px solid #dcdcde; |
| 206 | } |
| 207 | |
| 208 | .wp2fa-passkey-modal__title { |
| 209 | font-size: 22px; |
| 210 | font-weight: 600; |
| 211 | margin: 0; |
| 212 | line-height: 1.3; |
| 213 | } |
| 214 | |
| 215 | .wp2fa-passkey-modal__close { |
| 216 | background: none; |
| 217 | border: none; |
| 218 | font-size: 24px; |
| 219 | cursor: pointer; |
| 220 | padding: 4px 8px; |
| 221 | line-height: 1; |
| 222 | border-radius: 2px; |
| 223 | } |
| 224 | |
| 225 | .wp2fa-passkey-modal__close:hover, |
| 226 | .wp2fa-passkey-modal__close:focus { |
| 227 | background: #f0f0f1; |
| 228 | outline: 2px solid #2271b1; |
| 229 | outline-offset: -2px; |
| 230 | } |
| 231 | |
| 232 | /* ── Modal body ────────────────────────────────────────────── */ |
| 233 | |
| 234 | .wp2fa-passkey-modal__body { |
| 235 | padding: 24px; |
| 236 | flex: 1; |
| 237 | } |
| 238 | |
| 239 | .wp2fa-passkey-modal__body p { |
| 240 | font-size: 14px; |
| 241 | line-height: 1.6; |
| 242 | margin: 0 0 16px; |
| 243 | } |
| 244 | |
| 245 | /* ── Steps list ────────────────────────────────────────────── */ |
| 246 | |
| 247 | .wp2fa-passkey-steps-heading { |
| 248 | font-size: 14px; |
| 249 | font-weight: 600; |
| 250 | margin: 20px 0 12px; |
| 251 | } |
| 252 | |
| 253 | .wp2fa-passkey-steps { |
| 254 | list-style: none; |
| 255 | padding: 0; |
| 256 | margin: 0 0 16px; |
| 257 | counter-reset: passkey-step; |
| 258 | } |
| 259 | |
| 260 | .wp2fa-passkey-steps li { |
| 261 | display: flex; |
| 262 | align-items: center; |
| 263 | gap: 14px; |
| 264 | padding: 10px 0; |
| 265 | font-size: 14px; |
| 266 | line-height: 1.5; |
| 267 | counter-increment: passkey-step; |
| 268 | } |
| 269 | |
| 270 | .wp2fa-passkey-steps li::before { |
| 271 | content: counter(passkey-step); |
| 272 | flex-shrink: 0; |
| 273 | width: 32px; |
| 274 | height: 32px; |
| 275 | border-radius: 50%; |
| 276 | background: #2271b1; |
| 277 | color: #fff; |
| 278 | font-size: 14px; |
| 279 | font-weight: 600; |
| 280 | display: flex; |
| 281 | align-items: center; |
| 282 | justify-content: center; |
| 283 | } |
| 284 | |
| 285 | /* ── Modal footer ──────────────────────────────────────────── */ |
| 286 | |
| 287 | .wp2fa-passkey-modal__footer { |
| 288 | display: flex; |
| 289 | align-items: center; |
| 290 | justify-content: space-between; |
| 291 | padding: 16px 24px; |
| 292 | border-top: 1px solid #dcdcde; |
| 293 | border-radius: 0 0 4px 4px; |
| 294 | gap: 12px; |
| 295 | } |
| 296 | |
| 297 | .wp2fa-passkey-modal__footer-actions { |
| 298 | display: flex; |
| 299 | gap: 8px; |
| 300 | align-items: center; |
| 301 | } |
| 302 | |
| 303 | .wp2fa-passkey-modal__cancel { |
| 304 | background: none; |
| 305 | border: none; |
| 306 | color: #2271b1; |
| 307 | cursor: pointer; |
| 308 | font-size: 13px; |
| 309 | text-decoration: none; |
| 310 | padding: 4px 2px; |
| 311 | } |
| 312 | |
| 313 | .wp2fa-passkey-modal__cancel:hover, |
| 314 | .wp2fa-passkey-modal__cancel:focus { |
| 315 | color: #135e96; |
| 316 | text-decoration: underline; |
| 317 | outline: 2px solid #2271b1; |
| 318 | outline-offset: 2px; |
| 319 | } |
| 320 | |
| 321 | /* ── Success screen ────────────────────────────────────────── */ |
| 322 | |
| 323 | .wp2fa-passkey-success { |
| 324 | text-align: center; |
| 325 | padding: 40px 24px; |
| 326 | } |
| 327 | |
| 328 | .wp2fa-passkey-success__icon { |
| 329 | width: 80px; |
| 330 | height: 80px; |
| 331 | border-radius: 50%; |
| 332 | background: #e8f5e8; |
| 333 | display: flex; |
| 334 | align-items: center; |
| 335 | justify-content: center; |
| 336 | margin: 0 auto 20px; |
| 337 | } |
| 338 | |
| 339 | .wp2fa-passkey-success__icon svg { |
| 340 | width: 36px; |
| 341 | height: 36px; |
| 342 | color: #46b450; |
| 343 | } |
| 344 | |
| 345 | .wp2fa-passkey-success__title { |
| 346 | font-size: 22px; |
| 347 | font-weight: 600; |
| 348 | margin: 0 0 12px; |
| 349 | } |
| 350 | |
| 351 | .wp2fa-passkey-success__description { |
| 352 | font-size: 14px; |
| 353 | margin: 0 0 24px; |
| 354 | line-height: 1.5; |
| 355 | } |
| 356 | |
| 357 | .wp2fa-passkey-success__input-wrap { |
| 358 | max-width: 320px; |
| 359 | margin: 0 auto 20px; |
| 360 | } |
| 361 | |
| 362 | .wp2fa-passkey-success__input { |
| 363 | width: 100%; |
| 364 | padding: 10px 14px; |
| 365 | border: 1px solid #c3c4c7; |
| 366 | border-radius: 4px; |
| 367 | font-size: 14px; |
| 368 | text-align: center; |
| 369 | box-sizing: border-box; |
| 370 | } |
| 371 | |
| 372 | .wp2fa-passkey-success__input:focus { |
| 373 | border-color: #2271b1; |
| 374 | box-shadow: 0 0 0 1px #2271b1; |
| 375 | outline: none; |
| 376 | } |
| 377 | |
| 378 | .wp2fa-passkey-success__input.is-invalid { |
| 379 | border-color: #d63638; |
| 380 | box-shadow: 0 0 0 1px #d63638; |
| 381 | } |
| 382 | |
| 383 | .wp2fa-passkey-success__error { |
| 384 | color: #d63638; |
| 385 | font-size: 13px; |
| 386 | margin-top: 8px; |
| 387 | min-height: 20px; |
| 388 | } |
| 389 | |
| 390 | .wp2fa-passkey-success__submit { |
| 391 | display: block; |
| 392 | width: 100%; |
| 393 | max-width: 320px; |
| 394 | margin: 0 auto; |
| 395 | padding: 10px 20px; |
| 396 | background: #2271b1; |
| 397 | color: #fff; |
| 398 | border: none; |
| 399 | border-radius: 4px; |
| 400 | font-size: 14px; |
| 401 | font-weight: 600; |
| 402 | cursor: pointer; |
| 403 | } |
| 404 | |
| 405 | .wp2fa-passkey-success__submit:hover, |
| 406 | .wp2fa-passkey-success__submit:focus { |
| 407 | background: #135e96; |
| 408 | outline: 2px solid #2271b1; |
| 409 | outline-offset: 2px; |
| 410 | } |
| 411 | |
| 412 | .wp2fa-passkey-success__submit:disabled { |
| 413 | opacity: 0.6; |
| 414 | cursor: not-allowed; |
| 415 | } |
| 416 | |
| 417 | /* ── Error message area ────────────────────────────────────── */ |
| 418 | |
| 419 | .wp2fa-passkey-modal__error { |
| 420 | color: #d63638; |
| 421 | font-size: 13px; |
| 422 | margin-top: 8px; |
| 423 | padding: 0 24px; |
| 424 | } |
| 425 | |
| 426 | /* ── Button overrides ──────────────────────────────────────── */ |
| 427 | /* |
| 428 | .wp2fa-passkey-modal .button-primary { |
| 429 | background: #2271b1; |
| 430 | border-color: #2271b1; |
| 431 | color: #fff; |
| 432 | } |
| 433 | |
| 434 | .wp2fa-passkey-modal .button-primary:hover, |
| 435 | .wp2fa-passkey-modal .button-primary:focus { |
| 436 | background: #135e96; |
| 437 | border-color: #135e96; |
| 438 | } */ |
| 439 | |
| 440 | /* ── Focus visible for accessibility ───────────────────────── */ |
| 441 | |
| 442 | .wp2fa-passkey-modal :focus-visible { |
| 443 | outline: 2px solid #2271b1; |
| 444 | outline-offset: -2px; |
| 445 | } |
| 446 |