/* H5 Search Bar */
@media screen and (max-width: 799px) {
  @keyframes smoothFadeIn {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .search-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }
  .top-container {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .input-search_wrapper {
    width: fit-content;
    height: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.2rem;
    padding: 0 0.2rem;
    backdrop-filter: blur(10px) brightness(1);
    background-color: #ffffff40;
    box-shadow: inset 1px 0 1px 0px #ffffff38;
    cursor: pointer;
  }
  .search-icon {
    width: 0.4rem;
  }
  .input-search {
    width: 3.2rem;
    height: 100%;
    border: none;
    color: #fff;
    padding: 0 0.1rem;
    font-size: 0.26rem;
    cursor: pointer;
  }
  .input-search::placeholder {
    color: #ffffff99;
    opacity: 1;
  }
  .cancel-search {
    font-size: 0.26rem;
    color: #fff;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
  }
  .searches-container {
    width: 100vw;
    height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: -0.25rem;
    left: -0.25rem;
    background: linear-gradient(180deg, #044A48 0%, #1A1859 100%);
    z-index: 102;
    overflow: hidden;
  }
  .search-header-bg {
    width: 100%;
    object-fit: cover;
    flex-shrink: 0;
  }
  .search-results-container {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem;
    flex-grow: 1;
    overflow: hidden;
  }
  .search-results-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2rem 0;
    flex-shrink: 0;
  }
  .search-results-header-title {
    font-size: 0.32rem;
    color: #fff;
  }
  .dropdown-box {
    min-width: 3rem;
    max-width: 4.2rem;
    padding: 0.15rem 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0.2rem;
    border: 0.01rem solid #7F98C3;
    background-color: #ffffff1a;
    cursor: pointer;
  }
  .dropdown-box-value{
    font-size: 0.28rem;
    color: #fff;
  }
  .dropdown-icon{
    width: 0.4rem;
    object-fit: cover;
  }
  .search-results-list-container {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    border-radius: 0.2rem;
    flex-grow: 1;
    overflow: auto;
  }
  .result-wrapper {
    width: 100%;
    border-radius: 0.2rem;;
    background-color: #ffffff1a;
  }
  .h5-search-results-list-ul {
    list-style: none;
    padding: unset;
    transition: all 0.3s ease-in-out;
  }
  .search-result-item {
    width: 100%;
    padding: unset;
    opacity: 1;
    transform: translateY(8px);
    animation: smoothFadeIn 0.3s ease-in-out forwards;
  }
  .h5-search-results-list-ul.no-animation {
    transition: none;
  }
  .h5-search-results-list-ul.no-animation .search-result-item {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .faq-link {
    text-decoration: none;
  }
  .hidden_item {
    display: none;
  }
  .list-content-wrapper {
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.06rem 0.06rem 0.06rem 0.05rem;
    border-bottom: 0.01rem solid #c8c8c80f;
    cursor: pointer;
  }
  .faq-title {
    max-width: 90%;
    font-size: 0.06rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    color: #fff;
  }
  .highlighted_text {
    color: #ffff40;
  }
  .arrow-icon {
    width: 0.07rem;
  }
  ul > li:last-of-type > .list-content-wrapper {
    border-bottom: none;
  }
  .search-results-message-wrapper {
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .line-divider {
    width: 100%;
    margin: 0;
    border: solid 0.01rem #ffffff99;
  }
  .search-result-text{
    font-size: 0.26rem;
    padding: 0.1rem 0.2rem;
    white-space: nowrap;
    color: #ffffff99;
  }
  .select-topic-container {
    width: 100%;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: fixed;
    bottom: 0;
    left: 0;
    padding: 0.4rem 0.25rem;
    border-top-left-radius: 0.4rem;
    border-top-right-radius: 0.4rem;
    border: solid 0.02rem #ffffff66;
    background: linear-gradient(180deg, #09315C 0%, #063D47 100%);

    z-index: 1001;
    display: none;
  }
  .show_container {
    display: flex;
  }
  .topic-header-wrapper {
    width: 100%;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0;
    position: relative;
  }
  .topic-header-title {
    font-size: 0.35rem;
    color: #fff;
  }
  .select-topic-close-icon {
    width: 0.6rem;
    object-fit: cover;
    position: absolute;
    right: 0;
    cursor: pointer;
  }
  .topic-list-container {
    width: 100%;
    max-height: 3.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem;
    overflow-y: auto;
  }
  .topic-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    list-style: none;
    padding: unset;
  }
  li {
    width: 100%;
    padding: unset;
  }
  .topic-item-wrapper {
    width: 100%;
    height: fit-content;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.2rem 0.3rem;
    border-radius: 0.2rem;
    cursor: pointer;
    background-color: #ffffff14;
  }
  .topic-item-wrapper.selected_category {
    backdrop-filter: blur(10px) brightness(1);
    background-color: #ffffff40
  }
  .topic-item-title {
    max-width: 5.8rem;
    font-size: 0.28rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
  }
  .popup-mask {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #00000080;
    z-index: 103;
    display: none;
  }
  .show_mask {
    display: block;
  }
  .search-container {
    will-change: transform;
  }

  /* Searching state styles */
  .search-container.searching {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(-3.6rem) translateZ(0);
    z-index: 101;
  }
  .search-container.no_header.searching {
    transform: translateY(-2.6rem) translateZ(0);
  }
  .search-container.searching .top-container {
    z-index: 103;
  }
  .search-container.searching .top-container .input-search_wrapper .input-search {
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 5.2rem;
  }
  .search-container.searching .top-container .cancel-search {
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: visible;
    opacity: 1;
  }
  .search-container.searching .searches-container {
    height: 100dvh;
    overflow: visible;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
  }

  /* Dismissed state styles */
  .search-container.dismissed {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0) translateZ(0);
  }
  .search-container.dismissed .top-container .input-search_wrapper .input-search {
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 3.2rem;
  }
  .search-container.dismissed .top-container .cancel-search {
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), visibility 0s 0.4s;
    visibility: hidden;
    opacity: 0;
  }
  .search-container.dismissed .searches-container {
    height: 0;
    overflow: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
  }
}