/*
 * Contact Form 7 - Minimal Style
 * Twenty Twenty-Five 子テーマ用
 * ================================
 */

/* ── フォーム全体のラッパー ── */
.wpcf7 {
  max-width: 640px;
  margin: 0 auto;
  font-family: inherit;
  padding: 15px;
}

/* ── label ブロック ── */
.wpcf7 form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: #444;
}

/* 必須マーク */
.wpcf7 form label small.text-danger,
.wpcf7 form p small.text-danger {
  font-size: 0.7rem;
  color: #c0392b;
  margin-left: 4px;
  font-weight: normal;
}

/* ── wpcf7-form-control-wrap は label の中で block に ── */
.wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

/* ── input・textarea 共通 ── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #9d9d9d;
  border-radius: 6px;
  font-size: 1rem;
  color: inherit;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

/* フォーカス */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

/* プレースホルダー */
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder {
  color: #bbb;
  font-size: 0.9rem;
}

/* テキストエリア */
.wpcf7 textarea {
  resize: vertical;
  min-height: 160px;
  line-height: 1.7;
}

/* ── 確認チェックボックス（p タグで囲まれているブロック） ── */
.wpcf7 form p {
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
}

.wpcf7 form p .wpcf7-list-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}

.wpcf7 form p .wpcf7-list-item label {
  /* label の flex リセット（p > .wpcf7-list-item 内は横並び） */
  display: inline;
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #222;
  cursor: pointer;
}

.wpcf7 input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #111;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── 送信ボタン ── */
.wpcf7 form p.center {
  text-align: center;
  margin-top: 8px;
}

.wpcf7 input[type="submit"],
.wpcf7 input.btn-primary {
  display: inline-block;
  padding: 14px 56px;
  background: #111;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  border: 2px solid #111;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input.btn-primary:hover {
  background: #333;
  border-color: #333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.wpcf7 input[type="submit"]:active,
.wpcf7 input.btn-primary:active {
  background: #000;
  box-shadow: none;
  transform: translateY(0);
}

.wpcf7 input[type="submit"]:focus-visible,
.wpcf7 input.btn-primary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.25);
}

/* btn-block（横幅いっぱい）が指定されている場合 */
.wpcf7 input.btn-block {
  display: block;
  width: 100%;
}

/* ── バリデーションエラー ── */
.wpcf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 5px;
  font-size: 0.75rem;
  color: #c0392b;
}

.wpcf7 input.wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* ── 送信後メッセージ ── */
.wpcf7 .wpcf7-response-output {
  margin-top: 24px;
  padding: 14px 18px;
  font-size: 0.85rem;
  border: 1px solid transparent;
  border-radius: 6px;
}

.wpcf7 .wpcf7-mail-sent-ok {
  border-color: #2ecc71;
  color: #1a7a46;
  background: #f0fdf4;
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-aborted {
  border-color: #e74c3c;
  color: #922b21;
  background: #fef9f9;
}

.wpcf7 .wpcf7-spam-blocked {
  border-color: #f39c12;
  color: #7d5a0a;
  background: #fffbf0;
}

/* ── スピナー ── */
.wpcf7 .wpcf7-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2px solid #ddd;
  border-top-color: #111;
  border-radius: 50%;
  animation: cf7-spin 0.7s linear infinite;
  vertical-align: middle;
}

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

/* ── レスポンシブ ── */
@media (max-width: 600px) {
  .wpcf7 input[type="submit"],
  .wpcf7 input.btn-primary {
    width: 100%;
    padding: 14px 24px;
  }
}
