| 1 |
/** |
| 2 |
* Yatra trip search bar — full reset + layout (shortcode only). |
| 3 |
* All rules scoped under body .yatra-trip-search-shortcode to beat typical theme CSS. |
| 4 |
* Use with: [yatra_search] → root .yatra-trip-search-shortcode |
| 5 |
* |
| 6 |
* @package Yatra |
| 7 |
*/ |
| 8 |
|
| 9 |
/* ------------------------------------------------------------------------- |
| 10 |
Scope: high specificity (body + block class). box-sizing for predictable layout. |
| 11 |
------------------------------------------------------------------------- */ |
| 12 |
body .yatra-trip-search-shortcode { |
| 13 |
--yatra-ts-accent: var(--yatra-primary-dark, #2563eb); |
| 14 |
--yatra-ts-accent-hover: var(--yatra-primary-darker, #1d4ed8); |
| 15 |
--yatra-ts-surface: #ffffff; |
| 16 |
--yatra-ts-text: #0f172a; |
| 17 |
--yatra-ts-muted: #64748b; |
| 18 |
--yatra-ts-border: #e2e8f0; |
| 19 |
--yatra-ts-radius: 14px; |
| 20 |
--yatra-ts-row: 52px; |
| 21 |
--yatra-ts-z-dropdown: 10050; |
| 22 |
|
| 23 |
display: block; |
| 24 |
width: 100%; |
| 25 |
max-width: 100%; |
| 26 |
position: relative; |
| 27 |
z-index: 1000; |
| 28 |
isolation: isolate; |
| 29 |
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; |
| 30 |
line-height: 1.4; |
| 31 |
color: var(--yatra-ts-text); |
| 32 |
-webkit-font-smoothing: antialiased; |
| 33 |
} |
| 34 |
|
| 35 |
body .yatra-trip-search-shortcode *, |
| 36 |
body .yatra-trip-search-shortcode *::before, |
| 37 |
body .yatra-trip-search-shortcode *::after { |
| 38 |
box-sizing: border-box !important; |
| 39 |
} |
| 40 |
|
| 41 |
body .yatra-trip-search-shortcode button, |
| 42 |
body .yatra-trip-search-shortcode input, |
| 43 |
body .yatra-trip-search-shortcode select { |
| 44 |
font-family: inherit !important; |
| 45 |
font-size: inherit; |
| 46 |
line-height: inherit; |
| 47 |
} |
| 48 |
|
| 49 |
/* ------------------------------------------------------------------------- |
| 50 |
Horizontal strip (background behind bar) |
| 51 |
------------------------------------------------------------------------- */ |
| 52 |
body .yatra-trip-search-shortcode .yatra-horizontal-search { |
| 53 |
padding:0; |
| 54 |
margin: 0 !important; |
| 55 |
position: relative; |
| 56 |
z-index: 1; |
| 57 |
} |
| 58 |
|
| 59 |
body .yatra-trip-listing-search-wrap .yatra-trip-search-shortcode .yatra-horizontal-search { |
| 60 |
padding-top: 0 !important; |
| 61 |
padding-bottom: 28px !important; |
| 62 |
background: transparent !important; |
| 63 |
} |
| 64 |
|
| 65 |
body .yatra-trip-search-shortcode .yatra-horizontal-search-container { |
| 66 |
width: 100% !important; |
| 67 |
max-width: var(--yatra-container-max-width, 1200px) !important; |
| 68 |
margin-left: auto !important; |
| 69 |
margin-right: auto !important; |
| 70 |
padding-left: var(--yatra-container-padding, 20px) !important; |
| 71 |
padding-right: var(--yatra-container-padding, 20px) !important; |
| 72 |
position: relative; |
| 73 |
z-index: 2; |
| 74 |
} |
| 75 |
|
| 76 |
/* ------------------------------------------------------------------------- |
| 77 |
Main bar |
| 78 |
------------------------------------------------------------------------- */ |
| 79 |
body .yatra-trip-search-shortcode .yatra-search-bar { |
| 80 |
display: flex !important; |
| 81 |
flex-direction: row; |
| 82 |
align-items: stretch !important; |
| 83 |
flex-wrap: nowrap; |
| 84 |
gap: 0 !important; |
| 85 |
width: 100% !important; |
| 86 |
margin: 0 !important; |
| 87 |
padding: 5px 6px 5px 8px !important; |
| 88 |
background: var(--yatra-ts-surface) !important; |
| 89 |
border: 1px solid var(--yatra-ts-border) !important; |
| 90 |
border-radius: var(--yatra-ts-radius) !important; |
| 91 |
box-shadow: |
| 92 |
0 1px 2px rgba(15, 23, 42, 0.04), |
| 93 |
0 8px 24px rgba(15, 23, 42, 0.06) !important; |
| 94 |
transition: box-shadow 0.2s ease, border-color 0.2s ease; |
| 95 |
} |
| 96 |
|
| 97 |
body .yatra-trip-search-shortcode .yatra-search-bar:hover { |
| 98 |
border-color: #cbd5e1 !important; |
| 99 |
box-shadow: |
| 100 |
0 1px 2px rgba(15, 23, 42, 0.05), |
| 101 |
0 12px 32px rgba(15, 23, 42, 0.08) !important; |
| 102 |
} |
| 103 |
|
| 104 |
body .yatra-trip-search-shortcode .yatra-search-divider { |
| 105 |
width: 1px !important; |
| 106 |
flex-shrink: 0 !important; |
| 107 |
align-self: center !important; |
| 108 |
height: 28px !important; |
| 109 |
margin: 0 2px !important; |
| 110 |
padding: 0 !important; |
| 111 |
border: none !important; |
| 112 |
background: rgba(148, 163, 184, 0.45) !important; |
| 113 |
} |
| 114 |
|
| 115 |
/* ------------------------------------------------------------------------- |
| 116 |
Keyword column |
| 117 |
------------------------------------------------------------------------- */ |
| 118 |
body .yatra-trip-search-shortcode .yatra-search-keyword-segment { |
| 119 |
display: flex !important; |
| 120 |
flex: 2.5; |
| 121 |
align-items: stretch !important; |
| 122 |
min-width: 260px; |
| 123 |
max-width: 480px; |
| 124 |
margin: 0 !important; |
| 125 |
padding: 0 !important; |
| 126 |
} |
| 127 |
|
| 128 |
body .yatra-trip-search-shortcode .yatra-search-keyword-inner { |
| 129 |
display: flex !important; |
| 130 |
flex-direction: row; |
| 131 |
align-items: center !important; |
| 132 |
gap: 10px !important; |
| 133 |
width: 100% !important; |
| 134 |
min-height: var(--yatra-ts-row) !important; |
| 135 |
padding: 8px 12px !important; |
| 136 |
margin: 0 !important; |
| 137 |
border: 1px solid transparent !important; |
| 138 |
border-radius: calc(var(--yatra-ts-radius) - 6px) !important; |
| 139 |
background: transparent !important; |
| 140 |
box-shadow: none !important; |
| 141 |
transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; |
| 142 |
} |
| 143 |
|
| 144 |
body .yatra-trip-search-shortcode .yatra-search-keyword-inner:hover { |
| 145 |
background: #f8fafc !important; |
| 146 |
} |
| 147 |
|
| 148 |
body .yatra-trip-search-shortcode .yatra-search-keyword-inner:focus-within { |
| 149 |
background: #fafafa !important; |
| 150 |
border-color: rgba(37, 99, 235, 0.28) !important; |
| 151 |
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important; |
| 152 |
outline: none !important; |
| 153 |
} |
| 154 |
|
| 155 |
body .yatra-trip-search-shortcode .yatra-search-keyword-leading { |
| 156 |
display: flex !important; |
| 157 |
flex-shrink: 0 !important; |
| 158 |
align-items: center !important; |
| 159 |
justify-content: center !important; |
| 160 |
width: 20px !important; |
| 161 |
height: 20px !important; |
| 162 |
margin: 0 !important; |
| 163 |
padding: 0 !important; |
| 164 |
border: none !important; |
| 165 |
background: transparent !important; |
| 166 |
color: #64748b !important; |
| 167 |
} |
| 168 |
|
| 169 |
body .yatra-trip-search-shortcode .yatra-search-keyword-leading svg { |
| 170 |
display: block !important; |
| 171 |
width: 20px !important; |
| 172 |
height: 20px !important; |
| 173 |
max-width: none !important; |
| 174 |
fill: none !important; |
| 175 |
stroke: currentColor !important; |
| 176 |
vertical-align: middle !important; |
| 177 |
} |
| 178 |
|
| 179 |
body .yatra-trip-search-shortcode .yatra-search-keyword-inner:focus-within .yatra-search-keyword-leading { |
| 180 |
color: var(--yatra-ts-accent) !important; |
| 181 |
} |
| 182 |
|
| 183 |
body .yatra-trip-search-shortcode .yatra-search-keyword-stack { |
| 184 |
display: flex !important; |
| 185 |
flex-direction: column !important; |
| 186 |
align-items: flex-start !important; |
| 187 |
justify-content: center !important; |
| 188 |
gap: 4px !important; |
| 189 |
flex: 1 1 auto !important; |
| 190 |
min-width: 0 !important; |
| 191 |
margin: 0 !important; |
| 192 |
padding: 0 !important; |
| 193 |
} |
| 194 |
|
| 195 |
body .yatra-trip-search-shortcode .yatra-search-keyword-stack .yatra-dropdown-label { |
| 196 |
margin: 0 !important; |
| 197 |
padding: 0 !important; |
| 198 |
} |
| 199 |
|
| 200 |
body .yatra-trip-search-shortcode .yatra-search-keyword-input { |
| 201 |
display: block !important; |
| 202 |
width: 100% !important; |
| 203 |
min-width: 0 !important; |
| 204 |
margin: 0 !important; |
| 205 |
padding: 0 !important; |
| 206 |
border: none !important; |
| 207 |
border-radius: 0 !important; |
| 208 |
background: transparent !important; |
| 209 |
background-color: transparent !important; |
| 210 |
box-shadow: none !important; |
| 211 |
font-size: 15px !important; |
| 212 |
font-weight: 600 !important; |
| 213 |
line-height: 1.3 !important; |
| 214 |
color: var(--yatra-ts-text) !important; |
| 215 |
-webkit-appearance: none !important; |
| 216 |
appearance: none !important; |
| 217 |
} |
| 218 |
|
| 219 |
body .yatra-trip-search-shortcode .yatra-search-keyword-input::placeholder { |
| 220 |
color: #94a3b8 !important; |
| 221 |
font-weight: 500 !important; |
| 222 |
opacity: 1 !important; |
| 223 |
} |
| 224 |
|
| 225 |
body .yatra-trip-search-shortcode .yatra-search-keyword-input:focus { |
| 226 |
outline: none !important; |
| 227 |
box-shadow: none !important; |
| 228 |
} |
| 229 |
|
| 230 |
body .yatra-trip-search-shortcode .yatra-search-keyword-input::-webkit-search-decoration, |
| 231 |
body .yatra-trip-search-shortcode .yatra-search-keyword-input::-webkit-search-cancel-button { |
| 232 |
-webkit-appearance: none !important; |
| 233 |
appearance: none !important; |
| 234 |
} |
| 235 |
|
| 236 |
/* ------------------------------------------------------------------------- |
| 237 |
Dropdown columns |
| 238 |
------------------------------------------------------------------------- */ |
| 239 |
body .yatra-trip-search-shortcode .yatra-search-dropdown { |
| 240 |
position: relative !important; |
| 241 |
/* display:flex + align-items:stretch makes the trigger fill the full bar |
| 242 |
height (same mechanism as the keyword segment), so the trigger's own |
| 243 |
align-items:center can vertically centre the icon + label/value within |
| 244 |
the bar. As a plain block the trigger sat at the top, leaving the labels |
| 245 |
higher than the Search field. The absolutely-positioned menu is out of |
| 246 |
flow, so it's unaffected. */ |
| 247 |
display: flex !important; |
| 248 |
align-items: stretch !important; |
| 249 |
flex: 1 1 auto !important; |
| 250 |
min-width: 180px !important; |
| 251 |
margin: 0 !important; |
| 252 |
padding: 0 !important; |
| 253 |
isolation: isolate; |
| 254 |
} |
| 255 |
|
| 256 |
/* When a dropdown is open, lift its whole (isolated) stacking context above the |
| 257 |
sibling dropdowns that follow it in the DOM. `isolation: isolate` above makes |
| 258 |
each dropdown its own stacking context, so without this the open dropdown's |
| 259 |
absolutely-positioned menu is painted UNDER later siblings. Most visible on |
| 260 |
mobile, where the bar stacks vertically and the open Destination menu |
| 261 |
overlaps the Activity / Duration / Budget rows below it (their labels bled |
| 262 |
through). Applies on every viewport, so it also hardens desktop. */ |
| 263 |
body .yatra-trip-search-shortcode .yatra-search-dropdown.open { |
| 264 |
z-index: var(--yatra-ts-z-dropdown) !important; |
| 265 |
} |
| 266 |
|
| 267 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger { |
| 268 |
display: flex !important; |
| 269 |
flex-direction: row !important; |
| 270 |
align-items: center !important; |
| 271 |
gap: 10px !important; |
| 272 |
width: 100% !important; |
| 273 |
min-height: var(--yatra-ts-row) !important; |
| 274 |
margin: 0 !important; |
| 275 |
padding: 8px 12px !important; |
| 276 |
border: 1px solid transparent !important; |
| 277 |
border-radius: calc(var(--yatra-ts-radius) - 6px) !important; |
| 278 |
background: transparent !important; |
| 279 |
box-shadow: none !important; |
| 280 |
cursor: pointer !important; |
| 281 |
text-align: left !important; |
| 282 |
overflow: visible !important; |
| 283 |
transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; |
| 284 |
} |
| 285 |
|
| 286 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger:hover { |
| 287 |
background: #f8fafc !important; |
| 288 |
} |
| 289 |
|
| 290 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger:active { |
| 291 |
background: #f1f5f9 !important; |
| 292 |
} |
| 293 |
|
| 294 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger:focus { |
| 295 |
outline: none !important; |
| 296 |
border-color: rgba(37, 99, 235, 0.3) !important; |
| 297 |
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important; |
| 298 |
} |
| 299 |
|
| 300 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger svg:first-of-type { |
| 301 |
flex-shrink: 0 !important; |
| 302 |
display: block !important; |
| 303 |
width: 20px !important; |
| 304 |
height: 20px !important; |
| 305 |
min-width: 20px !important; |
| 306 |
min-height: 20px !important; |
| 307 |
margin: 0 !important; |
| 308 |
padding: 0 !important; |
| 309 |
color: #64748b !important; |
| 310 |
fill: none !important; |
| 311 |
stroke: currentColor !important; |
| 312 |
} |
| 313 |
|
| 314 |
body .yatra-trip-search-shortcode .yatra-dropdown-trigger:hover svg:first-of-type { |
| 315 |
color: #475569 !important; |
| 316 |
} |
| 317 |
|
| 318 |
body .yatra-trip-search-shortcode .yatra-dropdown-content { |
| 319 |
display: flex !important; |
| 320 |
flex-direction: column !important; |
| 321 |
align-items: flex-start !important; |
| 322 |
gap: 4px !important; |
| 323 |
flex: 1 1 auto !important; |
| 324 |
min-width: 0 !important; |
| 325 |
margin: 0 !important; |
| 326 |
padding: 0 !important; |
| 327 |
} |
| 328 |
|
| 329 |
body .yatra-trip-search-shortcode .yatra-dropdown-label { |
| 330 |
display: block !important; |
| 331 |
margin: 0 !important; |
| 332 |
padding: 0 !important; |
| 333 |
font-size: 10px !important; |
| 334 |
font-weight: 600 !important; |
| 335 |
line-height: 1.2 !important; |
| 336 |
letter-spacing: 0.06em !important; |
| 337 |
text-transform: uppercase !important; |
| 338 |
color: var(--yatra-ts-muted) !important; |
| 339 |
} |
| 340 |
|
| 341 |
body .yatra-trip-search-shortcode .yatra-dropdown-value { |
| 342 |
display: block !important; |
| 343 |
margin: 0 !important; |
| 344 |
padding: 0 !important; |
| 345 |
font-size: 15px !important; |
| 346 |
font-weight: 600 !important; |
| 347 |
line-height: 1.3 !important; |
| 348 |
color: #111827 !important; |
| 349 |
max-width: 100%; |
| 350 |
overflow: hidden; |
| 351 |
text-overflow: ellipsis; |
| 352 |
white-space: nowrap; |
| 353 |
} |
| 354 |
|
| 355 |
body .yatra-trip-search-shortcode .yatra-dropdown-arrow { |
| 356 |
flex-shrink: 0 !important; |
| 357 |
display: block !important; |
| 358 |
width: 16px !important; |
| 359 |
height: 16px !important; |
| 360 |
min-width: 16px !important; |
| 361 |
min-height: 16px !important; |
| 362 |
margin: 0 0 0 auto !important; |
| 363 |
padding: 0 !important; |
| 364 |
color: #9ca3af !important; |
| 365 |
fill: none !important; |
| 366 |
stroke: currentColor !important; |
| 367 |
transition: transform 0.15s ease; |
| 368 |
} |
| 369 |
|
| 370 |
body .yatra-trip-search-shortcode .yatra-search-dropdown.open .yatra-dropdown-arrow { |
| 371 |
transform: rotate(180deg); |
| 372 |
} |
| 373 |
|
| 374 |
/* ------------------------------------------------------------------------- |
| 375 |
Dropdown menus & options |
| 376 |
------------------------------------------------------------------------- */ |
| 377 |
body .yatra-trip-search-shortcode .yatra-dropdown-search-wrap { |
| 378 |
flex-shrink: 0 !important; |
| 379 |
margin: 0 !important; |
| 380 |
padding: 0 !important; |
| 381 |
} |
| 382 |
|
| 383 |
body .yatra-trip-search-shortcode .yatra-dropdown-filter-input { |
| 384 |
width: 100% !important; |
| 385 |
margin: 0 !important; |
| 386 |
padding: 8px 10px !important; |
| 387 |
font-size: 13px !important; |
| 388 |
font-weight: 500 !important; |
| 389 |
line-height: 1.35 !important; |
| 390 |
color: #111827 !important; |
| 391 |
border: 1px solid #e2e8f0 !important; |
| 392 |
border-radius: 6px !important; |
| 393 |
background: #f8fafc !important; |
| 394 |
box-shadow: none !important; |
| 395 |
-webkit-appearance: none !important; |
| 396 |
appearance: none !important; |
| 397 |
} |
| 398 |
|
| 399 |
body .yatra-trip-search-shortcode .yatra-dropdown-filter-input::placeholder { |
| 400 |
color: #9ca3af !important; |
| 401 |
opacity: 1 !important; |
| 402 |
} |
| 403 |
|
| 404 |
body .yatra-trip-search-shortcode .yatra-dropdown-filter-input:focus { |
| 405 |
outline: none !important; |
| 406 |
border-color: var(--yatra-primary, #3b82f6) !important; |
| 407 |
background: #ffffff !important; |
| 408 |
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important; |
| 409 |
} |
| 410 |
|
| 411 |
body .yatra-trip-search-shortcode .yatra-dropdown-options { |
| 412 |
flex: 1 1 auto !important; |
| 413 |
min-height: 0 !important; |
| 414 |
max-height: 280px !important; |
| 415 |
overflow-y: auto !important; |
| 416 |
overflow-x: hidden !important; |
| 417 |
margin: 0 !important; |
| 418 |
padding: 2px 0 !important; |
| 419 |
list-style: none !important; |
| 420 |
} |
| 421 |
|
| 422 |
body .yatra-trip-search-shortcode .yatra-dropdown-option--hidden { |
| 423 |
display: none !important; |
| 424 |
} |
| 425 |
|
| 426 |
body .yatra-trip-search-shortcode .yatra-dropdown-menu { |
| 427 |
position: absolute !important; |
| 428 |
top: calc(100% + 4px) !important; |
| 429 |
left: 0 !important; |
| 430 |
right: auto !important; |
| 431 |
min-width: 260px !important; |
| 432 |
margin: 0 !important; |
| 433 |
padding: 6px !important; |
| 434 |
background: #ffffff !important; |
| 435 |
border: 1px solid #e2e8f0 !important; |
| 436 |
border-radius: 10px !important; |
| 437 |
box-shadow: |
| 438 |
0 10px 40px rgba(15, 23, 42, 0.1), |
| 439 |
0 4px 12px rgba(15, 23, 42, 0.06) !important; |
| 440 |
z-index: var(--yatra-ts-z-dropdown) !important; |
| 441 |
opacity: 0; |
| 442 |
visibility: hidden; |
| 443 |
transform: translateY(-8px) scale(0.95); |
| 444 |
transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); |
| 445 |
display: none !important; |
| 446 |
} |
| 447 |
|
| 448 |
body .yatra-trip-search-shortcode .yatra-search-dropdown.open .yatra-dropdown-menu, |
| 449 |
body .yatra-trip-search-shortcode .yatra-dropdown-menu.show { |
| 450 |
display: block !important; |
| 451 |
opacity: 1 !important; |
| 452 |
visibility: visible !important; |
| 453 |
transform: translateY(0) scale(1) !important; |
| 454 |
} |
| 455 |
|
| 456 |
body .yatra-trip-search-shortcode .yatra-search-dropdown.open .yatra-dropdown-menu.yatra-dropdown-menu--filterable, |
| 457 |
body .yatra-trip-search-shortcode .yatra-dropdown-menu.yatra-dropdown-menu--filterable.show { |
| 458 |
display: flex !important; |
| 459 |
flex-direction: column !important; |
| 460 |
gap: 6px !important; |
| 461 |
padding: 8px !important; |
| 462 |
max-height: min(380px, 70vh) !important; |
| 463 |
} |
| 464 |
|
| 465 |
body .yatra-trip-search-shortcode .yatra-dropdown-option { |
| 466 |
margin: 0 !important; |
| 467 |
padding: 8px 10px !important; |
| 468 |
font-size: 13px !important; |
| 469 |
font-weight: 500 !important; |
| 470 |
line-height: 1.35 !important; |
| 471 |
color: #374151 !important; |
| 472 |
border-radius: 6px !important; |
| 473 |
cursor: pointer !important; |
| 474 |
display: flex !important; |
| 475 |
align-items: center !important; |
| 476 |
position: relative !important; |
| 477 |
background: transparent !important; |
| 478 |
border: none !important; |
| 479 |
text-align: left !important; |
| 480 |
width: 100% !important; |
| 481 |
box-shadow: none !important; |
| 482 |
} |
| 483 |
|
| 484 |
body .yatra-trip-search-shortcode .yatra-dropdown-option:hover { |
| 485 |
background: #f1f5f9 !important; |
| 486 |
color: #0f172a !important; |
| 487 |
} |
| 488 |
|
| 489 |
body .yatra-trip-search-shortcode .yatra-dropdown-option.selected { |
| 490 |
background: #eff6ff !important; |
| 491 |
color: var(--yatra-primary-darker, #1d4ed8) !important; |
| 492 |
font-weight: 600 !important; |
| 493 |
padding-right: 26px !important; |
| 494 |
} |
| 495 |
|
| 496 |
body .yatra-trip-search-shortcode .yatra-dropdown-option.selected::before { |
| 497 |
content: '' !important; |
| 498 |
position: absolute !important; |
| 499 |
right: 8px !important; |
| 500 |
top: 50% !important; |
| 501 |
transform: translateY(-50%) !important; |
| 502 |
width: 16px !important; |
| 503 |
height: 16px !important; |
| 504 |
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E"); |
| 505 |
background-repeat: no-repeat !important; |
| 506 |
background-position: center !important; |
| 507 |
background-size: 16px 16px !important; |
| 508 |
} |
| 509 |
|
| 510 |
/* ------------------------------------------------------------------------- |
| 511 |
Duration panel |
| 512 |
------------------------------------------------------------------------- */ |
| 513 |
body .yatra-trip-search-shortcode .yatra-duration-menu { |
| 514 |
min-width: 260px !important; |
| 515 |
padding: 8px !important; |
| 516 |
} |
| 517 |
|
| 518 |
body .yatra-trip-search-shortcode .yatra-duration-slider-wrapper { |
| 519 |
display: flex !important; |
| 520 |
flex-direction: column !important; |
| 521 |
gap: 10px !important; |
| 522 |
} |
| 523 |
|
| 524 |
body .yatra-trip-search-shortcode .yatra-duration-header { |
| 525 |
text-align: center !important; |
| 526 |
margin: 0 !important; |
| 527 |
} |
| 528 |
|
| 529 |
body .yatra-trip-search-shortcode .yatra-duration-title { |
| 530 |
font-size: 13px !important; |
| 531 |
font-weight: 600 !important; |
| 532 |
color: #1f2937 !important; |
| 533 |
margin: 0 0 2px !important; |
| 534 |
} |
| 535 |
|
| 536 |
body .yatra-trip-search-shortcode .yatra-duration-subtitle { |
| 537 |
font-size: 11px !important; |
| 538 |
font-weight: 500 !important; |
| 539 |
color: #6b7280 !important; |
| 540 |
line-height: 1.3 !important; |
| 541 |
margin: 0 !important; |
| 542 |
} |
| 543 |
|
| 544 |
body .yatra-trip-search-shortcode .yatra-duration-badges { |
| 545 |
display: flex !important; |
| 546 |
justify-content: space-between !important; |
| 547 |
align-items: center !important; |
| 548 |
padding: 8px 10px !important; |
| 549 |
background: #f8fafc !important; |
| 550 |
border: 1px solid #e2e8f0 !important; |
| 551 |
border-radius: 6px !important; |
| 552 |
} |
| 553 |
|
| 554 |
body .yatra-trip-search-shortcode .yatra-duration-badge { |
| 555 |
font-size: 11px !important; |
| 556 |
font-weight: 600 !important; |
| 557 |
color: #1f2937 !important; |
| 558 |
padding: 4px 8px !important; |
| 559 |
background: #ffffff !important; |
| 560 |
border: 1px solid var(--yatra-primary, #3b82f6) !important; |
| 561 |
border-radius: 4px !important; |
| 562 |
} |
| 563 |
|
| 564 |
/* Same horizontal inset as .yatra-duration-badges (padding 8px 10px) so the track matches the badge row */ |
| 565 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider { |
| 566 |
position: relative !important; |
| 567 |
height: 36px !important; |
| 568 |
box-sizing: border-box !important; |
| 569 |
width: calc(100% - 20px) !important; |
| 570 |
max-width: calc(100% - 20px) !important; |
| 571 |
margin: 6px auto 10px !important; |
| 572 |
padding: 0 !important; |
| 573 |
} |
| 574 |
|
| 575 |
body .yatra-trip-search-shortcode .yatra-slider-track { |
| 576 |
position: absolute !important; |
| 577 |
width: calc(100% - 16px) !important; |
| 578 |
height: 6px !important; |
| 579 |
left: 8px !important; |
| 580 |
top: 50% !important; |
| 581 |
transform: translateY(-50%) !important; |
| 582 |
background: #e5e7eb !important; |
| 583 |
border-radius: 3px !important; |
| 584 |
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1) !important; |
| 585 |
box-sizing: border-box !important; |
| 586 |
} |
| 587 |
|
| 588 |
body .yatra-trip-search-shortcode .yatra-slider-range { |
| 589 |
position: absolute !important; |
| 590 |
height: 6px !important; |
| 591 |
top: 50% !important; |
| 592 |
transform: translateY(-50%) !important; |
| 593 |
background: linear-gradient(90deg, var(--yatra-primary, #3b82f6) 0%, var(--yatra-primary-dark, #2563eb) 100%) !important; |
| 594 |
border-radius: 3px !important; |
| 595 |
box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3) !important; |
| 596 |
} |
| 597 |
|
| 598 |
/* Range inputs centred on the track (top:50%), matching the Price Range |
| 599 |
filter slider. The previous top:37% left the thumbs floating above the |
| 600 |
track. Inputs are click-through; only their thumbs capture pointer events. */ |
| 601 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range'] { |
| 602 |
position: absolute !important; |
| 603 |
left: 0 !important; |
| 604 |
width: 100% !important; |
| 605 |
height: 6px !important; |
| 606 |
top: 50% !important; |
| 607 |
transform: translateY(-50%) !important; |
| 608 |
margin: 0 !important; |
| 609 |
padding: 0 !important; |
| 610 |
border: 0 !important; |
| 611 |
background: transparent !important; |
| 612 |
-webkit-appearance: none !important; |
| 613 |
appearance: none !important; |
| 614 |
pointer-events: none !important; |
| 615 |
box-sizing: border-box !important; |
| 616 |
cursor: pointer !important; |
| 617 |
} |
| 618 |
|
| 619 |
/* Max thumb above min so an overlapping max handle stays grabbable (same as |
| 620 |
the price slider). z-index intentionally NOT !important. */ |
| 621 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range'].yatra-range-min { |
| 622 |
z-index: 3; |
| 623 |
} |
| 624 |
|
| 625 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range'].yatra-range-max { |
| 626 |
z-index: 4; |
| 627 |
} |
| 628 |
|
| 629 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-webkit-slider-runnable-track { |
| 630 |
height: 6px !important; |
| 631 |
background: transparent !important; |
| 632 |
border-radius: 3px !important; |
| 633 |
} |
| 634 |
|
| 635 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-webkit-slider-thumb { |
| 636 |
-webkit-appearance: none !important; |
| 637 |
appearance: none !important; |
| 638 |
width: 20px !important; |
| 639 |
height: 20px !important; |
| 640 |
border-radius: 50% !important; |
| 641 |
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important; |
| 642 |
border: 3px solid var(--yatra-primary, #3b82f6) !important; |
| 643 |
cursor: grab !important; |
| 644 |
pointer-events: all !important; |
| 645 |
box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1) !important; |
| 646 |
margin-top: -7px !important; |
| 647 |
} |
| 648 |
|
| 649 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-webkit-slider-thumb:hover { |
| 650 |
transform: scale(1.06) !important; |
| 651 |
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important; |
| 652 |
} |
| 653 |
|
| 654 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-webkit-slider-thumb:active { |
| 655 |
cursor: grabbing !important; |
| 656 |
} |
| 657 |
|
| 658 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-moz-range-track { |
| 659 |
height: 6px !important; |
| 660 |
background: transparent !important; |
| 661 |
border-radius: 3px !important; |
| 662 |
} |
| 663 |
|
| 664 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-moz-range-thumb { |
| 665 |
width: 20px !important; |
| 666 |
height: 20px !important; |
| 667 |
border-radius: 50% !important; |
| 668 |
background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important; |
| 669 |
border: 3px solid var(--yatra-primary, #3b82f6) !important; |
| 670 |
cursor: grab !important; |
| 671 |
pointer-events: all !important; |
| 672 |
box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1) !important; |
| 673 |
} |
| 674 |
|
| 675 |
body .yatra-trip-search-shortcode .yatra-dual-range-slider input[type='range']::-moz-range-thumb:hover { |
| 676 |
transform: scale(1.06) !important; |
| 677 |
} |
| 678 |
|
| 679 |
/* ------------------------------------------------------------------------- |
| 680 |
Submit button |
| 681 |
------------------------------------------------------------------------- */ |
| 682 |
body .yatra-trip-search-shortcode .yatra-search-button-container { |
| 683 |
display: flex !important; |
| 684 |
flex-shrink: 0 !important; |
| 685 |
align-items: stretch !important; |
| 686 |
margin: 0 0 0 4px !important; |
| 687 |
padding: 4px 4px 4px 10px !important; |
| 688 |
border: none !important; |
| 689 |
border-left: 1px solid rgba(148, 163, 184, 0.35) !important; |
| 690 |
background: transparent !important; |
| 691 |
} |
| 692 |
|
| 693 |
body .yatra-trip-search-shortcode .yatra-search-main-btn { |
| 694 |
-webkit-appearance: none !important; |
| 695 |
appearance: none !important; |
| 696 |
display: inline-flex !important; |
| 697 |
align-items: center !important; |
| 698 |
justify-content: center !important; |
| 699 |
min-width: 120px !important; |
| 700 |
min-height: var(--yatra-ts-row) !important; |
| 701 |
margin: 0 !important; |
| 702 |
padding: 0 22px !important; |
| 703 |
border: none !important; |
| 704 |
border-radius: 10px !important; |
| 705 |
background: var(--yatra-ts-accent) !important; |
| 706 |
background-color: var(--yatra-ts-accent) !important; |
| 707 |
color: #ffffff !important; |
| 708 |
font-size: 15px !important; |
| 709 |
font-weight: 600 !important; |
| 710 |
letter-spacing: 0.01em !important; |
| 711 |
text-transform: none !important; |
| 712 |
text-decoration: none !important; |
| 713 |
cursor: pointer !important; |
| 714 |
box-shadow: |
| 715 |
0 1px 2px rgba(15, 23, 42, 0.06), |
| 716 |
0 4px 14px rgba(37, 99, 235, 0.28) !important; |
| 717 |
transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease !important; |
| 718 |
} |
| 719 |
|
| 720 |
body .yatra-trip-search-shortcode .yatra-search-main-btn:hover { |
| 721 |
background: var(--yatra-ts-accent-hover) !important; |
| 722 |
background-color: var(--yatra-ts-accent-hover) !important; |
| 723 |
color: #ffffff !important; |
| 724 |
box-shadow: |
| 725 |
0 2px 6px rgba(15, 23, 42, 0.08), |
| 726 |
0 8px 22px rgba(37, 99, 235, 0.35) !important; |
| 727 |
} |
| 728 |
|
| 729 |
body .yatra-trip-search-shortcode .yatra-search-main-btn:active { |
| 730 |
transform: scale(0.99); |
| 731 |
} |
| 732 |
|
| 733 |
body .yatra-trip-search-shortcode .yatra-search-main-btn:focus { |
| 734 |
outline: none !important; |
| 735 |
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35) !important; |
| 736 |
} |
| 737 |
|
| 738 |
/* ------------------------------------------------------------------------- |
| 739 |
Responsive |
| 740 |
------------------------------------------------------------------------- */ |
| 741 |
@media (max-width: 1024px) { |
| 742 |
body .yatra-trip-search-shortcode .yatra-search-bar { |
| 743 |
flex-wrap: wrap !important; |
| 744 |
gap: 8px !important; |
| 745 |
} |
| 746 |
|
| 747 |
body .yatra-trip-search-shortcode .yatra-search-dropdown { |
| 748 |
min-width: calc(50% - 20px) !important; |
| 749 |
flex: 1 1 calc(50% - 20px) !important; |
| 750 |
} |
| 751 |
|
| 752 |
body .yatra-trip-search-shortcode .yatra-search-divider { |
| 753 |
display: none !important; |
| 754 |
} |
| 755 |
} |
| 756 |
|
| 757 |
@media (max-width: 768px) { |
| 758 |
body .yatra-trip-search-shortcode .yatra-search-bar { |
| 759 |
flex-direction: column !important; |
| 760 |
align-items: stretch !important; |
| 761 |
gap: 4px !important; |
| 762 |
padding: 12px !important; |
| 763 |
} |
| 764 |
|
| 765 |
body .yatra-trip-search-shortcode .yatra-search-keyword-segment { |
| 766 |
max-width: none !important; |
| 767 |
width: 100% !important; |
| 768 |
min-width: 0 !important; |
| 769 |
} |
| 770 |
|
| 771 |
body .yatra-trip-search-shortcode .yatra-search-dropdown { |
| 772 |
width: 100% !important; |
| 773 |
min-width: 100% !important; |
| 774 |
flex: 1 1 auto !important; |
| 775 |
} |
| 776 |
|
| 777 |
body .yatra-trip-search-shortcode .yatra-search-divider { |
| 778 |
display: block !important; |
| 779 |
width: 100% !important; |
| 780 |
height: 1px !important; |
| 781 |
margin: 6px 0 !important; |
| 782 |
} |
| 783 |
|
| 784 |
body .yatra-trip-search-shortcode .yatra-search-button-container { |
| 785 |
width: 100% !important; |
| 786 |
margin-left: 0 !important; |
| 787 |
padding: 10px 0 4px !important; |
| 788 |
border-left: none !important; |
| 789 |
border-top: 1px solid rgba(148, 163, 184, 0.35) !important; |
| 790 |
} |
| 791 |
|
| 792 |
body .yatra-trip-search-shortcode .yatra-search-main-btn { |
| 793 |
width: 100% !important; |
| 794 |
min-height: 48px !important; |
| 795 |
margin-top: 0 !important; |
| 796 |
} |
| 797 |
|
| 798 |
body .yatra-trip-search-shortcode .yatra-dropdown-menu { |
| 799 |
left: 0 !important; |
| 800 |
right: 0 !important; |
| 801 |
min-width: 100% !important; |
| 802 |
} |
| 803 |
|
| 804 |
body .yatra-trip-search-shortcode .yatra-duration-menu { |
| 805 |
min-width: 100% !important; |
| 806 |
} |
| 807 |
} |
| 808 |
|
| 809 |
/* --------------------------------------------------------------------------- |
| 810 |
Date field (optional, opt-in via Settings → Search & Listing → Date). |
| 811 |
Mirrors the keyword segment so it sits inline with the other search fields. |
| 812 |
Uses a native <input type="date"> for zero-dependency, mobile-friendly UX. |
| 813 |
--------------------------------------------------------------------------- */ |
| 814 |
body .yatra-trip-search-shortcode .yatra-search-date-segment { |
| 815 |
display: flex !important; |
| 816 |
flex: 1; |
| 817 |
align-items: stretch !important; |
| 818 |
min-width: 150px; |
| 819 |
max-width: 240px; |
| 820 |
margin: 0 !important; |
| 821 |
padding: 0 !important; |
| 822 |
} |
| 823 |
|
| 824 |
body .yatra-trip-search-shortcode .yatra-search-date-inner { |
| 825 |
display: flex !important; |
| 826 |
flex-direction: row; |
| 827 |
align-items: center !important; |
| 828 |
gap: 10px !important; |
| 829 |
width: 100% !important; |
| 830 |
min-height: var(--yatra-ts-row) !important; |
| 831 |
padding: 8px 12px !important; |
| 832 |
margin: 0 !important; |
| 833 |
border: 1px solid transparent !important; |
| 834 |
border-radius: calc(var(--yatra-ts-radius) - 6px) !important; |
| 835 |
background: transparent !important; |
| 836 |
box-shadow: none !important; |
| 837 |
transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; |
| 838 |
} |
| 839 |
|
| 840 |
body .yatra-trip-search-shortcode .yatra-search-date-inner:hover { |
| 841 |
background: #f8fafc !important; |
| 842 |
} |
| 843 |
|
| 844 |
body .yatra-trip-search-shortcode .yatra-search-date-inner:focus-within { |
| 845 |
background: #fafafa !important; |
| 846 |
border-color: rgba(37, 99, 235, 0.28) !important; |
| 847 |
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important; |
| 848 |
outline: none !important; |
| 849 |
} |
| 850 |
|
| 851 |
body .yatra-trip-search-shortcode .yatra-search-date-leading { |
| 852 |
display: flex !important; |
| 853 |
flex-shrink: 0 !important; |
| 854 |
align-items: center !important; |
| 855 |
justify-content: center !important; |
| 856 |
width: 20px !important; |
| 857 |
height: 20px !important; |
| 858 |
margin: 0 !important; |
| 859 |
padding: 0 !important; |
| 860 |
border: none !important; |
| 861 |
background: transparent !important; |
| 862 |
color: #64748b !important; |
| 863 |
} |
| 864 |
|
| 865 |
body .yatra-trip-search-shortcode .yatra-search-date-leading svg { |
| 866 |
display: block !important; |
| 867 |
width: 20px !important; |
| 868 |
height: 20px !important; |
| 869 |
max-width: none !important; |
| 870 |
fill: none !important; |
| 871 |
stroke: currentColor !important; |
| 872 |
vertical-align: middle !important; |
| 873 |
} |
| 874 |
|
| 875 |
body .yatra-trip-search-shortcode .yatra-search-date-inner:focus-within .yatra-search-date-leading { |
| 876 |
color: #2563eb !important; |
| 877 |
} |
| 878 |
|
| 879 |
body .yatra-trip-search-shortcode .yatra-search-date-stack { |
| 880 |
display: flex !important; |
| 881 |
flex-direction: column !important; |
| 882 |
align-items: flex-start !important; |
| 883 |
justify-content: center !important; |
| 884 |
gap: 4px !important; |
| 885 |
flex: 1 1 auto !important; |
| 886 |
min-width: 0 !important; |
| 887 |
margin: 0 !important; |
| 888 |
padding: 0 !important; |
| 889 |
} |
| 890 |
|
| 891 |
body .yatra-trip-search-shortcode .yatra-search-date-stack .yatra-dropdown-label { |
| 892 |
margin: 0 !important; |
| 893 |
padding: 0 !important; |
| 894 |
} |
| 895 |
|
| 896 |
body .yatra-trip-search-shortcode .yatra-search-date-input { |
| 897 |
display: block !important; |
| 898 |
width: 100% !important; |
| 899 |
min-width: 0 !important; |
| 900 |
margin: 0 !important; |
| 901 |
padding: 0 !important; |
| 902 |
border: none !important; |
| 903 |
border-radius: 0 !important; |
| 904 |
background: transparent !important; |
| 905 |
background-color: transparent !important; |
| 906 |
box-shadow: none !important; |
| 907 |
font-size: 15px !important; |
| 908 |
font-weight: 600 !important; |
| 909 |
line-height: 1.3 !important; |
| 910 |
color: var(--yatra-ts-text) !important; |
| 911 |
font-family: inherit !important; |
| 912 |
} |
| 913 |
|
| 914 |
body .yatra-trip-search-shortcode .yatra-search-date-input:focus { |
| 915 |
outline: none !important; |
| 916 |
box-shadow: none !important; |
| 917 |
} |
| 918 |
|
| 919 |
body .yatra-trip-search-shortcode .yatra-search-date-input::-webkit-calendar-picker-indicator { |
| 920 |
cursor: pointer; |
| 921 |
opacity: 0.55; |
| 922 |
margin: 0; |
| 923 |
} |
| 924 |
|
| 925 |
body .yatra-trip-search-shortcode .yatra-search-date-input::-webkit-calendar-picker-indicator:hover { |
| 926 |
opacity: 0.9; |
| 927 |
} |
| 928 |
|
| 929 |
/* When flatpickr upgrades the native date input it becomes a read-only text |
| 930 |
field opened by click; show a pointer cursor and keep the caret hidden. */ |
| 931 |
body .yatra-trip-search-shortcode .yatra-search-date-input.flatpickr-input { |
| 932 |
cursor: pointer !important; |
| 933 |
caret-color: transparent !important; |
| 934 |
} |
| 935 |
|
| 936 |
/* Placeholder ("Any date") shown when no date is selected. Native type="date" |
| 937 |
ignores placeholder, but flatpickr converts the field to a text input where |
| 938 |
it renders — matching the muted placeholder styling of the keyword field. */ |
| 939 |
body .yatra-trip-search-shortcode .yatra-search-date-input::placeholder { |
| 940 |
color: #94a3b8 !important; |
| 941 |
font-weight: 500 !important; |
| 942 |
opacity: 1 !important; |
| 943 |
} |
| 944 |
|