/* 公共顶栏搜索框（首页/Blog 等共用） */
.rj-job-search-form {
  display: grid;
  -moz-column-gap: 10px;
  column-gap: 10px;
  position: relative;
  grid-template-columns: 1fr 36px;
  width: 100%;
}

@media only screen and (min-width: 1199px) {
  .rj-job-search-form {
    grid-template-columns: 1fr 50px;
  }
}

.rj-job-search-form .rj-job-search-input {
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 3px;
  height: 36px;
  padding: 10px 16px;
  width: 100%;
  font-size: 1.6rem;
  line-height: 24px;
  border: 1px solid var(--wp--preset--color--gray-300, #d0d5dd);
  color: var(--wp--preset--color--black, #000);
  background-color: var(--wp--preset--color--white, #fff);
}

.rj-job-search-form .rj-job-search-input:focus,
.rj-job-search-form .rj-job-search-input select:focus,
.rj-job-search-form .rj-job-search-input textarea:focus {
  border: 2px solid var(--wp--preset--color--link-on-light, #0164f9);
}

@media only screen and (min-width: 1199px) {
  .rj-job-search-form .rj-job-search-input {
    height: 50px;
    padding: 6px 12px;
  }
}

.rj-job-search-form .rj-job-search-btn {
  height: 36px;
  width: 36px;
  padding: 0;
  border: none;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  background: var(--wp--preset--color--link-on-dark, #0164f9);
}

.rj-job-search-form .rj-job-search-btn svg {
  width: 17px;
  fill: currentColor;
  color: #fff;
}

.rj-job-search-form .rj-job-search-btn:focus-within {
  outline: var(--wp--preset--color--secondary, #016cf9) dashed 2px;
  outline-offset: 5px;
}

@media only screen and (min-width: 1199px) {
  .rj-job-search-form .rj-job-search-btn {
    width: 50px;
    height: 50px;
  }

  .rj-job-search-form .rj-job-search-btn svg {
    width: 20px;
  }
}

.rj-job-search-form .rj-job-suggestion-list-wrapper.d-none {
  display: none;
}

.rj-job-search-form .rj-job-suggestion-list-wrapper ul {
  list-style: none;
}

.rj-job-search-form .rj-job-suggestion-list-wrapper ul a:hover,
.rj-job-search-form .rj-job-suggestion-list-wrapper ul a.selected {
  background: #e6f1ff;
  font-weight: 600;
  text-decoration: none;
}

.rj-job-search-form .rj-job-suggestion-list-wrapper ul a:focus-visible {
  background: #e6f1ff;
  font-weight: 600;
  text-decoration: none;
}

@media only screen and (min-width: 1199px) {
  .rj-job-search-form .rj-job-suggestion-list-wrapper ul a:focus-visible {
    outline-offset: -0.3rem;
  }

  .rj-job-search-form .rj-job-suggestion-list-wrapper {
    position: absolute;
    left: 0;
    top: 100%;
    width: calc(100% - 60px);
    padding-right: 4px;
    border-radius: 3px;
    z-index: 100;
    background-color: var(--wp--preset--color--white, #fff);
    border: 1px solid var(--wp--preset--color--gray-300, #d0d5dd);
    box-shadow: rgba(0, 0, 0, .13) 0 0 10px 0;
  }

  .rj-job-search-form .rj-job-suggestion-list-wrapper ul {
    margin: 8px 0;
    max-height: 220px;
    padding: 0 8px;
    overflow-y: auto;
  }

  .rj-job-search-form .rj-job-suggestion-list-wrapper ul a {
    display: block;
    padding: 8.8px 16px;
    color: var(--wp--preset--color--black, #000);
  }
}

/* 顶栏内搜索框尺寸覆盖 */
.header .rj-job-search-form {
  width: 36px;
  gap: 0;
  margin-left: 0;
}

@media only screen and (min-width: 1199px) {
  .header .rj-job-search-form {
    max-width: 400px;
    width: 100%;
    gap: 10px;
    margin-right: auto;
    margin-left: 40px;
    grid-template-columns: 1fr 40px;
  }

  .header .rj-job-search-form .rj-job-suggestion-list-wrapper {
    width: calc(100% - 50px);
  }
}

.header .rj-job-search-form .rj-job-search-input {
  height: 40px;
  padding: 8px 16px;
  display: none;
}

@media only screen and (min-width: 1199px) {
  .header .rj-job-search-form .rj-job-search-input {
    display: inline-block;
  }

  .header .rj-job-search-form .rj-job-search-btn {
    width: 40px;
    height: 40px;
  }
}
