/* Search Container */
.search-container {
    width: 100%;
    padding: 16px;
    background-color: #293153;
    display: flex;
    justify-content: center;
}

.listing-container {
    max-width: 1024px;
    width: 100%;
}

.search-input-container {
    margin-top: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

fast-dropdown.search-dropdown-auto-width > .dropdown-toggle {
    display: flex !important;
}

fast-dropdown.search-dropdown-auto-width > .dropdown-toggle > fast-input {
    flex-grow: 1;
}

.search-prefloc-container {
    display: flex;
    gap: 5px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.search-prefloc-text {
    font-family: 'Lato';
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px; 
    color: #D4D4D4;
}

.search-prefloc-option {
    font-family: 'Lato';
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: 24px;
    color: #ffffff;
    display: flex; 
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    max-width: 100%;
}

.search-prefloc-option img {
    margin-left: 5px;
}

.search-prefloc-option:hover {
    color: #FA4094;
    text-decoration: none;
}

.search-prefloc-option-hint {
    font-size: 14px;
    color: #D4D4D4;
    cursor: pointer;
    font-weight: 400;
    padding-left: 5px;
}

.show-more-option-container {
    cursor: pointer;
    color: white;
    text-decoration: none;
    gap: 12px;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    justify-content: flex-start;
    padding: 15px 10px 15px;
    margin-top: auto;
}

.show-more-option-text {
    cursor: pointer;
    color: white;
    font-family: Lato;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
}

.show-more-option-text:hover {
    color: #FA4094;
}

.additional-search-options {
    display: none;
    flex-wrap: wrap;
    margin: 15px 0px 10px 0px;
}

.active {
    display: flex;
    gap: 10px;
}

.hide-show-more-options {
    display: none;
}

@media (min-width: 767px) and (max-width: 949px) {

    .search-container {
        padding: 24px 32px;
    }

    .search-input-container {
        grid-template-columns: 1fr 1fr 1fr auto;
    }

    .additional-search-options {
        flex-wrap: wrap;
    }

    .job-search-filter-form {
        display: flex;
        flex-direction: column;
        min-height: 100px;
    }
}

@media (min-width: 950px) {

    .job-search-filter-form {
        display: flex;
        flex-direction: column;
        min-height: 112px;
    }
}

@media (min-width: 901px) {
    .search-container {
        padding: 32px 120px;
    }

    .search-input-container {
        grid-template-columns: 1fr 1fr 1fr auto;
    }

    .show-more-option-container {
        padding: 20px 5px 10px 0px;
        justify-content: flex-start;
    }

    .additional-search-options {
        flex-wrap: nowrap;
    }
}

@media (min-width: 1280px) {
    .search-container {
        padding: 32px 200px;
    }

    .search-input-container {
        grid-template-columns: 1fr 1fr 1fr auto;
    }

    .show-more-option-container {
        padding: 20px 5px;
        justify-content: flex-start;
    }
}

/* Search Category */
fast-select#job-cat fast-select-option .option-label {
    display: flex;
    justify-content: space-between;
}

#job-cat fast-bottom-sheet .sheet-body {
    padding-bottom: 10px;
}

/* Search Locale */
.search-locale-container {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 40px;
    margin-top: 10px;
    margin-left: 10px;
}

fast-checkbox[name="st"] {
    color: #ffffff;
    white-space: nowrap;
}

@media (min-width: 767px) {

    .search-locale-container {
        margin-left: 10px;
        margin-top: 10px;
    }

}

@media (min-width: 901px) {
    .search-locale-container {
        margin-left: 20px;
        margin-top: 0px;
    }

    #job-cat fast-bottom-sheet .sheet-container {
        max-height: 350px;
        min-width: 360px;
    }
}

/* Search Salary */
fast-dropdown#job-salary input::-webkit-outer-spin-button,
fast-dropdown#job-salary input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
fast-dropdown#job-salary input[type=number] {
    -moz-appearance: textfield;
}

fast-dropdown#job-salary.is-open {
    background-color: #ffffff;
    color: #293153;
}

fast-dropdown#job-salary.is-open fast-icon#salary-chev {
    transform: rotate(180deg);
}
    /* Basic Reset */
.filter-dropdown {
    border: 1.5px solid #F5F5F5;
    border-radius: 25px;
    padding: 0px;
    color: #ffffff;
    font-size: 16px;
    min-height: 40px;
    max-width: 300px;
    display: flex;
    white-space: nowrap;
    font-family: 'Lato', sans-serif;
    cursor: pointer;
}

.dropdown-label {
    margin: 3px 0px;
    padding: 0px 10px 0px 15px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.dropdown-content {
    padding: 16px 12px !important;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 320px;
}

.country-dropdown-content {
    width: auto !important;
}

.dropdown-expsalp-container {
    display: flex;
    gap: 20px;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

@media (max-width: 767px) {
    .dropdown-content {
        width: auto;
    }

    .dropdown-expsalp-container {
        justify-content: space-around;
    }

    .job-search-filter-form {
        display: flex;
        flex-direction: column;
        min-height: 250px;
    }
}

div.select-input {
    cursor: pointer !important;
}

div.select-input > .input-content {
    cursor: pointer !important;
}

fast-select {
    display: none;
}

fast-select.hydrated {
    display: unset;
}

/* Search Job Tags */
fast-select#job-tags {
    max-width: 210px;
}
fast-select#job-tags .select-input {
    background-color: #293153;
    color: #ffffff;
    border: 1.5px solid #F5F5F5;
    border-radius: 25px;
    min-height: 40px;
    --placeholder-color: #ffffff;
}

fast-select#job-tags.open .select-input {
    background-color: #ffffff;
    color: #293153;
    --placeholder-color: #293153;
}

fast-select#job-tags .sheet-container {
    min-width: 244px;
}

/* Search Job Types */
fast-select#job-types {
    max-width: 162px;
}

fast-select#job-types .select-input {
    background-color: #293153;
    color: #ffffff;
    border: 1.5px solid #F5F5F5;
    border-radius: 25px;
    min-height: 40px;
    --placeholder-color: #ffffff;
}

fast-select#job-types.open .select-input {
    background-color: #ffffff;
    color: #293153;
    --placeholder-color: #293153;
}

fast-select#job-types .sheet-container {
    min-width: 244px;
}

/* Search Job Levels — match job types pill */
fast-select#job-levels {
    max-width: 180px;
}

fast-select#job-levels .select-input {
    background-color: #293153;
    color: #ffffff;
    border: 1.5px solid #F5F5F5;
    border-radius: 25px;
    min-height: 40px;
    --placeholder-color: #ffffff;
}

fast-select#job-levels.open .select-input {
    background-color: #ffffff;
    color: #293153;
    --placeholder-color: #293153;
}

fast-select#job-levels .sheet-container {
    min-width: 244px;
}

/* Search Keyword */
.searchbox-input-container {
    position: relative;
    width: 100%;
}

#search input {
    width: 100%;
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    padding: 0px 16px;
    overflow-y: auto;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 5px;
}

.suggestion-item {
    cursor: pointer;
    padding: 8px 10px;
    transition: background-color 0.2s;
}

.selected-keyword {
    background-color: #f0f0f0;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.highlight {
    font-weight: bold;
}

.empty {
    opacity: 0;
    pointer-events: none;
}

#suggestions.empty {
    display: none;
}

/* Search Location */
#job-location fast-select-option[value="0"] {
    order: -1;
}

#job-location fast-bottom-sheet .sheet-body {
    padding-bottom: 10px;
}

@media (min-width: 641px) {
    #job-location fast-bottom-sheet .sheet-container {
        max-height: 350px;
        min-width: 300px;
        top: 50px !important;
    }
}

@media (max-width: 767px) {
    #job-location fast-bottom-sheet .sheet-container {
        top: 50px !important;
    }

    #insert-additional-filter {
        display: flex;
        justify-content: center;
    }

}
/* Search Input */
#autocomplete-container {
    position: relative;

    #autocomplete-input {
        width: 100%;
        padding: 8px 36px 8.1px 12px;
        box-sizing: border-box;
        font-size: 16px;
        font-family: 'Lato';
        color: #292929;
        border: 1px solid #d4d4d4;
        border-radius: 4px;
        height: 48px;
    }

    &:focus {
        outline: none !important;
        border: 1px solid #66afe9 !important;
    }

    .icon-button {
        position: absolute;
        top: 50%;
        right: 10px;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        color: #292929;
        cursor: pointer;
        user-select: none;
        display: flex;
        align-items: center;
        justify-content: center;
         /* No-op for the legacy <span role="button">; resets the UA button
           chrome for the <button> version (salary search bar). */
        border: none;
        background: none;
        padding: 0;
        font: inherit;
    }

    .visible fast-icon {
        display: block;
        visibility: visible;
    }

    .icon-button fast-icon:not(.visible) {
        display: none;
    }

    #autocomplete-dropdown {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 4px;
        margin-top: 5px;
        border-top: none;
        z-index: 1000;
        min-width: 320px;
        max-height: 276px;
        overflow-y: auto;
        display: none;

        .autocomplete-item {
            padding: 12px 16px;
            cursor: pointer;
            font-family: 'Lato';
        }

        .autocomplete-item:hover,
        .autocomplete-item.selected {
            background-color: #f0f0f0;
        }

        .autocomplete-label {
            font-weight: bold;
            padding: 8px 12px;
            background-color: #f9f9f9;

            strong {
                font-weight: bold;
                color: #000000;
            }
        }
    }

    .recent-search-container {
        display: flex;
        flex-direction: column;
        padding-bottom: 5px;

        .recent-search-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            padding: 10px 16px;
            position: sticky;
            top: 0;
            background-color: #ffffff;

            .recent-search-title {
                color: #a1a1aa;
                font: 500 14px 'Poppins', sans-serif;
                line-height: 16px;
            }

            .recent-search-clear-all-cta {
                color: #1d4ed8;
                font: 700 14px 'Lato', sans-serif;
                line-height: 20px;
                text-decoration: underline;
                text-underline-offset: 2px;
                cursor: pointer;

                &:hover,
                &:focus,
                &:visited {
                    color: #1d4ed8;
                }
            }
        }

        .recent-search-item {
            display: flex;
            gap: 10px;
            padding: 8px 16px;
            border-radius: 5px;
            align-items: center;
            cursor: pointer;

            .recent-search-keyword {
                flex: 1;
                font: 400 16px 'Lato';
                line-height: 24px;
                margin-bottom: 0;
                display: -webkit-box;
                -webkit-line-clamp: 3;
                -webkit-box-orient: vertical;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: break-word;
            }

            .recent-search-close-icon {
                justify-content: flex-end;
            }

            &:hover {
                background-color: #f0f0f0;
            }
        }
    }
}

/* Top searches*/
#top-searches-container {
  .top-searches-divider {
    border-top: 1px solid #fff;
    opacity: 0.1;
    margin-top: 20px;
  }

  .top-searches-components {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 12px;

    .top-searches-label {
      font-family: 'Lato';
      font-size: 16px;
      font-weight: 700;
      line-height: 24px;
      color: #d4d4d4;
      margin-bottom: 0 !important;
      padding-bottom: 0 !important;
      display: inline-flex;
      white-space: nowrap;
    }

    .top-searches-pills-container {
      display: flex;
      flex-direction: row;
      gap: 8px;
      flex-wrap: wrap; 
      margin-left: 8px;

      .top-searches-pills {
        display: inline-flex;
        padding: 4px 16px;
        border: 1px solid #d4d4d4;
        border-radius: 52px;
        height: 33px;
        cursor: pointer;
        color: #d4d4d4;
        text-decoration: none;
        white-space: nowrap;

        &:hover {
          background-color: #fff;
          color: #000;
        }

        &:visited,
        &:focus {
          text-decoration: none;
        }

        .top-searches-pills-text {
          font-family: 'Lato';
          font-size: 16px;
          font-weight: 400;
          line-height: 24px;
          margin-bottom: 0 !important;
          padding-bottom: 0 !important;
        }
      }
    }
  }

    @media (max-width: 767px) {
        .top-searches-components {
            flex-direction: column;
            align-items: flex-start;

            .top-searches-label {
                margin-left: 12px;
            }
        }
    }
}

html[lang=ta] {
    .dropdown-label {
        padding: 0px 10px 0px 10px;
    }
    .filter-dropdown {
        font-size: 15px;
    }
    div.select-input > .input-content {
        font-size: 15px;
        padding-right: 10px;
    }
}