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-dialog.css
380 lines
| 1 | /** |
| 2 | * WP 2FA – Unified Dialog Styles |
| 3 | * |
| 4 | * Styles for the vanilla JS dialog utility (wp2fa-dialog.js). |
| 5 | * Works on both admin and frontend contexts. |
| 6 | * |
| 7 | * @package wp-2fa |
| 8 | * @since 4.0.0 |
| 9 | */ |
| 10 | |
| 11 | /* ============================================= |
| 12 | Overlay / Backdrop |
| 13 | ============================================= */ |
| 14 | .wp2fa-dialog-overlay { |
| 15 | position: fixed; |
| 16 | top: 0; |
| 17 | inset-inline-start: 0; |
| 18 | width: 100%; |
| 19 | height: 100%; |
| 20 | background: rgba(0, 0, 0, 0.65); |
| 21 | z-index: 100100; |
| 22 | display: flex; |
| 23 | align-items: center; |
| 24 | justify-content: center; |
| 25 | animation: wp2faDialogFadeIn 0.2s ease; |
| 26 | } |
| 27 | |
| 28 | @keyframes wp2faDialogFadeIn { |
| 29 | from { |
| 30 | opacity: 0; |
| 31 | } |
| 32 | to { |
| 33 | opacity: 1; |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /* ============================================= |
| 38 | Modal Container |
| 39 | ============================================= */ |
| 40 | .wp2fa-dialog-modal { |
| 41 | background: #fff; |
| 42 | border-radius: 6px; |
| 43 | box-shadow: 0 8px 32px rgba(0, 0, 0, 0.28); |
| 44 | width: 90%; |
| 45 | max-height: 80vh; |
| 46 | overflow-y: auto; |
| 47 | position: relative; |
| 48 | animation: wp2faDialogSlideIn 0.2s ease; |
| 49 | } |
| 50 | |
| 51 | @keyframes wp2faDialogSlideIn { |
| 52 | from { |
| 53 | transform: translateY(-12px); |
| 54 | opacity: 0; |
| 55 | } |
| 56 | to { |
| 57 | transform: translateY(0); |
| 58 | opacity: 1; |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /* Size variants */ |
| 63 | .wp2fa-dialog-overlay--small .wp2fa-dialog-modal { |
| 64 | max-width: 400px; |
| 65 | } |
| 66 | |
| 67 | .wp2fa-dialog-overlay--medium .wp2fa-dialog-modal { |
| 68 | max-width: 520px; |
| 69 | } |
| 70 | |
| 71 | .wp2fa-dialog-overlay--large .wp2fa-dialog-modal { |
| 72 | max-width: 640px; |
| 73 | } |
| 74 | |
| 75 | /* ============================================= |
| 76 | Header |
| 77 | ============================================= */ |
| 78 | .wp2fa-dialog-header { |
| 79 | display: flex; |
| 80 | align-items: center; |
| 81 | justify-content: space-between; |
| 82 | padding: 20px 24px 0; |
| 83 | } |
| 84 | |
| 85 | .wp2fa-dialog-title { |
| 86 | margin: 0; |
| 87 | font-size: 16px; |
| 88 | font-weight: 600; |
| 89 | color: #1d2327; |
| 90 | line-height: 1.4; |
| 91 | } |
| 92 | |
| 93 | .wp2fa-dialog-close { |
| 94 | background: none; |
| 95 | border: none; |
| 96 | font-size: 22px; |
| 97 | line-height: 1; |
| 98 | color: #787c82; |
| 99 | cursor: pointer; |
| 100 | padding: 4px 8px; |
| 101 | border-radius: 3px; |
| 102 | transition: color 0.15s ease, background 0.15s ease; |
| 103 | } |
| 104 | |
| 105 | .wp2fa-dialog-close:hover, |
| 106 | .wp2fa-dialog-close:focus { |
| 107 | color: #1d2327; |
| 108 | background: #f0f0f1; |
| 109 | outline: none; |
| 110 | } |
| 111 | |
| 112 | /* ============================================= |
| 113 | Body |
| 114 | ============================================= */ |
| 115 | .wp2fa-dialog-body { |
| 116 | padding: 16px 24px; |
| 117 | color: #50575e; |
| 118 | font-size: 13px; |
| 119 | line-height: 1.6; |
| 120 | } |
| 121 | |
| 122 | .wp2fa-dialog-body p { |
| 123 | margin: 0 0 12px; |
| 124 | } |
| 125 | |
| 126 | .wp2fa-dialog-body p:last-child { |
| 127 | margin-bottom: 0; |
| 128 | } |
| 129 | |
| 130 | /* ============================================= |
| 131 | Buttons |
| 132 | ============================================= */ |
| 133 | .wp2fa-dialog-buttons { |
| 134 | display: flex; |
| 135 | gap: 10px; |
| 136 | flex-wrap: wrap; |
| 137 | padding: 4px 24px 20px; |
| 138 | } |
| 139 | |
| 140 | .wp2fa-dialog-buttons .button { |
| 141 | min-width: 80px; |
| 142 | text-align: center; |
| 143 | } |
| 144 | |
| 145 | /* ============================================= |
| 146 | Footer Note |
| 147 | ============================================= */ |
| 148 | .wp2fa-dialog-note { |
| 149 | margin: 0; |
| 150 | padding: 0 24px 20px; |
| 151 | font-size: 12px; |
| 152 | color: #787c82; |
| 153 | font-style: italic; |
| 154 | line-height: 1.5; |
| 155 | } |
| 156 | |
| 157 | .wp2fa-premium-badge { |
| 158 | cursor: pointer; |
| 159 | } |
| 160 | |
| 161 | /* Reset badge visual styles when used on locked tab labels */ |
| 162 | .tab-label--locked.wp2fa-premium-badge { |
| 163 | /* padding: 0; */ |
| 164 | border: none; |
| 165 | border-radius: 0; |
| 166 | background: none; |
| 167 | font-size: inherit; |
| 168 | font-weight: inherit; |
| 169 | letter-spacing: inherit; |
| 170 | line-height: inherit; |
| 171 | color: inherit; |
| 172 | margin-right: 0; |
| 173 | } |
| 174 | |
| 175 | /* ============================================= |
| 176 | Premium Badge Dialog – Modal Skin |
| 177 | ============================================= */ |
| 178 | .wp2fa-dialog-overlay--large .wp2fa-premium-dialog-modal { |
| 179 | max-width: 580px; |
| 180 | border-radius: 8px; |
| 181 | box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22); |
| 182 | } |
| 183 | |
| 184 | .wp2fa-premium-dialog-modal .wp2fa-dialog-header { |
| 185 | padding: 28px 28px 0; |
| 186 | align-items: flex-start; |
| 187 | } |
| 188 | |
| 189 | .wp2fa-premium-dialog-modal .wp2fa-dialog-title { |
| 190 | display: flex; |
| 191 | align-items: flex-start; |
| 192 | gap: 14px; |
| 193 | font-size: 22px; |
| 194 | line-height: 1.3; |
| 195 | font-weight: 700; |
| 196 | color: #3c434a; |
| 197 | width: 80%; |
| 198 | } |
| 199 | |
| 200 | .wp2fa-premium-dialog-modal .wp2fa-dialog-title::before { |
| 201 | content: ''; |
| 202 | display: inline-block; |
| 203 | width: 44px; |
| 204 | height: 44px; |
| 205 | flex: 0 0 44px; |
| 206 | background-repeat: no-repeat; |
| 207 | background-size: contain; |
| 208 | background-position: center; |
| 209 | margin-top: 2px; |
| 210 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33' height='49' viewBox='0 0 33 49' fill='none'%3E%3Cpath d='M10.7607 16.2846L18.7944 8.17949L26.9017 0H13.414H0V8.17949V16.2846L2.65332 13.6077L5.38035 10.8564L8.03367 13.6077L10.7607 16.2846Z' fill='%2399FFFF'/%3E%3Cpath d='M32.2074 48.9278V37.997V27.1406L21.5205 37.997L10.7598 48.7791L21.5205 48.8534L32.2074 48.9278Z' fill='%233E6BFF'/%3E%3Cpath d='M10.7607 27.1406L8.03367 24.3893L5.38035 21.7124L2.65332 18.9611L0 16.2841V27.1406V37.997L2.65332 35.2457L5.38035 32.5688L8.03367 35.2457L10.7607 37.997L18.7944 29.8175L26.9017 21.7124L29.555 24.3893L32.2084 27.1406V16.2841V5.42773L21.5214 16.2841L10.7607 27.1406Z' fill='%2340D3F0'/%3E%3C/svg%3E"); |
| 211 | } |
| 212 | |
| 213 | .wp2fa-premium-dialog-modal .wp2fa-dialog-close { |
| 214 | position: absolute; |
| 215 | top: 12px; |
| 216 | right: 12px; |
| 217 | font-size: 28px; |
| 218 | color: #50575e; |
| 219 | padding: 4px 8px; |
| 220 | } |
| 221 | |
| 222 | .wp2fa-premium-dialog-modal .wp2fa-dialog-body { |
| 223 | padding: 16px 28px 28px; |
| 224 | } |
| 225 | |
| 226 | .wp2fa-dialog-title-highlight { |
| 227 | color: #2271b1; |
| 228 | display: contents; |
| 229 | } |
| 230 | |
| 231 | /* ── Premium dialog body layout ── */ |
| 232 | .wp2fa-premium-dialog { |
| 233 | display: flex; |
| 234 | flex-direction: column; |
| 235 | gap: 16px; |
| 236 | } |
| 237 | |
| 238 | .wp2fa-premium-dialog-intro, |
| 239 | .wp2fa-premium-dialog-description { |
| 240 | margin: 0; |
| 241 | font-size: 14px; |
| 242 | line-height: 1.5; |
| 243 | color: #50575e; |
| 244 | } |
| 245 | |
| 246 | /* ── Checkmark list – same pattern as wp2fa-reports-teaser-list ── */ |
| 247 | .wp2fa-premium-dialog-list { |
| 248 | list-style: none; |
| 249 | margin: 0; |
| 250 | padding: 0; |
| 251 | display: flex; |
| 252 | flex-direction: column; |
| 253 | gap: 14px; |
| 254 | } |
| 255 | |
| 256 | .wp2fa-premium-dialog-list-item { |
| 257 | display: flex; |
| 258 | align-items: center; |
| 259 | gap: 10px; |
| 260 | } |
| 261 | |
| 262 | .wp2fa-premium-dialog-list-icon { |
| 263 | width: 32px; |
| 264 | height: 32px; |
| 265 | border-radius: 50%; |
| 266 | background: #2271b1; |
| 267 | flex-shrink: 0; |
| 268 | position: relative; |
| 269 | } |
| 270 | |
| 271 | .wp2fa-premium-dialog-list-icon::before { |
| 272 | content: ''; |
| 273 | position: absolute; |
| 274 | top: 50%; |
| 275 | left: 50%; |
| 276 | width: 17px; |
| 277 | height: 17px; |
| 278 | transform: translate(-50%, -50%); |
| 279 | background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E"); |
| 280 | background-repeat: no-repeat; |
| 281 | background-size: contain; |
| 282 | } |
| 283 | |
| 284 | .wp2fa-premium-dialog-list-text { |
| 285 | display: flex; |
| 286 | flex-direction: column; |
| 287 | gap: 2px; |
| 288 | } |
| 289 | |
| 290 | .wp2fa-premium-dialog-list-title { |
| 291 | font-size: 16px; |
| 292 | line-height: 1.2; |
| 293 | font-weight: 600; |
| 294 | color: #3c434a; |
| 295 | } |
| 296 | |
| 297 | .wp2fa-premium-dialog-list-description { |
| 298 | font-size: 14px; |
| 299 | line-height: 1.34; |
| 300 | color: #646970; |
| 301 | } |
| 302 | |
| 303 | .wp2fa-premium-dialog-screenshot { |
| 304 | display: block; |
| 305 | width: 100%; |
| 306 | height: auto; |
| 307 | border: 1px solid #dcdcde; |
| 308 | border-radius: 8px; |
| 309 | background: #f6f7f7; |
| 310 | } |
| 311 | |
| 312 | /* ── CTA button – same style as wp2fa-top-bar-upgrade ── */ |
| 313 | .wp2fa-premium-dialog-cta { |
| 314 | display: inline-block; |
| 315 | align-self: flex-start; |
| 316 | background: #3d6b9e; |
| 317 | color: #fff; |
| 318 | padding: 7px 16px; |
| 319 | border-radius: 4px; |
| 320 | font-size: 13px; |
| 321 | font-weight: 500; |
| 322 | text-decoration: none; |
| 323 | text-transform: uppercase; |
| 324 | transition: background 0.2s ease; |
| 325 | } |
| 326 | |
| 327 | .wp2fa-premium-dialog-cta:hover, |
| 328 | .wp2fa-premium-dialog-cta:focus { |
| 329 | background: #1a2238; |
| 330 | color: #fff; |
| 331 | text-decoration: none; |
| 332 | } |
| 333 | |
| 334 | .wp2fa-premium-dialog-modal .wp2fa-dialog-buttons { |
| 335 | display: none; |
| 336 | } |
| 337 | |
| 338 | /* ============================================= |
| 339 | Responsive |
| 340 | ============================================= */ |
| 341 | @media screen and (max-width: 480px) { |
| 342 | .wp2fa-dialog-modal { |
| 343 | width: 95%; |
| 344 | } |
| 345 | |
| 346 | .wp2fa-dialog-header, |
| 347 | .wp2fa-dialog-body, |
| 348 | .wp2fa-dialog-buttons, |
| 349 | .wp2fa-dialog-note { |
| 350 | padding-inline-start: 16px; |
| 351 | padding-inline-end: 16px; |
| 352 | } |
| 353 | |
| 354 | .wp2fa-dialog-buttons { |
| 355 | flex-direction: column; |
| 356 | } |
| 357 | |
| 358 | .wp2fa-dialog-buttons .button { |
| 359 | width: 100%; |
| 360 | } |
| 361 | |
| 362 | .wp2fa-premium-dialog-modal .wp2fa-dialog-header { |
| 363 | padding: 16px 16px 0; |
| 364 | } |
| 365 | |
| 366 | .wp2fa-premium-dialog-modal .wp2fa-dialog-title { |
| 367 | font-size: 18px; |
| 368 | } |
| 369 | |
| 370 | .wp2fa-premium-dialog-modal .wp2fa-dialog-title::before { |
| 371 | width: 34px; |
| 372 | height: 34px; |
| 373 | flex-basis: 34px; |
| 374 | } |
| 375 | |
| 376 | .wp2fa-premium-dialog-modal .wp2fa-dialog-body { |
| 377 | padding: 12px 16px 20px; |
| 378 | } |
| 379 | } |
| 380 |