/* contact.css - お問い合わせフォーム専用スタイル */
/* Mobirise テーマ（#61b797, "M PLUS 1"）に合わせたデザイン */

/* メインコンテンツ */
.contact-main {
  padding-top: 100px;
  padding-bottom: 60px;
  min-height: 80vh;
}

/* ステップ表示制御 */
.contact-step {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.contact-step.active {
  display: block;
  opacity: 1;
}

/* プログレスバー */
.contact-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  gap: 8px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.progress-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #e0e0e0;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.progress-step.active .progress-number,
.progress-step.completed .progress-number {
  background-color: #61b797;
  color: #fff;
}

.progress-label {
  font-size: 0.75rem;
  color: #999;
  transition: color 0.3s ease;
}

.progress-step.active .progress-label,
.progress-step.completed .progress-label {
  color: #61b797;
  font-weight: 600;
}

.progress-line {
  width: 40px;
  height: 2px;
  background-color: #e0e0e0;
  margin-bottom: 20px;
  transition: background-color 0.3s ease;
}

.progress-line.active {
  background-color: #61b797;
}

/* Step 1: 目的選択カード */
.purpose-cards {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
  margin: 0 auto;
}

.purpose-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.1s ease;
  text-align: center;
}

.purpose-card:hover {
  border-color: #61b797;
  box-shadow: 0 4px 16px rgba(97, 183, 151, 0.2);
  transform: translateY(-2px);
}

.purpose-card:active {
  transform: translateY(0);
}

.purpose-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.purpose-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #232323;
  margin-bottom: 8px;
}

.purpose-desc {
  font-size: 0.9rem;
  color: #666;
}

/* Step 2: カレンダー */
.contact-calendar {
  max-width: 420px;
  margin: 0 auto 24px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-nav {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  color: #232323;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.calendar-nav:hover {
  background-color: #f5f5f5;
  border-color: #61b797;
}

.calendar-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.calendar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #232323;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.calendar-table th {
  text-align: center;
  padding: 8px 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #666;
}

.calendar-table th.cal-sun {
  color: #d33430;
}

.calendar-table th.cal-sat {
  color: #236686;
}

.calendar-table td {
  text-align: center;
  padding: 4px;
}

.cal-day {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
  color: #232323;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.cal-day:hover:not(:disabled) {
  background-color: rgba(97, 183, 151, 0.15);
}

.cal-day.today {
  font-weight: 700;
  border: 2px solid #61b797;
}

.cal-day.selected {
  background-color: #61b797;
  color: #fff;
  font-weight: 700;
}

.cal-day:disabled {
  color: #ccc;
  cursor: not-allowed;
  background: transparent;
}

.cal-day.weekend {
  color: #ccc;
}

/* Step 3: 時間帯 */
.time-slots-container {
  margin-bottom: 24px;
}

.time-group {
  margin-bottom: 16px;
}

.time-group-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: #61b797;
  margin-bottom: 8px;
  padding-left: 4px;
}

.time-group-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.time-slot-btn {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  color: #232323;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.time-slot-btn:hover {
  border-color: #61b797;
  background-color: rgba(97, 183, 151, 0.1);
}

.time-slot-btn.selected {
  border-color: #61b797;
  background-color: #61b797;
  color: #fff;
  font-weight: 700;
}

.time-slot-btn:disabled {
  color: #ccc;
  border-color: #eee;
  cursor: not-allowed;
  background: #f9f9f9;
}

.selected-time-box {
  text-align: center;
  padding: 16px;
  background: rgba(97, 183, 151, 0.08);
  border-radius: 8px;
  margin-bottom: 16px;
}

/* Step 4: 予約サマリー */
.booking-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  border-left: 4px solid #61b797;
}

.booking-summary-item {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.booking-summary-label {
  font-weight: 700;
  color: #61b797;
  min-width: 60px;
}

/* フォームエラー */
.form-control.is-invalid {
  border-color: #d33430;
}

.invalid-feedback {
  display: none;
  color: #d33430;
  font-size: 0.8rem;
  margin-top: 4px;
}

.form-control.is-invalid + .invalid-feedback {
  display: block;
}

.red-star {
  color: #d33430;
}

/* 完了画面 */
.complete-box {
  padding: 40px 20px;
}

.complete-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* LINE 誘導 */
.line-box {
  padding: 40px 20px;
}

.qr-image {
  max-width: 200px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.line-features {
  list-style: none;
  padding: 0;
  text-align: left;
  max-width: 300px;
  margin: 0 auto;
}

.line-features li {
  margin-bottom: 8px;
}

/* 戻るボタン */
.btn-back {
  background: none;
  border: none;
  color: #61b797;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.btn-back:hover {
  color: #4a9a7d;
  text-decoration: underline;
}

.step-nav {
  margin-top: 24px;
  text-align: center;
}

/* ローディング・エラー */
.contact-loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e0e0e0;
  border-top-color: #61b797;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* レスポンシブ */
@media (max-width: 768px) {
  .contact-main {
    padding-top: 80px;
    padding-bottom: 40px;
  }

  .contact-progress {
    gap: 4px;
  }

  .progress-number {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .progress-label {
    font-size: 0.65rem;
  }

  .progress-line {
    width: 24px;
  }

  .purpose-card {
    padding: 20px 16px;
  }

  .purpose-icon {
    font-size: 2rem;
  }

  .purpose-title {
    font-size: 1.1rem;
  }

  .contact-calendar {
    padding: 12px;
  }

  .cal-day {
    height: 36px;
    font-size: 0.8rem;
  }

  .time-slot-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}
