@keyframes fgReveal {
  100% {
    opacity: 1;
  }
}

body:has(.fairing-container.fairing-container--is-active.fairing-container--prevents-body-scroll) {
  overflow: hidden;
}

.fairing {
  --fg-theme-base-25: oklch(0.99 0 0);
  --fg-theme-base-50: oklch(0.98 0 0);
  --fg-theme-base-100: oklch(0.96 0.01 0);
  --fg-theme-base-200: oklch(0.93 0.01 0);
  --fg-theme-base-300: oklch(0.91 0.01 0);
  --fg-theme-base-400: oklch(0.89 0.01 159.75);
  --fg-theme-base-500: oklch(0.85 0.02 160.46);
  --fg-theme-base-600: oklch(0.79 0.02 161.26);
  --fg-theme-base-700: oklch(0.64 0.03 160.13);
  --fg-theme-base-800: oklch(0.61 0.03 161.22);
  --fg-theme-base-900: oklch(0.5 0.02 162.13);
  --fg-theme-base-950: oklch(0.24 0.02 162.68);

  --fg-theme-brand-25: oklch(0.99 0 0);
  --fg-theme-brand-50: oklch(0.98 0.01 0);
  --fg-theme-brand-100: oklch(0.96 0.01 276.31);
  --fg-theme-brand-200: oklch(0.93 0.02 274.15);
  --fg-theme-brand-300: oklch(0.91 0.03 275.22);
  --fg-theme-brand-400: oklch(0.88 0.04 274.5);
  --fg-theme-brand-500: oklch(0.84 0.05 274.92);
  --fg-theme-brand-600: oklch(0.77 0.06 273.89);
  --fg-theme-brand-700: oklch(0.26 0.05 274.15);
  --fg-theme-brand-800: oklch(0.35 0.05 273.8);
  --fg-theme-brand-900: oklch(0.51 0.06 274.13);
  --fg-theme-brand-950: oklch(0.27 0.05 274.33);

  --fg-theme-danger-600: oklch(74.62% 0.1106 32.27);
  --fg-theme-danger-700: oklch(62.71% 0.1936 33.34);

  --fg-theme-utility-white: oklch(100% 0 0);

  --fg-bg-fill-brand-primary: var(--fg-theme-brand-700);
  --fg-bg-fill-brand-primary-active: var(--fg-theme-brand-900);
  --fg-bg-fill-brand-primary-hover: var(--fg-theme-brand-800);

  --fg-bg-fill-brand-tertiary-hover: var(--fg-theme-brand-300);

  --fg-bg-fill-danger-primary: var(--fg-theme-danger-700);
  --fg-bg-fill-danger-primary-subtle: var(--fg-theme-danger-600);

  --fg-bg-surface-base-secondary: var(--fg-theme-base-50);

  --fg-bg-surface-brand-tertiary: var(--fg-theme-brand-100);

  --fg-border-base-primary: var(--fg-theme-base-500);

  --fg-border-brand-primary-active: var(--fg-theme-brand-700);
  --fg-border-brand-primary-hover: var(--fg-theme-brand-600);

  --fg-text-base-primary: var(--fg-theme-base-950);
  --fg-text-base-secondary: var(--fg-theme-base-900);

  --fg-text-brand-active: var(--fg-theme-brand-900);
  --fg-text-brand-hover: var(--fg-theme-brand-800);

  --fg-text-overlay-w-primary: var(--fg-theme-utility-white);

  --fg-radius-xs: 4px;

  container-type: inline-size;
}

.fairing-container {
  align-items: center;
  background: lch(77 0.02 356.63 / 0.63);
  backdrop-filter: blur(2px);
  display: grid;
  grid-auto-rows: minmax(max-content, calc(100dvh - 48px));
  inset: 0;
  opacity: 0;
  overflow-y: auto;
  padding: 24px;
  position: fixed;
  transform: scale(0);
  transition: opacity 400ms,
              transform 0s;
  z-index: 2147483640;
}

.fairing-container.fairing-container--is-active {
  opacity: 1;
  transform: scale(1);
}

.fairing__survey,
.fairing-question {
  background: hsl(0, 0%, 100%);
  border: 1px solid var(--fg-border-base-primary);
  border-radius: var(--fg-radius-xs);
  box-sizing: border-box;
  color: var(--fg-text-base-primary);
  display: block;
  overflow: hidden;
  width: 100%;
}

.fairing-container .fairing__survey,
.fairing-container .fairing-question {
  background: hsl(0, 0%, 100%);
  border: none;
  box-shadow: 0px 50px 100px 0px rgba(60, 66, 87, 0.08),
              0px 15px 35px 0px rgba(60, 66, 87, 0.08),
              0px 5px 15px 0px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  min-height: 440px;
  margin: 24px auto;
  max-width: 660px;
  width: 100%;
}

.fairing__error-notice {
  align-items: flex-start;
  animation: fgReveal 300ms 50ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;
  background: var(--fg-bg-fill-danger-primary);
  color: var(--fg-text-overlay-w-primary);
  display: flex;
  font-size: 14px;
  gap: 6px;
  line-height: 18px;
  margin: 0;
  opacity: 0;
  padding: 16px 24px;
}

.fairing__error-notice::before {
  align-items: center;
  background: var(--fg-text-overlay-w-primary);
  border-radius: 50%;
  display: inline-flex;
  content: "!";
  color: var(--fg-bg-fill-danger-primary-subtle);
  font-size: 14px;
  font-weight: bolder;
  height: 14px;
  justify-content: center;
  line-height: 14px;
  position: relative;
  top: 2px;
  width: 14px;
}

.fairing-survey__title {
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  margin: 0;
  padding: 70px 24px 0;
}

@container (width > 379px) {
  .fairing-survey__title {
    padding: 70px 48px 0;
  }
}


.fairing__question-description {
  color: var(--fg-text-base-secondary);
  font-size: 20px;
  font-weight: 500;
  line-height: 28px;
  margin: 0;
  opacity: initial;
  padding: 0 24px;
}

@container (width > 379px) {
  .fairing__question-description {
    padding: 0 48px;
  }
}

.fairing__responses,
.fairing__date-response {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  padding: 32px 24px;
}

.fairing__responses:has(.fairing__autosuggest) {
  flex: unset;
  height: 350px;
}

@container (width > 379px) {
  .fairing__responses,
  .fairing__date-response {
    padding: 32px 48px;
  }
}

.fairing__response {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.fairing__response-label {
  flex: 1 1 0;
  font-size: 16px;
  line-height: 20px;
  cursor: pointer;
  padding: 6px 0;
}

.fairing__radio-control {
  appearance: none;
  background-color: var(--fg-bg-surface-base-secondary);
  border: 1px solid var(--fg-border-base-primary);
  border-radius: 50%;
  box-sizing: border-box;
  cursor: pointer;
  flex: 0 0 18px;
  height: 18px;
  margin: 7px 0 0;
  outline: none;
  transition: border 100ms;
  width: 18px;
}

.fairing__response:hover .fairing__radio-control {
  border-color: var(--fg-border-brand-primary-active);
}

.fairing__radio-control:checked {
  background-clip: content-box;
  border-color: var(--fg-border-brand-primary-active);
  border-width: 6px;
}

.fairing__checkbox-control {
  appearance: none;
  /* For iOS < 15 to remove gradient background */
  background-color: var(--fg-bg-surface-base-secondary);
  border: 1px solid var(--fg-border-base-primary);
  border-radius: var(--fg-radius-xs);
  cursor: pointer;
  height: 18px;
  margin: 7px 0 0;
  transition: background 150ms ease-in,
              border 150ms ease-in;
  width: 18px;
}

.fairing__checkbox-control:hover {
  border-color: var(--fg-border-brand-primary-active);
}

.fairing__checkbox-control:checked {
  --check-shape: 25% 51%, 41% 68%, 74% 34%, 69% 29%, 41% 56%, 31% 45%, 25% 51%;
  background-color: var(--fg-bg-fill-brand-primary);
  border-color: var(--fg-border-brand-primary-active);
  /* This cuts a hole in the shape of a check mark */
  clip-path: polygon(0 0, 100% 0,100% 100%,0 100%,0 0px,var(--check-shape));
}

.fairing__responses[data-fg-component="fg-nps"] {
  display: flex;
  gap: 16px 0;
}

.fairing__nps-labels {
  display: grid;
  gap: 4px 6px;
  grid-template-columns: auto 1fr;
  margin: 0 0 8px;
  order: 0;
}

@container (width >= 552px) {
  .fairing__nps-labels {
    grid-template-columns: 1fr 1fr;
    margin: 0;
    order: 2;
  }
}

.fairing__nps-labels span {
  display: contents;
  padding: 8px 2px;
  text-align: left;
}

.fairing__nps-labels span:first-child::before {
  content: "0 –";
  text-align: right;
}

.fairing__nps-labels span:last-child::before {
  content: "10 –";
  text-align: right;
}

@container (width >= 552px) {
  .fairing__nps-labels span {
    display: block;
    padding: 0;
  }

  .fairing__nps-labels span:last-child {
    text-align: right;
  }

  .fairing__nps-labels span:first-child::before,
  .fairing__nps-labels span:last-child::before {
    content: '';
    display: none;
  }
}

.fairing__nps-controls {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  order: 1;
}

@container (width >= 472px) {
  .fairing__nps-controls {
    grid-template-columns: repeat(6, 1fr);
  }
}

@container (width >= 552px) {
  .fairing__nps-controls {
    gap: 0;
    grid-template-columns: repeat(11, 1fr);
  }
}

.fairing__nps-control {
  border: 1px solid var(--fg-border-base-primary);
  border-radius: var(--fg-radius-xs);
  font-weight: bold;
  padding: 8px 16px;
  text-align: center;
  transition: all 150ms ease-out;
}

@container (width >= 552px) {
  .fairing__nps-control {
    border-radius: 0;
    border-right-width: 0;
    padding: 8px;
  }

  .fairing__nps-control:first-of-type {
    border-radius: var(--fg-radius-xs) 0 0 var(--fg-radius-xs);
  }

  .fairing__nps-control:last-of-type {
    border-radius: 0 var(--fg-radius-xs) var(--fg-radius-xs) 0;
    border-right-width: 1px;
  }
}

.fairing__nps-control:hover {
  background-color: var(--fg-bg-fill-brand-tertiary-hover);
  border-color: var(--fg-border-brand-primary-hover);
  color: var(--fg-text-brand-hover);
  cursor: pointer;
}

[data-enquire-response]:checked + .fairing__nps-control {
  background-color: var(--fg-bg-fill-brand-primary-hover);
  border: 1px solid var(--fg-border-brand-primary-active);
  color: var(--fg-text-overlay-w-primary);
}

.fairing__open-ended-response {
  border: 1px solid var(--fg-border-base-primary);
  box-sizing: border-box;
  display: block;
  font-size: 16px;
  height: calc(calc(4 * 1.25em) + 26px);
  line-height: 20px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}

.fairing__autosuggest {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}

.fairing__autosuggest__input {
  appearance: none;
  background: var(--fg-bg-surface-base-secondary);
  border: none;
  border-radius: var(--fg-radius-xs);
  box-sizing: border-box;
  display: block;
  font-size: 16px;
  line-height: 16px;
  outline: 1px solid var(--fg-border-base-primary);
  outline-offset: -1px;
  margin: 0;
  padding: 12px 18px;
  transition: outline 100ms;
  width: 100%;
}

.fairing__autosuggest__input:focus {
  outline: 2px solid var(--fg-border-brand-primary-active);
  outline-offset: -2px;
}

.fairing__autosuggest__list {
  border: 1px solid var(--fg-border-base-primary);
  border-radius: var(--fg-radius-xs);
  box-sizing: border-box;
  margin: 0;
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  position: relative;
  transition: opacity 175ms ease-out;
  width: 100%;
  word-break: normal;
  z-index: -1;
}

.fairing__autosuggest__list--visible {
  opacity: 1;
  z-index: 1;
}

.fairing__autosuggest__option {
  color: black;
  cursor: pointer;
  padding: 12px 17px;
  transition: background-color 150ms ease-out,
              color 200ms ease-out;
}

.fairing__autosuggest__option:hover,
.fairing__autosuggest__option--selected {
  background-color: var(--fg-bg-surface-brand-tertiary);
  color: var(--fg-text-brand-active);
}

.fairing__autosuggest__highlight {
  font-weight: 700;
}

.fairing__autosuggest__hint {
  color: gray;
  font-style: italic;
  overflow: hidden;
  padding: 0.25em 0.5em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fairing__date-response {
  align-items: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@container (width > 499px) {
  .fairing__date-response {
    flex-direction: row;
  }
}

.fairing__other-response-wrapper {
  flex: 1 1 0;
}

.fairing__other-response,
.fairing__date-response__input {
  appearance: none;
  background: var(--fg-bg-surface-base-secondary);
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  display: block;
  outline: 1px solid var(--fg-border-base-primary);
  margin: 0;
  padding: 17px 12px;
  transition: outline 100ms;
  width: 100%;
}

.fairing__other-response:focus {
  outline: 2px solid var(--fg-border-brand-primary-active);
}

.fairing__other-response__label {
  clip: rect(0 0 0 0); 
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap; 
  width: 1px;
}

.fairing__success-message {
  font-size: 24px;
  font-weight: bold;
  margin: auto 0;
  padding: 48px;
  text-align: center;
}

.fairing__survey-actions {
  background-color: var(--fg-bg-surface-base-secondary);
  display: grid;
  gap: 16px;
  padding: 24px;
}

@container (width > 379px) {
  .fairing__survey-actions {
    align-items: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 24px 48px;
  }
}

.fairing__action--submit {
  background-color: var(--fg-bg-fill-brand-primary);
  border-radius: 2px;
  border-width: 0;
  color: #FFFFFF;
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
  padding: 8px 16px;
}

.fairing__action--submit:hover {
  box-shadow: 0px 1px 3px 1px rgba(1, 38, 83, 0.25),
              0px 1px 1px 1px rgba(87, 101, 171, 0.25);
}

.fairing__action--submit:active {
  background-color: var(--fg-bg-fill-brand-primary);
}

.fairing__branding {
  font-size: 12px;
  line-height: 16px;
  margin: 0;
  padding: 0;
  text-align: center;
  white-space: nowrap;
}

@container (width > 379px) {
  .fairing__branding {
    text-align: right;
  }
}

.fairing__branding-link {
  color: var(--fg-text-base-secondary);
}
