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.

972 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. },
  428. // book2 (schedule) {
  429. // if (schedule.fields.IsExpedia[0] === 'true') {
  430. // this.startingDate = new Date()
  431. // this.selectedSchedule = schedule.fields
  432. // this.selectedDays = this.daysList(schedule.fields.Frequency_Convert)
  433. // } else {
  434. // window.open(schedule.fields['BookingLink (from Carriers_Alaska)'][0])
  435. // }
  436. // },
  437. book () {
  438. this.$segment.track('flights__book', {
  439. origin: this.selectedSchedule.fields.Origin_IATA[0],
  440. destination: this.selectedSchedule.fields.Destination_IATA[0],
  441. departureDate: this.$route.params.departure,
  442. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  443. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  444. numAdult: this.numAdult,
  445. numChild: this.numChild,
  446. carrier: this.selectedSchedule.fields.Carrier_Name
  447. })
  448. 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}`)
  449. },
  450. goToCarrier () {
  451. this.$segment.track('flights__open_carrier', {
  452. origin: this.selectedSchedule.fields.Origin_IATA[0],
  453. destination: this.selectedSchedule.fields.Destination_IATA[0],
  454. departureDate: this.$route.params.departure,
  455. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  456. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  457. numAdult: this.numAdult,
  458. numChild: this.numChild,
  459. carrier: this.selectedSchedule.fields.Carrier_Name
  460. })
  461. window.open(this.selectedSchedule.fields['BookingLink (from Carriers_Alaska)'][0])
  462. },
  463. async contactCarrier () {
  464. const newBooking =
  465. {
  466. fields: {
  467. ArrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  468. Carrier: this.selectedSchedule.fields.Carrier_Name,
  469. DepartureTime: this.selectedSchedule.fields.Departure_TimeL,
  470. Destination: this.selectedSchedule.fields.Destination_IATA[0],
  471. Origin: this.selectedSchedule.fields.Origin_IATA[0],
  472. CreatedDate: new Date(),
  473. FirstName: this.firstName,
  474. LastName: this.lastName,
  475. Phone: this.phone,
  476. Email: this.email,
  477. DepartureDate: this.$route.params.departure,
  478. NumAdult: this.numAdult,
  479. NumChild: this.numChild,
  480. }
  481. }
  482. const res = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/CVAS_Booking/`, {
  483. method: 'POST',
  484. headers: {
  485. 'Content-Type': 'application/json',
  486. Authorization: 'Bearer key8ZVBxVZJL2Wp7y'
  487. },
  488. body: JSON.stringify(newBooking)
  489. })
  490. const json = await res.json()
  491. //this.guests = { ...await json }
  492. if(await json) {
  493. this.mailSent = true
  494. this.firstName = ''
  495. this.lastName = ''
  496. this.email = ''
  497. this.phone = ''
  498. this.firstNameTouched = false
  499. this.lastNameTouched = false
  500. this.emailTouched = false
  501. this.phoneTouched = false
  502. }
  503. },
  504. selectSchedule (schedule) {
  505. this.selectedSchedule = { ...schedule }
  506. this.$segment.track('flights__select_schedule', {
  507. origin: this.selectedSchedule.fields.Origin_IATA[0],
  508. destination: this.selectedSchedule.fields.Destination_IATA[0],
  509. departureDate: this.$route.params.departure,
  510. departureTime: this.selectedSchedule.fields.Departure_TimeL,
  511. arrivalTime: this.selectedSchedule.fields.Arrival_TimeL,
  512. carrier: this.selectedSchedule.fields.Carrier_Name
  513. })
  514. },
  515. clearSelectedSchedule () {
  516. // console.log('clear')
  517. this.startingDate = ''
  518. this.selectedSchedule = {}
  519. },
  520. async fetchSingleAirport(iata, isOrig) {
  521. const airportFetchFilterFormula =
  522. isOrig
  523. ? `AND(Is_Origin=1,{IsCurrent-AsOrigin}="Yes",Airport_IATA="${iata}")`
  524. : `AND(Is_Destination=1,{IsCurrent-AsDest}="Yes",Airport_IATA="${iata}")`
  525. const response = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/Airports_IATA?filterByFormula=${airportFetchFilterFormula}`, {
  526. method: 'GET',
  527. headers: {
  528. 'Content-Type': 'application/x-www-form-urlencoded',
  529. Authorization: 'Bearer keyJ2ht64ZSN57AG1'
  530. }
  531. })
  532. const mapData = await response.json()
  533. const thisAirport = {
  534. iata: mapData.records[0].fields.Airport_IATA,
  535. lat: mapData.records[0].fields.Latitude_Deg,
  536. long: mapData.records[0].fields.Longitude_Deg,
  537. icon: mapData.records[0].fields.Icon_Url,
  538. name: mapData.records[0].fields.Airport_Name,
  539. municipality: mapData.records[0].fields.Municipality,
  540. type: mapData.records[0].fields.Type,
  541. search: mapData.records[0].fields.Search_Field
  542. }
  543. switch (isOrig) {
  544. case true:
  545. this.selectedOrig = { ...thisAirport }
  546. break
  547. case false:
  548. this.selectedDest = { ...thisAirport }
  549. break
  550. default:
  551. break
  552. }
  553. },
  554. validateEmail() {
  555. 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)) {
  556. const emailArray = this.email.split('@')
  557. const name = emailArray[0]
  558. const fullDomain = emailArray[1]
  559. const domainArray = fullDomain.split('.')
  560. const domain = domainArray.slice(-2)[0]
  561. const tld = domainArray.slice(-1)[0]
  562. if(tld.length < 2 || domain.length < 2) {
  563. this.emailError = 'your email isn\'t valid';
  564. } else {
  565. this.emailError = '';
  566. }
  567. } else {
  568. this.emailError = 'your email isn\'t valid';
  569. }
  570. },
  571. validatePhone(data) {
  572. this.phoneIsValid = data.isValid
  573. if (data.isValid) {
  574. this.phoneError = '';
  575. } else {
  576. this.phoneError = 'your phone number isn\'t valid';
  577. }
  578. }
  579. }
  580. }
  581. </script>
  582. <style lang="scss" scoped>
  583. .main-with-header {
  584. margin-top: clamp(20px + 1.75rem, 4rem + 1.75rem, 50px + 1.75rem);
  585. }
  586. .schedule-wrapper {
  587. display: flex;
  588. flex-direction: column;
  589. align-items: center;
  590. }
  591. .schedule-grid {
  592. display: flex;
  593. flex-direction: column;
  594. gap: 1rem;
  595. margin: 2rem 2rem 2rem 2rem;
  596. }
  597. .grid__row {
  598. display: flex;
  599. flex-direction: row;
  600. align-items: center;
  601. gap: 1rem;
  602. padding: 1rem 1rem 1rem 4rem;
  603. flex-wrap: wrap;
  604. border-radius: 2rem;
  605. }
  606. .grid__row:nth-child(odd) {
  607. background: #eee;
  608. }
  609. label {
  610. font-size: 0.75rem;
  611. font-weight: 700;
  612. color: white;
  613. display: block;
  614. }
  615. .field__content {
  616. font-size: 1.5rem;
  617. }
  618. .dow-grid {
  619. width: 200px;
  620. display: grid;
  621. grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  622. gap: 0.5rem;
  623. }
  624. .dow-grid__day {
  625. font-size: 0.8rem;
  626. border: 1px solid #ccc !important;
  627. display: flex;
  628. align-items: center;
  629. justify-content: center;
  630. border-radius: 3px !important;
  631. text-transform: capitalize;
  632. }
  633. .day--su {
  634. grid-column: 1 / span 1;
  635. }
  636. .day--mo {
  637. grid-column: 2 / span 1;
  638. }
  639. .day--tu {
  640. grid-column: 3 / span 1;
  641. }
  642. .day--we {
  643. grid-column: 4 / span 1;
  644. }
  645. .day--th {
  646. grid-column: 5 / span 1;
  647. }
  648. .day--fr {
  649. grid-column: 6 / span 1;
  650. }
  651. .day--sa {
  652. grid-column: 7 / span 1;
  653. }
  654. .row__trip {
  655. display: flex;
  656. align-items: center;
  657. }
  658. .row__trip svg {
  659. margin-bottom: -0.5rem;
  660. width: 3.5rem;
  661. height: 3.5rem;
  662. margin-left: -1rem;
  663. margin-right: -1rem;
  664. }
  665. .shape--trip {
  666. height: 0.4rem;
  667. width: 2rem;
  668. background: #007fff;
  669. display: block;
  670. margin-top: 1rem;
  671. position: relative;
  672. }
  673. .shape--trip::before {
  674. height: 0.8rem;
  675. width: 0.8rem;
  676. background: #fff;
  677. border: 0.02rem solid #007fff;
  678. border-radius: 999px;
  679. content: "";
  680. position: absolute;
  681. top: -0.15rem;
  682. left: -0.5rem;
  683. }
  684. .shape--trip::after {
  685. height: 0.8rem;
  686. width: 0.8rem;
  687. background: #007fff;
  688. border: 0.02rem solid #007fff;
  689. border-radius: 999px;
  690. content: "";
  691. position: absolute;
  692. top: -0.15rem;
  693. right: -0.5rem;
  694. }
  695. h1 {
  696. font-size: 3rem;
  697. line-height: 0.85;
  698. }
  699. h2 {
  700. font-size: 2rem;
  701. line-height: 1;
  702. }
  703. label.text--muni {
  704. color: #007fff;
  705. line-height: 1;
  706. padding-left: 0.3rem;
  707. }
  708. span.text--flight-num {
  709. font-weight: 700;
  710. margin-right: 0.5rem;
  711. }
  712. span.text--dow {
  713. font-weight: 300;
  714. font-size: 0.8rem;
  715. color: #007fff;
  716. }
  717. span.badge--avail {
  718. border-radius: 999px;
  719. border: 1px solid gray;
  720. color: gray;
  721. padding: 0.2em 0.8em;
  722. line-height: 1;
  723. font-size: 0.8rem;
  724. display: block;
  725. width: fit-content;
  726. }
  727. .radio span {
  728. border-radius: 999px;
  729. border: 3px solid #007fff;
  730. background-color: white;
  731. height: 2rem;
  732. width: 2rem;
  733. display: flex;
  734. position: relative;
  735. transition: all 0.3s;
  736. align-items: center;
  737. justify-content: center;
  738. }
  739. .radio span svg {
  740. transition: all 0.3s;
  741. stroke: #eee;
  742. }
  743. .radio span:hover {
  744. background: #007fff;
  745. }
  746. .radio input:checked + span {
  747. background: #007fff;
  748. }
  749. .radio input:checked + span svg {
  750. stroke: white;
  751. }
  752. .radio input {
  753. display: none;
  754. }
  755. .row__info {
  756. min-width: fit-content;
  757. }
  758. .row__check {
  759. margin-left: -3rem;
  760. }
  761. .form-row {
  762. display: flex;
  763. flex-direction: column;
  764. justify-content: stretch;
  765. }
  766. .form-row label {
  767. text-transform: uppercase;
  768. font-size: 1rem;
  769. font-weight: 300;
  770. }
  771. .form-row input {
  772. background: #eee;
  773. border-radius: 0.5rem 3rem 3rem 3rem;
  774. transition: 0.3s all;
  775. padding: 0.5em 0.8em;
  776. font-size: min(1rem, 18px);
  777. line-height: 1;
  778. }
  779. .form-row--two-columns {
  780. display: flex;
  781. flex-direction: row;
  782. flex-wrap: nowrap;
  783. column-gap: 1rem;
  784. }
  785. .form-row--two-columns input {
  786. width: 50%;
  787. }
  788. .form-row input:focus {
  789. border: 0;
  790. }
  791. .flyout {
  792. background: #007fff;
  793. border-radius: 3rem 3rem 0 0;
  794. padding: 3rem;
  795. pointer-events: all;
  796. width: clamp(450px, 50vw, 400px);
  797. display: flex;
  798. flex-direction: column;
  799. gap: 1rem;
  800. }
  801. .flyout .btn.btn--primary {
  802. background: white;
  803. color: black;
  804. }
  805. .flyout .btn.btn--primary:hover {
  806. background: #00ca00;
  807. color: #fff;
  808. }
  809. .flyout .v-select {
  810. font-size: 1.5rem;
  811. }
  812. .flyout .vs__dropdown-menu {
  813. display: flex;
  814. flex-direction: row;
  815. flex-wrap: wrap;
  816. }
  817. .flyout .vs__dropdown-menu li {
  818. border-radius: 999px;
  819. transition: 0.3 all;
  820. }
  821. .flyout .vs__dropdown-menu li:hover {
  822. border-radius: 999px;
  823. background-color: #007fff;
  824. }
  825. .flyout .vs__dropdown-toggle {
  826. background: #eee;
  827. border-radius: 1.2rem 1.2rem 1.2rem 1.2rem;
  828. }
  829. .flyout .vs--open .vs__dropdown-toggle {
  830. background: #eee;
  831. border-radius: 1.2rem 1.2rem 0 0;
  832. }
  833. .flyout p {
  834. font-size: 1rem;
  835. line-height: 1.2;
  836. font-weight: 400;
  837. color: #fff;
  838. margin-bottom: 1rem;
  839. margin-left: 0.5rem;
  840. margin-right: 0.5rem;
  841. }
  842. .flyout p:last-child {
  843. margin-bottom: 0;
  844. }
  845. .flyout h3 {
  846. font-size: 1.5rem;
  847. line-height: 1;
  848. font-weight: 200;
  849. margin-bottom: 1rem;
  850. color: #fff;
  851. margin-left: 0.5rem;
  852. margin-right: 0.5rem;
  853. }
  854. .flyout h3 strong {
  855. font-weight: 600;
  856. }
  857. .btn:disabled {
  858. opacity: 0.2;
  859. background-color: #ddd;
  860. color: #222;
  861. cursor: not-allowed;
  862. pointer-events: none;
  863. }
  864. .form-row input.input--error {
  865. --stripe1: #ff69b433;
  866. --stripe2: #eee;
  867. // box-shadow: 0 0 0 0.2rem red;
  868. 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);
  869. background-size: 56.57px 56.57px;
  870. }
  871. .alert--error {
  872. text-align: center;
  873. color: white;
  874. font-size: 0.75rem;
  875. margin-top: 0.15rem;
  876. }
  877. .alert--sent {
  878. text-align: center;
  879. background-color: #00ca00;
  880. margin: 0 -3rem -3rem -3rem;
  881. text-transform: uppercase;
  882. font-size: 0.9rem;
  883. letter-spacing: 0.1rem;
  884. padding: 1rem;
  885. }
  886. </style>