/* コンタクトフォーム関連のスタイル */

/* エラーメッセージ */
.error-message {
  color: #e74c3c;
  font-size: 12px;
  margin-top: 5px;
  margin-bottom: 10px;
  padding: 5px;
  background-color: #fdf2f2;
  border: 1px solid #e74c3c;
  border-radius: 3px;
}

/* エラー時の入力フィールド */
.contact-form input.error,
.contact-form textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

/* 確認画面オーバーレイ */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 確認ダイアログ */
.confirm-dialog {
  color: #333333;
  background: white;
  padding: 30px;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.confirm-dialog h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
  font-size: 20px;
}

.confirm-content {
  margin-bottom: 25px;
}

.confirm-content p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.confirm-content strong {
  color: #333;
  font-weight: bold;
}

/* 確認画面ボタン */
.confirm-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirm-buttons button {
  padding: 12px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn-cancel {
  background-color: #95a5a6;
  color: white;
}

.btn-cancel:hover {
  background-color: #7f8c8d;
}

.btn-send {
  background-color: #3498db;
  color: white;
}

.btn-send:hover {
  background-color: #2980b9;
}

/* 送信完了メッセージ - 新しいおしゃれなデザイン */
.success-container {
  position: relative;
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  margin: 20px;
  overflow: hidden;
  animation: successSlideIn 0.8s ease-out;
}

/* 成功アニメーション */
@keyframes successSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* チェックマークアニメーション */
.success-animation {
  margin-bottom: 30px;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-block;
  stroke-width: 3;
  stroke: #fff;
  stroke-miterlimit: 10;
  margin: 0 auto;
  box-shadow: inset 0px 0px 0px #27ae60;
  animation: checkmark-fill 0.4s ease-in-out 0.4s forwards, checkmark-scale 0.3s ease-in-out 0.9s both;
  position: relative;
}

.success-checkmark .check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 3px solid #27ae60;
  background: #27ae60;
}

.success-checkmark .check-icon::before {
  top: 3px;
  left: -2px;
  width: 30px;
  transform-origin: 100% 50%;
  border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
  top: 0;
  left: 30px;
  width: 60px;
  transform-origin: 0 50%;
  border-radius: 0 100px 100px 0;
  animation: checkmark-rotate 4.25s ease-in;
}

.success-checkmark .check-icon::before,
.success-checkmark .check-icon::after {
  content: '';
  height: 100px;
  position: absolute;
  background: #fff;
  transform: rotate(-45deg);
}

.success-checkmark .icon-line {
  height: 3px;
  background-color: #fff;
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.success-checkmark .icon-line.line-tip {
  top: 46px;
  left: 14px;
  width: 25px;
  transform: rotate(45deg);
  animation: checkmark-icon-tip 0.75s ease-in-out 1.2s forwards;
}

.success-checkmark .icon-line.line-long {
  top: 38px;
  right: 8px;
  width: 47px;
  transform: rotate(-45deg);
  animation: checkmark-icon-long 0.75s ease-in-out 1.5s forwards;
}

.success-checkmark .icon-circle {
  top: -3px;
  left: -3px;
  z-index: 10;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: absolute;
  box-sizing: content-box;
  border: 3px solid rgba(39, 174, 96, 0.5);
}

.success-checkmark .icon-fix {
  top: 8px;
  width: 5px;
  left: 26px;
  z-index: 1;
  height: 85px;
  position: absolute;
  transform: rotate(-45deg);
  background-color: #fff;
}

@keyframes checkmark-rotate {
  0% {
    transform: rotate(-45deg);
  }

  5% {
    transform: rotate(-45deg);
  }

  12% {
    transform: rotate(-405deg);
  }

  100% {
    transform: rotate(-405deg);
  }
}

@keyframes checkmark-icon-tip {
  0% {
    width: 0;
    left: 1px;
    top: 19px;
  }

  54% {
    width: 0;
    left: 1px;
    top: 19px;
  }

  70% {
    width: 50px;
    left: -8px;
    top: 37px;
  }

  84% {
    width: 17px;
    left: 21px;
    top: 48px;
  }

  100% {
    width: 25px;
    left: 14px;
    top: 46px;
  }
}

@keyframes checkmark-icon-long {
  0% {
    width: 0;
    right: 46px;
    top: 54px;
  }

  65% {
    width: 0;
    right: 46px;
    top: 54px;
  }

  84% {
    width: 55px;
    right: 0px;
    top: 35px;
  }

  100% {
    width: 47px;
    right: 8px;
    top: 38px;
  }
}

@keyframes checkmark-fill {
  100% {
    box-shadow: inset 0px 0px 0px 80px #27ae60;
  }
}

@keyframes checkmark-scale {

  0%,
  100% {
    transform: none;
  }

  50% {
    transform: scale3d(1.1, 1.1, 1);
  }
}

/* タイトルとテキスト */
.success-title {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  animation: titleFadeIn 0.8s ease-out 0.5s both;
}

.success-text {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  animation: textFadeIn 0.8s ease-out 0.7s both;
}

.success-subtext {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  animation: textFadeIn 0.8s ease-out 0.9s both;
}

@keyframes titleFadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(15px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 装飾パーティクル */
.success-decoration {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite;
}

.particle:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 3s;
}

.particle:nth-child(2) {
  top: 60%;
  left: 85%;
  animation-delay: 0.5s;
  animation-duration: 2.5s;
}

.particle:nth-child(3) {
  top: 30%;
  left: 70%;
  animation-delay: 1s;
  animation-duration: 3.5s;
}

.particle:nth-child(4) {
  top: 80%;
  left: 20%;
  animation-delay: 1.5s;
  animation-duration: 2s;
}

.particle:nth-child(5) {
  top: 10%;
  left: 50%;
  animation-delay: 2s;
  animation-duration: 4s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 1;
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 0.8;
  }
}

/* 旧スタイルは削除または非表示 */
.success-message i {
  display: none;
}

/* ローディング状態 */
.contact-form input[type="submit"]:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
  .confirm-dialog {
    padding: 20px;
    width: 95%;
  }

  .confirm-buttons {
    flex-direction: column;
  }

  .confirm-buttons button {
    width: 100%;
    margin-bottom: 10px;
  }

  /* 送信完了画面のレスポンシブ */
  .success-container {
    margin: 10px;
    padding: 40px 15px;
    border-radius: 15px;
  }

  .success-checkmark {
    width: 60px;
    height: 60px;
  }

  .success-checkmark .check-icon {
    width: 60px;
    height: 60px;
  }

  .success-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .success-text {
    font-size: 16px;
  }

  .success-subtext {
    font-size: 13px;
  }
}