/* Contact Form 7 モーダル確認画面 */

/* モーダルが開いている時にbodyをスクロール禁止 */
body.cf7-modal-open {
  overflow: hidden;
}

/* モーダル本体 */
.cf7-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
}

/* オーバーレイ */
.cf7-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* モーダルコンテンツ */
.cf7-modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -45%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* モーダルヘッダー */
.cf7-modal-header {
  background-color: var(--main, #1F5C2C);
  color: #fff;
  padding: 1.5em 2em;
  border-radius: 8px 8px 0 0;
  flex-shrink: 0;
}

.cf7-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

@media screen and (max-width: 767px) {
  .cf7-modal-header {
    padding: 1.2em 1.5em;
  }
  
  .cf7-modal-header h2 {
    font-size: 1.25rem;
  }
}

/* モーダルボディ */
.cf7-modal-body {
  padding: 2em;
  overflow-y: auto;
  flex: 1;
  /* スクロールバーを非表示 */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE, Edge */
}

.cf7-modal-body::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

@media screen and (max-width: 767px) {
  .cf7-modal-body {
    padding: 1.5em;
  }
}

.cf7-modal-description {
  margin-bottom: 1.5em;
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* セクション */
.cf7-modal-section {
  margin-bottom: 2em;
}

.cf7-modal-section:last-child {
  margin-bottom: 0;
}

.cf7-modal-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--main, #1F5C2C);
  margin: 0 0 0.8em 0;
}

@media screen and (max-width: 767px) {
  .cf7-modal-section-title {
    font-size: 1.1rem;
  }
}

/* 確認テーブル */
.cf7-modal-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.cf7-modal-table tr {
  border-bottom: 1px solid #e8e8e8;
}

.cf7-modal-table tr:last-child {
  border-bottom: none;
}

.cf7-modal-table th,
.cf7-modal-table td {
  padding: 1em 1.5em;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

@media screen and (max-width: 767px) {
  .cf7-modal-table th,
  .cf7-modal-table td {
    padding: 0.8em 1em;
    font-size: 0.9rem;
  }
}

.cf7-modal-table th {
  background-color: #fafafa;
  font-weight: 600;
  color: #333;
  width: 30%;
  vertical-align: top;
}

@media screen and (max-width: 767px) {
  .cf7-modal-table th {
    width: 35%;
  }
}

.cf7-modal-table td {
  background-color: #fff;
  color: #555;
  word-break: break-word;
}

/* 送信中表示 */
.cf7-modal-sending {
  text-align: center;
  padding: 3em 2em;
}

.cf7-sending-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e0e0e0;
  border-top-color: var(--main, #1F5C2C);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5em;
}

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

.cf7-sending-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #666;
  margin: 0;
}

/* モーダルフッター */
.cf7-modal-footer {
  padding: 1.5em 2em 2em;
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-shrink: 0;
}

@media screen and (max-width: 767px) {
  .cf7-modal-footer {
    padding: 1.2em 1.5em 1.5em;
    flex-direction: column;
    gap: 0.8em;
  }
}

/* モーダルボタン */
.cf7-modal-btn {
  padding: 0.9em 3em;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

@media screen and (max-width: 767px) {
  .cf7-modal-btn {
    width: 100%;
    padding: 1em 2em;
  }
}

.cf7-modal-back {
  background-color: #fff;
  color: #666;
  border: 2px solid #d0d0d0;
  text-align: center;
}

.cf7-modal-back:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

.cf7-modal-submit {
  background-color: var(--main, #1F5C2C);
  color: #fff;
  border: 2px solid var(--main, #1F5C2C);
}

.cf7-modal-submit:hover {
  background-color: #2a7a3d;
  border-color: #2a7a3d;
}

/* 送信ボタンの状態 */
.wpcf7-submit.disabled,
.wpcf7-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #d0d0d0 !important;
  border-color: #d0d0d0 !important;
  color: #999 !important;
}

.wpcf7-submit.disabled:hover,
.wpcf7-submit:disabled:hover {
  background-color: #d0d0d0 !important;
  border-color: #d0d0d0 !important;
}
