/* ============================================================
   CF7 確認画面モーダル
   子テーマの style.css に追記するか、別CSSファイルとして読み込む
   ============================================================ */

/* スクロールロック */
body.cf7-modal-open {
  overflow: hidden;
}

/* モーダル全体（初期は非表示） */
#cf7-confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#cf7-confirm-modal.is-visible {
  display: flex;
}

/* オーバーレイ */
#cf7-confirm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

/* モーダル本体 */
#cf7-confirm-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  width: min(90%, 560px);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

#cf7-modal-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 0 0 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #eee;
  outline: none; /* フォーカス時のアウトライン非表示 */
}

.cf7-confirm-lead {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 1.25rem;
}

/* 確認テーブル */
#cf7-confirm-table {
  margin: 0 0 1.5rem;
}

.cf7-confirm-row {
  display: grid;
  grid-template-columns: 10em 1fr;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
}

.cf7-confirm-row:first-child {
  border-top: 1px solid #f0f0f0;
}

.cf7-confirm-row dt {
  font-weight: bold;
  color: #444;
}

.cf7-confirm-row dd {
  margin: 0;
  word-break: break-all;
  color: #222;
}

/* ボタンエリア */
.cf7-confirm-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cf7-confirm-buttons button {
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}

.cf7-confirm-buttons button:hover {
  opacity: 0.8;
}

/* 戻るボタン */
#cf7-back-btn {
  background: #f0f0f0;
  color: #444;
}

/* 送信ボタン */
#cf7-send-btn {
  background: #333;
  color: #fff;
}

/* スマホ対応 */
@media (max-width: 480px) {
  #cf7-confirm-box {
    padding: 1.5rem 1rem;
  }

  .cf7-confirm-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .cf7-confirm-buttons button {
    width: 100%;
  }
}
