/* ================================
   Contact Page Modern Design
   お問い合わせページのモダンなデザイン
================================ */

/* お問い合わせヘッダー */
.contact-head {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 24px 32px;
  background: #05060a;
  color: #fff;
  border-radius: 16px;
  text-align: center;
  font-size: 16px;
  line-height: 1.8;
  box-shadow: 0 4px 20px rgba(255, 32, 79, 0.15);
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.contact-head::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250vmax;
  height: 250vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  background:
    radial-gradient(80vmax 80vmax at 10% 10%, rgba(255, 32, 79, 0.45), transparent 60%),
    radial-gradient(70vmax 70vmax at 90% 90%, rgba(0, 64, 255, 0.45), transparent 65%),
    linear-gradient(135deg, #ff204f, #0040ff);
  background-repeat: no-repeat;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
  animation: spinCCW 10s linear infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
}

@keyframes spinCCW {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-head::before {
    animation: none;
  }
}

/* フォームコンテナ */
.form-input {
  max-width: 800px;
  margin: 0 auto;
}

/* 白いボックス（inquiry-input）の横幅を調整 */
.document-request-input {
  max-width: 800px;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* フォーム本体 */
.document-request-input dl > div {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid #f0f0f0;
}

.document-request-input dl > div:last-of-type {
  border-bottom: none;
}

/* ラベル（dt） */
.document-request-input dt {
  font-weight: 700;
  font-size: 15px;
  color: #1f2937;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

/* 必須マーク */
.document-request-input dt span {
  display: inline-block;
  padding: 4px 10px;
  background: #05060a;
  color: #fff;
  font-size: 11px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 0;
  flex-shrink: 0;
}

.document-request-input dt span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250vmax;
  height: 250vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  background:
    radial-gradient(80vmax 80vmax at 10% 10%, rgba(255, 32, 79, 0.45), transparent 60%),
    radial-gradient(70vmax 70vmax at 90% 90%, rgba(0, 64, 255, 0.45), transparent 65%),
    linear-gradient(135deg, #ff204f, #0040ff);
  background-repeat: no-repeat;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
  animation: spinCCW 10s linear infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
}

/* 入力フィールド共通 */
.document-request-input dd {
  position: relative;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.document-request-input input[type="text"],
.document-request-input textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e3e4ea;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  box-sizing: border-box;
}

.document-request-input input[type="text"]:focus,
.document-request-input textarea:focus {
  border: 2px solid transparent;
  background-image:
    linear-gradient(white, white),
    linear-gradient(135deg, #0088ff 0%, #11c0ff 30%, #ff6fb3 70%, #8de3b9 100%);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 4px 16px rgba(0, 136, 255, 0.2), 0 2px 8px rgba(255, 111, 179, 0.15);
  outline: none;
}

.document-request-input textarea {
  min-height: 150px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.6;
}

/* ラジオボタン・チェックボックス */
.form-privacy_click {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.form-privacy_click input[type="radio"],
.form-privacy_click input[type="checkbox"] {
  display: none;
}

.form-privacy_click label {
  display: inline-flex !important;
  align-items: center;
  padding: 12px 24px;
  padding-left: 44px;
  border: 2px solid #e5e7eb;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  background: #fff;
  user-select: none;
  position: relative;
  min-width: 220px !important;
  width: auto !important;
  justify-content: flex-start;
}

.form-privacy_click label::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s ease;
}

.form-privacy_click_check label::before {
  border-radius: 4px;
}

.form-privacy_click label:hover {
  border: 2px solid transparent;
  background-image:
    linear-gradient(white, white),
    linear-gradient(135deg, #0088ff 0%, #11c0ff 30%, #ff6fb3 70%, #8de3b9 100%);
  background-origin: padding-box, border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 4px 16px rgba(0, 136, 255, 0.2), 0 2px 8px rgba(255, 111, 179, 0.15);
}

.form-privacy_click label:hover::before {
  border-color: #0088ff;
}

/* ラジオボタンのチェック時 - ラベル背景（回転グラデーション） */
.form-privacy_click input[type="radio"]:checked + label {
  background: #05060a;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 32, 79, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.form-privacy_click input[type="radio"]:checked + label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250vmax;
  height: 250vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  background:
    radial-gradient(80vmax 80vmax at 10% 10%, rgba(255, 32, 79, 0.45), transparent 60%),
    radial-gradient(70vmax 70vmax at 90% 90%, rgba(0, 64, 255, 0.45), transparent 65%),
    linear-gradient(135deg, #ff204f, #0040ff);
  background-repeat: no-repeat;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
  animation: spinCCW 10s linear infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
  display: block !important;
}

/* チェックボックスのチェック時 - ラベル背景（回転グラデーション） */
.form-privacy_click_check input[type="checkbox"]:checked + label {
  background: #05060a;
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 32, 79, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.form-privacy_click_check input[type="checkbox"]:checked + label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250vmax;
  height: 250vmax;
  transform: translate(-50%, -50%) rotate(0deg) !important;
  transform-origin: 50% 50%;
  background:
    radial-gradient(80vmax 80vmax at 10% 10%, rgba(255, 32, 79, 0.45), transparent 60%),
    radial-gradient(70vmax 70vmax at 90% 90%, rgba(0, 64, 255, 0.45), transparent 65%),
    linear-gradient(135deg, #ff204f, #0040ff);
  background-repeat: no-repeat;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
  animation: spinCCW 10s linear infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
  display: block !important;
  border: none !important;
  width: 250vmax !important;
  height: 250vmax !important;
  border-radius: 0 !important;
}

/* ラジオボタンのチェック時 - アイコン（::beforeを使用、z-indexで前面に） */
.form-privacy_click input[type="radio"]:checked + label::before {
  border-color: #fff !important;
  background: #fff !important;
  box-shadow: inset 0 0 0 5px #ff204f !important;
  z-index: 1 !important;
}

/* チェックボックスのチェック時 - アイコン（白い四角の中に赤い✓） */
.document-request-input .form-privacy_click_check input[type="checkbox"]:checked + label::before {
  border: 2px solid #fff !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgb(255,32,79)" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpolyline points="20 6 9 17 4 12"/%3E%3C/svg%3E') !important;
  background-position: center center !important;
  background-size: 14px 14px !important;
  background-repeat: no-repeat !important;
  box-shadow: none !important;
  z-index: 1 !important;
}

/* style.cssの白い✓（::after）を無効化（チェックしていない時のみ） */
.form-privacy_click input:not(:checked) + label::after,
.form-privacy_click_check input:not(:checked) + label::after {
  display: none !important;
}

/* エラーメッセージ */
.error {
  display: block;
  color: #ef4444;
  font-size: 13px;
  margin-top: 8px;
  font-weight: 500;
}

/* 個人情報保護方針 */
.form-privacy {
  margin-top: 48px;
  padding: 32px;
  background: #f9fafb;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

.form-privacy > p {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

.form-privacy_box {
  max-height: 300px;
  overflow-y: auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.form-privacy_box p {
  font-size: 13px;
  line-height: 1.8;
  color: #4b5563;
}

.form-privacy_check {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-privacy_check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #ff204f;
}

.form-privacy_check label {
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  font-size: 15px;
}

.privacy-checkbox-field {
  border: 2px solid #ef4444;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef2f2;
}

/* 送信ボタン */
.form-button {
  margin-top: 40px;
  text-align: center;
  width: 100%;
  display: flex;
  justify-content: center;
}

.form-button input[type="submit"] {
  padding: 18px 48px;
  background: #05060a;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: none;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  text-align: center;
  line-height: 1.5;
  text-indent: 0;
  display: inline-block;
  width: auto;
  margin: 0 auto;
}

.form-button input[type="submit"]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 250vmax;
  height: 250vmax;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  background:
    radial-gradient(80vmax 80vmax at 10% 10%, rgba(255, 32, 79, 0.45), transparent 60%),
    radial-gradient(70vmax 70vmax at 90% 90%, rgba(0, 64, 255, 0.45), transparent 65%),
    linear-gradient(135deg, #ff204f, #0040ff);
  background-repeat: no-repeat;
  filter: saturate(1.1) contrast(1.05) brightness(1.05);
  animation: spinCCW 10s linear infinite;
  will-change: transform;
  z-index: -1;
  pointer-events: none;
  border-radius: 50px;
}

.form-button input[type="submit"]:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: none;
}

.form-button input[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
  .contact-head {
    padding: 20px 24px;
    font-size: 14px;
    margin-bottom: 32px;
  }

  .form-input {
    padding: 32px 24px;
  }

  .document-request-input dl > div {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .document-request-input dt {
    font-size: 14px;
  }

  .document-request-input input[type="text"],
  .document-request-input textarea {
    padding: 12px 14px;
    font-size: 14px;
  }

  .form-privacy_click {
    gap: 8px;
  }

  .form-privacy_click label {
    padding: 8px 14px;
    font-size: 13px;
  }

  .form-privacy {
    padding: 24px 20px;
  }

  .form-privacy > p {
    font-size: 16px;
  }

  .form-button input[type="submit"] {
    padding: 16px 36px;
    font-size: 15px;
    width: 100%;
  }
}
