/*
Theme Name: ジョブサーチ
Description: ジョブサーチの職種別求人・記事・相談サイト
Version: 0.1.0
*/

.p-entry__benefit-hero .u-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.p-job-detail-hero__grid > * {
    min-width: 0;
}
.p-job-detail-hero__summary .c-job-result__amount {
    white-space: normal;
    overflow-wrap: anywhere;
}

.p-job-detail-hero__job-title {
    margin-top: 0.65em;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* Plain-text ACF fields retain the editor's line breaks in headings and cards. */
.p-job-detail-hero__heading :is(h1,h2),
.p-job-detail-hero__location,
.p-job-detail__salary :is(dt,dd,strong),
.p-job-terms__type,
.p-job-terms summary strong,
.c-job-result__body :is(h3,dt,dd,strong),
.c-job-result__access,
.c-eye-job__body :is(h3,.c-eye-job__salary,.c-eye-job__conditions,.c-eye-job__location),
.js-entry-job-title {
    white-space: pre-line;
}

/* Keep the fixed navigation immediately below the WordPress toolbar. */
body.admin-bar .l-header,
body.admin-bar .l-header:is(.is-open, :focus-within) {
    top: var(--wp-admin--admin-bar--height);
}
body.admin-bar .l-header.is-hidden:not(.is-open):not(:focus-within) {
    top: calc(var(--wp-admin--admin-bar--height) - var(--header-height));
}
html:has(body.admin-bar) {
    scroll-padding-top: calc(var(--wp-admin--admin-bar--height) + var(--header-height) + 16px);
}
@media (max-width: 1024px) {
    body.admin-bar .l-header__nav,
    body.admin-bar .l-header__backdrop {
        top: var(--wp-admin--admin-bar--height);
    }
}
@media (max-width: 600px) {
    body.admin-bar #wpadminbar {
        position: fixed;
    }
}

.p-entry__job-copy .js-entry-job-pay {
    margin-top: 0.5rem;
    padding: 0;
    background: transparent;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}
.js-entry-job-pay :is(dt, dd),
.p-job-detail__condition-note,
.c-job-result__condition-note,
.c-eye-job__condition-note {
    white-space: pre-line;
}

.p-support__detail {
    margin-top: 1.5rem;
    text-align: right;
}
.p-support__detail a {
    display: inline-block;
    padding-block: .5rem;
    text-decoration: underline;
    text-underline-offset: .25em;
}

.p-reasons {
    background: var(--color-white);
}
.p-reasons__hero {
    padding-bottom: clamp(2rem, 5vw, 4.5rem);
    background: linear-gradient(110deg, #f8f0ee, #f8f5f1 58%, #edf2f4);
}
.p-reasons__hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    margin-top: 2rem;
}
.p-reasons__hero h1 {
    max-width: 11em;
    font: 600 clamp(2rem, 4.4vw, 4rem)/1.45 var(--font-serif);
    text-wrap: balance;
    word-break: auto-phrase;
}
.p-reasons__hero img {
    width: 100%;
    height: auto;
    aspect-ratio: 1.7;
    object-fit: cover;
    border-radius: 3px 3rem 3px 3px;
}
.p-reasons__body {
    max-width: 960px;
    padding-block: clamp(3rem, 7vw, 6rem);
}
.p-reasons__intro {
    max-width: 46rem;
    margin: 0 auto clamp(2.5rem, 5vw, 5rem);
}
.p-reasons__intro h2, .p-reasons__item h2 {
    margin-bottom: 1rem;
    font: 600 clamp(1.35rem, 2.5vw, 2rem)/1.55 var(--font-serif);
}
.p-reasons__body p {
    line-height: 2;
    overflow-wrap: anywhere;
}
.p-reasons__item {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: clamp(1rem, 4vw, 3rem);
    padding-block: clamp(1.75rem, 4vw, 3rem);
    border-top: 1px solid #d8cec2;
}
.p-reasons__number {
    font: 500 clamp(2rem, 4vw, 3.25rem)/1.1 var(--font-serif);
    color: #806951;
}
@media (max-width: 680px) {
    .p-reasons__hero-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .p-reasons__item { grid-template-columns: 2.6rem minmax(0, 1fr); }
}

.p-recruit__body section + section {
    margin-top: clamp(2.5rem, 5vw, 4.5rem);
    padding-top: clamp(2rem, 4vw, 3.25rem);
    border-top: 1px solid var(--color-line);
}
.p-recruit__body h2 {
    margin-bottom: 1.25rem;
    font: 600 clamp(1.5rem, 3vw, 2.35rem)/1.55 var(--font-serif);
}
.p-recruit__body h3 {
    margin: 1.75rem 0 .8rem;
    font: 600 clamp(1.1rem, 2vw, 1.45rem)/1.6 var(--font-serif);
}
.p-recruit__body p + p { margin-top: .8rem; }
.p-recruit__body ul {
    padding: 1rem 1.5rem 1rem 2.5rem;
    margin-block: .75rem 1rem;
    background: var(--color-ivory);
    list-style: disc;
}
.p-recruit__body li::marker { color: var(--color-rose-deep); }
.p-recruit__body table { width: 100%; border-collapse: collapse; }
.p-recruit__body :is(th, td) {
    border-bottom: 1px solid var(--color-line);
    padding: .9rem clamp(.75rem, 2vw, 1.5rem);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.p-recruit__body th { width: 25%; background: var(--color-ivory); }
.p-recruit__body td a { text-decoration: underline; }

.p-business { background: var(--color-white); }
.p-business__hero { background: linear-gradient(110deg, #f8f0ee, #f8f5f1 58%, #edf2f4); }
.p-business__hero h1 {
    padding-block: clamp(2rem, 6vw, 5rem);
    font: 600 clamp(1.8rem, 4vw, 3.4rem)/1.45 var(--font-serif);
    text-wrap: balance;
}
.p-business__body { max-width: 900px; padding-block: clamp(2rem, 6vw, 5rem); overflow-wrap: anywhere; }
.p-business__body h2, .p-business__body .wp-block-heading {
    color: var(--text) !important;
    font: 600 clamp(1.35rem, 3vw, 2rem)/1.55 var(--font-serif) !important;
    margin-bottom: 1rem;
}
.p-business__body :is(p,figure,.wp-block-columns) + :is(p,figure,.c-button,h2) { margin-top: 1.25rem; }
.p-business__body .wp-block-spacer { max-height: 2rem; }
.p-business__body a:not(.c-button) { text-decoration: underline; text-underline-offset: .2em; }
.p-business__choices { display: flex; gap: 1rem; flex-wrap: wrap; }
.p-business__body :is(.business-field,.business-shop) { min-width: 0; border: 0; padding: 0; margin: 0 0 1.25rem; }
.p-business__body .business-shop { padding-top: 1rem; border-top: 1px solid var(--color-line); }
.business-shop > legend { font: 600 1.3rem/1.6 var(--font-serif); }
.business-field > label, .business-field legend { display: block; font-weight: 600; }
.p-business .wpcf7-form :is(.p-listing-form__required, .p-listing-form__optional) { display: inline-block; margin-inline-start: .4rem; vertical-align: middle; }
.business-field input:not([type=checkbox]), .business-field textarea, .business-controls select {
    box-sizing: border-box; width: 100%; padding: .65rem .85rem; background: white;
    border: 1px solid #a99f96; border-radius: .3rem; font: inherit;
}
.business-field textarea { height: 6rem; }
.business-controls { display: flex; flex-wrap: wrap; gap: .75rem; align-items: end; margin-block: 1.5rem 3rem; }
.business-controls button, .p-business .p-contact__button-link { border: 1px solid var(--color-line); padding: .65rem 1rem; border-radius: .4rem; }
.p-business .p-contact__button-link { color: white; background: var(--color-rose-deep); padding-inline: 2rem; }
.p-business .p-contact__privacy { margin-block: 1.5rem; }
.p-business .hidden-file, .p-business [hidden] { display: none !important; }
@media (max-width: 680px) { .p-business__choices .c-button { width: 100%; } }

.business-intro { margin-bottom: 2rem; line-height: 1.9; }
.business-controls { align-items: start; margin-block: .75rem 1.5rem; }
.business-controls [data-shop-tabs] { display: flex; flex-wrap: wrap; gap: .5rem; }
.business-controls button[aria-pressed=true] { background: var(--color-rose-deep); color: white; }
.business-controls summary { cursor: pointer; padding: .65rem 1rem; border: 1px solid var(--color-line); border-radius: .4rem; }
.business-controls details button { display: block; width: 100%; margin-top: .35rem; }

.p-business .p-contact__button-link:disabled { opacity: .45; cursor: not-allowed; }

.p-business .p-contact__button-link:enabled:hover,
.p-business .p-contact__button-link:focus-visible {
    background: var(--color-rose);
}
main .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background),
main .glsr-button:not(.has-background) {
    background-color: var(--color-rose-deep);
    color: var(--color-white);
}

/* The job details remain available from the selected job's link. */
@media (max-width: 599px) {
    .p-entry-page--compact .p-entry__job-copy :is(.js-entry-job-title, .js-entry-job-pay) {
        display: none;
    }
    .p-entry-page--compact .p-entry__job {
        grid-template-columns: clamp(88px, 27vw, 132px) minmax(0, 1fr) auto;
        margin-bottom: 8px;
    }
    .p-entry-page--compact .p-entry__job-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;
    }
    .p-entry-page--compact .p-entry__job h2 {
        font-size: .8125rem;
    }
}
@media (max-width: 599px) and (max-height: 700px) {
    .p-entry-page--compact:has(.js-entry-job:not([hidden])) .p-entry__benefit-hero img {
        max-height: 18svh;
        width: auto;
        max-width: 100%;
        margin-inline: auto;
    }
}

@media (max-width: 767px) {
    .p-hero__career--hair > img {
        object-position: right center;
        transform: none;
    }
}

#jsr-recaptcha-notice {
    margin: 0;
    padding: 0.75rem 1rem;
    color: #545454;
    background: #fff;
    font-size: 0.8125rem;
    line-height: 1.6;
    text-align: center;
}

body:has(#jsr-recaptcha-notice) .grecaptcha-badge {
    visibility: hidden;
}

.p-article-intro .p-article-cover { margin: 0; }
.p-article-intro__summary { margin: 1rem 0 0; line-height: 1.85; }

@media (min-width: 769px) {
    .p-article-layout--intro { row-gap: 34px; }
    .p-article-layout--intro > .p-article-intro { grid-area: 1 / 2; min-width: 0; }
    .p-article-layout--intro > .p-article-toc { grid-area: 1 / 1 / 3 / 2; }
    .p-article-layout--intro > .p-article-layout__main { grid-area: 2 / 2; }
    .p-article-intro__summary { display: none; }
}

.p-journal__image {
    overflow: hidden;
    aspect-ratio: 3 / 2;
    align-self: start;
    margin: 0;
}
.p-journal__image > img {
    display: block;
    height: 100%;
}
.p-journal__image > .p-journal-article__placeholder {
    padding: 0;
}
:is(.p-journal__card, .p-eye-journal__list) a:is(:hover, :focus-visible) h3 {
    color: var(--color-rose-deep);
}
@media (prefers-reduced-motion: no-preference) {
    :is(.p-journal__image, .p-eye-journal__image) > * {
        transition: transform 0.35s ease;
    }
    a:is(:hover, :focus-visible) > :is(.p-journal__image, .p-eye-journal__image) > * {
        transform: scale(1.035);
    }
}

.p-journal__card div h3,
.p-eye-journal__list h3,
.p-journal-article h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    block-size: 2lh;
    min-height: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
}


.p-eye-journal__meta,
.p-journal-article__meta {
    flex-wrap: nowrap;
}

.p-journal__card div p,
.p-eye-journal__meta span,
.p-journal-article__category {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-eye-journal__meta time,
.p-journal-article__meta time {
    flex: none;
    margin-inline-start: auto;
    white-space: nowrap;
}

.postid-5598 .p-article-intro__summary,
.postid-5598 .p-article-body > p:first-child > strong:only-child {
    font-size: 1.125rem;
}
@media (max-width: 599px) {
    .postid-5598 .p-article-intro__summary,
    .postid-5598 .p-article-body > p:first-child > strong:only-child {
        font-size: 1.0625rem;
    }
}

/* Pickup card links on the eye and hair landing pages. */
.p-eye-jobs__rail .c-eye-job__link:focus-visible h3 {
    color: var(--color-rose-deep);
    text-decoration: underline;
}

@media (hover: hover) {
    .p-eye-jobs__rail .c-eye-job__link:hover h3 {
        color: var(--color-rose-deep);
        text-decoration: underline;
    }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .p-eye-jobs__rail .c-eye-job__link:hover .c-eye-job__media img {
        transform: scale(1.05);
    }
}
