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 / phone-input.css

phone-input.css in Yatra – Travel Booking & Tour Operator Software trunk, at assets/css/phone-input.css

182 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Yatra international phone input (paired with assets/js/phone-input.js and the
3 * markup from yatra_render_form_field). Left: country selector (flag + dial
4 * code). Right: national number. Dropdown: sticky search + scrollable list.
5 */
6
7 .yatra-phone-field {
8 position: relative;
9 display: flex;
10 align-items: stretch;
11 width: 100%;
12 border: 1px solid #d1d5db;
13 border-radius: 8px;
14 background: #fff;
15 overflow: visible;
16 }
17
18 .yatra-phone-field:focus-within {
19 border-color: #2563eb;
20 box-shadow: 0 0 0 1px #2563eb;
21 }
22
23 /* Left: country button */
24 .yatra-phone-country {
25 display: flex;
26 align-items: center;
27 gap: 6px;
28 padding: 0 10px;
29 margin: 0;
30 border: 0;
31 border-right: 1px solid #e5e7eb;
32 border-radius: 8px 0 0 8px;
33 background: #f9fafb;
34 cursor: pointer;
35 font: inherit;
36 color: #111827;
37 white-space: nowrap;
38 line-height: 1;
39 }
40
41 .yatra-phone-country:hover {
42 background: #f3f4f6;
43 }
44
45 .yatra-phone-flag {
46 display: block;
47 width: 22px;
48 height: 16px;
49 object-fit: cover;
50 border-radius: 2px;
51 box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
52 flex: 0 0 auto;
53 }
54
55 .yatra-phone-dial {
56 font-size: 14px;
57 color: #374151;
58 }
59
60 .yatra-phone-caret {
61 width: 0;
62 height: 0;
63 border-left: 4px solid transparent;
64 border-right: 4px solid transparent;
65 border-top: 5px solid #6b7280;
66 transition: transform 0.15s ease;
67 }
68
69 .yatra-phone-field.is-open .yatra-phone-caret {
70 transform: rotate(180deg);
71 }
72
73 /* Right: number input — flatten the native field so the wrapper is the control */
74 .yatra-phone-field .yatra-phone-number {
75 flex: 1 1 auto;
76 min-width: 0;
77 border: 0 !important;
78 outline: none !important;
79 box-shadow: none !important;
80 background: transparent;
81 padding: 10px 12px;
82 font: inherit;
83 border-radius: 0 8px 8px 0;
84 margin: 0;
85 width: auto;
86 }
87
88 /* Dropdown panel */
89 .yatra-phone-dropdown {
90 position: absolute;
91 top: calc(100% + 4px);
92 left: 0;
93 right: 0;
94 z-index: 1000;
95 display: none;
96 background: #fff;
97 border: 1px solid #d1d5db;
98 border-radius: 8px;
99 box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
100 max-height: 280px;
101 overflow: hidden;
102 flex-direction: column;
103 }
104
105 .yatra-phone-field.is-open .yatra-phone-dropdown {
106 display: flex;
107 }
108
109 .yatra-phone-search-wrap {
110 padding: 8px;
111 border-bottom: 1px solid #f0f0f0;
112 background: #fff;
113 }
114
115 .yatra-phone-search {
116 width: 100%;
117 box-sizing: border-box;
118 padding: 8px 10px;
119 border: 1px solid #d1d5db;
120 border-radius: 6px;
121 font: inherit;
122 outline: none;
123 }
124
125 .yatra-phone-search:focus {
126 border-color: #2563eb;
127 }
128
129 .yatra-phone-list {
130 list-style: none;
131 margin: 0;
132 padding: 4px 0;
133 overflow-y: auto;
134 max-height: 220px;
135 }
136
137 .yatra-phone-option {
138 display: flex;
139 align-items: center;
140 gap: 10px;
141 padding: 8px 12px;
142 cursor: pointer;
143 font-size: 14px;
144 color: #111827;
145 }
146
147 .yatra-phone-option:hover,
148 .yatra-phone-option.is-active {
149 background: #eff6ff;
150 }
151
152 .yatra-phone-option-name {
153 flex: 1 1 auto;
154 overflow: hidden;
155 text-overflow: ellipsis;
156 white-space: nowrap;
157 }
158
159 .yatra-phone-option-dial {
160 color: #6b7280;
161 font-size: 13px;
162 flex: 0 0 auto;
163 }
164
165 .yatra-phone-empty {
166 padding: 12px;
167 text-align: center;
168 color: #6b7280;
169 font-size: 13px;
170 list-style: none;
171 }
172
173 /* Dark-mode friendliness when a theme opts in */
174 @media (prefers-color-scheme: dark) {
175 .yatra-phone-field.yatra-phone-dark,
176 .yatra-phone-dark .yatra-phone-dropdown {
177 background: #1f2937;
178 border-color: #374151;
179 color: #f3f4f6;
180 }
181 }
182