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.

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