/* ========================================
   Contact Page - お問い合わせページ専用CSS
   依存: critical.css, base.css
   8ptグリッドシステム準拠
   
   参考: plan-page.css のパターンに準拠
======================================== */

/* ========================================
   ヘッダーセクション（黒背景）
======================================== */
.contact-header-section {
  padding: 4rem 5%;
  background: var(--color-black);
  color: var(--color-white);
}

.contact-header-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-header {
  text-align: center;
}

.contact-header__label {
  font-family: var(--font-en);
  font-size: 0.75rem; /* 12px */
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem; /* 8px */
}

.contact-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem); /* 28px〜40px */
  font-weight: 900;
  color: var(--color-white);
  margin-bottom: 0.5rem; /* 8px */
  line-height: var(--lh-heading);
}

.contact-header__subtitle {
  font-size: 1rem; /* 16px */
  color: var(--color-white);
  margin: 0;
  line-height: var(--lh-body);
}

/* ========================================
   イントロセクション（白背景）
======================================== */
.contact-intro-section {
  padding: 4rem 5%;
  background: var(--color-white);
}

.contact-intro-section__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-intro {
  text-align: center;
}

.contact-intro__text {
  font-size: 1rem; /* 16px */
  line-height: var(--lh-body);
  color: var(--color-text);
  margin: 0;
}

/* PC用改行 */
.pc-only {
  display: none;
}

@media (min-width: 769px) {
  .pc-only {
    display: inline;
  }
}

/* ========================================
   フォームセクション（黒背景）
======================================== */
.contact-form-section {
  padding: 4rem 5%;
  background: var(--color-black);
}

.contact-form-section__inner {
  max-width: 720px;
  margin: 0 auto;
}

/* ========================================
   フォーム本体（CF7）
======================================== */
#pkg-cf7-wrapper {
  font-family: var(--font-ja), sans-serif;
  color: var(--color-white);
  font-size: 1rem; /* 16px */
  box-sizing: border-box;
}

/* ========================================
   フォームグループ
======================================== */
#pkg-cf7-wrapper .pkg-form-group {
  margin-bottom: 2rem; /* 32px */
  position: relative;
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper .pkg-form-group {
    margin-bottom: 2.5rem; /* 40px */
  }
}

/* ========================================
   ラベル
======================================== */
#pkg-cf7-wrapper label {
  display: block;
  font-size: 1.25rem; /* 20px */
  font-weight: 700;
  margin-bottom: 0.75rem; /* 12px */
  color: var(--color-white);
  letter-spacing: 0.02em;
  line-height: var(--lh-heading);
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper label {
    margin-bottom: 1rem; /* 16px */
  }
}

/* 必須マーク */
#pkg-cf7-wrapper .required-mark {
  color: #ff6b6b;
  margin-left: 0.5rem; /* 8px */
  font-size: 0.75rem; /* 12px */
  font-weight: 400;
}

/* ========================================
   ラジオボタン
======================================== */
#pkg-cf7-wrapper .wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* 16px */
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper .wpcf7-radio {
    flex-direction: row;
    gap: 2.5rem; /* 40px */
  }
}

#pkg-cf7-wrapper .wpcf7-list-item {
  display: flex;
  align-items: center;
  margin: 0;
}

#pkg-cf7-wrapper input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.25rem; /* 20px */
  height: 1.25rem; /* 20px */
  min-width: 1.25rem;
  min-height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  margin: 0;
  margin-right: 0.75rem; /* 12px */
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease;
  background: transparent;
  flex-shrink: 0;
}

#pkg-cf7-wrapper input[type="radio"]:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

#pkg-cf7-wrapper input[type="radio"]:checked {
  border-color: var(--color-white);
}

/* チェック時の内側の円 */
#pkg-cf7-wrapper input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.5rem; /* 8px */
  height: 0.5rem; /* 8px */
  border-radius: 50%;
  background: var(--color-white);
}

#pkg-cf7-wrapper .wpcf7-list-item-label {
  cursor: pointer;
  font-weight: 400; /* 500から変更 - フォント軽量化 */
  color: var(--color-white);
  font-size: 1rem; /* 16px */
  line-height: 1;
}

/* ========================================
   入力フィールド
======================================== */
#pkg-cf7-wrapper input[type="text"],
#pkg-cf7-wrapper input[type="email"],
#pkg-cf7-wrapper input[type="tel"],
#pkg-cf7-wrapper textarea {
  width: 100%;
  padding: 1rem 1.25rem; /* 16px 20px */
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  font-size: 1rem; /* 16px */
  font-family: var(--font-ja), sans-serif;
  color: var(--color-white);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  line-height: var(--lh-body);
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper input[type="text"],
  #pkg-cf7-wrapper input[type="email"],
  #pkg-cf7-wrapper input[type="tel"],
  #pkg-cf7-wrapper textarea {
    padding: 1.25rem 1.5rem; /* 20px 24px */
    font-size: 1.125rem; /* 18px */
  }
}

/* プレースホルダー */
#pkg-cf7-wrapper input::placeholder,
#pkg-cf7-wrapper textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 1rem; /* 16px */
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper input::placeholder,
  #pkg-cf7-wrapper textarea::placeholder {
    font-size: 1rem; /* 16px */
  }
}

/* ホバー時 */
#pkg-cf7-wrapper input[type="text"]:hover,
#pkg-cf7-wrapper input[type="email"]:hover,
#pkg-cf7-wrapper input[type="tel"]:hover,
#pkg-cf7-wrapper textarea:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

/* フォーカス時 */
#pkg-cf7-wrapper input[type="text"]:focus,
#pkg-cf7-wrapper input[type="email"]:focus,
#pkg-cf7-wrapper input[type="tel"]:focus,
#pkg-cf7-wrapper textarea:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

/* テキストエリア */
#pkg-cf7-wrapper textarea {
  min-height: 10rem; /* 160px */
  resize: vertical;
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper textarea {
    min-height: 12rem; /* 192px */
  }
}

/* ========================================
   送信ボタンコンテナ
======================================== */
#pkg-cf7-wrapper .pkg-submit-container {
  text-align: center;
  margin-top: 2.5rem; /* 40px */
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper .pkg-submit-container {
    margin-top: 3rem; /* 48px */
  }
}

/* ========================================
   送信ボタン
======================================== */
#pkg-cf7-wrapper input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 1.25rem 2rem !important; /* 20px 32px */
  background: transparent !important;
  color: var(--color-white) !important;
  font-family: var(--font-ja), sans-serif;
  font-size: 1rem !important; /* 16px */
  font-weight: 700 !important;
  border: 1px solid var(--color-white) !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

@media (min-width: 769px) {
  #pkg-cf7-wrapper input[type="submit"] {
    width: auto;
    padding: 1.25rem 5rem !important; /* 20px 80px */
    font-size: 1.125rem !important; /* 18px */
  }
}

/* ホバー時 - 背景反転 + 虹色グローアニメーション */
#pkg-cf7-wrapper input[type="submit"]:hover {
  background: var(--color-white) !important;
  color: var(--color-black) !important;
  animation: rainbow-glow 1.5s ease-in-out infinite;
}

@keyframes rainbow-glow {
  0%, 100% {
    box-shadow: 
      0 0 0 2px var(--color-white),
      0 0 0 4px #667eea,
      0 0 20px rgba(102, 126, 234, 0.5);
  }
  25% {
    box-shadow: 
      0 0 0 2px var(--color-white),
      0 0 0 4px #00f5ff,
      0 0 20px rgba(0, 245, 255, 0.5);
  }
  50% {
    box-shadow: 
      0 0 0 2px var(--color-white),
      0 0 0 4px #ff6b9d,
      0 0 20px rgba(255, 107, 157, 0.5);
  }
  75% {
    box-shadow: 
      0 0 0 2px var(--color-white),
      0 0 0 4px #ffd89b,
      0 0 20px rgba(255, 216, 155, 0.5);
  }
}

/* アクティブ（押下時） */
#pkg-cf7-wrapper input[type="submit"]:active {
  transform: scale(0.98);
}

/* ========================================
   バリデーションエラー
======================================== */
#pkg-cf7-wrapper .wpcf7-not-valid {
  border-color: #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.1) !important;
}

#pkg-cf7-wrapper .wpcf7-not-valid-tip {
  color: #ff6b6b;
  font-size: 0.75rem; /* 12px */
  margin-top: 0.5rem; /* 8px */
  display: block;
}

/* 送信完了・エラーメッセージ（pkg-cf7-wrapperの外にある） */
.contact-form-section .wpcf7-response-output {
  margin-top: 2rem !important; /* 32px */
  padding: 1.25rem !important; /* 20px */
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 0 !important;
  font-size: 1rem !important; /* 16px */
  text-align: center !important;
  background-color: transparent !important;
  color: var(--color-white) !important;
}

.contact-form-section .wpcf7 form.sent .wpcf7-response-output {
  border-color: #4caf50 !important;
  color: #4caf50 !important;
  background-color: rgba(76, 175, 80, 0.15) !important;
}

.contact-form-section .wpcf7 form.invalid .wpcf7-response-output,
.contact-form-section .wpcf7 form.failed .wpcf7-response-output {
  border-color: #ff6b6b !important;
  color: #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.15) !important;
}

/* ========================================
   送信中スピナー
======================================== */
#pkg-cf7-wrapper .wpcf7-spinner {
  display: inline-block;
  width: 1.5rem; /* 24px */
  height: 1.5rem; /* 24px */
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: contact-spin 0.8s linear infinite;
  margin-left: 1rem; /* 16px */
  vertical-align: middle;
}

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

/* ========================================
   フォーカス時のアクセシビリティ
======================================== */
#pkg-cf7-wrapper input:focus-visible,
#pkg-cf7-wrapper textarea:focus-visible,
#pkg-cf7-wrapper input[type="submit"]:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

/* ========================================
   レスポンシブ（スマホ）
======================================== */
@media (max-width: 768px) {
  .contact-header-section,
  .contact-intro-section,
  .contact-form-section {
    padding: 3rem 1rem; /* 48px 16px */
  }

  .contact-header__label {
    font-size: 0.75rem; /* 12px */
  }

  .contact-intro__text {
    text-align: left;
  }
}
