/* ==========================================
   entry.css - エントリーフォーム
   - フォーム要素のスタイル
========================================== */

/* ========== フォームセクション ========== */
.form-section {
  background: #003d80;
  padding: 56px 0 72px;
}

.form-card {
  background: #e7eef6;
  border-radius: 16px;
  padding: 26px 18px 22px;
}

.form-notice {
  margin-top: 14px;
  font-size: 13px;
  color: #111;
}

/* ========== フォーム ========== */
.entry-form {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.form-group {
  /* スペーシングは layout.css で管理 */
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
  display: inline-block;
}

.required {
  color: #0a7bff;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: var(--color-text);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

/* ========== セレクトボックス ========== */
.select-wrapper {
  position: relative;
}

.select-wrapper::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  border-right: 2px solid #6b7280;
  border-bottom: 2px solid #6b7280;
  pointer-events: none;
}

.form-select {
  appearance: none;
}

/* ========== ラジオボタン ========== */
.radio-group {
  display: grid;
  gap: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #111;
  cursor: pointer;
}

.radio-label input {
  display: none;
}

.radio-mark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #9ca3af;
  background: #fff;
  position: relative;
  flex-shrink: 0;
}

.radio-label input:checked + .radio-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #0a7bff;
  border-radius: 2px;
}

/* ========== 送信ボタン ========== */
.form-submit {
  margin-top: 10px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  background: linear-gradient(90deg, #4c22ff 0%, #0a7bff 50%, #00d6c6 100%);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.form-submit:active {
  transform: translateY(0);
}

/* ==========================================
   送信完了ダイアログ
========================================== */
.success-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.success-dialog-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.success-dialog-overlay.is-closing {
  opacity: 0;
  visibility: hidden;
}

.success-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s ease;
}

.success-dialog-overlay.is-open .success-dialog {
  transform: translateY(0) scale(1);
}

.success-dialog__icon {
  margin-bottom: 20px;
}

.success-dialog__title {
  font-size: 24px;
  font-weight: 900;
  color: #111;
  margin-bottom: 16px;
}

.success-dialog__message {
  font-size: 14px;
  color: #374151;
  line-height: 1.8;
  margin-bottom: 24px;
}

.success-dialog__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 48px;
  background: linear-gradient(90deg, #4c22ff 0%, #0a7bff 50%, #00d6c6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.success-dialog__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   エントリーボタンとオーバーレイ
========================================== */

/* ========== エントリーボタンエリア ========== */
.entry-buttons {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid #e5e7eb;
  margin-bottom: 64px;
}

.entry-buttons__title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 32px;
}

.entry-buttons__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ========== エントリーボタン ========== */
.entry-button {
  position: relative;
  height: 80px;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.entry-button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(37, 99, 235, 0.2) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.entry-button:hover::before {
  opacity: 1;
}

.entry-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.entry-button__area {
  font-size: 14px;
  font-weight: 700;
  color: #60a5fa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.entry-button__office {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}

/* ========== オーバーレイ ========== */
.entry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  /* 初期状態: 非表示 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.entry-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* スクロール禁止 */
body.entry-overlay-open {
  overflow: hidden;
}

/* ========== オーバーレイコンテナ ========== */
.entry-overlay__container {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 16px;
  overflow-y: auto;

  /* アニメーション */
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.entry-overlay.is-open .entry-overlay__container {
  transform: translateY(0);
}

/* ========== 閉じるボタン ========== */
.entry-overlay__close {
  position: sticky;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  margin-left: auto;
  margin-right: 16px;
  margin-bottom: -48px;
  transition: background 0.3s ease;
}

.entry-overlay__close:hover {
  background: #1f2937;
}

/* ========== オーバーレイコンテンツ ========== */
.entry-overlay__content {
  padding: 40px 24px;
}

.entry-overlay section {
  padding: 0;
}

.entry-overlay__section {
  margin-bottom: 48px;
}

.entry-overlay__section:last-child {
  margin-bottom: 0;
}

.entry-overlay__title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2563eb;
}

/* ========== 応募フォーム ========== */
.entry-form__field {
  margin-bottom: 24px;
}

.entry-form__label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1f2937;
}

.entry-form__input,
.entry-form__textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.entry-form__input:focus,
.entry-form__textarea:focus {
  outline: none;
  border-color: #2563eb;
}

.entry-form__textarea {
  resize: vertical;
  font-family: inherit;
}

.entry-form__submit {
  width: 100%;
  padding: 16px;
  background: #2563eb;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.entry-form__submit:hover {
  background: #1d4ed8;
}

/* ==========================================
   オーバーレイ内：募集要項（details無効化）
========================================== */

/* details を構造だけ使い、機能を完全に殺す */
.entry-overlay details {
  all: unset;
  display: block;
}

/* summary を見出しとして再定義 */
.entry-overlay summary {
  all: unset;
  display: block;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #1f2937;
}

/* デフォルト矢印完全削除（保険） */
.entry-overlay summary::-webkit-details-marker {
  display: none;
}

/* ==========================================
   プライバシーポリシーオーバーレイ
========================================== */
.privacy-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.privacy-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

body.privacy-overlay-open {
  overflow: hidden;
}

.privacy-overlay__container {
  position: relative;
  width: 100%;
  max-width: 700px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.privacy-overlay.is-open .privacy-overlay__container {
  transform: translateY(0);
}

.privacy-overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s ease;
}

.privacy-overlay__close:hover {
  background: #e5e7eb;
}

.privacy-overlay__close svg {
  width: 20px;
  height: 20px;
  color: #374151;
}

.privacy-overlay__content {
  padding: 32px 24px;
  overflow-y: auto;
  flex: 1;
}

.privacy-overlay__title {
  font-size: 24px;
  font-weight: 900;
  color: #111;
  margin-bottom: 24px;
  padding-right: 40px;
}

.privacy-overlay__body {
  font-size: 13px;
  line-height: 1.8;
  color: #374151;
}

.privacy-section {
  margin-bottom: 16px;
}

.privacy-section:last-child {
  margin-bottom: 0;
}

.privacy-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: #111;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
}

.privacy-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  margin: 10px 0 6px;
}

.privacy-section p {
  margin-bottom: 8px;
}

.privacy-section ul {
  margin: 0 0 8px 0;
  padding-left: 18px;
  list-style: disc;
}

.privacy-section li {
  margin-bottom: 4px;
}

.privacy-date {
  margin-top: 10px;
  padding: 10px;
  background: #f9fafb;
  border-radius: 6px;
  font-size: 11px;
  color: #6b7280;
}

.privacy-overlay__close-btn {
  display: block;
  width: calc(100% - 48px);
  margin: 0 24px 24px;
  padding: 14px;
  background: linear-gradient(90deg, #4c22ff 0%, #0a7bff 50%, #00d6c6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.privacy-overlay__close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========== レスポンシブ: PC (769px+) ========== */
@media (min-width: 769px) {
  .privacy-overlay__content {
    padding: 40px 32px;
  }

  .privacy-overlay__title {
    font-size: 28px;
  }

  .privacy-overlay__body {
    font-size: 14px;
  }

  .privacy-section h3 {
    font-size: 18px;
  }

  .privacy-overlay__close-btn {
    width: calc(100% - 64px);
    margin: 0 32px 32px;
  }

  .entry-buttons__title {
    font-size: 28px;
  }

  .entry-buttons__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .entry-button {
    height: 72px;
  }

  .entry-button__area {
    font-size: 16px;
  }

  .entry-button__office {
    font-size: 20px;
  }

  .entry-overlay__content {
    padding: 60px 48px;
  }

  .entry-overlay__title {
    font-size: 28px;
  }
}
