/* 投稿一覧と左端をそろえるため、main の constrained レイアウトの幅の制限を外す */
.search-header {
    max-width: 100vw !important;
    margin-bottom: var(--wp--preset--spacing--40);
}

.search-header-title {
    margin-bottom: 0.2em;
}

.search-header-count {
    margin-top: 0;
    color: #767676;
    font-size: var(--wp--preset--font-size--small);
}

/* タグページの件数。見出し（query-title）とは別のブロックなので、constrained レイアウトの幅の制限と、ブロックの間の余白を外す */
/* 本体のブロックの間の余白（:root :where(.is-layout-constrained) > * + *）より強くするため、main の archive-main-grid から指定する */
.archive-main-grid .search-header-archive-count {
    max-width: 100vw !important;
    margin-block-start: 0.2em;
}

/* 検索窓（トップページの検索窓と同じ見た目） */
.search-header-form {
    position: relative;
    max-width: 645px;
    margin-top: 1em;
}

.search-header-form input[type="search"] {
    width: 100%;
    padding: 0.6em 3em 0.6em 1em;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    outline: none;
    font-size: 1em;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
}

.search-header-form input[type="search"]:focus {
    border-color: #4eb34c;
}

.search-header-button {
    position: absolute;
    top: 50%;
    right: 0.5em;
    transform: translateY(-50%);
    display: flex;
    padding: 0;
    background: none;
    border: none;
    color: #4eb34c;
    cursor: pointer;
}

.search-header-button:hover {
    color: #4eb34c90;
}

/* ラベルを画面に出さず、読み上げには残す */
.search-header-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* 0件のときの案内 */
.search-header-empty {
    box-sizing: border-box;
    max-width: 645px;
    margin-top: var(--wp--preset--spacing--40);
    padding: 1.2em 1.5em;
    background-color: #f6f9f5;
    border-radius: 8px;
}

.search-header-empty-message {
    margin-top: 0;
    font-weight: 600;
}

.search-header-hints {
    margin: 0.5em 0 0;
    padding-left: 1.2em;
    color: #555;
    font-size: var(--wp--preset--font-size--small);
}

.search-header-subtitle {
    margin: 1.5em 0 0.6em;
    font-size: var(--wp--preset--font-size--medium);
}

/* タグは投稿詳細のタグと同じ緑の枠 */
.search-header-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}

.search-header-tags a {
    padding: 0.3em 0.8em;
    border: 1px solid #4eb34c;
    border-radius: 999px;
    color: #4eb34c;
    background-color: #fff;
    font-size: var(--wp--preset--font-size--small);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.search-header-tags a:hover {
    color: #fff;
    background-color: #4eb34c;
}

.search-header-kana {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.search-header-kana a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
    border: 1.5px solid #ccc;
    border-radius: 8px;
    color: #333;
    background-color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.search-header-kana a:hover {
    color: #fff;
    background-color: #4eb34c;
    border-color: #4eb34c;
}

/* 科から探す（plant-browse の科の一覧へのリンク） */
.search-header-family {
    margin: 0;
}

.search-header-family a {
    color: #4eb34c;
}
