/**
 * 新卒採用エントリーフォーム (27th_form.html) 専用スタイル
 * 既存 form-section / reservation-form を踏襲しつつ拡張
 */

/* ========== ステップフォーム：進捗表示 ========== */
.form-step-progress {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: rgba(230, 0, 18, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(230, 0, 18, 0.15);
}
.form-step-progress__text {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0D0001;
  margin: 0 0 12px 0;
}
.form-step-progress__bar {
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
}
.form-step-progress__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #E60012, rgba(230, 0, 18, 0.85));
  border-radius: 4px;
  transition: width 0.35s ease;
}
.form-step-progress__labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 1.3rem;
  color: #666;
}
.form-step-progress__label {
  margin: 0;
}
.form-step-progress__label.is-active {
  color: #E60012;
  font-weight: 700;
}
.form-step-progress__draft-note {
  font-size: 1.2rem;
  color: #666;
  margin: 12px 0 0 0;
  line-height: 1.5;
}
@media screen and (max-width: 599px) {
  .form-step-progress {
    margin-bottom: 24px;
    padding: 16px;
  }
  .form-step-progress__text {
    font-size: 1.4rem;
  }
  .form-step-progress__labels {
    font-size: 1.2rem;
  }
  .form-step-progress__draft-note {
    font-size: 1.1rem;
  }
}

/* ========== 下書き復元バナー ========== */
.form-draft-banner {
  margin-bottom: 24px;
  padding: 20px 24px;
  background: #fff8e6;
  border: 1px solid #e6d9b8;
  border-radius: 12px;
}
.form-draft-banner[hidden] {
  display: none !important;
}
.form-draft-banner__text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0D0001;
  margin: 0 0 16px 0;
}
.form-draft-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.form-draft-banner__btn {
  padding: 12px 24px;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}
.form-draft-banner__btn--restore {
  background: #E60012;
  color: #fff;
}
.form-draft-banner__btn--restore:hover {
  background: #c70010;
  transform: translateY(-1px);
}
.form-draft-banner__btn--discard {
  background: #fff;
  color: #666;
  border: 2px solid #ccc;
}
.form-draft-banner__btn--discard:hover {
  border-color: #999;
  color: #0D0001;
}
.form-draft-photo-note {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 1.3rem;
  color: #c00;
  background: rgba(230, 0, 18, 0.06);
  border-radius: 8px;
}
.form-draft-photo-note[hidden] {
  display: none !important;
}
@media screen and (max-width: 599px) {
  .form-draft-banner__actions {
    flex-direction: column;
  }
  .form-draft-banner__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== ステップ表示切り替え ========== */
.reservation-form--steps .form-step {
  display: none;
}
.reservation-form--steps .form-step.is-active {
  display: block;
  animation: formStepFadeIn 0.3s ease;
}
@keyframes formStepFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== ステップ内ナビゲーション（次へ・戻る） ========== */
.form-step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #f0f0f0;
}
.form-step-nav__back {
  padding: 14px 28px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #0D0001;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.form-step-nav__back:hover {
  border-color: #E60012;
  color: #E60012;
  background: rgba(230, 0, 18, 0.04);
}
.form-step-nav__next {
  padding: 14px 32px;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #E60012 0%, rgba(230, 0, 18, 0.9) 100%);
  border: none;
  border-radius: 28px;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-left: auto;
}
.form-step-nav__next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 0, 18, 0.35);
}
.form-step-nav--last .form-submit__button {
  margin-left: auto;
}
@media screen and (max-width: 599px) {
  .form-step-nav {
    margin-top: 32px;
    padding-top: 24px;
    flex-wrap: wrap;
  }
  .form-step-nav__back,
  .form-step-nav__next {
    padding: 12px 24px;
    font-size: 1.5rem;
  }
  .form-step-nav--last {
    flex-direction: column-reverse;
  }
  .form-step-nav--last .form-submit__button {
    width: 100%;
    margin-left: 0;
  }
}

/* ========== ファイル入力 ========== */
.form-input--file {
  padding: 12px 16px;
  font-size: 1.4rem;
  cursor: pointer;
}
.form-input--file::-webkit-file-upload-button {
  padding: 8px 16px;
  margin-right: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  background: #E60012;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
@media screen and (max-width: 599px) {
  .form-input--file {
    font-size: 1.2rem;
    padding: 10px 12px;
  }
  .form-input--file::-webkit-file-upload-button {
    padding: 6px 12px;
    margin-right: 8px;
    font-size: 1.2rem;
  }
}

/* ========== 条件付き詳細エリア（スライド表示） ========== */
.form-group--detail {
  margin-top: 0;
  margin-bottom: 24px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease-out, opacity 0.3s ease, margin 0.3s ease;
}
.form-group--detail.is-visible {
  max-height: 280px;
  opacity: 1;
  margin-top: 16px;
  margin-bottom: 32px;
  transition: max-height 0.4s ease-in, opacity 0.3s ease, margin 0.3s ease;
}
@media screen and (max-width: 599px) {
  .form-group--detail.is-visible {
    max-height: 260px;
    margin-bottom: 28px;
  }
}

/* ========== Pill型（タグ型）チェックボックス ========== */
.form-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.form-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.form-pill input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-pill span {
  display: inline-block;
  padding: 10px 18px;
  font-size: 1.4rem;
  font-weight: 500;
  color: #0D0001;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 999px;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.form-pill:hover span {
  background: #eee;
  border-color: #ccc;
}
.form-pill input:checked + span {
  color: #fff;
  background: #E60012;
  border-color: #E60012;
}
.form-pill.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.form-pill.is-disabled span {
  background: #f0f0f0;
  border-color: #e5e5e5;
}
.form-pill.is-disabled:hover span {
  background: #f0f0f0;
  border-color: #e5e5e5;
}
@media screen and (max-width: 599px) {
  .form-pill-group {
    gap: 8px 10px;
  }
  .form-pill span {
    padding: 10px 14px;
    font-size: 1.3rem;
  }
}

/* ========== ラジオボタン・ボタン風（チーム役割） ========== */
.form-radio-group--button {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
}
.form-radio--button {
  display: inline-flex;
  margin: 0;
  padding: 0;
}
.form-radio--button input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.form-radio--button span {
  display: inline-block;
  padding: 12px 20px;
  font-size: 1.5rem;
  font-weight: 600;
  color: #0D0001;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.form-radio--button:hover span {
  border-color: #E60012;
  background: rgba(230, 0, 18, 0.04);
}
.form-radio--button input:checked + span {
  color: #fff;
  background: #E60012;
  border-color: #E60012;
}
@media screen and (max-width: 599px) {
  .form-radio-group--button {
    gap: 8px 10px;
  }
  .form-radio--button span {
    padding: 10px 14px;
    font-size: 1.3rem;
  }
}

/* ========== 文字数カウンター付きテキストエリア ========== */
.form-textarea-wrap {
  position: relative;
}
.form-textarea-wrap .form-textarea {
  padding-bottom: 36px;
}
.form-char-counter {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 1.2rem;
  color: #666;
}
.form-textarea.is-max + .form-char-counter {
  color: #E60012;
  font-weight: 700;
}
@media screen and (max-width: 599px) {
  .form-char-counter {
    font-size: 1.1rem;
    right: 10px;
    bottom: 8px;
  }
}

/* ========== ラベル補足の余白 ========== */
.form-label--inline {
  margin-top: 12px;
  display: block;
}
.form-label__sub--mt {
  margin-top: 12px;
}

/* ========== チームで取り組んだこと：役割と記述の間隔 ========== */
.form-group--team-experience {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f0f0f0;
}
@media screen and (max-width: 599px) {
  .form-group--team-experience {
    margin-top: 24px;
    padding-top: 20px;
  }
}

/* ========== PCスキル内のサブ項目 ========== */
.form-group--sub {
  margin-top: 20px;
  margin-bottom: 0;
}
.form-group--sub + .form-group--sub {
  margin-top: 24px;
}
