/**
 * Story FAQ Block Styles
 * トピックベースのFAQ表示（+ / - toggle）
 */

.story-faq {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px;
  background-color: #ffffff;
}

.story-faq__list {
  margin-bottom: 60px;
}

/* Topic (clickable title) */
.story-faq__topic {
  margin-bottom: 0;
}

.story-faq__topic-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #000;
  cursor: pointer;
  text-align: left;
  transition: opacity 0.2s ease;
}

.story-faq__topic-button:hover {
  opacity: 0.7;
}

.story-faq__topic-title {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  font-family: var(--wp--preset--font-family--ja-serif);
  line-height: 1.6;
  padding-right: 20px;
}

/* Toggle Icon (+ and -) */
.story-faq__toggle-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  font-size: 24px;
  font-weight: 300;
  color: #333;
  position: relative;
}

.story-faq__icon-minus {
  display: none;
  position: absolute;
}

.story-faq__icon-plus {
  display: block;
  position: absolute;
}

.story-faq__topic-button[aria-expanded="true"] .story-faq__icon-plus {
  display: none;
}

.story-faq__topic-button[aria-expanded="true"] .story-faq__icon-minus {
  display: block;
}

/* FAQ Content (Q&A area) */
.story-faq__content {
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  opacity: 0;
  padding: 0;
  background-color: #ffffff;
}

.story-faq__content:not([hidden]) {
  max-height: 3000px;
  opacity: 1;
  padding: 32px 0 48px 0;
}

/* Q&A Item */
.story-faq__qa-item {
  margin-bottom: 32px;
}

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

/* Question */
.story-faq__question {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
}

.story-faq__q-label {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  font-family: var(--wp--preset--font-family--en-serif);
  margin-right: 16px;
  line-height: 1.8;
}

.story-faq__question-text {
  flex: 1;
  font-size: 15px;
  color: #333;
  line-height: 1.8;
  font-family: var(--wp--preset--font-family--ja-serif);
}

/* Answer */
.story-faq__answer {
  display: flex;
  align-items: flex-start;
}

.story-faq__a-label {
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  font-family: var(--wp--preset--font-family--en-serif);
  margin-right: 16px;
  line-height: 1.8;
}

.story-faq__answer-text {
  flex: 1;
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  font-family: var(--wp--preset--font-family--ja-serif);
}

/* Remove hover background on questions */
.story-faq__question:hover {
  background-color: transparent;
}

/* Remove any p tag margins that WordPress might add */
.story-faq__answer-text p {
  margin: 0;
  display: inline;
}

/* Link to FAQ page */
.story-faq__link-wrapper {
  text-align: right;
  margin-top: 40px;
}

.story-faq__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-family: var(--wp--preset--font-family--ja-serif);
  transition: opacity 0.2s ease;
  letter-spacing: 0.05em;
}

.story-faq__link:hover {
  opacity: 0.7;
}

.story-faq__link-arrow {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.story-faq__link:hover .story-faq__link-arrow {
  transform: translateX(4px);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .story-faq {
    padding: 40px 20px;
  }

  .story-faq__topic-button {
    padding: 20px 0;
  }

  .story-faq__topic-title {
    font-size: 15px;
  }

  .story-faq__toggle-icon {
    font-size: 20px;
  }

  .story-faq__content:not([hidden]) {
    padding: 24px 0 20px 0;
  }

  .story-faq__qa-item {
    margin-bottom: 24px;
  }

  .story-faq__q-label,
  .story-faq__a-label {
    font-size: 15px;
    margin-right: 12px;
  }

  .story-faq__question-text,
  .story-faq__answer-text {
    font-size: 14px;
  }

  .story-faq__link {
    font-size: 13px;
  }
}
