/* ==========================================================================
   FAQ styles (site-faq plugin templates)
   - 既存テーマ(The7)のCSS設計が読み取れないため素朴なクラス命名で記述。
     既存規約(BEM/FLOCSS等)が判明したらそちらに寄せる。
   ========================================================================== */

.faq-archive,
.faq-single {
	max-width: 880px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}

/* Headers */
.faq-archive__header,
.faq-article__header {
	margin-bottom: 24px;
}

.faq-archive__title,
.faq-article__title {
	font-size: 1.75rem;
	line-height: 1.4;
	margin: 0;
}

.faq-archive__back {
	font-size: 0.9rem;
	margin: 0 0 8px;
}

.faq-archive__description {
	margin-top: 12px;
	color: #555;
}

/* Categories nav */
.faq-categories {
	margin-bottom: 24px;
}

.faq-categories__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.faq-categories {
	& .faq-categories__list {
		margin-left: 0;
	}
}

.faq-categories__item {
	list-style: none;
}

.faq-categories__item a {
	display: inline-block;
	padding: 3px 10px;
	border: 1px solid #d0d0d0;
	border-radius: 999px;
	font-size: 0.875rem;
	text-decoration: none;
	color: #333;
	background: #fafafa;
	font-weight: 700;
}

.faq-categories__item a:hover,
.faq-categories__item a:focus {
	background: #f0f0f0;
	border-color: #b0b0b0;
}

/* Breadcrumbs */
.faq-breadcrumbs {
	font-size: 0.85rem;
	margin-bottom: 16px;
	color: #666;
}

.faq-breadcrumbs a {
	color: #0066cc;
	text-decoration: none;
}

.faq-breadcrumbs a:hover {
	text-decoration: underline;
}

.faq-breadcrumbs__sep {
	margin: 0 6px;
	color: #999;
}

.faq-breadcrumbs__current {
	color: #333;
}

/* Q/A labels */
.faq-q-label,
.faq-a-label {
	display: inline-block;
	font-weight: 700;
	font-family: Georgia, "Times New Roman", serif;
	color: #c0392b;
	margin-right: 8px;
}

.faq-a-label {
	color: #2980b9;
}

/* List (archive / taxonomy) */
.faq-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.faq-item {
	border-bottom: 1px solid #e5e5e5;
	list-style: none;
}

.faq-item:first-child {
	border-top: 1px solid #e5e5e5;
}

.faq-item__details {
	padding: 0;
}

.faq-item__summary {
	cursor: pointer;
	padding: 16px 8px;
	font-size: 1rem;
	line-height: 1.6;
	font-weight: 600;
	display: flex;
	align-items: baseline;
	gap: 4px;
	color: #1f365c;
}

.faq-item__summary:hover {
	background: #f7f7f7;
}

.faq-item__details[open]>.faq-item__summary {
	background: #f0f7ff;
}

.faq-item__question {
	flex: 1;
	color: inherit;
	text-decoration: none;
}

.faq-item__question:hover,
.faq-item__question:focus {
	text-decoration: underline;
}

.faq-item__answer {
	padding: 8px 16px 24px 32px;
	display: flex;
	gap: 4px;
	align-items: flex-start;
}

.faq-item__answer-body {
	flex: 1;
	line-height: 1.8;
	color: #333;
}

.faq-item__answer-body>*:first-child {
	margin-top: 0;
}

.faq-item__answer-body>*:last-child {
	margin-bottom: 0;
}

/* Single article */
.faq-article {
	margin-top: 16px;
}

.faq-article__categories {
	font-size: 0.875rem;
	color: #fff;
	margin: 8px 0 24px;
	background-color: #0066cc;
	border-radius: 4px;
	padding: 10px 20px;

	>a {
		padding: 0 10px;
		display: inline-block;
		font-weight: 700;
	}
}

.faq-article__categories-label {
	font-weight: 700;
}

.faq-article__answer {
	display: flex;
	gap: 4px;
	align-items: flex-start;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e5e5e5;
}

.faq-article__answer-body {
	flex: 1;
	line-height: 1.9;

	& p {
		color: #333;
		font-weight: 500;
	}
}
.faq-item__permalink {
	align-self: center;
	padding: 0 0 0 20px;
	& a {
		font-weight: 700;
		background-color: #1f365c;
		padding: 10px 20px;
		border-radius: 6px;
		display: inline-block;
		margin-bottom: 0;
	}
}
/* Related */
.faq-related {
	margin-top: 48px;
	padding: 24px;
	background: #f7f7f7;
	border-radius: 6px;
}

.faq-related__heading {
	font-size: 1.125rem;
	margin: 0 0 12px;
}

.faq-related {
	& .faq-related__list {
		list-style: none;
		margin: 0;
		background-color: rgba(0, 102, 204, 0.9);
		padding: 20px;
		border-radius: 6px;
	}
}

.faq-related__item {
	margin-bottom: 6px;
	& a {
		font-weight: 700;
	}
}

/* Empty state */
.faq-empty {
	padding: 24px;
	text-align: center;
	color: #888;
	background: #fafafa;
	border-radius: 6px;
}

/* Responsive */
@media (max-width: 600px) {

	.faq-archive,
	.faq-single {
		padding: 24px 0 48px;
	}

	.faq-archive__title,
	.faq-article__title {
		font-size: 1.4rem;
	}

	.faq-item__answer {
		padding: 8px 8px 20px 16px;
		display: flex;
		flex-direction: column;
	}

	.faq-categories__item a {
		padding: 3px 6px;
	}

	.faq-archive .faq-list {
		margin-left: 0;
	}
}