/* Entry page (Templates/entry.php): Contact Form 7 styled like the corporate contact form. */

.entry { padding: 88px 0 120px; background: linear-gradient(180deg, var(--beige), var(--cream) 35%); }
.entry__layout { max-width: calc(1240px + var(--pad-x) * 2); display: flex; flex-wrap: wrap; gap: 40px 48px; align-items: flex-start; }
.entry__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 40px; }
/* Wide screens: positions list on the left, level with the form box (steps sit above the box) */
@media (min-width: 1000px) {
    .entry__layout { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
    .entry__main { display: contents; }
    .entry__main > .ef-steps { grid-column: 2; grid-row: 1; }
    .entry__main > .ef-card { grid-column: 2; grid-row: 2; }
    .entry-aside { grid-column: 1; grid-row: 2; align-self: start; }
}
@media (max-width: 699px) { .entry { padding: 64px 0 88px; } }

/* Steps: 01 入力 → 02 完了 */
.ef-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ef-steps li { display: flex; flex-direction: column; gap: 10px; }
.ef-steps span { height: 2px; background: var(--line); }
.ef-steps p { display: flex; align-items: baseline; gap: 10px; font-size: 15px; letter-spacing: .1em; color: #a39890; }
.ef-steps b { font-family: var(--mincho); font-weight: 400; font-size: 18px; letter-spacing: .02em; }
.ef-steps .is-current span, .ef-steps .is-done span { background: linear-gradient(90deg, var(--red), var(--red-dark)); }
.ef-steps .is-current p, .ef-steps .is-done p { color: var(--red); }

/* Card */
.ef-card { position: relative; padding: clamp(28px, 4vw, 56px); background: #fff; box-shadow: var(--shadow); }
.ef-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--red), rgba(var(--accent-rgb), 0)); }
.ef-card[hidden] { display: none; }

/* ===== Contact Form 7 ===== */
.ef-card .wpcf7-form { display: flex; flex-direction: column; gap: 28px; }
.ef-card .wpcf7-form > p:empty { display: none; }

/* Rows (recommended form template: .ef-row > .ef-label + .ef-field) */
.ef-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.ef-label { display: flex; align-items: center; gap: 10px; align-self: start; padding-top: 12px; font-size: 14px; font-weight: 500; letter-spacing: .06em; color: var(--ink); }
.ef-req, .ef-opt { font-size: 13px; font-weight: 400; letter-spacing: .08em; }
.ef-req { color: #b07a74; }
.ef-opt { color: #a39890; }
.ef-field { grid-column: span 2; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ef-note { font-size: 14px; font-weight: 300; line-height: 1.7; color: #8a7f77; }


/* Fallback for forms without the .ef-row template */
.ef-card .wpcf7-form > p { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); font-size: 14px; color: var(--text); }
.ef-card .wpcf7-form > p > label { display: block; font-size: 14px; font-weight: 500; letter-spacing: .06em; color: var(--ink); }
.ef-card .wpcf7-form > p > label > .wpcf7-form-control-wrap { display: block; margin-top: 10px; }

/* Controls */
.ef-card .wpcf7-form-control-wrap { display: block; }
.ef-card input[type=text], .ef-card input[type=email], .ef-card input[type=tel], .ef-card input[type=number], .ef-card input[type=date], .ef-card input[type=url], .ef-card select, .ef-card textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 0; background: #fdfbf8; font-size: 15px; font-weight: 400; color: var(--ink); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .25s, background .25s, box-shadow .25s;
}
.ef-card select { -webkit-appearance: auto; appearance: auto; cursor: pointer; } /* native select, as in the design */
.ef-card textarea { display: block; height: 219px; min-height: 120px; line-height: 1.8; resize: vertical; }
.ef-count { align-self: flex-end; font-size: 14px; font-variant-numeric: tabular-nums; color: #8a7f77; }
.ef-card input:focus, .ef-card select:focus, .ef-card textarea:focus { border-color: var(--red); background-color: #fff; box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08); }
.ef-card ::placeholder { font-weight: 300; color: #c4bbb2; opacity: 1; }

/* File drop zone (built by JS/entry.js around each CF7 file input) */
.ef-file { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px 20px; border: 1px dashed #d8cdc2; background: #fdfbf8; text-align: center; transition: border-color .25s, background .25s; }
.ef-file:hover, .ef-file.is-drag, .ef-file:focus-within { border-color: var(--red); background: #fff; }
.ef-file.is-drag { background: var(--accent-wash); }
.ef-file input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ef-file__icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--accent-soft); color: var(--red); box-shadow: 0 6px 16px rgba(var(--accent-rgb), .08); }
.ef-file__icon svg { width: 17px; height: 17px; }
.ef-file__text { font-size: 14px; letter-spacing: .04em; color: var(--ink); }
.ef-file__text b { font-weight: 400; color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.ef-file__note { margin: 0; font-size: 14px; font-weight: 300; line-height: normal; color: #8a7f77; }
.ef-file__list { display: flex; flex-direction: column; gap: 8px; }
.ef-file__item { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; background: #fdfbf8; border: 1px solid var(--line); }
.ef-file__ext { flex-shrink: 0; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--red); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.ef-file__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ef-file__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; color: var(--ink); }
.ef-file__size { font-size: 13px; color: #8a7f77; }
.ef-file__remove { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #8a7f77; transition: color .25s; }
.ef-file__remove:hover { color: var(--red); }
.ef-file__warn { font-size: 14px; color: var(--red); }
/* Without JS: tidy native file input */
.ef-card input[type=file] { width: 100%; font-size: 15px; color: var(--body-2); }
.ef-card input[type=file]::file-selector-button { margin-right: 14px; padding: 10px 18px; border: 1px solid #d8cdc2; background: #fff; font: inherit; color: var(--text); cursor: pointer; }

/* Send row: consent (left) + submit (centre), like the corporate form */
.ef-send { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); align-items: center; gap: 20px 24px; padding-top: 8px; }
.ef-agree { grid-column: 1; grid-row: 1; justify-self: start; }
.ef-submit { grid-column: 2; grid-row: 1; justify-self: center; position: relative; display: flex; flex-direction: column; align-items: center; }
@media (max-width: 699px) { .ef-send { grid-template-columns: minmax(0, 1fr); } .ef-submit { grid-column: 1; grid-row: 2; } .ef-card .wpcf7-acceptance label { white-space: normal; } }

.ef-card .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.ef-card .wpcf7-acceptance label { display: flex; align-items: center; gap: 10px; min-height: 44px; white-space: nowrap; font-size: 15px; font-weight: 300; letter-spacing: .04em; color: var(--body); cursor: pointer; }
.ef-card .wpcf7-acceptance input[type=checkbox] { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 14px; height: 14px; margin: 0; border: 1px solid #6b625c; border-radius: 2px; background: #fff; cursor: pointer; }
.ef-card .wpcf7-acceptance input[type=checkbox]:checked { background: #6b625c no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E"); }
.ef-card .wpcf7-acceptance input[type=checkbox]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ef-card .wpcf7-acceptance a { color: var(--body); text-decoration: underline; text-decoration-color: #d8cdc2; text-underline-offset: 3px; }
.ef-card .wpcf7-acceptance a:hover { color: var(--red); }

.ef-card input[type=submit] {
  padding: 18px 100px 18px 44px; border: none; border-radius: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
  background: no-repeat right 44px center / 36px 8px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 8'%3E%3Cpath d='M0 4h34M31 1l3 3-3 3' fill='none' stroke='%23fbf7f3' stroke-width='1.1'/%3E%3C/svg%3E"), var(--red-grad);
  font-size: 14px; letter-spacing: .18em; color: var(--light); box-shadow: 0 12px 28px rgba(var(--accent-rgb), .2); transition: translate .3s, box-shadow .3s;
}
.ef-card input[type=submit]:hover { translate: 0 -2px; box-shadow: 0 18px 36px rgba(var(--accent-rgb), .28); }
.ef-card input[type=submit]:disabled { opacity: .55; cursor: not-allowed; translate: none; }
.ef-card .wpcf7-spinner { position: absolute; top: 50%; right: -36px; margin: -12px 0 0; }

/* Validation & response */
.ef-card .wpcf7-not-valid { border-color: #d98a8a !important; }
.ef-card .wpcf7-not-valid-tip { margin-top: 6px; font-size: 14px; font-weight: 400; color: var(--red); }
.ef-card .wpcf7-response-output:empty,
.ef-card .wpcf7-form.init .wpcf7-response-output, .ef-card .wpcf7-form.resetting .wpcf7-response-output, .ef-card .wpcf7-form.submitting .wpcf7-response-output { display: none; }
.ef-card .wpcf7-response-output { margin: 0 !important; padding: 14px 18px !important; border: 1px solid var(--line) !important; font-size: 15px; line-height: 1.8; }
.ef-card .wpcf7-form.invalid .wpcf7-response-output, .ef-card .wpcf7-form.unaccepted .wpcf7-response-output,
.ef-card .wpcf7-form.failed .wpcf7-response-output, .ef-card .wpcf7-form.aborted .wpcf7-response-output, .ef-card .wpcf7-form.spam .wpcf7-response-output { border-color: #efc9c6 !important; background: #fbf0ef; color: var(--red-dark); }
.ef-card .wpcf7-form.sent .wpcf7-response-output { border-color: #cfe3d9 !important; background: #ecf4f0; color: #2f6b55; }

/* Done panel */
.ef-done { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 56px); text-align: center; }
.ef-done__icon { width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--red-grad); box-shadow: 0 12px 28px rgba(var(--accent-rgb), .22); }
.ef-done__en { font-family: var(--en); font-size: 15px; letter-spacing: .45em; color: var(--red); }
.ef-done__title { font-family: var(--serif); font-weight: 400; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .1em; line-height: 1.7; color: var(--ink); }
.ef-done__text { max-width: 560px; font-size: 14px; font-weight: 300; line-height: 2.1; color: var(--body); }
.ef-done .link-arrow { align-self: center; margin-top: 12px; }

/* Aside: open positions */
.entry-aside { flex: 1 1 320px; min-width: 0; position: sticky; top: calc(var(--header-h) + 32px); display: flex; flex-direction: column; gap: 20px; }
.entry-aside__box { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: #fff; border: 1px solid var(--line-card); }
.entry-aside__box .heading__en { font-size: 14px; letter-spacing: .4em; }
.entry-aside__title { margin-top: -6px; font-family: var(--serif); font-weight: 400; font-size: 19px; letter-spacing: .1em; color: var(--ink); }
.entry-aside__jobs li { border-top: 1px solid var(--line-soft); }
.entry-aside__jobs a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 14px 0; color: var(--text); transition: padding .3s; }
.entry-aside__jobs a:hover { color: var(--text); padding-left: 6px; }
.entry-aside__jobs .tag { grid-column: 1 / -1; justify-self: start; padding: 3px 10px; font-size: 13px; }
.entry-aside__job { font-family: var(--serif); font-size: 15px; letter-spacing: .06em; line-height: 1.6; color: var(--ink); }
.entry-aside__jobs svg { color: var(--red); }
@media (max-width: 999px) { .entry-aside { position: relative; top: 0; } }
