You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

975 lines
26 KiB

3 years ago
3 years ago
3 years ago
  1. <template>
  2. <div class="white-bkg">
  3. <header>
  4. <div class="header__col">
  5. <button class="btn btn--primary" @click="goBack">
  6. <svg
  7. xmlns="http://www.w3.org/2000/svg"
  8. class="icon icon-tabler icon-tabler-chevrons-left"
  9. width="24"
  10. height="24"
  11. viewBox="0 0 24 24"
  12. stroke-width="3"
  13. stroke="#ffffff"
  14. fill="none"
  15. stroke-linecap="round"
  16. stroke-linejoin="round"
  17. >
  18. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  19. <polyline points="11 7 6 12 11 17" />
  20. <polyline points="17 7 12 12 17 17" />
  21. </svg>
  22. back
  23. </button>
  24. </div>
  25. <div class="header__col">
  26. <Logo />
  27. </div>
  28. <div class="header__col" />
  29. </header>
  30. <main class="main-with-header">
  31. <ChosenFlights
  32. :selected-orig="selectedOrig"
  33. :selected-dest="selectedDest"
  34. :departure="formattedDate($route.params.departure)"
  35. :departure-time="
  36. selectedSchedule &&
  37. selectedSchedule.fields &&
  38. selectedSchedule.fields.Departure_TimeL
  39. "
  40. style="margin: 0 1rem;"
  41. />
  42. <div class="schedule-wrapper">
  43. <ul class="schedule-grid">
  44. <li
  45. v-for="schedule in schedules"
  46. :key="schedule.fields.Record_ID"
  47. :class="[
  48. 'grid__row',
  49. { grid__row: selectedSchedule.id == schedule.id },
  50. ]"
  51. >
  52. <div class="row__check">
  53. <label class="radio radio--sched" :for="schedule.id">
  54. <input :id="schedule.id" type="radio" name="schedules" />
  55. <span @click="selectSchedule(schedule)">
  56. <svg
  57. xmlns="http://www.w3.org/2000/svg"
  58. class="icon icon-tabler icon-tabler-check"
  59. width="24"
  60. height="24"
  61. viewBox="0 0 24 24"
  62. stroke-width="3"
  63. stroke="#ffffff"
  64. fill="none"
  65. stroke-linecap="round"
  66. stroke-linejoin="round"
  67. >
  68. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  69. <path d="M5 12l5 5l10 -10" />
  70. </svg>
  71. </span>
  72. </label>
  73. </div>
  74. <div class="row__dep">
  75. <label class="text--muni">
  76. {{ selectedOrig.municipality }}
  77. </label>
  78. <h1 class="text--time">
  79. {{ schedule.fields.Departure_TimeL }}
  80. </h1>
  81. </div>
  82. <div class="row__trip">
  83. <svg
  84. xmlns="http://www.w3.org/2000/svg"
  85. class="icon icon-tabler icon-tabler-arrow-right-circle"
  86. width="100"
  87. height="100"
  88. viewBox="0 0 24 24"
  89. stroke-width="1.5"
  90. stroke="#007fff"
  91. fill="none"
  92. stroke-linecap="round"
  93. stroke-linejoin="round"
  94. >
  95. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  96. <path d="M18 15l3 -3l-3 -3" />
  97. <circle cx="5" cy="12" r="2" />
  98. <path d="M7 12h14" />
  99. </svg>
  100. </div>
  101. <div class="row__arr">
  102. <label class="text--muni">
  103. {{ selectedDest.municipality }}
  104. </label>
  105. <h1 class="text--time">
  106. {{ schedule.fields.Arrival_TimeL }}
  107. </h1>
  108. </div>
  109. <div class="row__info">
  110. <h2 class="text--carrier">
  111. {{ schedule.fields.Carrier_Name }}
  112. </h2>
  113. <span
  114. v-if="schedule.fields.Flight_Number"
  115. class="text--flight-num"
  116. >
  117. Flight No. {{ schedule.fields.Flight_Number }}
  118. </span>
  119. <span class="text--dow">
  120. {{ schedule.fields.Frequency_Convert }}
  121. </span>
  122. <span class="badge--avail">
  123. Available until
  124. <strong>{{
  125. formattedDate(schedule.fields.Effective_End)
  126. }}</strong>
  127. </span>
  128. </div>
  129. </li>
  130. </ul>
  131. </div>
  132. <div
  133. :class="[
  134. 'flyout-container',
  135. { 'flyout-container--hide': !selectedSchedule.id },
  136. { 'flyout-container--show': selectedSchedule.id },
  137. ]"
  138. >
  139. <div class="flyout">
  140. <button
  141. v-if="
  142. selectedSchedule &&
  143. selectedSchedule.fields &&
  144. selectedSchedule.fields.IsExpedia &&
  145. selectedSchedule.fields.IsExpedia[0] !== 'true' &&
  146. selectedSchedule.fields.Carrier_Name !==
  147. 'Copper Valley Air Service'
  148. "
  149. class="btn btn--primary"
  150. @click="goToCarrier"
  151. >
  152. see flights
  153. </button>
  154. <div
  155. v-if="
  156. selectedSchedule &&
  157. selectedSchedule.fields &&
  158. selectedSchedule.fields.IsExpedia &&
  159. (selectedSchedule.fields.IsExpedia[0] === 'true' ||
  160. selectedSchedule.fields.Carrier_Name ===
  161. 'Copper Valley Air Service')
  162. "
  163. class="form-row"
  164. >
  165. <label for="">How Many Adults?</label>
  166. <v-select
  167. v-model="numAdult"
  168. :options="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
  169. />
  170. </div>
  171. <div
  172. v-if="
  173. selectedSchedule &&
  174. selectedSchedule.fields &&
  175. selectedSchedule.fields.IsExpedia &&
  176. (selectedSchedule.fields.IsExpedia[0] === 'true' ||
  177. selectedSchedule.fields.Carrier_Name ===
  178. 'Copper Valley Air Service')
  179. "
  180. class="form-row"
  181. >
  182. <label for="">How Many Children?</label>
  183. <v-select
  184. v-model="numChild"
  185. :options="[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
  186. />
  187. </div>
  188. <div
  189. v-if="
  190. selectedSchedule &&
  191. selectedSchedule.fields &&
  192. selectedSchedule.fields.Carrier_Name ===
  193. 'Copper Valley Air Service'
  194. "
  195. class="alert--flights"
  196. >
  197. <h3>
  198. You'll be flying with<br>
  199. <strong>Copper Valley Air Service</strong>,<br>a great local
  200. airline!
  201. </h3>
  202. <!-- <p>
  203. Copper Valley is a small, family run airline that not only
  204. provides bi-weekly air-taxi flights, but also mail delivery,
  205. sight-seeing, and adventure flights to remote areas of Alaska.
  206. </p> -->
  207. <p>
  208. To book with Copper Valley, enter your contact info below and they
  209. will contact you directly to finish your booking.
  210. </p>
  211. </div>
  212. <div
  213. v-if="
  214. selectedSchedule &&
  215. selectedSchedule.fields &&
  216. selectedSchedule.fields.Carrier_Name ===
  217. 'Copper Valley Air Service'
  218. "
  219. class="form-row form-row--two-columns"
  220. >
  221. <input
  222. type="text"
  223. name="firstName"
  224. placeholder="first name"
  225. v-model="firstName"
  226. :class="[{'input--error': firstNameTouched && !firstName}]"
  227. @focus="firstNameTouched = true"
  228. />
  229. <input
  230. type="text"
  231. name="lastName"
  232. placeholder="last name"
  233. v-model="lastName"
  234. :class="[{'input--error': lastNameTouched && !lastName}]"
  235. @focus="lastNameTouched = true"
  236. />
  237. </div>
  238. <div
  239. v-if="
  240. selectedSchedule &&
  241. selectedSchedule.fields &&
  242. selectedSchedule.fields.Carrier_Name ===
  243. 'Copper Valley Air Service'
  244. "
  245. class="form-row"
  246. >
  247. <input
  248. type="email"
  249. name="email"
  250. placeholder="email address"
  251. v-model="email"
  252. required
  253. @input="validateEmail"
  254. :class="[{'input--error': emailError}]"
  255. />
  256. <span class="alert--error">
  257. {{ emailError }}
  258. </span>
  259. </div>
  260. <div
  261. v-if="
  262. selectedSchedule &&
  263. selectedSchedule.fields &&
  264. selectedSchedule.fields.Carrier_Name ===
  265. 'Copper Valley Air Service'
  266. "
  267. class="form-row"
  268. >
  269. <VuePhoneNumberInput
  270. v-model="phone"
  271. required
  272. @update="validatePhone"
  273. show-code-on-list
  274. @phone-number-focused="phoneTouched = true" />
  275. <!-- <input
  276. type="tel"
  277. name="tel"
  278. placeholder="phone number"
  279. v-model="phone"
  280. required
  281. @blur="validatePhone"
  282. /> -->
  283. <span v-if="phoneTouched" class="alert--error">
  284. {{ phoneError }}
  285. </span>
  286. </div>
  287. <button
  288. v-if="
  289. selectedSchedule &&
  290. selectedSchedule.fields &&
  291. selectedSchedule.fields.IsExpedia &&
  292. selectedSchedule.fields.IsExpedia[0] === 'true'
  293. "
  294. class="btn btn--primary"
  295. @click="book"
  296. >
  297. book now!
  298. </button>
  299. <button
  300. v-if="
  301. selectedSchedule &&
  302. selectedSchedule.fields &&
  303. selectedSchedule.fields.Carrier_Name ===
  304. 'Copper Valley Air Service'
  305. "
  306. :disabled="(emailError + phoneError).length > 0 || !firstName || !lastName"
  307. class="btn btn--primary"
  308. @click="contactCarrier"
  309. >
  310. contact carrier <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-send" width="24" height="24" viewBox="0 0 24 24" stroke-width="3" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
  311. <path stroke="none" d="M0 0h24v24H0z" fill="none"/>
  312. <line x1="10" y1="14" x2="21" y2="3" />
  313. <path d="M21 3l-6.5 18a0.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a0.55 .55 0 0 1 0 -1l18 -6.5" />
  314. </svg>
  315. </button>
  316. <div v-if="mailSent" class="alert--sent">
  317. Thanks! You will be contacted shortly.
  318. </div>
  319. </div>
  320. </div>
  321. </main>
  322. </div>
  323. </template>
  324. <script>
  325. export default {
  326. data () {
  327. return {
  328. schedules: [],
  329. startingDate: '',
  330. selectedSchedule: {},
  331. selectedDays: [],
  332. selectedOrig: {},
  333. selectedDest: {},
  334. numAdult: 1,
  335. numChild: 0,
  336. firstName: '',
  337. lastName: '',
  338. email: '',
  339. phone: '',
  340. firstNameTouched: false,
  341. lastNameTouched: false,
  342. emailTouched: false,
  343. phoneTouched: false,
  344. emailError: '',
  345. phoneError: '',
  346. mailSent: false
  347. }
  348. },
  349. async fetch () {
  350. // console.log(this.$route.params.o)
  351. const today = new Date().toLocaleDateString('en-CA')
  352. const scheduleFetchFilterFormula = `AND(Is_Current="Yes",Origin_IATA="${this.$route.params.o}",Destination_IATA="${this.$route.params.d}",Effective_End>"${today}",SEARCH("${new Date(this.$route.params.departure).getUTCDay()}",Frequency)>0)`
  353. // console.log(scheduleFetchFilterFormula)
  354. const scheduleFetchSort = '&sort[0][field]=Departure_TimeL&sort[0][direction]=asc'
  355. const response = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/Schedule?filterByFormula=${scheduleFetchFilterFormula}${scheduleFetchSort}`, {
  356. method: 'GET',
  357. headers: {
  358. 'Content-Type': 'application/x-www-form-urlencoded',
  359. Authorization: 'Bearer keyJ2ht64ZSN57AG1'
  360. }
  361. })
  362. const data = await response.json()
  363. // console.log(data)
  364. this.schedules = [...data.records]
  365. },
  366. created () {
  367. // console.log(this.$route.path)
  368. if (this.$route && this.$route.params && this.$route.params.o) {
  369. this.fetchSingleAirport(this.$route.params.o, true)
  370. }
  371. if (this.$route && this.$route.params && this.$route.params.d) {
  372. this.fetchSingleAirport(this.$route.params.d, false)
  373. }
  374. },
  375. methods: {
  376. formattedDate (date) {
  377. const thisDate = new Date(date)
  378. const month = thisDate.toLocaleString('en-us', { month: 'short' })
  379. const year = ((thisDate.getUTCFullYear() !== new Date().getUTCFullYear()) ? ', ' + thisDate.getUTCFullYear() : '')
  380. return month + ' ' + thisDate.getUTCDate() + year
  381. },
  382. daysList (days) {
  383. const list = days.split(', ').map((day) => {
  384. const name = day.toLowerCase().slice(0, -1)
  385. let num
  386. switch (name) {
  387. case 'su':
  388. num = 0
  389. break
  390. case 'mo':
  391. num = 1
  392. break
  393. case 'tu':
  394. num = 2
  395. break
  396. case 'we':
  397. num = 3
  398. break
  399. case 'th':
  400. num = 4
  401. break
  402. case 'fr':
  403. num = 5
  404. break
  405. case 'sa':
  406. num = 6
  407. break
  408. default:
  409. break
  410. }
  411. return {
  412. name,
  413. num
  414. }
  415. })
  416. return list.sort(function (a, b) {
  417. return a.num - b.num
  418. })
  419. },
  420. goBack () {
  421. this.$segment.track('flights__go_back', {
  422. origin: this.$route.params.o,
  423. destination: this.$route.params.d,
  424. departureDate: this.$route.params.departure,
  425. })
  426. //this.$router.go(-1)
  427. this.$router.push({
  428. path: '/dates/' + this.$route.params.o + "/" + this.$route.params.d
  429. })
  430. },
  431. // book2 (schedule) {
  432. // if (schedule.fields.IsExpedia[0] === 'true') {
  433. // this.startingDate = new Date()
  434. // this.selectedSchedule = schedule.fields
  435. // this.selectedDays = this.daysList(schedule.fields.Frequency_Convert)
  436. // } else {
  437. // window.open(schedule.fields['BookingLink (from Carriers_Alaska)'][0])
  438. // }
  439. // },
  440. book () {
  441. this.$segment.track('flights__book', {
  442. origin: this.selectedSchedule.fields.Origin_IATA[0],
  443. destination: this.selectedSchedule.fields.Destination_IATA[0],
  444. departureDate: this.$route.params.departure,
  445. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  446. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  447. numAdult: this.numAdult,
  448. numChild: this.numChild,
  449. carrier: this.selectedSchedule.fields.Carrier_Name
  450. })
  451. window.open(`https://www.anrdoezrs.net/links/100449149/type/am/https://www.expedia.com/go/flight/search/oneway/${this.$route.params.departure}/${this.$route.params.departure}?langid=1033&FromAirport=${this.selectedSchedule.fields.Origin_IATA}&FromTime=${this.selectedSchedule.fields.Departure_TimeL}&ToTime=${this.selectedSchedule.fields.Arrival_TimeL}&ToAirport=${this.selectedSchedule.fields.Destination_IATA}&Class=3&NumAdult=${this.numAdult}&NumChild=${this.numChild}`)
  452. },
  453. goToCarrier () {
  454. this.$segment.track('flights__open_carrier', {
  455. origin: this.selectedSchedule.fields.Origin_IATA[0],
  456. destination: this.selectedSchedule.fields.Destination_IATA[0],
  457. departureDate: this.$route.params.departure,
  458. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  459. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  460. numAdult: this.numAdult,
  461. numChild: this.numChild,
  462. carrier: this.selectedSchedule.fields.Carrier_Name
  463. })
  464. window.open(this.selectedSchedule.fields['BookingLink (from Carriers_Alaska)'][0])
  465. },
  466. async contactCarrier () {
  467. const newBooking =
  468. {
  469. fields: {
  470. ArrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  471. Carrier: this.selectedSchedule.fields.Carrier_Name,
  472. DepartureTime: this.selectedSchedule.fields.Departure_TimeL,
  473. Destination: this.selectedSchedule.fields.Destination_IATA[0],
  474. Origin: this.selectedSchedule.fields.Origin_IATA[0],
  475. CreatedDate: new Date(),
  476. FirstName: this.firstName,
  477. LastName: this.lastName,
  478. Phone: this.phone,
  479. Email: this.email,
  480. DepartureDate: this.$route.params.departure,
  481. NumAdult: this.numAdult,
  482. NumChild: this.numChild,
  483. }
  484. }
  485. const res = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/CVAS_Booking/`, {
  486. method: 'POST',
  487. headers: {
  488. 'Content-Type': 'application/json',
  489. Authorization: 'Bearer key8ZVBxVZJL2Wp7y'
  490. },
  491. body: JSON.stringify(newBooking)
  492. })
  493. const json = await res.json()
  494. //this.guests = { ...await json }
  495. if(await json) {
  496. this.mailSent = true
  497. this.firstName = ''
  498. this.lastName = ''
  499. this.email = ''
  500. this.phone = ''
  501. this.firstNameTouched = false
  502. this.lastNameTouched = false
  503. this.emailTouched = false
  504. this.phoneTouched = false
  505. }
  506. },
  507. selectSchedule (schedule) {
  508. this.selectedSchedule = { ...schedule }
  509. this.$segment.track('flights__select_schedule', {
  510. origin: this.selectedSchedule.fields.Origin_IATA[0],
  511. destination: this.selectedSchedule.fields.Destination_IATA[0],
  512. departureDate: this.$route.params.departure,
  513. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  514. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  515. carrier: this.selectedSchedule.fields.Carrier_Name
  516. })
  517. },
  518. clearSelectedSchedule () {
  519. // console.log('clear')
  520. this.startingDate = ''
  521. this.selectedSchedule = {}
  522. },
  523. async fetchSingleAirport(iata, isOrig) {
  524. const airportFetchFilterFormula =
  525. isOrig
  526. ? `AND(Is_Origin=1,{IsCurrent-AsOrigin}="Yes",Airport_IATA="${iata}")`
  527. : `AND(Is_Destination=1,{IsCurrent-AsDest}="Yes",Airport_IATA="${iata}")`
  528. const response = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/Airports_IATA?filterByFormula=${airportFetchFilterFormula}`, {
  529. method: 'GET',
  530. headers: {
  531. 'Content-Type': 'application/x-www-form-urlencoded',
  532. Authorization: 'Bearer keyJ2ht64ZSN57AG1'
  533. }
  534. })
  535. const mapData = await response.json()
  536. const thisAirport = {
  537. iata: mapData.records[0].fields.Airport_IATA,
  538. lat: mapData.records[0].fields.Latitude_Deg,
  539. long: mapData.records[0].fields.Longitude_Deg,
  540. icon: mapData.records[0].fields.Icon_Url,
  541. name: mapData.records[0].fields.Airport_Name,
  542. municipality: mapData.records[0].fields.Municipality,
  543. type: mapData.records[0].fields.Type,
  544. search: mapData.records[0].fields.Search_Field
  545. }
  546. switch (isOrig) {
  547. case true:
  548. this.selectedOrig = { ...thisAirport }
  549. break
  550. case false:
  551. this.selectedDest = { ...thisAirport }
  552. break
  553. default:
  554. break
  555. }
  556. },
  557. validateEmail() {
  558. if (/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/.test(this.email)) {
  559. const emailArray = this.email.split('@')
  560. const name = emailArray[0]
  561. const fullDomain = emailArray[1]
  562. const domainArray = fullDomain.split('.')
  563. const domain = domainArray.slice(-2)[0]
  564. const tld = domainArray.slice(-1)[0]
  565. if(tld.length < 2 || domain.length < 2) {
  566. this.emailError = 'your email isn\'t valid';
  567. } else {
  568. this.emailError = '';
  569. }
  570. } else {
  571. this.emailError = 'your email isn\'t valid';
  572. }
  573. },
  574. validatePhone(data) {
  575. this.phoneIsValid = data.isValid
  576. if (data.isValid) {
  577. this.phoneError = '';
  578. } else {
  579. this.phoneError = 'your phone number isn\'t valid';
  580. }
  581. }
  582. }
  583. }
  584. </script>
  585. <style lang="scss" scoped>
  586. .main-with-header {
  587. margin-top: clamp(20px + 1.75rem, 4rem + 1.75rem, 50px + 1.75rem);
  588. }
  589. .schedule-wrapper {
  590. display: flex;
  591. flex-direction: column;
  592. align-items: center;
  593. }
  594. .schedule-grid {
  595. display: flex;
  596. flex-direction: column;
  597. gap: 1rem;
  598. margin: 2rem 2rem 2rem 2rem;
  599. }
  600. .grid__row {
  601. display: flex;
  602. flex-direction: row;
  603. align-items: center;
  604. gap: 1rem;
  605. padding: 1rem 1rem 1rem 4rem;
  606. flex-wrap: wrap;
  607. border-radius: 2rem;
  608. }
  609. .grid__row:nth-child(odd) {
  610. background: #eee;
  611. }
  612. label {
  613. font-size: 0.75rem;
  614. font-weight: 700;
  615. color: white;
  616. display: block;
  617. }
  618. .field__content {
  619. font-size: 1.5rem;
  620. }
  621. .dow-grid {
  622. width: 200px;
  623. display: grid;
  624. grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  625. gap: 0.5rem;
  626. }
  627. .dow-grid__day {
  628. font-size: 0.8rem;
  629. border: 1px solid #ccc !important;
  630. display: flex;
  631. align-items: center;
  632. justify-content: center;
  633. border-radius: 3px !important;
  634. text-transform: capitalize;
  635. }
  636. .day--su {
  637. grid-column: 1 / span 1;
  638. }
  639. .day--mo {
  640. grid-column: 2 / span 1;
  641. }
  642. .day--tu {
  643. grid-column: 3 / span 1;
  644. }
  645. .day--we {
  646. grid-column: 4 / span 1;
  647. }
  648. .day--th {
  649. grid-column: 5 / span 1;
  650. }
  651. .day--fr {
  652. grid-column: 6 / span 1;
  653. }
  654. .day--sa {
  655. grid-column: 7 / span 1;
  656. }
  657. .row__trip {
  658. display: flex;
  659. align-items: center;
  660. }
  661. .row__trip svg {
  662. margin-bottom: -0.5rem;
  663. width: 3.5rem;
  664. height: 3.5rem;
  665. margin-left: -1rem;
  666. margin-right: -1rem;
  667. }
  668. .shape--trip {
  669. height: 0.4rem;
  670. width: 2rem;
  671. background: #007fff;
  672. display: block;
  673. margin-top: 1rem;
  674. position: relative;
  675. }
  676. .shape--trip::before {
  677. height: 0.8rem;
  678. width: 0.8rem;
  679. background: #fff;
  680. border: 0.02rem solid #007fff;
  681. border-radius: 999px;
  682. content: "";
  683. position: absolute;
  684. top: -0.15rem;
  685. left: -0.5rem;
  686. }
  687. .shape--trip::after {
  688. height: 0.8rem;
  689. width: 0.8rem;
  690. background: #007fff;
  691. border: 0.02rem solid #007fff;
  692. border-radius: 999px;
  693. content: "";
  694. position: absolute;
  695. top: -0.15rem;
  696. right: -0.5rem;
  697. }
  698. h1 {
  699. font-size: 3rem;
  700. line-height: 0.85;
  701. }
  702. h2 {
  703. font-size: 2rem;
  704. line-height: 1;
  705. }
  706. label.text--muni {
  707. color: #007fff;
  708. line-height: 1;
  709. padding-left: 0.3rem;
  710. }
  711. span.text--flight-num {
  712. font-weight: 700;
  713. margin-right: 0.5rem;
  714. }
  715. span.text--dow {
  716. font-weight: 300;
  717. font-size: 0.8rem;
  718. color: #007fff;
  719. }
  720. span.badge--avail {
  721. border-radius: 999px;
  722. border: 1px solid gray;
  723. color: gray;
  724. padding: 0.2em 0.8em;
  725. line-height: 1;
  726. font-size: 0.8rem;
  727. display: block;
  728. width: fit-content;
  729. }
  730. .radio span {
  731. border-radius: 999px;
  732. border: 3px solid #007fff;
  733. background-color: white;
  734. height: 2rem;
  735. width: 2rem;
  736. display: flex;
  737. position: relative;
  738. transition: all 0.3s;
  739. align-items: center;
  740. justify-content: center;
  741. }
  742. .radio span svg {
  743. transition: all 0.3s;
  744. stroke: #eee;
  745. }
  746. .radio span:hover {
  747. background: #007fff;
  748. }
  749. .radio input:checked + span {
  750. background: #007fff;
  751. }
  752. .radio input:checked + span svg {
  753. stroke: white;
  754. }
  755. .radio input {
  756. display: none;
  757. }
  758. .row__info {
  759. min-width: fit-content;
  760. }
  761. .row__check {
  762. margin-left: -3rem;
  763. }
  764. .form-row {
  765. display: flex;
  766. flex-direction: column;
  767. justify-content: stretch;
  768. }
  769. .form-row label {
  770. text-transform: uppercase;
  771. font-size: 1rem;
  772. font-weight: 300;
  773. }
  774. .form-row input {
  775. background: #eee;
  776. border-radius: 0.5rem 3rem 3rem 3rem;
  777. transition: 0.3s all;
  778. padding: 0.5em 0.8em;
  779. font-size: min(1rem, 18px);
  780. line-height: 1;
  781. }
  782. .form-row--two-columns {
  783. display: flex;
  784. flex-direction: row;
  785. flex-wrap: nowrap;
  786. column-gap: 1rem;
  787. }
  788. .form-row--two-columns input {
  789. width: 50%;
  790. }
  791. .form-row input:focus {
  792. border: 0;
  793. }
  794. .flyout {
  795. background: #007fff;
  796. border-radius: 3rem 3rem 0 0;
  797. padding: 3rem;
  798. pointer-events: all;
  799. width: clamp(450px, 50vw, 400px);
  800. display: flex;
  801. flex-direction: column;
  802. gap: 1rem;
  803. }
  804. .flyout .btn.btn--primary {
  805. background: white;
  806. color: black;
  807. }
  808. .flyout .btn.btn--primary:hover {
  809. background: #00ca00;
  810. color: #fff;
  811. }
  812. .flyout .v-select {
  813. font-size: 1.5rem;
  814. }
  815. .flyout .vs__dropdown-menu {
  816. display: flex;
  817. flex-direction: row;
  818. flex-wrap: wrap;
  819. }
  820. .flyout .vs__dropdown-menu li {
  821. border-radius: 999px;
  822. transition: 0.3 all;
  823. }
  824. .flyout .vs__dropdown-menu li:hover {
  825. border-radius: 999px;
  826. background-color: #007fff;
  827. }
  828. .flyout .vs__dropdown-toggle {
  829. background: #eee;
  830. border-radius: 1.2rem 1.2rem 1.2rem 1.2rem;
  831. }
  832. .flyout .vs--open .vs__dropdown-toggle {
  833. background: #eee;
  834. border-radius: 1.2rem 1.2rem 0 0;
  835. }
  836. .flyout p {
  837. font-size: 1rem;
  838. line-height: 1.2;
  839. font-weight: 400;
  840. color: #fff;
  841. margin-bottom: 1rem;
  842. margin-left: 0.5rem;
  843. margin-right: 0.5rem;
  844. }
  845. .flyout p:last-child {
  846. margin-bottom: 0;
  847. }
  848. .flyout h3 {
  849. font-size: 1.5rem;
  850. line-height: 1;
  851. font-weight: 200;
  852. margin-bottom: 1rem;
  853. color: #fff;
  854. margin-left: 0.5rem;
  855. margin-right: 0.5rem;
  856. }
  857. .flyout h3 strong {
  858. font-weight: 600;
  859. }
  860. .btn:disabled {
  861. opacity: 0.2;
  862. background-color: #ddd;
  863. color: #222;
  864. cursor: not-allowed;
  865. pointer-events: none;
  866. }
  867. .form-row input.input--error {
  868. --stripe1: #ff69b433;
  869. --stripe2: #eee;
  870. // box-shadow: 0 0 0 0.2rem red;
  871. background: linear-gradient(135deg, var(--stripe1) 25%, var(--stripe2) 25%, var(--stripe2) 50%, var(--stripe1) 50%, var(--stripe1) 75%, var(--stripe2) 75%, var(--stripe2) 100%), var(--stripe2);
  872. background-size: 56.57px 56.57px;
  873. }
  874. .alert--error {
  875. text-align: center;
  876. color: white;
  877. font-size: 0.75rem;
  878. margin-top: 0.15rem;
  879. }
  880. .alert--sent {
  881. text-align: center;
  882. background-color: #00ca00;
  883. margin: 0 -3rem -3rem -3rem;
  884. text-transform: uppercase;
  885. font-size: 0.9rem;
  886. letter-spacing: 0.1rem;
  887. padding: 1rem;
  888. }
  889. </style>