admin
12 hours ago
passkeys
12 hours ago
wp2fa-dialog.css
12 hours ago
wp2fa-profile.css
12 hours ago
wp2fa-wizard.css
12 hours ago
wp2fa-profile.css
525 lines
| 1 | /** |
| 2 | * WP 2FA - User Profile Section Styles |
| 3 | * |
| 4 | * Card-based layout for the user profile 2FA settings. |
| 5 | * All selectors are prefixed with .wp2fa-profile to avoid conflicts. |
| 6 | * Mobile-friendly and frontend/shortcode compatible. |
| 7 | */ |
| 8 | |
| 9 | /* ============================================= |
| 10 | Container |
| 11 | ============================================= */ |
| 12 | .wp2fa-profile { |
| 13 | max-width: 960px; |
| 14 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
| 15 | line-height: 1.5; |
| 16 | box-sizing: border-box; |
| 17 | background: #fff; |
| 18 | border-radius: 8px; |
| 19 | padding: 24px; |
| 20 | border: 1px solid #dcdcde; |
| 21 | margin-top: 10px; |
| 22 | } |
| 23 | |
| 24 | .wp2fa-profile *, |
| 25 | .wp2fa-profile *::before, |
| 26 | .wp2fa-profile *::after { |
| 27 | box-sizing: inherit; |
| 28 | } |
| 29 | |
| 30 | /* ============================================= |
| 31 | Header |
| 32 | ============================================= */ |
| 33 | .wp2fa-profile__title { |
| 34 | font-size: 1.5em; |
| 35 | font-weight: 700; |
| 36 | margin: 0 0 6px; |
| 37 | padding: 0; |
| 38 | } |
| 39 | |
| 40 | .wp2fa-profile__desc { |
| 41 | margin: 0 0 20px; |
| 42 | font-size: 14px; |
| 43 | } |
| 44 | |
| 45 | /* ============================================= |
| 46 | Summary (Primary / Secondary methods) |
| 47 | ============================================= */ |
| 48 | .wp2fa-profile__summary { |
| 49 | margin-bottom: 24px; |
| 50 | padding-bottom: 20px; |
| 51 | border-bottom: 1px solid #dcdcde; |
| 52 | } |
| 53 | |
| 54 | .wp2fa-profile__summary-row { |
| 55 | display: flex; |
| 56 | align-items: baseline; |
| 57 | padding: 6px 0; |
| 58 | } |
| 59 | |
| 60 | .wp2fa-profile__summary-label { |
| 61 | font-weight: 700; |
| 62 | min-width: 180px; |
| 63 | flex-shrink: 0; |
| 64 | font-size: 14px; |
| 65 | } |
| 66 | |
| 67 | .wp2fa-profile__summary-value { |
| 68 | font-size: 14px; |
| 69 | } |
| 70 | |
| 71 | .wp2fa-profile__configure-now-link { |
| 72 | color: #2271b1; |
| 73 | text-decoration: underline; |
| 74 | font-weight: 600; |
| 75 | cursor: pointer; |
| 76 | } |
| 77 | |
| 78 | .wp2fa-profile__configure-now-link:hover, |
| 79 | .wp2fa-profile__configure-now-link:focus { |
| 80 | color: #135e96; |
| 81 | } |
| 82 | |
| 83 | /* ============================================= |
| 84 | Configuration Section Heading |
| 85 | ============================================= */ |
| 86 | .wp2fa-profile__section-title { |
| 87 | font-size: 1.2em; |
| 88 | font-weight: 700; |
| 89 | margin: 0 0 16px; |
| 90 | } |
| 91 | |
| 92 | /* ============================================= |
| 93 | Cards Grid |
| 94 | ============================================= */ |
| 95 | .wp2fa-profile__cards { |
| 96 | display: grid; |
| 97 | grid-template-columns: 1fr 1fr; |
| 98 | gap: 20px; |
| 99 | margin-bottom: 24px; |
| 100 | } |
| 101 | |
| 102 | /* ============================================= |
| 103 | Card |
| 104 | ============================================= */ |
| 105 | .wp2fa-profile__card { |
| 106 | border: 1px solid #dcdcde; |
| 107 | border-radius: 6px; |
| 108 | padding: 24px; |
| 109 | background: #fff; |
| 110 | color: #3c434a; |
| 111 | } |
| 112 | |
| 113 | .wp2fa-profile__card-title { |
| 114 | font-size: 15px; |
| 115 | font-weight: 700; |
| 116 | margin: 0 0 16px; |
| 117 | } |
| 118 | |
| 119 | /* ============================================= |
| 120 | Buttons |
| 121 | ============================================= */ |
| 122 | .wp2fa-profile__btn { |
| 123 | display: inline-block; |
| 124 | padding: 8px 20px; |
| 125 | font-size: 13px; |
| 126 | font-weight: 600; |
| 127 | line-height: 1.5; |
| 128 | text-decoration: none; |
| 129 | border-radius: 4px; |
| 130 | cursor: pointer; |
| 131 | transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; |
| 132 | border: 2px solid transparent; |
| 133 | margin: 0 8px 10px 0; |
| 134 | text-align: center; |
| 135 | vertical-align: middle; |
| 136 | white-space: nowrap; |
| 137 | } |
| 138 | |
| 139 | .wp2fa-profile__btn:focus { |
| 140 | outline: 2px solid #2271b1; |
| 141 | outline-offset: 1px; |
| 142 | } |
| 143 | |
| 144 | /* Primary (filled) */ |
| 145 | .wp2fa-profile__btn--primary { |
| 146 | background: #2271b1; |
| 147 | color: #fff; |
| 148 | border-color: #2271b1; |
| 149 | } |
| 150 | |
| 151 | .wp2fa-profile__btn--primary:hover, |
| 152 | .wp2fa-profile__btn--primary:focus { |
| 153 | background: #135e96; |
| 154 | border-color: #135e96; |
| 155 | color: #fff; |
| 156 | } |
| 157 | |
| 158 | .wp2fa-profile__btn--primary:disabled, |
| 159 | .wp2fa-profile__btn--primary[disabled] { |
| 160 | background: #a7aaad; |
| 161 | border-color: #a7aaad; |
| 162 | color: #fff; |
| 163 | cursor: not-allowed; |
| 164 | pointer-events: none; |
| 165 | } |
| 166 | |
| 167 | /* Secondary (outline) */ |
| 168 | .wp2fa-profile__btn--secondary { |
| 169 | background: #fff; |
| 170 | color: #2271b1; |
| 171 | border-color: #2271b1; |
| 172 | } |
| 173 | |
| 174 | .wp2fa-profile__btn--secondary:hover, |
| 175 | .wp2fa-profile__btn--secondary:focus { |
| 176 | background: #f0f6fc; |
| 177 | color: #135e96; |
| 178 | border-color: #135e96; |
| 179 | } |
| 180 | |
| 181 | /* Danger (outline red) */ |
| 182 | .wp2fa-profile__btn--danger { |
| 183 | background: #fff; |
| 184 | color: #d63638; |
| 185 | border-color: #d63638; |
| 186 | } |
| 187 | |
| 188 | .wp2fa-profile__btn--danger:hover, |
| 189 | .wp2fa-profile__btn--danger:focus { |
| 190 | background: #fcf0f1; |
| 191 | color: #a00; |
| 192 | border-color: #a00; |
| 193 | } |
| 194 | |
| 195 | .wp2fa-profile__btn--disabled { |
| 196 | opacity: 0.5; |
| 197 | pointer-events: none; |
| 198 | } |
| 199 | |
| 200 | /* ============================================= |
| 201 | Button Group (stacked in card) |
| 202 | ============================================= */ |
| 203 | .wp2fa-profile__btn-group { |
| 204 | display: flex; |
| 205 | flex-direction: column; |
| 206 | gap: 10px; |
| 207 | } |
| 208 | |
| 209 | .wp2fa-profile__btn-group .wp2fa-profile__btn { |
| 210 | margin: 0; |
| 211 | display: block; |
| 212 | width: 100%; |
| 213 | } |
| 214 | |
| 215 | /* ============================================= |
| 216 | Status / Remaining text |
| 217 | ============================================= */ |
| 218 | .wp2fa-profile__status-text { |
| 219 | font-size: 13px; |
| 220 | margin: 4px 0 0; |
| 221 | } |
| 222 | |
| 223 | .wp2fa-profile__status-text a { |
| 224 | color: #2271b1; |
| 225 | text-decoration: none; |
| 226 | } |
| 227 | |
| 228 | .wp2fa-profile__status-text a:hover { |
| 229 | color: #135e96; |
| 230 | text-decoration: underline; |
| 231 | } |
| 232 | |
| 233 | /* ============================================= |
| 234 | TOTP QR Code Details |
| 235 | ============================================= */ |
| 236 | .wp2fa-profile__totp-details { |
| 237 | margin-bottom: 16px; |
| 238 | } |
| 239 | |
| 240 | .wp2fa-profile__totp-toggle { |
| 241 | display: inline-block; |
| 242 | padding: 8px 20px; |
| 243 | font-size: 13px; |
| 244 | font-weight: 600; |
| 245 | background: #2271b1; |
| 246 | color: #fff; |
| 247 | border: none; |
| 248 | border-radius: 4px; |
| 249 | cursor: pointer; |
| 250 | transition: background-color 0.15s ease; |
| 251 | } |
| 252 | |
| 253 | .wp2fa-profile__totp-toggle:hover, |
| 254 | .wp2fa-profile__totp-toggle:focus { |
| 255 | background: #135e96; |
| 256 | } |
| 257 | |
| 258 | .wp2fa-profile__totp-content { |
| 259 | display: none; |
| 260 | margin-top: 12px; |
| 261 | } |
| 262 | |
| 263 | .wp2fa-profile__totp-content.wp2fa-profile__totp-content--open { |
| 264 | display: block; |
| 265 | } |
| 266 | |
| 267 | .wp2fa-profile__totp-qr { |
| 268 | max-width: 200px; |
| 269 | height: auto; |
| 270 | display: block; |
| 271 | margin-bottom: 10px; |
| 272 | } |
| 273 | |
| 274 | .wp2fa-profile__totp-key-wrap { |
| 275 | display: flex; |
| 276 | align-items: center; |
| 277 | gap: 8px; |
| 278 | margin-top: 8px; |
| 279 | } |
| 280 | |
| 281 | .wp2fa-profile__totp-key-input { |
| 282 | flex: 1; |
| 283 | padding: 6px 10px; |
| 284 | border: 1px solid #dcdcde; |
| 285 | border-radius: 4px; |
| 286 | font-family: monospace; |
| 287 | font-size: 13px; |
| 288 | max-width: 280px; |
| 289 | } |
| 290 | |
| 291 | .wp2fa-profile__copy-btn { |
| 292 | padding: 6px 12px; |
| 293 | font-size: 12px; |
| 294 | font-weight: 600; |
| 295 | background: #2271b1; |
| 296 | color: #fff; |
| 297 | border: 1px solid transparent; |
| 298 | border-radius: 4px; |
| 299 | cursor: pointer; |
| 300 | text-transform: uppercase; |
| 301 | letter-spacing: 0.5px; |
| 302 | transition: background-color 0.15s ease; |
| 303 | box-sizing: border-box; |
| 304 | line-height: normal; |
| 305 | align-self: stretch; |
| 306 | } |
| 307 | |
| 308 | .wp2fa-profile__copy-btn:hover, |
| 309 | .wp2fa-profile__copy-btn:focus { |
| 310 | background: #135e96; |
| 311 | } |
| 312 | |
| 313 | /* ============================================= |
| 314 | Admin actions (for admin viewing other user) |
| 315 | ============================================= */ |
| 316 | .wp2fa-profile__admin-actions { |
| 317 | margin-top: 20px; |
| 318 | padding-top: 16px; |
| 319 | border-top: 1px solid #dcdcde; |
| 320 | } |
| 321 | |
| 322 | .wp2fa-profile__admin-title { |
| 323 | font-size: 15px; |
| 324 | font-weight: 700; |
| 325 | margin: 0 0 12px; |
| 326 | } |
| 327 | |
| 328 | .wp2fa-profile__admin-desc { |
| 329 | font-size: 13px; |
| 330 | margin: 0 0 12px; |
| 331 | } |
| 332 | |
| 333 | /* ============================================= |
| 334 | Confirmation Dialog (inline modal) |
| 335 | ============================================= */ |
| 336 | .wp2fa-profile__confirm-overlay { |
| 337 | position: fixed; |
| 338 | top: 0; |
| 339 | inset-inline-start: 0; |
| 340 | width: 100%; |
| 341 | height: 100%; |
| 342 | background: rgba(0, 0, 0, 0.55); |
| 343 | z-index: 100060; |
| 344 | display: none; |
| 345 | align-items: center; |
| 346 | justify-content: center; |
| 347 | } |
| 348 | |
| 349 | .wp2fa-profile__confirm-overlay.wp2fa-profile__confirm--open { |
| 350 | display: flex; |
| 351 | } |
| 352 | |
| 353 | .wp2fa-profile__confirm-dialog { |
| 354 | background: #fff; |
| 355 | border-radius: 8px; |
| 356 | box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); |
| 357 | padding: 28px 32px; |
| 358 | max-width: 430px; |
| 359 | width: 94%; |
| 360 | text-align: center; |
| 361 | color: #3c434a; |
| 362 | } |
| 363 | |
| 364 | .wp2fa-profile__confirm-dialog h3 { |
| 365 | margin: 0 0 8px; |
| 366 | font-size: 16px; |
| 367 | } |
| 368 | |
| 369 | .wp2fa-profile__confirm-dialog p { |
| 370 | margin: 0 0 20px; |
| 371 | font-size: 14px; |
| 372 | } |
| 373 | |
| 374 | .wp2fa-profile__confirm-icon { |
| 375 | margin: 0 auto 16px; |
| 376 | text-align: center; |
| 377 | } |
| 378 | |
| 379 | .wp2fa-profile__confirm-buttons { |
| 380 | display: flex; |
| 381 | justify-content: center; |
| 382 | gap: 12px; |
| 383 | } |
| 384 | |
| 385 | .wp2fa-profile__confirm-buttons--stacked { |
| 386 | display: flex; |
| 387 | flex-direction: column; |
| 388 | align-items: center; |
| 389 | gap: 12px; |
| 390 | } |
| 391 | |
| 392 | .wp2fa-profile__confirm-cancel-link { |
| 393 | color: #3c5a99; |
| 394 | font-size: 14px; |
| 395 | text-decoration: none; |
| 396 | cursor: pointer; |
| 397 | } |
| 398 | |
| 399 | .wp2fa-profile__confirm-cancel-link:hover { |
| 400 | text-decoration: underline; |
| 401 | } |
| 402 | |
| 403 | /* ============================================= |
| 404 | Excluded user notice |
| 405 | ============================================= */ |
| 406 | .wp2fa-profile__notice { |
| 407 | padding: 12px 16px; |
| 408 | border-inline-start: 4px solid #dba617; |
| 409 | background: #fcf9e8; |
| 410 | margin-bottom: 16px; |
| 411 | font-size: 14px; |
| 412 | } |
| 413 | |
| 414 | /* ============================================= |
| 415 | Backup Codes Generated dialog |
| 416 | ============================================= */ |
| 417 | .wp2fa-profile-backup-codes__icon { |
| 418 | margin: 0 auto 12px; |
| 419 | } |
| 420 | |
| 421 | .wp2fa-profile-backup-codes__textarea { |
| 422 | display: block; |
| 423 | width: 80%; |
| 424 | max-width: 320px; |
| 425 | margin: 16px auto; |
| 426 | padding: 12px 16px; |
| 427 | font-family: monospace; |
| 428 | font-size: 14px; |
| 429 | line-height: 1.8; |
| 430 | border: 1px solid #dcdcde; |
| 431 | border-radius: 6px; |
| 432 | background: #f9f9f9; |
| 433 | resize: none; |
| 434 | color: #3c434a; |
| 435 | } |
| 436 | |
| 437 | .wp2fa-profile-backup-codes__actions { |
| 438 | display: flex; |
| 439 | flex-direction: column; |
| 440 | gap: 8px; |
| 441 | align-items: center; |
| 442 | margin: 16px 0 8px; |
| 443 | } |
| 444 | |
| 445 | .wp2fa-profile-backup-codes__action-btn { |
| 446 | width: 80%; |
| 447 | max-width: 320px; |
| 448 | } |
| 449 | |
| 450 | .wp2fa-profile-backup-codes__close-wrap { |
| 451 | margin-top: 12px; |
| 452 | } |
| 453 | |
| 454 | .wp2fa-profile-backup-codes__close-link { |
| 455 | color: #2271b1; |
| 456 | text-decoration: none; |
| 457 | font-size: 14px; |
| 458 | cursor: pointer; |
| 459 | } |
| 460 | |
| 461 | .wp2fa-profile-backup-codes__close-link:hover { |
| 462 | text-decoration: underline; |
| 463 | } |
| 464 | |
| 465 | .wp2fa-profile-backup-codes__status { |
| 466 | font-size: 13px; |
| 467 | margin-top: 10px; |
| 468 | } |
| 469 | |
| 470 | /* ============================================= |
| 471 | Responsive |
| 472 | ============================================= */ |
| 473 | @media (max-width: 782px) { |
| 474 | .wp2fa-profile__cards { |
| 475 | grid-template-columns: 1fr; |
| 476 | } |
| 477 | |
| 478 | .wp2fa-profile__summary-row { |
| 479 | flex-direction: column; |
| 480 | gap: 2px; |
| 481 | } |
| 482 | |
| 483 | .wp2fa-profile__summary-label { |
| 484 | min-width: 0; |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | @media (max-width: 480px) { |
| 489 | .wp2fa-profile__card { |
| 490 | padding: 16px; |
| 491 | } |
| 492 | |
| 493 | .wp2fa-profile__title { |
| 494 | font-size: 1.3em; |
| 495 | } |
| 496 | } |
| 497 | |
| 498 | /* ============================================= |
| 499 | Frontend / Shortcode wrapper |
| 500 | Ensures consistent appearance when rendered |
| 501 | outside wp-admin (e.g., shortcode, WooCommerce). |
| 502 | ============================================= */ |
| 503 | .wp-2fa-shortcode-wrapper .wp2fa-profile { |
| 504 | max-width: 100%; |
| 505 | } |
| 506 | |
| 507 | .wp-2fa-shortcode-wrapper .wp2fa-profile__btn { |
| 508 | font-family: inherit; |
| 509 | } |
| 510 | |
| 511 | /* WooCommerce My Account context */ |
| 512 | .woocommerce-MyAccount-content .wp2fa-profile { |
| 513 | max-width: 100%; |
| 514 | } |
| 515 | |
| 516 | .woocommerce-MyAccount-content .wp2fa-profile__cards { |
| 517 | grid-template-columns: 1fr 1fr; |
| 518 | } |
| 519 | |
| 520 | @media (max-width: 782px) { |
| 521 | .woocommerce-MyAccount-content .wp2fa-profile__cards { |
| 522 | grid-template-columns: 1fr; |
| 523 | } |
| 524 | } |
| 525 |