/* Floating "Get a demo" banner. Markup: php_components/demo_banner.php */

.demo-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1040; /* Below Bootstrap modals (1050) */
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: calc(100% - 32px);
  max-width: 856px;
  padding: 16px;
  border-radius: 16px;
  background-color: #1a232e;
  color: #fff;
  font-family: Manrope, sans-serif;
  letter-spacing: 0;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.demo-banner[hidden] {
  display: none;
}

.demo-banner.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.demo-banner__content {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.demo-banner__copy {
  flex: 0 1 423px;
  min-width: 0;
}

.demo-banner .demo-banner__title,
.demo-banner .demo-banner__text,
.demo-banner .demo-banner__status {
  margin: 0;
  color: #fff;
}

.demo-banner__title {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-banner__text,
.demo-banner__status {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.demo-banner__action {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.demo-banner__form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.demo-banner__status:empty {
  display: none;
}

.demo-banner.is-submitted .demo-banner__form {
  display: none;
}

.demo-banner .demo-banner__input {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #e6ebef;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: none;
  color: #1a232e;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.demo-banner .demo-banner__input::placeholder {
  color: #8d97a4;
  opacity: 1;
}

.demo-banner .demo-banner__input:focus {
  border-color: #00beac;
  outline: none;
}

.demo-banner .demo-banner__input[aria-invalid="true"] {
  border-color: #f04438;
}

.demo-banner .demo-banner__submit {
  flex-shrink: 0;
  height: 40px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background-color: #00beac;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}

.demo-banner .demo-banner__submit:hover,
.demo-banner .demo-banner__submit:focus-visible {
  background-color: #00a99a;
}

.demo-banner .demo-banner__submit:disabled {
  cursor: progress;
  opacity: 0.7;
}

.demo-banner .demo-banner__close {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.demo-banner .demo-banner__close:hover,
.demo-banner .demo-banner__close:focus-visible {
  background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 767.98px) {
  .demo-banner {
    align-items: flex-start;
    bottom: 88px; /* Clear the Intercom launcher */
  }

  .demo-banner__content {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .demo-banner__copy {
    flex-basis: auto;
  }

  .demo-banner__title {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-banner {
    transition: none;
  }
}
