/**
 * FlatFAQ スタイルシート
 * シンプル・ミニマルデザイン
 */

/* コンテナ */
.flatfaq-container {
	max-width: 100%;
	margin: 0 auto 2rem;
}

/* フィルターエリア */
.flatfaq-filters {
	margin-bottom: 2rem;
	padding: 1rem;
	background: #f9f9f9;
	border-radius: 4px;
}

.flatfaq-search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
}

.flatfaq-search-wrapper {
	display: flex;
	gap: 0.5rem;
	flex: 1 1 300px;
}

.flatfaq-search-input {
	flex: 1;
	padding: 0.5rem 1rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
}

.flatfaq-search-input:focus {
	outline: none;
	border-color: #666;
}

.flatfaq-search-button {
	padding: 0.5rem 1.5rem;
	background: #333;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1rem;
	transition: background 0.3s;
}

.flatfaq-search-button:hover {
	background: #555;
}

.flatfaq-category-filter {
	flex: 0 1 200px;
}

.flatfaq-category-select {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 1rem;
	background: #fff;
}

.flatfaq-category-select:focus {
	outline: none;
	border-color: #666;
}

.flatfaq-clear-filters {
	padding: 0.5rem 1rem;
	color: #666;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.3s;
	white-space: nowrap;
}

.flatfaq-clear-filters:hover {
	background: #fff;
	border-color: #666;
	color: #333;
}

/* FAQ リスト */
.flatfaq-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

/* FAQ アイテム */
.flatfaq-item {
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.3s;
}

.flatfaq-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 質問部分 */
.flatfaq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
	cursor: pointer;
	user-select: none;
	transition: background 0.3s;
}

.flatfaq-question:hover {
	background: #f9f9f9;
}

.flatfaq-question-text {
	margin: 0;
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
	flex: 1;
}

/* トグルアイコン */
.flatfaq-toggle {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	position: relative;
	margin-left: 1rem;
}

.flatfaq-toggle::before,
.flatfaq-toggle::after {
	content: '';
	position: absolute;
	background: #666;
	transition: transform 0.3s;
}

.flatfaq-toggle::before {
	top: 50%;
	left: 0;
	width: 100%;
	height: 2px;
	transform: translateY(-50%);
}

.flatfaq-toggle::after {
	top: 0;
	left: 50%;
	width: 2px;
	height: 100%;
	transform: translateX(-50%);
}

.flatfaq-item.active .flatfaq-toggle::after {
	transform: translateX(-50%) rotate(90deg);
	opacity: 0;
}

/* 回答部分 */
.flatfaq-answer {
	overflow: hidden;
	transition: max-height 0.3s ease-out;
}

.flatfaq-answer-content {
	padding: 0 1.5rem 1.5rem;
	color: #555;
	line-height: 1.6;
}

.flatfaq-answer-content p:first-child {
	margin-top: 0;
}

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

/* 結果なし */
.flatfaq-no-results {
	padding: 2rem;
	text-align: center;
	color: #999;
	font-style: italic;
}

/* カテゴリごとのグループ表示 */
.flatfaq-grouped {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.flatfaq-category-section {
	border-top: 2px solid #e0e0e0;
	padding-top: 1.5rem;
	margin-bottom: 1em;
}

.flatfaq-category-section:first-child {
	border-top: none;
	padding-top: 0;
}

.flatfaq-category-title {
	margin: 0 0 1rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: #333;
}

.flatfaq-category-description {
	margin-bottom: 1.5rem;
	color: #666;
	line-height: 1.6;
}

.flatfaq-category-description p {
	margin: 0 0 0.5rem;
}

.flatfaq-category-description p:last-child {
	margin-bottom: 0;
}

.flatfaq-uncategorized .flatfaq-category-title {
	color: #999;
}

/* 検索フォームのみ表示 */
.flatfaq-search-only {
	margin-bottom: 2rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
	.flatfaq-filters {
		padding: 0.75rem;
	}

	.flatfaq-search-form {
		flex-direction: column;
		align-items: stretch;
	}

	.flatfaq-search-wrapper,
	.flatfaq-category-filter {
		flex: 1 1 auto;
	}

	.flatfaq-question {
		padding: 0.75rem 1rem;
	}

	.flatfaq-question-text {
		font-size: 1rem;
	}

	.flatfaq-answer-content {
		padding: 0 1rem 1rem;
	}

	.flatfaq-category-title {
		font-size: 1.3rem;
	}

	.flatfaq-grouped {
		gap: 2rem;
	}
}
