.hero-generator {
  border-bottom: none;
}

.hero-generator .flex {
  display: flex;
}

.hero-generator .show {
  display: flex;
  visibility: visible;
}

.hero-generator .hide {
  display: none !important;
  visibility: hidden !important;
}

.hero-generator .justify-center {
  justify-content: center;
}

.hero-generator .category-selector-list {
  display: flex;
  -ms-overflow-style: none;
  scrollbar-width: none;
  gap: 4px;
  padding: 6px;
}

.category-selector .scroll-right,
.category-selector .scroll-left {
  top: 45px;
}

.hero-generator .category-selector {
  display: flex;
  position: relative;
}

.hero-generator .category-selector-container {
  border-radius: 9999px;
  background: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 4px 20px 0px #00000026;
  max-width: 905px;
}

.hero-generator .category-selector .category-button {
  height: 44px;
  border-radius: 9999px;
  border: none;
  position: relative;
  background: #fff;
  min-width: fit-content;
  padding: 0.75rem;
  cursor: pointer;
  color: #717178;
  font-size: 14px;

  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  text-align: center;
}

.hero-generator .category-selector .category-button:hover {
  background: #f4f4f4;
}

.hero-generator .category-selector .button-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.375rem;
  flex-shrink: 0;
}

.hero-generator .category-selector .category-button.selected {
  background: linear-gradient(90deg, #9747ff -9.17%, #0073e6 100%);
  box-shadow: 0px 0px 4px 0px #0000003d;
}

.hero-generator .category-selector .category-button.selected::before {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  left: 1px;
  background: white;
  border-radius: 9999px;
  z-index: 0;
}

.hero-generator .category-selector .category-button.selected > * {
  position: relative;
  z-index: 1;
}

.hero-generator .input-box {
  position: relative;
  background-color: #fff;
  border-radius: 16px;
  width: 100%;
  z-index: 0;
}

.hero-generator .browser-more {
  border-radius: 6px;
  padding-top: 10px;
  padding-right: 16px;
  padding-bottom: 10px;
  padding-left: 16px;
  gap: 8px;
  border-width: 1px;
  border: 1px solid #cacaca;
  text-decoration: none;
  font-family: Inter;
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  letter-spacing: 0;
  color: #2b2b35;
  font-family: "Inter", sans-serif;
}

.hero-generator .browser-more:hover {
  background: rgba(0, 0, 0, 0.078);
}

.hero-generator .more-templates-container {
  gap: 20px;
  text-align: center;
}

.hero-generator .input-box::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  bottom: -1px;
  left: -1px;
  background: linear-gradient(90deg, #9747ff -9.17%, #0073e6 100%);
  z-index: 0;
  border-radius: 13px;
}

.hero-generator .input-box > * {
  position: relative;
  z-index: 1;
}

.hero-generator .submitBtn {
  display: inline-flex;
  appearance: none;
  -webkit-box-align: center;
  align-items: center;
  -webkit-box-pack: center;
  justify-content: center;
  user-select: none;
  position: relative;
  vertical-align: middle;
  line-height: 1.2;
  font-weight: 600;
  transition-property: background-color, border-color, color, fill, stroke,
    opacity, box-shadow, transform;
  transition-duration: 200ms;
  height: 2.5rem;
  min-width: fit-content;
  font-size: 1rem;
  padding-inline-start: 1rem;
  padding-inline-end: 1rem;
  background-image: linear-gradient(
    to right,
    rgb(151, 71, 255),
    rgb(0, 115, 230)
  );
  color: #ffffff;
  max-width: fit-content;
  width: fit-content;
  white-space: nowrap;
  border-radius: 0.375rem;
  cursor: pointer;
  gap: 0.5rem;
  border: none;
}

.hero-generator .submitBtn:hover {
  background-image: linear-gradient(to right, #6641d6, #6641d6);
}

.hero-generator .submitBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.hero-generator .input-box textarea {
  min-height: 100px;
  padding: 0.75rem;
  resize: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  width: 100%;
  border: none;
  font-family: "Inter", sans-serif;
}

.hero-generator .input-box textarea:focus-visible {
  outline: none;
}

.hero-generator .input-container {
  position: relative;
  margin-top: 12px;
  background-color: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 868px;
  box-shadow: 2px 4px 20px 0px #00000026;
  padding: 16px;
  z-index: 0;
}

.hero-generator .button-container {
  background: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  padding: 8px 12px;
  justify-content: space-between;
}

.hero-generator .subcategory-selector {
  align-items: center;
  position: relative;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 2px;
}

.hero-generator form {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
}

.hero-generator .icon-btn {
  display: inline-flex;
  appearance: none;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.2;
  height: 2rem;
  min-width: 2rem;
  padding: 0px;
  border-radius: 0.375rem;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  gap: 0.5rem;
}

.hero-generator .icon-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.hero-generator .template-container {
  padding: 82px 0;
  gap: 28px;
  display: flex;
  justify-content: center;
}

.template-card:hover .template_box_overlay {
  opacity: 1;
}

.hero-generator .template-card {
  display: flex;
  background-clip: padding-box;
  position: relative;
  box-shadow: 0px 0px 4px 0px #0000003d;
  height: fit-content;
  border-radius: 6px;

  &:focus,
  &:focus-within,
  &:focus-visible {
    .template_box_overlay {
      opacity: 1;
    }
  }
}

.hero-generator .column {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.hero-generator .template-card-image {
  width: 100%;
  max-width: 310px;
}

.template-card-link {
  box-shadow: 0px 0px 4.91px 0px #0000003d;
  display: flex;
  border-radius: 6px;
}

.section_1.hero-generator {
  background: url("/assets/img/v2/landing/hero_bg.png") no-repeat top center;
  background-size: 1600px;
}

.hero-generator .subcategory-selector .subCatButton {
  display: flex;
  appearance: none;
  align-items: center;
  position: relative;
  white-space: nowrap;
  vertical-align: middle;
  line-height: inherit;
  border-radius: 0.5rem;
  font-weight: 500;
  height: 34px;
  min-width: fit-content;
  font-size: 0.875rem;
  margin: 0;
  padding: 0.5rem;
  background: #f4f4f4;
  flex-shrink: 0;
  -webkit-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  gap: 6px;
  color: #2b2b35;
}

.tooltip {
  white-space: nowrap;
  position: relative;
}

.tooltip.active {
  opacity: 1;
}

/* Tooltip box */
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
  font-family: "Inter", sans-serif;
  font-size: 12px;
  text-align: center;
  display: block;
  max-width: 200px;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
  font-weight: 500;
}

.tooltip-200::after {
  min-width: 200px;
}
.tooltip-180::after {
  min-width: 180px;
}

/* Arrow */
.tooltip::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.tooltip:hover::after,
.tooltip:hover::before {
  opacity: 1;
}

/* TOP */
.tooltip[data-position="top"]::after {
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
}

.tooltip[data-position="top"]::before {
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

/* RIGHT */
.tooltip[data-position="right"]::after {
  top: 50%;
  left: 125%;
  transform: translateY(-50%);
}

.tooltip[data-position="right"]::before {
  top: 50%;
  left: 115%;
  transform: translateY(-50%);
  border-width: 6px 6px 6px 0;
  border-color: transparent rgba(0, 0, 0, 0.85) transparent transparent;
}

/* BOTTOM */
.tooltip[data-position="bottom"]::after {
  top: 125%;
  left: 50%;
  transform: translateX(-50%);
}

.tooltip[data-position="bottom"]::before {
  top: 115%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 6px 6px 6px;
  border-color: transparent transparent rgba(0, 0, 0, 0.85) transparent;
}

/* LEFT */
.tooltip[data-position="left"]::after {
  top: 50%;
  right: 125%;
  transform: translateY(-50%);
}

.tooltip[data-position="left"]::before {
  top: 50%;
  right: 115%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
}

.hero-generator .subcategory-selector button.selected {
  color: #7047eb;
  box-shadow: inset 0 0 0 1px #8b5cf6;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: #f1edfd;
}

.hero-generator .subcategory-selector button .closeButton {
  display: none;
  width: 0;
}

.hero-generator .subcategory-selector button.selected .closeButton {
  display: block;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: auto;
}

.hero-generator
  .category-selector
  .category-button.selected
  .button-content
  svg {
  color: #7047eb;
}
.hero-generator
  .category-selector
  .category-button.selected
  .button-content
  span {
  background: linear-gradient(90deg, #9747ff -9.17%, #0073e6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media only screen and (max-width: 848px) {
  .hero-generator .category-selector-container {
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    background: none;
    border-radius: 0;
  }
  .hero-generator .category-selector .category-button {
    box-shadow: 0px 0px 4px 0px #0000003d;
  }

  .hero-generator .template-container {
    padding: 48px 0;
    gap: 22px;
    flex-wrap: wrap;
  }

  .hero-generator .template-card {
    max-width: 210px;
  }

  .hero-generator .category-selector-list {
    overflow-x: auto;
    overflow-y: hidden;
  }

  .tooltip[data-position="bottom"]::before,
  .tooltip[data-position="bottom"]::after {
    display: none;
  }
}

@media only screen and (max-width: 720px) {
  .hero-generator .more-templates-container {
    gap: 8px;
    flex-direction: column;
  }

  .hero-generator .category-selector-list {
    gap: 8px;
  }

  .hero-generator .column {
    flex-direction: row;
    gap: 20px;
  }

  .hero-generator .input-box textarea {
    font-size: 16px;
    min-height: 120px;
  }

  .section_1.hero-generator {
    padding: 48px 0 43px;
    background-position: center 200px;
    background-size: 800px;

    .category-selector-list {
      padding: 6px 20px;
    }

    .form-container,
    .more-templates-container,
    .hero-templates-list,
    .section_1_container {
      padding: 0 20px;
    }
  }

  .hero-generator .input-container {
    padding: 8px;
  }

  .subcategory-selector .scroll-right,
  .subcategory-selector .scroll-left,
  .category-selector .scroll-right,
  .category-selector .scroll-left {
    display: none;
    visibility: hidden;
  }
}

@media only screen and (max-width: 360px) {
  .hero-generator .template-card {
    max-width: 136px;
  }
}
