html,
body {
  margin: 0;
  padding: 0;
}

body {
  overflow: hidden;
  contain: paint;
}

@font-face {
  font-family: "Manrope";
  src:
    url("../fonts/Manrope-Regular.woff2") format("woff2"),
    url("../fonts/Manrope-Regular.woff2") format("woff");
  font-weight: 400;
  font-style: normal;
}

.gift-finder {
  --RED: #b51319;
  --DARK-RED: #7d1511;
  --GRAY: #f4f0eb;
  --TYPO: "Manrope", sans-serif;
  --BEIGE: #ecdfc5;
  --PADDING: 20px;
  --BORDER-RADIUS: 12px;
  font-family: var(--TYPO);
  font-optical-sizing: auto;
  font-style: normal;
  background-color: var(--DARK-RED);
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: var(--PADDING);
  overflow: hidden;
}

.gift-finder * {
  box-sizing: border-box;
}

.gift-finder__wrapper {
  max-width: 1280px;
  width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  gap: var(--PADDING);
}

@media (max-width: 1023px) {
  .gift-finder__wrapper {
    height: 100%;
    justify-content: center;
    gap: 0;
  }
}

@media (min-width: 1024px) {
  .gift-finder *[data-device="mobile"] {
    display: none;
  }
}

@media (max-width: 1023px) {
  .gift-finder *[data-device="desktop"] {
    display: none;
  }
}

.gift-finder-cta {
  color: white;
  background-color: var(--RED);
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  margin-top: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  box-shadow: 10px -10px 0px #4f1110;
}

.gift-finder-cta:hover {
  box-shadow: 5px -5px 0px #4f1110;
}

.gift-finder-cta::after,
.gift-finder-cta::before {
  content: " ";
  background-color: #4f1110;
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
}

@media (max-width: 1023px) {
  .gift-finder-cta {
    margin-top: 32px;
  }
}

.gift-finder-header {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--PADDING);
  flex: 1;
  --TYPO: "Montserrat", sans-serif;
  font-family: var(--TYPO);
}

.gift-finder-header::after {
  content: " ";
  position: absolute;
  width: 200%;
  aspect-ratio: 1/1;
  background: radial-gradient(closest-side, var(--RED) 0%, var(--DARK-RED) 80%);
  display: block;
  z-index: 1;
}

.gift-finder-header__logo {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
  max-width: 362px;
}

.gift-finder-header__logo img {
  width: 100%;
  height: auto;
  display: block;
}

.gift-finder-header__content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  max-width: 400px;
  transition:
    max-height 0.5s ease-out,
    opacity 0.3s ease-out;
  overflow: hidden;
}

.gift-finder-header__title {
  font-size: 28px;
  font-weight: 800;
  color: white;
  margin: 0;
  padding: 0;
  margin-top: 60px;
  font-family: var(--TYPO);
  line-height: 1em;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.gift-finder-header__description {
  font-size: 16px;
  font-weight: 400;
  color: white;
  margin: 0;
  padding: 0;
  line-height: 1.25em;
}

@media (max-width: 1023px) {
  .gift-finder-header {
    height: 100%;
    justify-content: flex-start;
  }

  .gift-finder-header__title {
    font-size: 16px;
    margin-top: 16px;
  }

  .gift-finder-header__description {
    font-size: 14px;
  }

  .gift-finder-header__brand {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(var(--PADDING) * 4);
    height: calc(var(--PADDING) * 4);
    z-index: 3;
    filter: brightness(0) invert(1);
  }
}

.gift-finder-column {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 750px;
}

@media (max-width: 1023px) {
  .gift-finder-column {
    position: unset;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
  }
}

.gift-finder-hero {
  position: relative;
  z-index: 2;
  overflow: hidden;
  mask-image: radial-gradient(closest-side, black 70%, transparent 100%);
  animation: fadeInHero 2s;
  animation-fill-mode: both;
  animation-timing-function: ease-out;

  flex: 1;
  aspect-ratio: 1;
}

@media (min-width: 1024px) {
  .gift-finder-hero {
    position: absolute;
  }
}

@media (max-width: 1023px) {
  .gift-finder-hero img {
    width: 100%;
    height: auto;
    display: block;
  }
}

@keyframes fadeInHero {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.gift-finder-hero::after {
  content: " ";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  z-index: 2;
  background: radial-gradient(closest-side, transparent 35%, var(--DARK-RED) 50%);
  display: block;
  animation: zoomInHero 2s;
  animation-fill-mode: both;
  animation-timing-function: ease-out;
}

@keyframes zoomInHero {
  0% {
    transform: scale(0.5);
  }

  100% {
    transform: scale(1);
  }
}

.gift-finder-frame {
  width: 100%;
  background-color: var(--RED);
  height: auto;
  padding: var(--PADDING);
  box-shadow: 20px 20px 10px 0 rgba(79, 17, 16, 0.5);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  transition: transform 0.5s ease-out;
}

.gift-finder-frame[data-open="0"] {
  visibility: hidden;
}

.gift-finder-frame__header {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  background-color: var(--GRAY);
  padding: 8px;
}
.gift-finder-frame__title {
  font-weight: normal;
  color: #000;
  margin: 0;
  font-size: 18px;
  line-height: 1.25em;
  letter-spacing: 0.02em;
  font-family: var(--TYPO);
}
.gift-finder-frame__logo {
  border-radius: 60px;
  width: 60px;
  height: 60px;
  padding: 5px;
  display: block;
  overflow: hidden;
}

.gift-finder-frame__logo img {
  width: 100%;
  height: 100%;
}

@media (max-width: 1023px) {
  .gift-finder-frame {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    padding: 0px;
  }
}

.gift-finder-chatbot {
  background-color: var(--BEIGE);
  padding-bottom: var(--PADDING);
  height: 500px;
  overflow-y: scroll;
  scrollbar-width: thin;
  position: relative;
  scrollbar-color: var(--RED) var(--BEIGE);
  padding-top: var(--PADDING);
}

.gift-finder-chatbot__screen {
  width: 100%;
  padding: 0 50px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.gift-finder-chatbot__screen[data-active="0"] {
  display: none;
}
.gift-finder-chatbot__screen[data-active="2"] button {
  pointer-events: none;
}
.gift-finder-chatbot__message {
  --COLOR: black;
  --BACKGROUND: var(--RED);
  transition:
    transform 0.5s ease-out,
    opacity 0.3s ease-out,
    visibility 0s linear 0.3s;
  padding-top: 8px;
  width: fit-content;
}

.gift-finder-chatbot__message[data-active="1"] {
  transition:
    transform 0.5s ease-out,
    opacity 0.3s ease-out,
    visibility 0s linear 0s;
}

.gift-finder-chatbot__message[data-active="0"] {
  visibility: hidden;
  opacity: 0;
  overflow: hidden;
}

.gift-finder-chatbot__message[data-type="dots"][data-active="0"] {
  overflow: visible;
}

.gift-finder-chatbot__message[data-type="dots"][data-hide="1"] {
  opacity: 0;
  visibility: hidden;
  overflow: visible;
  transition:
    opacity 0.3s ease-out,
    visibility 0s linear 0.3s;
}

.gift-finder-chatbot__message[data-type="bot"][data-active="1"] > p,
.gift-finder-chatbot__message[data-type="user"][data-active="1"] > button {
  animation: popmessage 0.5s ease-out;
  animation-fill-mode: both;
}

@keyframes popmessage {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

.gift-finder-chatbot__message[data-type="animation"] {
  position: relative;
  width: 100%;
  padding-top: 0;
}

.gift-finder-chatbot__message[data-type="animation"][data-overlay="1"] {
  position: absolute;
  inset: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

.gift-finder-chatbot__message[data-type="animation"][data-overlay="1"] video {
  width: 90%;
  max-width: 420px;
}

*[data-screen="S-01"] .gift-finder-chatbot__message[data-type="animation"] {
}

.gift-finder-chatbot__message[data-type="animation"] video {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
  display: block;
  transition: opacity 0.3s ease-out;
}
.gift-finder-chatbot__message[data-type="trigger"] {
  display: none;
}

.gift-finder-chatbot__message[data-type="dots"] {
  height: 0;
  padding-top: 0;
}

.gift-finder-chatbot__dots {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: var(--PADDING);
}

.gift-finder-chatbot__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--RED);
  transition: transform 0.3s ease-out;
}

.gift-finder-chatbot__message[data-active="1"] .gift-finder-chatbot__dots span {
  animation: pulse 1s;
  animation-iteration-count: 3;
  animation-timing-function: ease-in-out;
}

.gift-finder-chatbot__message[data-active="1"] .gift-finder-chatbot__dots {
  animation: fadeOut 1s;
  animation-delay: 3s;
  animation-fill-mode: both;
}

.gift-finder-chatbot__message[data-active="1"] .gift-finder-chatbot__dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.gift-finder-chatbot__message[data-active="1"] .gift-finder-chatbot__dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes pulse {
  0% {
    transform: translateY(0%);
  }

  50% {
    transform: translateY(100%);
  }

  100% {
    transform: translateY(0%);
  }
}

.gift-finder-chatbot__message {
  --COLOR: black;
  --BACKGROUND: var(--RED);
}

.gift-finder-chatbot__message[data-type="bot"] {
  align-self: flex-start;
  padding-block: 4px;
}

.gift-finder-chatbot__message[data-type="bot"] + .gift-finder-chatbot__message[data-type="user"],
.gift-finder-chatbot__message[data-type="user"] + .gift-finder-chatbot__message[data-type="bot"] {
  padding-top: 16px;
}

.gift-finder-chatbot__screen + .gift-finder-chatbot__screen .gift-finder-chatbot__message[data-type="bot"] {
  padding-top: 16px;
}

.gift-finder-chatbot__message[data-type="user"] {
  align-self: flex-end;
  text-align: right;
}

.gift-finder-chatbot__link {
  background-color: white;
  margin: 0;
  color: black;
  border-radius: var(--BORDER-RADIUS);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  flex-direction: column;
  text-align: left;
  position: relative;
  max-width: 375px;
  text-decoration: none;
  font-family: var(--TYPO);
}

.gift-finder-chatbot__link a {
  color: var(--DARK-RED);
  font-size: 16px;
  line-height: 1.5em;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
}

.gift-finder-chatbot__thumbnail {
  margin: 0 calc(-1 * var(--PADDING) + 6px);
  margin-bottom: 6px;
  width: calc(100% - 12px + 2 * var(--PADDING));
  height: auto;
  border-top-left-radius: calc(var(--BORDER-RADIUS) - 6px);
  border-top-right-radius: calc(var(--BORDER-RADIUS) - 6px);
  overflow: hidden;
}

.gift-finder-chatbot__thumbnail img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 300/250;
}

.gift-finder-chatbot__link:hover {
  border: 2px solid var(--RED);
}
.gift-finder-chatbot__link,
.gift-finder-chatbot__button {
  background-color: white;
  margin: 0;
  text-decoration: none;
  padding: 5px var(--PADDING);
  color: black !important;
  min-height: 30px;
  border-radius: var(--BORDER-RADIUS);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  position: relative;
  font-size: 18px;
  line-height: 1.25em;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--TYPO);
  outline: 0;
  display: table;
  width: fit-content;
}

.gift-finder-chatbot__button span {
  display: inline;
  width: fit-content;
  text-wrap: balance;
}
*[data-type="user"] .gift-finder-chatbot__button {
  text-align: right;
}
*[data-type="bot"] .gift-finder-chatbot__button {
  background-color: var(--RED);
  color: white !important;
  min-height: 44px;
  padding: 6px var(--PADDING);
  text-align: left;
}

.gift-finder-chatbot__button[data-selected="1"] {
  border: 2px solid var(--RED);
}
.gift-finder-chatbot__link:hover,
.gift-finder-chatbot__button:hover {
  border: 2px solid var(--RED);
}
.gift-finder-chatbot__link:focus-visible,
.gift-finder-chatbot__button:focus-visible {
  border: 2px solid var(--DARK-RED);
}

.gift-finder-chatbot__text {
  margin: 0;
  padding: 8px var(--PADDING);
  background-color: var(--RED);
  color: white;
  min-height: 40px;
  border-radius: var(--BORDER-RADIUS);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 18px;
  line-height: 1.25em;
  font-family: var(--TYPO);
  display: table;
  width: fit-content;
  text-wrap: balance;
}

.gift-finder-chatbot__text span {
  display: inline-block;
  width: fit-content;
  text-wrap: auto;
}

.gift-finder-chatbot__message .gift-finder-chatbot__text::before {
  content: " ";
  display: block;
  width: 15px;
  height: 40px;
  background-repeat: no-repeat;
  background-image: url(../img/chatbot-bubble-left.svg);
  background-position: bottom right;
  background-size: contain;
  position: absolute;
  bottom: 0;
  left: -8px;
}

@media (max-width: 1023px) {
  .gift-finder-chatbot {
    aspect-ratio: unset;
    height: 100%;
  }

  .gift-finder-chatbot__screen {
    padding: 0 var(--PADDING);
  }

  .gift-finder-chatbot__message[data-type="animation"] {
    position: relative;
    bottom: auto;
  }
}
@media (max-width: 761px) {
  .gift-finder-chatbot__text,
  .gift-finder-chatbot__link,
  .gift-finder-chatbot__button {
    font-size: 14px;
  }
  .gift-finder-chatbot__text {
    min-height: 30px;
  }
  .gift-finder-chatbot__button {
    max-width: 300px;
  }
}

.gift-finder-chatbot__message[data-type="products"] {
  width: 100%;
}

.gift-finder-chatbot__products {
  display: flex;
  flex-direction: column;
  gap: var(--PADDING);
  container-type: inline-size;
  container-name: products;
  align-items: center;
}

.gift-finder-product {
  display: flex;
  background-color: white;
  border-radius: var(--BORDER-RADIUS);
  overflow: hidden;
  width: 100%;
  max-width: 415px;
  min-height: 160px;
}

.gift-finder-product__image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 150px;
  height: auto;
  background-color: white;
  cursor: pointer;
}

.gift-finder-product__image img {
  width: 90%;
  height: auto;
  aspect-ratio: 1;
  display: block;
  text-align: center;
  transition: transform 0.3s ease-out;
}

.gift-finder-product__image:hover img {
  transform: scale(1.05);
}

.gift-finder-product__content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  padding: var(--PADDING);
  max-width: 265px;
  flex: 1;
  text-align: center;
  background-color: var(--GRAY);
  position: relative;
}

.gift-finder-product__name {
  font-size: 16px;
  color: black;
  font-weight: 800;
}

.gift-finder-product__description {
  font-size: 14px;
  color: black;
}

.gift-finder-product__link {
  font-size: 14px;
  color: var(--RED);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  outline: 0;
  padding: 4px;
  padding-right: 6px;
  margin: -4px;
  margin-top: 6px;
  border-radius: 20px;
  box-sizing: border-box;
  border: 2px solid transparent;
}

.gift-finder-product__link:before {
  content: " ";
  display: block;
  width: 22px;
  height: 22px;
  background-image: url(../img/arrow.svg);
  background-size: 22px 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: var(--RED);
  border-radius: 50%;
}
.gift-finder-product__link:hover {
  color: var(--DARK-RED);
}
.gift-finder-product__link:hover:before {
  background-color: var(--DARK-RED);
}

.gift-finder-product__link:focus-visible {
  border: 2px solid var(--DARK-RED);
}

.gift-finder-product__capacity {
  display: none;
}

@media (max-width: 761px) {
  .gift-finder-product__name {
    font-size: 12px;
  }

  .gift-finder-product__description {
    font-size: 10px;
  }

  .gift-finder-product__link {
    font-size: 12px;
  }
}
