/* 採用サイトの応募フォーム（/career/entry/・/career/entry-resume/・/new-grad/entry/） */

.ef-form {
  --ef-text: #2e2e2e;
  --ef-muted: #6b6b6b;
  --ef-line: #d4d4d4;
  --ef-line-strong: #9a9a9a;
  --ef-soft: #f6f6f4;
  --ef-accent: #f9bf11;
  --ef-accent-soft: #fff7dc;
  --ef-error: #c62828;
  --ef-error-soft: #fdf3f3;
  --ef-radius: 0;
  --ef-control-h: 52px;

  color: var(--ef-text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.04em;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px 72px;
}

.ef-form *,
.ef-form *::before,
.ef-form *::after {
  box-sizing: border-box;
}

/* 見出しと区切り */
.ef-section {
  margin: 0;
  padding: 0;
}

.ef-section + .ef-section {
  margin-top: 48px;
}

.ef-section__title {
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ef-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

/* ページ見出し（.page-title-content-title-sub）と同じく、英字の小見出しを日本語の上に置く */
.ef-section__en {
  display: block;
  margin-bottom: 4px;
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--ef-accent);
}

/* 項目 */
.ef-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.ef-field + .ef-field {
  margin-top: 24px;
}

.ef-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0 0 8px;
  padding: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

/* セクションの見出しと同じ文言なので、見出しは読み上げ用にだけ残す */
.ef-position .ef-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ef-label__note {
  font-size: 13px;
  font-weight: 400;
  color: var(--ef-muted);
}

.ef-badge {
  display: inline-block;
  padding: 1px 6px;
  background: #ececec;
  color: var(--ef-muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.04em;
}

.ef-badge--req {
  background: var(--ef-accent);
  color: var(--ef-text);
}

.ef-hint {
  margin: -2px 0 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ef-muted);
}

.ef-form .wpcf7-form-control-wrap {
  display: block;
  position: relative;
}

/* 入力欄 */
.ef-control {
  display: block;
  width: 100%;
  height: var(--ef-control-h);
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--ef-line);
  border-radius: var(--ef-radius);
  background: #fff;
  color: var(--ef-text);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}

.ef-control::placeholder {
  color: #a3a3a3;
  opacity: 1;
}

.ef-control:hover {
  border-color: var(--ef-line-strong);
}

.ef-control:focus {
  outline: none;
  border-color: var(--ef-text);
  box-shadow: 0 0 0 3px rgba(249, 191, 17, .45);
}

.ef-textarea {
  height: auto;
  min-height: 168px;
  padding: 12px 14px;
  resize: vertical;
}

.ef-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%232e2e2e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.ef-date {
  max-width: 240px;
}

.ef-control[readonly],
.ef-control[readonly]:hover,
.ef-control[readonly]:focus {
  border-color: transparent;
  background: var(--ef-soft);
  box-shadow: none;
  font-weight: 700;
  cursor: default;
}

.ef-short {
  max-width: 120px;
}

.ef-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ef-suffix {
  flex: none;
  font-size: 15px;
  white-space: nowrap;
}

/* 姓・名、年・月・日のように並べる項目 */
.ef-row {
  display: grid;
  gap: 12px;
}

.ef-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ef-row--3 {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.ef-sublabel {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ef-muted);
}

.ef-row--3 .ef-sublabel,
.ef-group .ef-row--2 .ef-part:has(.ef-select) .ef-sublabel {
  display: none;
}

.ef-part__control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ef-part__control > .wpcf7-form-control-wrap {
  flex: 1;
  min-width: 0;
}

.ef-row--3 .ef-select,
.ef-row--2 .ef-select {
  padding-left: 12px;
  padding-right: 32px;
  background-position: right 10px center;
}

/* 文字数 */
.ef-counter {
  margin: 6px 0 0;
  font-size: 12px;
  text-align: right;
  color: var(--ef-muted);
}

.ef-counter.is-over {
  color: var(--ef-error);
  font-weight: 700;
}

/* チェックボックス */
.ef-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.5;
}

.ef-check input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid var(--ef-line-strong);
  background: #fff;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .15s, border-color .15s;
}

.ef-check input[type="checkbox"]:checked {
  border-color: var(--ef-text);
  background: var(--ef-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='11' viewBox='0 0 14 11'%3E%3Cpath d='M1.5 5.5l4 4 7-8' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.ef-check input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(249, 191, 17, .45);
}

.ef-check input[type="checkbox"]:disabled {
  background: var(--ef-soft);
  border-color: var(--ef-line);
  cursor: not-allowed;
}

.ef-options {
  display: grid;
  gap: 8px;
}

.ef-option {
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--ef-line);
  border-radius: var(--ef-radius);
  background: #fff;
  transition: border-color .15s, background-color .15s;
}

.ef-option:hover {
  border-color: var(--ef-line-strong);
}

.ef-option:has(input:checked) {
  border-color: var(--ef-text);
  background: var(--ef-accent-soft);
}

.ef-option:has(input:disabled) {
  color: #b3b3b3;
  cursor: not-allowed;
}

/* 添付 */
.ef-file {
  position: relative;
}

.ef-file__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ef-file__drop {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 14px;
  padding: 16px;
  border: 1.5px dashed var(--ef-line-strong);
  border-radius: var(--ef-radius);
  background: var(--ef-soft);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}

.ef-file__drop:hover,
.ef-file.is-dragover .ef-file__drop {
  border-color: var(--ef-text);
  background: var(--ef-accent-soft);
}

.ef-file__input:focus-visible + .ef-file__drop {
  border-style: solid;
  border-color: var(--ef-text);
  box-shadow: 0 0 0 3px rgba(249, 191, 17, .45);
}

.ef-file__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232e2e2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 20h16'/%3E%3C/svg%3E") no-repeat center;
  border: 1px solid var(--ef-line);
}

.ef-file__drop .ef-file__icon {
  grid-row: span 2;
}

.ef-file__icon--doc {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%232e2e2e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E");
}

.ef-file__text {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.ef-file__or {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--ef-muted);
}

.ef-file__sub {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ef-muted);
}

.ef-file__chosen {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ef-text);
  border-radius: var(--ef-radius);
  background: #fff;
}

.ef-file:not(.has-file) .ef-file__chosen,
.ef-file.has-file .ef-file__drop {
  display: none;
}

.ef-file__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ef-file__size {
  flex: none;
  font-size: 12px;
  color: var(--ef-muted);
}

.ef-file__clear {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--ef-line);
  background: #fff;
  color: var(--ef-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.ef-file__clear:hover {
  border-color: var(--ef-text);
}

/* 入力の誤り */
.ef-form .wpcf7-not-valid-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--ef-error);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.ef-form .wpcf7-not-valid-tip::before {
  content: '!';
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--ef-error);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.ef-control.wpcf7-not-valid,
.ef-options.wpcf7-not-valid .ef-option {
  border-color: var(--ef-error);
  background-color: var(--ef-error-soft);
}

.ef-file:has(.wpcf7-not-valid) .ef-file__drop {
  border-color: var(--ef-error);
  background-color: var(--ef-error-soft);
}

.ef-check--accept:has(.wpcf7-not-valid) input[type="checkbox"] {
  border-color: var(--ef-error);
}

/* 送信 */
.ef-submit-area {
  padding-top: 32px;
  border-top: 1px solid var(--ef-line);
}

.ef-accept {
  display: flex;
  justify-content: center;
}

.ef-accept .wpcf7-form-control-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ef-accept .wpcf7-not-valid-tip {
  justify-content: center;
}

.ef-check--accept {
  align-items: center;
  font-weight: 700;
}

.ef-check--accept a {
  color: var(--ef-text);
  text-decoration: underline;
  text-decoration-color: var(--ef-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* CF7 の styles.css が状態ごとに枠の色を変えるので、同じ詳細度で上書きする */
.wpcf7 form.ef-form .wpcf7-response-output {
  margin: 24px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--ef-error);
  border-radius: var(--ef-radius);
  background: var(--ef-error-soft);
  color: var(--ef-error);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

.wpcf7 form.ef-form .wpcf7-response-output[aria-hidden="true"],
.wpcf7 form.ef-form.sent .wpcf7-response-output {
  display: none;
}

.ef-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  height: 60px;
  margin: 24px auto 0;
  padding: 18px 20px;
  border: 0;
  border-radius: 0;
  background: var(--ef-text);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity .3s;
}

.ef-submit::after {
  content: '';
  width: 28px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='10' viewBox='0 0 28 10'%3E%3Cpath d='M0 5h26M22 1l4 4-4 4' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center;
}

.ef-submit:hover {
  opacity: .7;
}

.ef-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ef-accent);
}

.ef-submit:disabled {
  opacity: .7;
  cursor: wait;
}

.ef-submit:disabled::after {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  background: none;
  animation: ef-spin .8s linear infinite;
}

@keyframes ef-spin {
  to { transform: rotate(360deg); }
}

.ef-recaptcha,
.ef-help {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  color: var(--ef-muted);
}

.ef-help {
  margin-top: 8px;
  font-size: 13px;
}

.ef-recaptcha a,
.ef-help a {
  color: inherit;
  text-decoration: underline;
}

.ef-help a {
  color: var(--ef-text);
  font-weight: 700;
}

/* 規約どおり、バッジの代わりに送信ボタンの下に表記している */
.grecaptcha-badge {
  visibility: hidden;
}

body.cf7-loading,
body.cf7-loading * {
  cursor: wait !important;
}

@media (min-width: 768px) {
  main {
    padding: 56px 0 96px;
  }

  .ef-section + .ef-section {
    margin-top: 56px;
  }

  .ef-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ef-row--3 {
    grid-template-columns: repeat(3, minmax(0, 160px));
  }

  .ef-row--2:has(.ef-select) {
    grid-template-columns: repeat(2, minmax(0, 200px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .ef-form *,
  .ef-form *::before,
  .ef-form *::after {
    transition: none !important;
    animation-duration: 1.5s !important;
  }
}
