/* Help/FAQ Page Styles */

/* 戻るボタン */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.back-button:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.back-button:active {
  transform: scale(0.98);
}

.back-button i {
  font-size: 14px;
  color: #0087F7;
}

/* コンテナ */
.help-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* ページタイトル */
.page-title {
  font-size: 1.8em;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title i {
  color: #0087F7;
}

.page-description {
  color: #666;
  margin-bottom: 30px;
  font-size: 1em;
  line-height: 1.6;
}

/* 検索ボックス */
.search-container {
  margin-bottom: 24px;
}

.search-box-wrapper {
  position: relative;
  max-width: 500px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 16px;
}

.faq-search-input {
  width: 100%;
  padding: 14px 44px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  outline: none;
  transition: all 0.3s ease;
  background: #fff;
  box-sizing: border-box;
}

.faq-search-input:focus {
  border-color: #0087F7;
  box-shadow: 0 0 0 3px rgba(0, 135, 247, 0.1);
}

.faq-search-input::placeholder {
  color: #aaa;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #e0e0e0;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.search-clear-btn:hover {
  background: #ccc;
}

.search-clear-btn i {
  font-size: 12px;
  color: #666;
}

.search-results-count {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* カテゴリタブ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  background: #f5f5f5;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab:hover {
  background: #e8e8e8;
  color: #333;
}

.category-tab.active {
  background: #0087F7;
  color: #fff;
}

.category-tab i {
  font-size: 14px;
}

/* FAQセクション */
.faq-sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.faq-section {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.faq-section.hidden {
  display: none;
}

.section-title {
  font-size: 1.2em;
  color: #333;
  margin: 0 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #0087F7;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title i {
  color: #0087F7;
  font-size: 1.1em;
}

/* FAQ項目 */
.faq-item {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item:hover {
  border-color: #d0d0d0;
}

.faq-item.hidden {
  display: none;
}

.faq-item.highlight {
  border-color: #0087F7;
  box-shadow: 0 0 0 2px rgba(0, 135, 247, 0.1);
}

/* 質問ボタン */
.faq-question {
  width: 100%;
  padding: 16px 20px;
  background: #fafafa;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: all 0.2s ease;
}

.faq-question:hover {
  background: #f0f0f0;
}

.faq-item.open .faq-question {
  background: #f0f8ff;
}

.question-text {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  flex: 1;
  padding-right: 16px;
}

.question-icon {
  color: #999;
  font-size: 14px;
  transition: transform 0.3s ease;
}

.faq-item.open .question-icon {
  transform: rotate(180deg);
  color: #0087F7;
}

/* 回答 */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #fff;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
}

.faq-answer p {
  margin: 0 0 12px 0;
  color: #555;
  line-height: 1.7;
  font-size: 14px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
  margin: 0 0 12px 0;
  padding-left: 20px;
  color: #555;
}

.faq-answer ul:last-child,
.faq-answer ol:last-child {
  margin-bottom: 0;
}

.faq-answer li {
  margin-bottom: 8px;
  line-height: 1.6;
  font-size: 14px;
}

.faq-answer li:last-child {
  margin-bottom: 0;
}

.faq-answer strong {
  color: #333;
}

/* 検索結果なし */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-results i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-results p {
  margin: 0;
  font-size: 16px;
}

.no-results-hint {
  margin-top: 8px !important;
  font-size: 14px !important;
  color: #bbb;
}

/* ハイライト（検索マッチ） */
.search-highlight {
  background: #fff3cd;
  padding: 1px 3px;
  border-radius: 3px;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .help-container {
    padding: 16px;
  }

  .page-title {
    font-size: 1.5em;
  }

  .search-box-wrapper {
    max-width: 100%;
  }

  .category-tabs {
    gap: 6px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 12px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
  }

  .category-tab {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .category-tab span {
    display: none;
  }

  .category-tab i {
    font-size: 16px;
  }

  .faq-section {
    padding: 16px;
    border-radius: 12px;
  }

  .section-title {
    font-size: 1.1em;
  }

  .faq-question {
    padding: 14px 16px;
  }

  .question-text {
    font-size: 14px;
  }

  .faq-item.open .faq-answer {
    padding: 14px 16px;
  }

  .faq-answer p,
  .faq-answer li {
    font-size: 13px;
  }
}

/* アニメーション */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-section {
  animation: fadeIn 0.3s ease;
}

/* スクロールバー（横スクロール用） */
.category-tabs::-webkit-scrollbar {
  height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 2px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

