@import '../../marketplace.css';

:root {
  --desktopTitleMaxWidth: 625px;

  --animationProperties: {
    animation-name: animationTitle;
    animation-duration: 0.5s;
    animation-timing-function: ease-out;
    -webkit-animation-fill-mode: forwards;

    visibility: hidden;
    opacity: 1;
    position: relative;
  }
}

/* Animation for the hero elements */

@keyframes animationTitle {
  0% {
    visibility: hidden;
    opacity: 0;
    top: -20px;
  }
  100% {
    visibility: visible;
    opacity: 1;
    top: 0;
  }
}

.root {
  @apply --backgroundImage;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;

  /* Text positioning is done with paddings */
  padding: 0 24px 0 24px;

  @media (--viewportMedium) {
    padding: 0 0 0 7.5vw;
  }

  @media (--viewportLarge) {
    padding: 0 0 0 15vw;
  }
}

.heroMainTitle {
  @apply --marketplaceHeroTitleFontStyles;
  color: var(--matterColorLight);

  @apply --animationProperties;
  animation-delay: 0.5s;

  @media (--viewportMedium) {
    max-width: var(--desktopTitleMaxWidth);
  }
}

.heroSubTitle {
  @apply --marketplaceBodyFontStyles;

  color: var(--matterColorLight);
  margin: 0 0 32px 0;

  @apply --animationProperties;
  animation-delay: 0.65s;

  @media (--viewportMedium) {
    max-width: var(--desktopTitleMaxWidth);
    margin: 0 0 63px 0;
  }
}

.mobileSearchButton {
  border-radius: 4px;
  flex-shrink: 0;

  @apply --animationProperties;
  animation-delay: 0.8s;

  @media (--viewportMedium) {
    display: none;
  }
}

.searchIcon {
  vertical-align: top;
  stroke: var(--matterColorLight);
  width: 16px;
  height: 16px;
  margin-top: 5px;
  margin-right: 10px;
}

.desktopSearchForm {
  display: none;
  background-color: var(--matterColorLight);
  border-bottom: 4px solid var(--marketplaceColor);
  border-bottom-left-radius: 2px;
  border-bottom-right-radius: 2px;

  @apply --animationProperties;
  animation-delay: 0.8s;

  @media (--viewportMedium) {
    display: block;
    width: 400px;
  }
}
