PluginProbe
Yatra – Travel Booking & Tour Operator Software / trunk
Yatra – Travel Booking & Tour Operator Software vtrunk
3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 2.0.10 2.0.11 All 82 releases
yatra / assets / css / shortcodes / login-shortcode.css

login-shortcode.css in Yatra – Travel Booking & Tour Operator Software trunk, at assets/css/shortcodes/login-shortcode.css

553 lines 13.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Login Shortcode CSS
3 *
4 * Production-optimized styles for the login form shortcode
5 *
6 * @package Yatra
7 */
8
9 /* CSS Custom Properties for better maintainability */
10 :root {
11 --yatra-login-primary: var(--yatra-primary, #3b82f6);
12 --yatra-login-primary-hover: var(--yatra-primary-dark, #2563eb);
13 --yatra-login-primary-light: color-mix(in srgb, var(--yatra-primary, #3b82f6) 12%, transparent);
14 --yatra-login-text: #1f2937;
15 --yatra-login-text-muted: #6b7280;
16 --yatra-login-border: #d1d5db;
17 --yatra-login-border-hover: #9ca3af;
18 --yatra-login-background: #ffffff;
19 --yatra-login-background-secondary: #f9fafb;
20 --yatra-login-error: #dc2626;
21 --yatra-login-error-bg: #fef2f2;
22 --yatra-login-error-border: #fecaca;
23 --yatra-login-success: #10b981;
24 --yatra-login-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
25 --yatra-login-shadow-hover: 0 2px 8px color-mix(in srgb, var(--yatra-primary, #3b82f6) 28%, transparent);
26 --yatra-login-border-radius: 12px;
27 --yatra-login-border-radius-sm: 8px;
28 --yatra-login-border-radius-xs: 6px;
29 --yatra-login-transition: all 0.2s ease;
30 --yatra-login-transition-fast: all 0.15s ease;
31 }
32
33 /* Main container with hardware acceleration */
34 .yatra-login-shortcode {
35 max-width: 500px;
36 margin: 30px auto;
37 will-change: transform;
38 transform: translateZ(0); /* Hardware acceleration */
39 }
40
41 .yatra-login-container {
42 background: var(--yatra-login-background);
43 border: 1px solid #e5e7eb;
44 border-radius: var(--yatra-login-border-radius);
45 overflow: hidden;
46 box-shadow: var(--yatra-login-shadow);
47 will-change: transform;
48 transform: translateZ(0); /* Hardware acceleration */
49 }
50
51 .yatra-login-header {
52 padding: 30px 30px 20px;
53 text-align: center;
54 background: var(--yatra-login-background-secondary);
55 border-bottom: 1px solid #e5e7eb;
56 }
57
58 .yatra-login-title {
59 margin: 0 0 10px 0;
60 color: var(--yatra-login-text);
61 font-size: 1.875rem;
62 font-weight: 600;
63 line-height: 1.2;
64 }
65
66 .yatra-login-subtitle {
67 margin: 0;
68 color: var(--yatra-login-text-muted);
69 font-size: 0.875rem;
70 line-height: 1.4;
71 }
72
73 .yatra-login-form-container {
74 padding: 30px;
75 }
76
77 /* Login / Sign Up tabs */
78 .yatra-login-tabs {
79 display: flex;
80 gap: 4px;
81 margin-bottom: 24px;
82 border-bottom: 2px solid var(--yatra-login-border);
83 }
84
85 .yatra-login-tab {
86 flex: 1;
87 background: none;
88 border: none;
89 padding: 12px 16px;
90 margin-bottom: -2px;
91 font-size: 0.95rem;
92 font-weight: 600;
93 color: var(--yatra-login-text-muted);
94 cursor: pointer;
95 border-bottom: 2px solid transparent;
96 transition: var(--yatra-login-transition-fast);
97 }
98
99 .yatra-login-tab:hover {
100 color: var(--yatra-login-text);
101 }
102
103 .yatra-login-tab.is-active {
104 color: var(--yatra-login-primary);
105 border-bottom-color: var(--yatra-login-primary);
106 }
107
108 .yatra-login-tab:focus-visible {
109 outline: 2px solid var(--yatra-login-primary);
110 outline-offset: 2px;
111 border-radius: var(--yatra-login-border-radius-xs);
112 }
113
114 /* Gentle fade so switching tabs (and the card growing/shrinking) isn't abrupt.
115 Only runs when a panel is rendered; the reduced-motion rule below disables it. */
116 .yatra-auth-panel {
117 animation: yatraAuthPanelIn 0.2s ease;
118 }
119
120 @keyframes yatraAuthPanelIn {
121 from { opacity: 0; transform: translateY(4px); }
122 to { opacity: 1; transform: translateY(0); }
123 }
124
125 /* Title + intro line shown at the top of the register / forgot panels */
126 .yatra-auth-panel-title {
127 text-align: center;
128 margin: 0 0 8px 0;
129 font-size: 1.5rem;
130 }
131
132 .yatra-auth-panel-intro {
133 margin: 0 0 20px 0;
134 text-align: center;
135 }
136
137 .yatra-form-group {
138 margin-bottom: 20px;
139 }
140
141 .yatra-form-label {
142 display: block;
143 margin-bottom: 8px;
144 font-weight: 500;
145 color: var(--yatra-login-text);
146 font-size: 0.875rem;
147 line-height: 1.4;
148 }
149
150 .yatra-form-input {
151 width: 100%;
152 padding: 12px 16px;
153 border: 1px solid var(--yatra-login-border);
154 border-radius: var(--yatra-login-border-radius-sm);
155 font-size: 1rem;
156 font-family: inherit;
157 line-height: 1.5;
158 transition: var(--yatra-login-transition);
159 -webkit-appearance: none;
160 -moz-appearance: none;
161 appearance: none;
162 }
163
164 .yatra-form-input:focus {
165 outline: none;
166 border-color: var(--yatra-login-primary);
167 box-shadow: 0 0 0 3px var(--yatra-login-primary-light);
168 }
169
170 .yatra-password-input-group {
171 position: relative;
172 }
173
174 /* Reserve room on the right so typed text / placeholder never runs under
175 the show/hide toggle. */
176 .yatra-password-input-group .yatra-form-input {
177 padding-right: 44px;
178 }
179
180 .yatra-password-toggle {
181 position: absolute;
182 right: 12px;
183 top: 50%;
184 transform: translateY(-50%);
185 background: none;
186 border: none;
187 cursor: pointer;
188 padding: 4px;
189 border-radius: var(--yatra-login-border-radius-xs);
190 display: flex;
191 align-items: center;
192 justify-content: center;
193 color: var(--yatra-login-text-muted);
194 transition: var(--yatra-login-transition);
195 will-change: color;
196 }
197
198 .yatra-password-toggle:hover {
199 color: var(--yatra-login-primary);
200 }
201
202 .yatra-password-toggle:focus-visible {
203 outline: 2px solid var(--yatra-login-primary);
204 outline-offset: 2px;
205 }
206
207 .yatra-eye-icon,
208 .yatra-eye-off-icon {
209 width: 20px;
210 height: 20px;
211 pointer-events: none; /* Prevent clicking on SVG */
212 }
213
214 .yatra-eye-off-icon {
215 display: none;
216 }
217
218 .yatra-form-checkbox {
219 margin-bottom: 20px;
220 }
221
222 .yatra-checkbox-wrapper {
223 display: flex;
224 align-items: center;
225 }
226
227 .yatra-checkbox-label {
228 display: flex;
229 align-items: center;
230 cursor: pointer;
231 font-size: 0.875rem;
232 color: #374151;
233 transition: all 0.2s ease;
234 padding: 4px;
235 border-radius: 8px;
236 margin: -4px;
237 }
238
239 .yatra-checkbox-label:hover {
240 color: #1f2937;
241 background-color: #f9fafb;
242 }
243
244 .yatra-checkbox-label:active {
245 transform: scale(0.98);
246 }
247
248 .yatra-checkbox-label input[type="checkbox"] {
249 display: none;
250 }
251
252 .yatra-checkbox-custom {
253 width: 20px;
254 height: 20px;
255 border: 2px solid #d1d5db;
256 border-radius: 6px;
257 margin-right: 12px;
258 display: flex;
259 align-items: center;
260 justify-content: center;
261 transition: all 0.2s ease;
262 background: #ffffff;
263 position: relative;
264 flex-shrink: 0;
265 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
266 }
267
268 .yatra-checkbox-label:hover .yatra-checkbox-custom {
269 border-color: #9ca3af;
270 }
271
272 .yatra-checkbox-label input[type="checkbox"]:checked + .yatra-checkbox-custom {
273 background: linear-gradient(135deg, var(--yatra-login-primary) 0%, var(--yatra-login-primary-hover) 100%);
274 border-color: var(--yatra-login-primary-hover);
275 box-shadow: var(--yatra-login-shadow-hover), 0 0 0 3px var(--yatra-login-primary-light);
276 }
277
278 .yatra-check-icon {
279 width: 16px;
280 height: 16px;
281 color: #ffffff;
282 opacity: 0;
283 transform: scale(0.8);
284 transition: all 0.2s ease;
285 position: absolute;
286 top: 50%;
287 left: 50%;
288 transform: translate(-50%, -50%) scale(0.8);
289 }
290
291 .yatra-checkbox-label input[type="checkbox"]:checked + .yatra-checkbox-custom .yatra-check-icon {
292 opacity: 1;
293 transform: translate(-50%, -50%) scale(1);
294 }
295
296 /* Fallback for when SVG doesn't load */
297 .yatra-checkbox-custom::after {
298 content: '';
299 position: absolute;
300 top: 50%;
301 left: 50%;
302 transform: translate(-50%, -50%) scale(0);
303 width: 6px;
304 height: 10px;
305 border: solid white;
306 border-width: 0 2px 2px 0;
307 opacity: 0;
308 transition: all 0.2s ease;
309 }
310
311 .yatra-checkbox-label input[type="checkbox"]:checked + .yatra-checkbox-custom::after {
312 opacity: 1;
313 transform: translate(-50%, -50%) scale(1) rotate(45deg);
314 }
315
316 /* Hide fallback when SVG is present */
317 .yatra-check-icon:not(:empty) + .yatra-checkbox-custom::after {
318 display: none;
319 }
320
321 .yatra-checkbox-text {
322 font-weight: 500;
323 user-select: none;
324 flex: none !important;
325 }
326
327 /* Override listing.css flex rule for login checkbox */
328 .yatra-login-shortcode .yatra-checkbox-label span:not(.yatra-filter-count) {
329 flex: none !important;
330 }
331
332 .yatra-login-shortcode .yatra-checkbox-label .yatra-checkbox-custom {
333 flex: none !important;
334 }
335
336 .yatra-login-shortcode .yatra-checkbox-label .yatra-check-icon {
337 flex: none !important;
338 }
339
340 .yatra-form-actions {
341 margin-bottom: 20px;
342 }
343
344 .yatra-btn-full {
345 width: 100%;
346 padding: 12px 24px;
347 }
348
349 /* Production-optimized anti-flicker styles */
350 .yatra-login-form[data-ajax="true"] {
351 transition: none;
352 contain: layout style paint; /* CSS containment for performance */
353 }
354
355 .yatra-login-form[data-ajax="true"] .yatra-btn-primary:disabled {
356 opacity: 0.7;
357 cursor: not-allowed;
358 transition: var(--yatra-login-transition);
359 will-change: opacity, transform;
360 }
361
362 .yatra-login-form[data-ajax="true"] .yatra-btn-primary {
363 transition: var(--yatra-login-transition);
364 will-change: transform, opacity;
365 }
366
367 .yatra-login-form[data-ajax="true"] .yatra-btn-primary:disabled {
368 transform: scale(0.98);
369 }
370
371 /* Optimized error styles */
372 .yatra-form-error {
373 color: var(--yatra-login-error);
374 background-color: var(--yatra-login-error-bg);
375 border: 1px solid var(--yatra-login-error-border);
376 border-radius: var(--yatra-login-border-radius-sm);
377 padding: 12px 16px;
378 margin-bottom: 20px;
379 font-weight: 500;
380 font-size: 0.875rem;
381 line-height: 1.4;
382 will-change: opacity;
383 }
384
385 /* Performance optimizations */
386 .yatra-login-shortcode * {
387 box-sizing: border-box;
388 }
389
390 /* Reduce paint operations */
391 .yatra-login-container,
392 .yatra-login-form-container {
393 contain: layout style paint;
394 }
395
396 /* Optimize animations */
397 @media (prefers-reduced-motion: reduce) {
398 .yatra-login-shortcode * {
399 transition: none !important;
400 animation: none !important;
401 }
402 }
403
404 .yatra-forgot-password {
405 text-align: center;
406 margin-bottom: 20px;
407 }
408
409 .yatra-link {
410 color: var(--yatra-primary, #3b82f6);
411 text-decoration: none;
412 font-size: 0.875rem;
413 transition: color 0.3s ease;
414 }
415
416 .yatra-link:hover {
417 color: var(--yatra-primary-dark, #2563eb);
418 }
419
420 .yatra-link-bold {
421 font-weight: 600;
422 }
423
424 .yatra-register-prompt {
425 text-align: center;
426 padding-top: 20px;
427 border-top: 1px solid #f3f4f6;
428 }
429
430 .yatra-register-prompt p {
431 margin: 0;
432 color: #6b7280;
433 font-size: 0.875rem;
434 }
435
436 .yatra-login-footer {
437 padding: 20px 30px;
438 background: #f9fafb;
439 border-top: 1px solid #e5e7eb;
440 }
441
442 .yatra-login-security {
443 display: flex;
444 align-items: center;
445 gap: 12px;
446 justify-content: center;
447 }
448
449 .yatra-security-icon-svg {
450 width: 20px;
451 height: 20px;
452 color: #10b981;
453 }
454
455 .yatra-security-text {
456 margin: 0;
457 color: #6b7280;
458 font-size: 0.75rem;
459 }
460
461 .yatra-login-logged-in {
462 background: white;
463 border: 1px solid #e5e7eb;
464 border-radius: 12px;
465 padding: 40px 30px;
466 text-align: center;
467 box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
468 }
469
470 .yatra-logged-in-icon-svg {
471 width: 60px;
472 height: 60px;
473 color: #10b981;
474 margin-bottom: 20px;
475 }
476
477 .yatra-logged-in-content h3 {
478 margin: 0 0 10px 0;
479 color: #1f2937;
480 }
481
482 .yatra-logged-in-content p {
483 margin: 0 0 20px 0;
484 color: #6b7280;
485 }
486
487 .yatra-logged-in-actions {
488 display: flex;
489 gap: 12px;
490 justify-content: center;
491 }
492
493 /* Responsive Design */
494 @media (max-width: 480px) {
495 .yatra-login-shortcode {
496 margin: 20px;
497 }
498
499 .yatra-login-header,
500 .yatra-login-form-container,
501 .yatra-login-footer {
502 padding: 20px;
503 }
504
505 .yatra-logged-in-actions {
506 flex-direction: column;
507 }
508 }
509
510 /* ============================================
511 MOBILE-INPUT HYGIENE
512 ============================================
513 Match the booking-form mobile rules so the customer's full
514 journey (browse → book → login → register → manage account)
515 feels consistent on phones. Two concerns are addressed at
516 <=768px:
517
518 1. iOS auto-zoom: any input below 16px computed font-size
519 triggers a 1.25x viewport zoom on focus. The desktop styles
520 use 1rem (16px) already, but we re-declare it inside the
521 media query to win any theme override that might lower it.
522 2. Tap-target comfort: bump min-height to 48px and pad the
523 input vertically for thumb-friendly hit areas. Apple HIG
524 minimum is 44pt; Material is 48dp — we use the larger so
525 portrait phone use isn't cramped.
526 ============================================ */
527 @media (max-width: 768px) {
528 .yatra-login-shortcode .yatra-form-input,
529 .yatra-login-shortcode input[type="text"],
530 .yatra-login-shortcode input[type="email"],
531 .yatra-login-shortcode input[type="password"],
532 .yatra-login-shortcode input[type="tel"],
533 .yatra-login-shortcode select,
534 .yatra-login-shortcode textarea {
535 font-size: 16px;
536 min-height: 48px;
537 padding-top: 14px;
538 padding-bottom: 14px;
539 }
540
541 /*
542 * The submit / primary-action button on login + register
543 * gets the same 48px floor so the CTA matches input height
544 * and is easy to tap one-handed.
545 */
546 .yatra-login-shortcode button[type="submit"],
547 .yatra-login-shortcode .yatra-btn-primary,
548 .yatra-login-shortcode .yatra-submit-btn {
549 min-height: 48px;
550 font-size: 16px;
551 }
552 }
553