| 1 |
/** |
| 2 |
* Stripe Elements Styling |
| 3 |
*/ |
| 4 |
|
| 5 |
.yatra-stripe-container { |
| 6 |
margin: 18px 0 0; |
| 7 |
display: none; /* Hidden by default, shown when Stripe is selected */ |
| 8 |
padding: 0; |
| 9 |
border: none; |
| 10 |
background: transparent; |
| 11 |
box-shadow: none; |
| 12 |
} |
| 13 |
|
| 14 |
.yatra-method-switcher { |
| 15 |
margin-bottom: 18px; |
| 16 |
} |
| 17 |
|
| 18 |
/* Card-only checkout: no method chooser is rendered, so the card field stands |
| 19 |
alone directly under the Stripe option. Give it a little breathing room the |
| 20 |
switcher used to provide. */ |
| 21 |
.yatra-stripe-container--single-method .yatra-stripe-card-wrapper { |
| 22 |
margin-top: 6px; |
| 23 |
} |
| 24 |
|
| 25 |
.yatra-method-switcher__header { |
| 26 |
margin-bottom: 16px; |
| 27 |
} |
| 28 |
|
| 29 |
.yatra-label-eyebrow { |
| 30 |
font-size: 0.75rem; |
| 31 |
text-transform: uppercase; |
| 32 |
letter-spacing: 0.1em; |
| 33 |
color: var(--yatra-primary-dark, #2563eb); |
| 34 |
margin: 0 0 6px; |
| 35 |
} |
| 36 |
|
| 37 |
.yatra-method-switcher__title { |
| 38 |
font-size: 1.3rem; |
| 39 |
font-weight: 700; |
| 40 |
color: #0f172a; |
| 41 |
} |
| 42 |
|
| 43 |
.yatra-method-switcher__helper { |
| 44 |
margin: 4px 0 0; |
| 45 |
color: #475569; |
| 46 |
font-size: 0.92rem; |
| 47 |
} |
| 48 |
|
| 49 |
.yatra-method-switcher__buttons { |
| 50 |
display: grid; |
| 51 |
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); |
| 52 |
gap: 10px; |
| 53 |
} |
| 54 |
|
| 55 |
.yatra-method-button { |
| 56 |
display: flex; |
| 57 |
align-items: center; |
| 58 |
gap: 12px; |
| 59 |
padding: 14px 12px; |
| 60 |
border-radius: 14px; |
| 61 |
border: 1px solid rgba(148, 163, 184, 0.4); |
| 62 |
background: #f8fafc; |
| 63 |
color: #0f172a; |
| 64 |
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05); |
| 65 |
transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; |
| 66 |
font-weight: 500; |
| 67 |
} |
| 68 |
|
| 69 |
.yatra-method-button .method-icon { |
| 70 |
width: 40px; |
| 71 |
height: 40px; |
| 72 |
border-radius: 12px; |
| 73 |
background: #ffffff; |
| 74 |
display: inline-flex; |
| 75 |
align-items: center; |
| 76 |
justify-content: center; |
| 77 |
color: #1e1b4b; |
| 78 |
flex-shrink: 0; |
| 79 |
} |
| 80 |
|
| 81 |
.method-icon svg { |
| 82 |
width: 22px; |
| 83 |
height: 22px; |
| 84 |
} |
| 85 |
|
| 86 |
/* JS uses method-icon--google_pay / method-icon--apple_pay (match stripe.js) */ |
| 87 |
.method-icon--google { |
| 88 |
background: linear-gradient(135deg, #0f9d58, #1a73e8); |
| 89 |
color: #fff; |
| 90 |
} |
| 91 |
|
| 92 |
.method-icon--google_pay { |
| 93 |
background: #fff; |
| 94 |
border: 1px solid #e2e8f0; |
| 95 |
color: inherit; |
| 96 |
} |
| 97 |
|
| 98 |
.method-icon--google_pay svg { |
| 99 |
width: 28px; |
| 100 |
height: 28px; |
| 101 |
max-width: none; |
| 102 |
} |
| 103 |
|
| 104 |
.method-icon--apple { |
| 105 |
background: #0f172a; |
| 106 |
color: #fff; |
| 107 |
} |
| 108 |
|
| 109 |
.method-icon--apple_pay { |
| 110 |
background: #fff; |
| 111 |
border: 1px solid #e2e8f0; |
| 112 |
color: #000; |
| 113 |
} |
| 114 |
|
| 115 |
.method-icon--apple_pay svg { |
| 116 |
width: 26px; |
| 117 |
height: 26px; |
| 118 |
max-width: none; |
| 119 |
} |
| 120 |
|
| 121 |
.yatra-method-button .method-content { |
| 122 |
text-align: left; |
| 123 |
display: flex; |
| 124 |
flex-direction: column; |
| 125 |
gap: 4px; |
| 126 |
} |
| 127 |
|
| 128 |
.yatra-method-button .method-label { |
| 129 |
font-size: 0.9rem; |
| 130 |
font-weight: 600; |
| 131 |
} |
| 132 |
|
| 133 |
.yatra-method-button .method-description { |
| 134 |
font-size: 0.8rem; |
| 135 |
color: #475569; |
| 136 |
} |
| 137 |
|
| 138 |
.method-tooltip { |
| 139 |
position: relative; |
| 140 |
z-index: 2; |
| 141 |
margin-left: auto; |
| 142 |
width: 26px; |
| 143 |
height: 26px; |
| 144 |
border-radius: 50%; |
| 145 |
background: #f1f5f9; |
| 146 |
display: inline-flex; |
| 147 |
align-items: center; |
| 148 |
justify-content: center; |
| 149 |
color: var(--yatra-primary-dark, #2563eb); |
| 150 |
transition: background 0.15s ease; |
| 151 |
flex-shrink: 0; |
| 152 |
pointer-events: auto; |
| 153 |
} |
| 154 |
|
| 155 |
.method-tooltip svg { |
| 156 |
width: 16px; |
| 157 |
height: 16px; |
| 158 |
} |
| 159 |
|
| 160 |
.yatra-method-button.is-disabled .method-tooltip, |
| 161 |
.yatra-method-button.is-pending .method-tooltip { |
| 162 |
pointer-events: auto; |
| 163 |
} |
| 164 |
|
| 165 |
.method-tooltip:hover, |
| 166 |
.method-tooltip:focus-visible { |
| 167 |
background: #e0ecff; |
| 168 |
} |
| 169 |
|
| 170 |
.method-tooltip::after { |
| 171 |
content: attr(data-tooltip); |
| 172 |
position: absolute; |
| 173 |
transform: translate(-50%, -8px); |
| 174 |
left: 50%; |
| 175 |
bottom: 100%; |
| 176 |
background: #0f172a; |
| 177 |
color: #fff; |
| 178 |
padding: 8px 12px; |
| 179 |
border-radius: 8px; |
| 180 |
font-size: 0.75rem; |
| 181 |
line-height: 1.35; |
| 182 |
max-width: min(280px, 86vw); |
| 183 |
width: max-content; |
| 184 |
white-space: normal; |
| 185 |
text-align: left; |
| 186 |
box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25); |
| 187 |
opacity: 0; |
| 188 |
pointer-events: none; |
| 189 |
transition: opacity 0.15s ease, transform 0.15s ease; |
| 190 |
z-index: 50; |
| 191 |
} |
| 192 |
|
| 193 |
.method-tooltip:hover::after, |
| 194 |
.method-tooltip:focus-visible::after { |
| 195 |
opacity: 1; |
| 196 |
transform: translate(-50%, -14px); |
| 197 |
} |
| 198 |
|
| 199 |
.yatra-method-button.is-active { |
| 200 |
border-color: var(--yatra-primary-dark, #2563eb); |
| 201 |
box-shadow: 0 10px 26px rgba(37, 99, 235, 0.2); |
| 202 |
transform: translateY(-3px); |
| 203 |
} |
| 204 |
|
| 205 |
.yatra-method-button.is-disabled { |
| 206 |
cursor: not-allowed; |
| 207 |
background: #eef2f6; |
| 208 |
border-color: #cbd5e1; |
| 209 |
color: #64748b; |
| 210 |
} |
| 211 |
|
| 212 |
.yatra-method-button.is-disabled .method-label { |
| 213 |
color: #64748b; |
| 214 |
} |
| 215 |
|
| 216 |
.yatra-method-button.is-disabled .method-icon { |
| 217 |
opacity: 0.85; |
| 218 |
} |
| 219 |
|
| 220 |
.yatra-method-button.is-pending { |
| 221 |
border-style: dashed; |
| 222 |
border-color: #94a3b8; |
| 223 |
} |
| 224 |
|
| 225 |
.yatra-stripe-card-wrapper, |
| 226 |
.yatra-stripe-payment-request-wrapper { |
| 227 |
background: #fff; |
| 228 |
border: 1px solid rgba(148, 163, 184, 0.3); |
| 229 |
border-radius: 18px; |
| 230 |
padding: 22px; |
| 231 |
margin-top: 14px; |
| 232 |
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 25px rgba(15, 23, 42, 0.08); |
| 233 |
} |
| 234 |
|
| 235 |
.yatra-wallet-header { |
| 236 |
display: flex; |
| 237 |
align-items: center; |
| 238 |
justify-content: space-between; |
| 239 |
flex-wrap: wrap; |
| 240 |
gap: 12px; |
| 241 |
} |
| 242 |
|
| 243 |
.yatra-wallet-eyebrow { |
| 244 |
font-size: 0.75rem; |
| 245 |
text-transform: uppercase; |
| 246 |
letter-spacing: 0.1em; |
| 247 |
color: var(--yatra-primary-dark, #2563eb); |
| 248 |
margin: 0; |
| 249 |
} |
| 250 |
|
| 251 |
.yatra-wallet-title { |
| 252 |
font-size: 1.25rem; |
| 253 |
margin: 0; |
| 254 |
color: #0f172a; |
| 255 |
} |
| 256 |
|
| 257 |
.yatra-wallet-badges { |
| 258 |
display: flex; |
| 259 |
gap: 6px; |
| 260 |
} |
| 261 |
|
| 262 |
.wallet-badge { |
| 263 |
padding: 6px 14px; |
| 264 |
border-radius: 999px; |
| 265 |
font-size: 0.8rem; |
| 266 |
font-weight: 600; |
| 267 |
color: #0f172a; |
| 268 |
background: #eef2ff; |
| 269 |
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); |
| 270 |
} |
| 271 |
|
| 272 |
.wallet-badge--apple { |
| 273 |
background: #0f172a; |
| 274 |
color: #fff; |
| 275 |
} |
| 276 |
|
| 277 |
.wallet-badge--google { |
| 278 |
background: linear-gradient(135deg, #1a73e8, #34a853); |
| 279 |
color: #fff; |
| 280 |
} |
| 281 |
|
| 282 |
.yatra-wallet-desc { |
| 283 |
margin: 10px 0 14px; |
| 284 |
color: #475569; |
| 285 |
font-size: 0.9rem; |
| 286 |
} |
| 287 |
|
| 288 |
.yatra-wallet-status { |
| 289 |
margin-top: 18px; |
| 290 |
font-size: 0.88rem; |
| 291 |
color: #475569; |
| 292 |
padding: 12px 14px; |
| 293 |
border-radius: 12px; |
| 294 |
background: #edf2ff; |
| 295 |
} |
| 296 |
|
| 297 |
.yatra-wallet-status.is-success { |
| 298 |
background: #ecfdf5; |
| 299 |
color: #047857; |
| 300 |
} |
| 301 |
|
| 302 |
.yatra-wallet-status.is-warning { |
| 303 |
background: #fff7ed; |
| 304 |
color: #9a3412; |
| 305 |
} |
| 306 |
|
| 307 |
.yatra-wallet-status.is-error { |
| 308 |
background: #fef2f2; |
| 309 |
color: #b91c1c; |
| 310 |
} |
| 311 |
|
| 312 |
.wallet-placeholder { |
| 313 |
border: 1px dashed #cbd5f5; |
| 314 |
border-radius: 14px; |
| 315 |
padding: 16px; |
| 316 |
color: #64748b; |
| 317 |
text-align: center; |
| 318 |
background: rgba(248, 250, 255, 0.8); |
| 319 |
} |
| 320 |
|
| 321 |
.yatra-stripe-card-element { |
| 322 |
padding: 14px; |
| 323 |
border: 1px solid rgba(148, 163, 184, 0.6); |
| 324 |
border-radius: 14px; |
| 325 |
background: #fff; |
| 326 |
margin-bottom: 12px; |
| 327 |
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; |
| 328 |
} |
| 329 |
|
| 330 |
.yatra-stripe-card-element--focus { |
| 331 |
border-color: var(--yatra-primary-dark, #2563eb); |
| 332 |
box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.6); |
| 333 |
} |
| 334 |
|
| 335 |
.yatra-stripe-card-element--invalid { |
| 336 |
border-color: #ef4444; |
| 337 |
} |
| 338 |
|
| 339 |
.yatra-stripe-errors { |
| 340 |
color: #ef4444; |
| 341 |
font-size: 0.875rem; |
| 342 |
line-height: 1.25rem; |
| 343 |
margin-top: 0.5rem; |
| 344 |
display: none; |
| 345 |
} |
| 346 |
|
| 347 |
.yatra-stripe-errors.visible { |
| 348 |
display: block; |
| 349 |
} |
| 350 |
|
| 351 |
/* Loading spinner */ |
| 352 |
.yatra-spinner { |
| 353 |
display: inline-block; |
| 354 |
width: 1em; |
| 355 |
height: 1em; |
| 356 |
border: 2px solid rgba(255, 255, 255, 0.3); |
| 357 |
border-radius: 50%; |
| 358 |
border-top-color: #fff; |
| 359 |
animation: yatra-spin 1s ease-in-out infinite; |
| 360 |
margin-right: 8px; |
| 361 |
vertical-align: middle; |
| 362 |
} |
| 363 |
|
| 364 |
/* Responsive adjustments */ |
| 365 |
@media (max-width: 480px) { |
| 366 |
.yatra-stripe-card-element { |
| 367 |
padding: 10px; |
| 368 |
} |
| 369 |
} |
| 370 |
|