/*
 * 求人一覧・求人検索（resources/views/client/joblist.blade.php）の部品。共通の部品は base.css。
 * 部品の名前と、写真や特徴タグが無いときの見え方は docs/design/applicant-redesign/01-job-pages.md。
 */

/* ---- FV 画像（顧客が登録したときだけ。切り抜かずに横いっぱいに出す） ---- */
.ap-jl-fv img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---- 帯（会社名・紹介・検索） ---- */
.ap-jl-hero {
    padding: 26px 0 22px;
}

/* 箱を文字の幅に合わせ、右上の飾りの円（白文字が 4.5:1 を切る）から離す */
.ap-jl-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

/* 見出しの飾りの線（文字ではないので、地とのコントラストの基準は 3:1） */
.ap-jl-hero__eyebrow::before {
    content: "";
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-marker);
}

.ap-jl-hero__title {
    margin: 4px 0 8px;
    color: #ffffff;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.35;
    letter-spacing: 0.02em;
    word-break: auto-phrase;
    text-wrap: balance;
}

.ap-jl-hero__lead {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.7;
}

/* 検索（白いカード。項目名は見えない label で読み上げる） */
.ap-jl-search {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding: 10px;
    border-radius: 14px;
    background: #ffffff;
    color: #2a2d27;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 8px 20px -10px rgba(0, 0, 0, 0.18);
}

.ap-jl-search__field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    margin: 0;
    padding: 0 12px;
    border-radius: 10px;
    background: #f4f5f2;
    color: #4f554b;
    font-weight: 400;
}

.ap-jl-search__field .ap-icon {
    color: var(--brand-deep);
}

.ap-jl-search__field select,
.ap-jl-search__field input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #2a2d27;
    font: inherit;
    font-size: 16px;
}

.ap-jl-search__field:focus-within {
    box-shadow: inset 0 0 0 2px var(--brand-deep);
}

.ap-jl-search__field select:focus,
.ap-jl-search__field input:focus {
    outline: none;
}

.ap-jl-search .ap-btn {
    width: 100%;
}

.ap-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---- 件数 ---- */
.ap-jl-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 0;
    padding: 18px 0 10px;
    color: #4f554b;
    font-size: 13px;
}

.ap-jl-result b {
    margin-right: 2px;
    color: var(--brand-ink);
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

/* ---- 求人のカード ---- */
.ap-jl-cards {
    display: grid;
    gap: 16px;
    padding-bottom: 24px;
}

.ap-jl-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 26px -14px rgba(0, 0, 0, 0.18);
}

.ap-jl-card__photo {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--brand-tint);
}

@supports not (aspect-ratio: 1 / 1) {
    .ap-jl-card__photo {
        height: 56vw;
    }
}

.ap-jl-card__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-jl-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 16px 16px 18px;
}

.ap-jl-card__title {
    margin: 0;
    color: var(--brand-ink);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.45;
    word-break: auto-phrase;
}

.ap-page .ap-jl-card__title a {
    color: inherit;
    text-decoration: none;
}

.ap-page .ap-jl-card__title a:hover {
    text-decoration: underline;
}

/* 写真が無いカードでも、ボタンをカードの下端にそろえる */
.ap-jl-card__acts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

/* ---- 求人が無いとき ---- */
.ap-jl-empty {
    margin: 0 0 24px;
    padding: 28px 18px;
    color: var(--brand-ink);
    text-align: center;
}

/* ---- ページ送り ---- */
.ap-jl-pager {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 4px 0 8px;
}

.ap-jl-pager__range {
    margin: 0;
    color: #4f554b;
    font-size: 13px;
}

.ap-jl-pager nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ap-jl-pager__link,
.ap-jl-pager__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.ap-page a.ap-jl-pager__link,
.ap-page a.ap-jl-pager__link:hover {
    background: #ffffff;
    color: var(--brand-ink);
    text-decoration: none;
    box-shadow: inset 0 0 0 1px var(--brand-line);
}

.ap-jl-pager__current {
    background: var(--brand-deep);
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 768px) {
    .ap-jl-hero {
        padding: 44px 0 34px;
    }

    .ap-jl-hero__title {
        font-size: 34px;
    }

    .ap-jl-search {
        display: flex;
        align-items: center;
    }

    .ap-jl-search__field {
        flex: 1;
    }

    .ap-jl-search__field--wide {
        flex: 1.4;
    }

    .ap-jl-search .ap-btn {
        width: auto;
        padding-inline: 28px;
    }

    /* PC は左に写真・右に本文の横長のカードを 1 列に並べる。写真の無いカードは本文だけになり、2 列のときのような空白ができない */
    .ap-jl-card {
        flex-direction: row;
    }

    .ap-jl-card__photo {
        flex: none;
        width: 300px;
        min-height: 188px;
        aspect-ratio: auto;
    }

    .ap-jl-card__body {
        padding: 20px 24px;
    }

    .ap-jl-card__acts {
        grid-template-columns: repeat(2, minmax(0, 200px));
    }
}
