@font-face {
  font-family: 'Pure Pakati';
  src: url('./img/PurePakatiWeb-Regular.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Pure Pakati Notch';
  src: url('./img/PurePakatiWeb-Notch.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'National';
  src: url('./img/NationalWebLF-Book.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'National';
  src: url('./img/NationalWebLF-Medium.woff') format('woff');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'National';
  src: url('./img/NationalWebLF-Bold.woff') format('woff');
  font-weight: bold;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: white;
  font-family: 'National', sans-serif;
  color: #1b1c1d;
}

.hidden {
  display: none !important;
}

#chat-ads {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  position: relative;
}

/* Initial Screen */
#initial-chat-screen {
  height: 100%;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#initial-chat-image-container,
#multiturn-chat-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.base-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

#initial-chat-image-container .base-image {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
  animation: bg-fade 6s infinite;
}

#initial-chat-image-container .base-image:nth-child(1) {
  opacity: 1;
  animation: bg-fade-first 6s infinite 2.5s;
  object-position: 20% center;
}
#initial-chat-image-container .base-image:nth-child(2) {
  animation-delay: 2.5s;
}
#initial-chat-image-container .base-image:nth-child(3) {
  animation-delay: 4.0s;
  object-position: 47% center;
}
#initial-chat-image-container .base-image:nth-child(4) {
  animation-delay: 5.5s;
  object-position: 25% center;
}

@keyframes bg-fade {
  0% { opacity: 0; }
  10% { opacity: 1; }
  25% { opacity: 1; }
  35% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes bg-fade-first {
  0% { opacity: 1; }
  10% { opacity: 0; }
  75% { opacity: 0; }
  85% { opacity: 1; }
  100% { opacity: 1; }
}

#carousel-indicators {
  position: absolute;
  top: 38.000vh;
  left: 5.000vw;
  display: flex;
  gap: 2.667vw;
  width: auto;
  height: 4.000vh;
  align-items: center;
  z-index: 3;
}

.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9.000vw;
  height: 4.500vh;
  pointer-events: none;
}

.indicator-icon {
  font-size: 4.500vh;
  color: #fff;
  opacity: 0.4;
  animation: icon-fade 6s infinite;
}

#carousel-indicators .icon-container:nth-child(1) .indicator-icon {
  opacity: 1;
  animation: icon-fade-first 6s infinite 2.5s;
}
#carousel-indicators .icon-container:nth-child(2) .indicator-icon { animation-delay: 2.5s; }
#carousel-indicators .icon-container:nth-child(3) .indicator-icon { animation-delay: 4.0s; }
#carousel-indicators .icon-container:nth-child(4) .indicator-icon { animation-delay: 5.5s; }

@keyframes icon-fade {
  0% { opacity: 0.4; }
  10% { opacity: 1; }
  25% { opacity: 1; }
  35% { opacity: 0.4; }
  100% { opacity: 0.4; }
}

@keyframes icon-fade-first {
  0% { opacity: 1; }
  10% { opacity: 0.4; }
  75% { opacity: 0.4; }
  85% { opacity: 1; }
  100% { opacity: 1; }
}

.image-gradient-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.6) 100%);
}

#company-logo {
  position: absolute;
  bottom: 4.000vh;
  right: 4.000vw;
  height: 10.000vh;
  object-fit: contain;
  z-index: 2;
}

#header-container {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: left;
  gap: 3.333vw;
  z-index: 2;
}

#ad-header {
  color: #fff;
  text-align: left;
  font-family: 'Pure Pakati';
  font-size: 10.000vh;
  font-weight: normal;
}

#ad-header .line {
  display: block;
}



#initial-chat-center-container {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5.333vw;
  z-index: 2;
}

.chat-form {
  width: 90%;
  position: relative;
  border-radius: 4.000vh;
  display: flex;
  align-items: center;
  padding-left: 5.333vw;
  padding-right: 2.667vw;
  box-sizing: border-box;
  height: 8.000vh;
  box-shadow: 0 0.667vh 2.000vh rgba(0,0,0,0.15);
  background: linear-gradient(white, white) padding-box,
              linear-gradient(90deg, #4285f4, #ea4335, #fbbc04, #34a853) border-box;
  border: 0.333vh solid transparent;
}

.chat-form input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 2.667vw;
  font-family: inherit;
  font-size: 2.333vh;
  background: transparent;
  color: #1b1c1d;
}

#initial-chat-suggestions {
  width: 100%;
  overflow: hidden;
}

.suggestions-row {
  display: flex;
  gap: 3.333vw;
  padding: 0.667vh 0;
  width: max-content;
  animation: scroll 9s linear infinite;
}

.suggestions-row:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.chat-suggestion,
.suggested-chip-button {
  background-color: white;
  border: none;
  padding: 1.333vh 5.333vw;
  border-radius: 3.333vh 3.333vh 3.333vh 3.333vh;
  font-size: 2vh;
  color: #2c4136;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 5.5vh;
  box-sizing: border-box;
  box-shadow: 0 0.333vh 1.333vh rgba(0,0,0,0.1);
  transition: background-color 0.2s, transform 0.1s;
}

.chat-suggestion:hover,
.suggested-chip-button:hover {
  background-color: #f5f5f5;
}

.chat-suggestion:active,
.suggested-chip-button:active {
  transform: scale(0.98);
}

a.fixed-chip {
  text-decoration: none;
  color: #2c4136;
}

.chat-form button {
  background: none;
  border: none;
  color: #2c4136;
  cursor: pointer;
  display: flex;
}

.chat-form button:disabled {
  opacity: 0.25;
}

/* Multiturn Chat Screen */
#multiturn-chat-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background-color: transparent;
  position: relative;
  overflow: hidden;
}

#company-header {
  height: 8.000vh;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(0.667vh);
  border-bottom: 0.167vh solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6.667vw;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
}

.header-logo-img {
  height: 3.500vh;
  object-fit: contain;
}

#close-button {
  position: absolute;
  top: 2.000vh;
  right: 5.333vw;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  z-index: 3;
}

#chat-text {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3.333vh 6.667vw 0 6.667vw;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* Message Bubbles */
.user-message,
.model-message {
  padding: 2.000vh 5.333vw;
  border-radius: 2.667vh;
  margin-bottom: 2.000vh;
  max-width: 85%;
  word-wrap: break-word;
  font-family: National;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  animation: fadeIn 0.3s ease-out;
}

.error-message {
  background-color: #fff;
  color: #d93025;
  border: 0.167vh solid #d93025;
  padding: 1.667vh 4.667vw;
  border-radius: 2.000vh;
  margin-bottom: 2.000vh;
  max-width: 85%;
  word-wrap: break-word;
  font-size: 2.167vh;
  line-height: 1.5;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(1.667vh); }
  to { opacity: 1; transform: translateY(0); }
}

.user-message {
  background-color: rgba(255, 255, 255, 0.2);
  border: 0.167vh solid rgba(255, 255, 255, 0.5);
  color: #000;
  background: #fff;
  align-self: flex-end;
  text-align: right;
  border-bottom-right-radius: 0.667vh;
}

.model-message {
  background-color: #1b1c1d;
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 0.667vh;
}

/* Product Cards (Carousel Style) */
#multiturn-chat-screen #chat-text .product-card-list-container {
  position: relative;
  width: calc(100% + 13.333vw);
  margin: 0.667vh -6.667vw 2.000vh -6.667vw;
}

#multiturn-chat-screen #chat-text .product-card-list-container .arrow {
  position: absolute;
  top: 40%;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  height: 4.667vh;
  width: 9.333vw;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0.333vh 1.000vh rgba(0,0,0,0.3);
  z-index: 3;
}

#multiturn-chat-screen #chat-text .product-card-list-container .arrow-forward {
  right: 2.667vw;
}

#multiturn-chat-screen #chat-text .product-card-list-container .arrow-back {
  left: 2.667vw;
}

#multiturn-chat-screen #chat-text .product-card-list-container .arrow:hover {
  background: rgba(255, 255, 255, 1);
}

#multiturn-chat-screen #chat-text .product-card-list-container .arrow .google-symbols {
  font-size: 3.000vh;
  color: #2c4136;
}

#multiturn-chat-screen #chat-text .product-card-list {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.667vh 6.667vw;
  gap: 4.000vw;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 6.667vw;
}

#multiturn-chat-screen #chat-text .product-card-list::-webkit-scrollbar {
  display: none;
}

#multiturn-chat-screen #chat-text .product-card-list .product-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  width: 66.667vw;
  border-radius: 2.000vh;
  background-color: transparent;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 0.667vh 2.000vh rgba(0,0,0,0.2);
  transition: transform 0.2s;
  position: relative;
  scroll-snap-align: start;
}

#multiturn-chat-screen #chat-text .product-card-list .product-card:hover {
  transform: translateY(-0.667vh);
}

#multiturn-chat-screen #chat-text .product-card-list .product-card::after {
  display: block;
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 1;
}

#multiturn-chat-screen #chat-text .product-card img {
  width: 100%;
  height: 22.100vh;
  object-fit: cover;
  display: block;
}

#multiturn-chat-screen #chat-text .product-details {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2vh 2vw;
  background: transparent;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

#multiturn-chat-screen #chat-text .product-name {
  font-size: 2.333vh;
  font-weight: 500;
  color: white;
  margin: 0;
}

#multiturn-chat-screen #chat-text .product-name::after {
  content: " \2192";
}

#multiturn-chat-screen #chat-text .product-name:empty::after {
  content: "";
}

#multiturn-chat-screen #chat-text .product-description {
  font-size: 1.667vh;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.4;
}

#multiturn-chat-screen #chat-text .product-button {
  display: none;
}

#multiturn-chat-screen #chat-text .product-click-out-icon {
  position: absolute;
  top: 1.5vh;
  right: 2.667vw;
  color: white;
  font-size: 3vh;
  background: rgba(0,0,0,0.4);
  padding: 0.5vh 1vw;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

.waiting-message {
  font-size: 2.167vh;
  color: rgba(255, 255, 255, 0.7);
  padding: 1.667vh 0;
  align-self: flex-start;
  margin-left: 6.667vw;
  margin-bottom: 2.500vh;
}

.waiting-message .dots::after {
  display: inline-block;
  text-align: left;
  width: 1.5em;
  content: ".";
  animation: cycle-dots 1.5s infinite steps(1, end);
}

@keyframes cycle-dots {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
  100% { content: "."; }
}

/* Footer & Input */
#chat-footer {
  padding: 1.333vh 5.333vw;
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(0.333vh);
  border-top: 0.167vh solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2.667vw;
  align-items: center;
  position: relative;
  z-index: 2;
}

#multiturn-chat-form {
  width: 100%;
  border-radius: 4.000vh;
  display: flex;
  align-items: center;
  padding: 0 5.333vw 0 4.000vw;
  box-sizing: border-box;
  height: 8.000vh;
  gap: 1.333vw;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(90deg, #4285f4, #ea4335, #fbbc04, #34a853) border-box;
  border: 0.333vh solid transparent;
}

#multiturn-chat-form textarea {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 2.3vh;
  resize: none;
  padding: 0;
  line-height: 4.000vh;
  height: 4.000vh;
  background: transparent;
  color: #1b1c1d;
  overflow: hidden;
}

#multiturn-chat-form button:disabled {
  color: #bdc1c6;
  opacity: 1;
}

/* Chat Suggestions */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 2.667vw;
  padding: 0 6.667vw;
  margin-bottom: 2vh;
  margin-top: 1vh;
  background-color: transparent;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.chat-suggestions-horizontal {
  flex-wrap: nowrap;
  overflow-x: auto;
  justify-content: flex-start;
  scrollbar-width: none;
}

.chat-suggestions-horizontal::-webkit-scrollbar {
  display: none;
}

.chat-suggestions-container {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  z-index: 2;
}

.chat-suggestions-container .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  height: 4.667vh;
  width: 9.333vw;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 0.333vh 1.000vh rgba(0,0,0,0.3);
  z-index: 3;
}

.chat-suggestions-container .arrow-forward {
  right: 2.667vw;
}

.chat-suggestions-container .arrow-back {
  left: 2.667vw;
}

.chat-suggestions-container .arrow:hover {
  background: rgba(255, 255, 255, 1);
}

.chat-suggestions-container .arrow .google-symbols {
  font-size: 3.000vh;
  color: #2c4136;
}

.prompt-suggestion-icon {
  font-size: 3vh;
  margin-right: 0.667vw;
}

.chat-suggestion {
  border: 1px solid rgba(0,0,0,0.05); /* very light border just in case they meant border */
}

#chat-disclaimer {
  width: 100%;
  padding: 0 1.333vw;
  box-sizing: border-box;
  color: #c6c6c6;
  font-size: 1.333vh;
  line-height: 1.667vh;
}

#chat-disclaimer a {
  color: #c6c6c6;
  text-decoration: underline;
}

#multiturn-chat-screen #chat-text .model-message .feedback-buttons {
  display: flex;
  margin-top: 1.333vh;
  gap: 4.000vw;
  justify-content: flex-end;
}

#multiturn-chat-screen #chat-text .model-message .feedback-buttons button {
  background: none;
  border: none;
  color: #a0a0a0;
  cursor: pointer;
  padding: 0;
  font-size: 2.667vh;
  transition: color 0.2s;
}

#multiturn-chat-screen #chat-text .model-message .feedback-buttons button:hover {
  color: #2c4136;
}

@media (min-width: 200.000vw) {
  #ad-header {
    font-size: 12.000vh;
  }
}

/* Animations */
@keyframes fadeInSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -5.000vh);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeInSlideDownNormal {
  from {
    opacity: 0;
    transform: translateY(-5.000vh);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% + 5.000vh));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes fadeInSlideUpNormal {
  from {
    opacity: 0;
    transform: translateY(5.000vh);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#header-container {
  opacity: 0;
  animation: fadeInSlideDown 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

#company-logo {
  opacity: 0;
  animation: fadeIn 0.8s ease-out 0.5s forwards;
}

#initial-chat-center-container {
  opacity: 0;
  animation: fadeInSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.5s forwards;
}

/* Multiturn Screen Transition Delays */
#multiturn-chat-screen.fade-in #company-header,
#multiturn-chat-screen.fade-in #close-button {
  opacity: 0;
  animation: fadeInSlideDownNormal 0.8s ease-out 0.5s forwards;
}

#multiturn-chat-screen.fade-in #chat-footer {
  opacity: 0;
  animation: fadeInSlideUpNormal 0.8s ease-out 0.5s forwards;
}

#multiturn-chat-screen.fade-in #chat-text {
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out 0.5s forwards;
}

#multiturn-chat-screen.fade-in .chat-suggestions,
#multiturn-chat-screen.fade-in .chat-suggestions-container .arrow-forward {
  opacity: 0;
  animation: fadeIn 0.8s ease-in-out 0.5s forwards;
}

@media (min-width: 600px) and (min-height: 900px) {
  .user-message,
  .model-message {
    font-size: 20px;
  }
  .chat-form input {
    font-size: 20px;
  }
  #multiturn-chat-form textarea {
    font-size: 20px;
  }
  .chat-suggestion,
  .suggested-chip-button {
    font-size: 18px;
  }
  #multiturn-chat-screen #chat-text .product-name {
    font-size: 24px;
  }
  #multiturn-chat-screen #chat-text .product-description {
    font-size: 18px;
  }
}
