/* SG Contact Availability - 本番「その他ご相談」タブ準拠 */

#sg-contact-form {
  max-width: 680px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

/* フィールド共通 */
.sgca-field {
  margin-bottom: 20px;
}

/* ラベル */
.sgca-label {
  display: block;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
  font-size: 15px;
}

/* 必須マーク */
.sgca-must {
  display: inline-block;
  background-color: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: normal;
  border-radius: 5px;
  padding: 2px 6px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.4;
}

/* ヘルプテキスト */
.sgca-help {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* input / textarea / select 共通 */
#sg-contact-form input[type="text"],
#sg-contact-form input[type="email"],
#sg-contact-form input[type="tel"],
#sg-contact-form textarea,
#sg-contact-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

#sg-contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

#sg-contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

#sg-contact-form input:focus,
#sg-contact-form textarea:focus,
#sg-contact-form select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.15);
}

/* ラジオボタン・チェックボックス */
#sg-contact-form .wpcf7-radio,
#sg-contact-form .wpcf7-checkbox {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

#sg-contact-form .wpcf7-radio .wpcf7-list-item,
#sg-contact-form .wpcf7-checkbox .wpcf7-list-item {
  margin: 0;
}

#sg-contact-form .wpcf7-list-item-label {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

/* p タグの余白制御（CF7 が p で囲む） */
#sg-contact-form p {
  margin: 0 0 4px;
}

/* 日付 + 時刻 横並び */
.sgca-date-row {
  display: flex;
  gap: 12px;
}

.sgca-date-col {
  flex: 1;
}

.sgca-time-col {
  flex: 0 0 160px;
}

/* 送信ボタン */
.sgca-submit {
  text-align: center;
  margin-top: 30px;
}

#sg-contact-form input[type="submit"] {
  display: inline-block;
  background-color: #3498db;
  color: #fff;
  padding: 15px 60px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#sg-contact-form input[type="submit"]:hover {
  background-color: #2980b9;
}

/* CF7 バリデーションエラー */
#sg-contact-form .wpcf7-not-valid-tip {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 4px;
}

#sg-contact-form .wpcf7-not-valid {
  border-color: #e74c3c;
}

/* flatpickr 入力欄のカーソル */
#sg-contact-form input.js-sg-date {
  cursor: pointer;
  background-color: #fff;
}

/* レスポンシブ */
@media (max-width: 600px) {
  #sg-contact-form {
    padding: 15px;
  }

  .sgca-date-row {
    flex-direction: column;
    gap: 8px;
  }

  .sgca-time-col {
    flex: 1;
  }

  #sg-contact-form input[type="submit"] {
    width: 100%;
    padding: 15px 30px;
  }
}

/* flatpickr: 前後月のトレイル日付を非表示にする（誤解防止）
   ・calendarContainer に付与した .sgca-flatpickr で当プラグイン用途に限定
   ・visibility: hidden でグリッド高さは維持しつつ数字だけ消す */
.sgca-flatpickr .flatpickr-day.prevMonthDay,
.sgca-flatpickr .flatpickr-day.nextMonthDay {
  visibility: hidden;
}
