/* ============================================
   FC Brand Search v3.0 - スタイルシート（ダークテーマ）
   ============================================ */

/* ---- 検索フォーム全体（コンテナの装飾はWP側で設定） ---- */
.fc-search-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 24px;
  align-items: start;
}

/* ---- 各フィールド ---- */
.fc-search-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-search-field > label:first-child {
  font-size: 14px;
  font-weight: 700;
  color: #ececec;
}

/* ---- セレクト・テキスト入力 ---- */
.fc-search-field select,
.fc-search-field input[type="text"] {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* セレクトの下向き矢印 */
.fc-search-field 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='%23888' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* フリーワードの虫眼鏡アイコン */
#fc-freeword {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
}

.fc-search-field input[type="text"]::placeholder {
  color: #9a9a9a;
}

.fc-search-field select:focus,
.fc-search-field input[type="text"]:focus {
  outline: none;
  border-color: #ec7a31;
  box-shadow: 0 0 0 3px rgba(236, 122, 49, 0.15);
}

/* ---- エリア・こだわり（チェックボックス） ---- */
.fc-search-field-area,
.fc-search-field-keywords {
  grid-column: 1 / -1;
}

.fc-area-checkboxes,
.fc-keyword-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fc-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}

.fc-checkbox-label:hover {
  border-color: #ec7a31;
}

.fc-checkbox-label input[type="checkbox"] {
  position: static !important;
  display: inline-block !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  border: 1px solid #c4c4c4 !important;
  border-radius: 3px !important;
  background: #fff !important;
  cursor: pointer;
  vertical-align: middle;
  flex: 0 0 auto;
}

/* チェックON：オレンジ背景＋白いチェックマーク */
.fc-checkbox-label input[type="checkbox"]:checked {
  background-color: #ec7a31 !important;
  border-color: #ec7a31 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 11px 11px !important;
}

/* 子テーマ form.css のグローバルなチェックボックス/ラジオ装飾を
   このフォーム内に限り打ち消す（赤枠の擬似要素などを無効化） */
.fc-checkbox-label input[type="checkbox"] + span,
.fc-checkbox-label input[type="radio"] + span {
  position: static;
  padding-left: 0;
  margin-left: 0 !important;
}

.fc-checkbox-label input[type="checkbox"] + span::before,
.fc-checkbox-label input[type="checkbox"] + span::after,
.fc-checkbox-label input[type="radio"] + span::before,
.fc-checkbox-label input[type="radio"] + span::after {
  content: none !important;
  display: none !important;
}

/* 選択中のカード（オレンジ） */
.fc-checkbox-label:has(input:checked) {
  background: #fdf1e9;
  border-color: #ec7a31;
  color: #d96a23;
  font-weight: 700;
}

/* ---- 検索ボタン ---- */
.fc-search-submit {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 14px;
}

.fc-search-submit button {
  display: inline-block;
  padding: 15px 56px;
  background: #ec7a31;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}

.fc-search-submit button:hover {
  background: #d96a23;
}

.fc-search-submit button:active {
  transform: translateY(1px);
}

/* ---- 注釈テキスト ---- */
.fc-search-note {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  color: #9a948e;
}

/* ---- レスポンシブ ---- */
@media (max-width: 768px) {
  .fc-search-form {
    grid-template-columns: 1fr;
  }

  .fc-search-field-area,
  .fc-search-field-keywords,
  .fc-search-submit,
  .fc-search-note {
    grid-column: auto;
  }

  .fc-search-submit button {
    width: 100%;
    padding: 15px 20px;
  }
}
