/**
 * Laifen Russia - FAQ Module Styles
 * FAQ 手风琴和搜索组件样式
 *
 * @package Laifen_Russia
 * @since 1.0.0
 */

/* ==========================================================================
   FAQ Page Layout
   ========================================================================== */

.faq-page {
	padding-bottom: 4rem;
}

.faq-header {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	padding: 3rem 0;
	text-align: center;
}

.faq-header-container {
	max-width: 800px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

.faq-title {
	font-size: 2.5rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #1a1a1a;
}

.faq-description {
	font-size: 1.125rem;
	color: #666;
	margin: 0 0 2rem;
	line-height: 1.6;
}

/* ==========================================================================
   FAQ Search Component
   ========================================================================== */

.faq-search-container {
	max-width: 600px;
	margin: 0 auto;
}

.faq-search-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.faq-search-wrapper--header {
	background: #fff;
	border-radius: 50px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 0.25rem 1rem;
}

.faq-search-icon {
	flex-shrink: 0;
	color: #999;
	margin-right: 0.75rem;
}

.faq-search-input {
	flex: 1;
	border: none;
	background: transparent;
	font-size: 1rem;
	padding: 0.875rem 0;
	outline: none;
	width: 100%;
}

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

.faq-search-input--header:focus {
	outline: none;
}

.faq-search-clear {
	flex-shrink: 0;
	background: none;
	border: none;
	padding: 0.5rem;
	cursor: pointer;
	color: #999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease;
}

.faq-search-clear:hover {
	color: #333;
}

/* Container-level search */
.laifen-faq-container .faq-search-wrapper {
	margin-bottom: 1.5rem;
}

.laifen-faq-container .faq-search-input {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 1rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.laifen-faq-container .faq-search-input:focus {
	border-color: #333;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   FAQ Categories
   ========================================================================== */

.faq-categories {
	margin-bottom: 2rem;
}

.faq-category-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	margin: 0;
	padding: 0;
	justify-content: center;
}

.faq-category-btn {
	background: #f5f5f5;
	border: 1px solid transparent;
	border-radius: 50px;
	padding: 0.5rem 1.25rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #666;
	cursor: pointer;
	transition: all 0.2s ease;
}

.faq-category-btn:hover {
	background: #e9e9e9;
	color: #333;
}

.faq-category-btn--active,
.faq-category-btn[aria-pressed="true"] {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

/* ==========================================================================
   FAQ Content Area
   ========================================================================== */

.faq-content-wrapper {
	padding: 2rem 0;
}

.faq-container {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-accordion {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faq-item {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.faq-item--expanded {
	border-color: #333;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-item--hidden,
.faq-item[hidden] {
	display: none;
}

/* Question Button */
.faq-question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 1.25rem 1.5rem;
	background: none;
	border: none;
	text-align: left;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.5;
	transition: background-color 0.2s ease;
}

.faq-question:hover {
	background-color: #fafafa;
}

.faq-question:focus {
	outline: none;
	background-color: #f5f5f5;
}

.faq-question:focus-visible {
	outline: 2px solid #333;
	outline-offset: -2px;
}

.faq-question-text {
	flex: 1;
	padding-right: 1rem;
}

/* Toggle Icon */
.faq-toggle-icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: #666;
	transition: transform 0.3s ease;
}

.faq-item--expanded .faq-toggle-icon,
.faq-question[aria-expanded="true"] .faq-toggle-icon {
	transform: rotate(180deg);
}

/* Answer */
.faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.faq-answer:not([hidden]) {
	max-height: none;
}

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

.faq-answer-content p {
	margin: 0 0 1rem;
}

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

.faq-answer-content ul,
.faq-answer-content ol {
	margin: 0 0 1rem;
	padding-left: 1.5rem;
}

.faq-answer-content a {
	color: #0066cc;
	text-decoration: underline;
}

.faq-answer-content a:hover {
	color: #004499;
}

/* ==========================================================================
   No Results Message
   ========================================================================== */

.faq-no-results,
.no-faqs {
	text-align: center;
	padding: 3rem 1.5rem;
	color: #666;
	font-size: 1rem;
}

.faq-no-results[hidden] {
	display: none;
}

/* ==========================================================================
   FAQ Footer
   ========================================================================== */

.faq-footer {
	text-align: center;
	padding: 2rem 0;
}

.faq-footer .edit-link {
	font-size: 0.875rem;
	color: #666;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
	.faq-header {
		padding: 2rem 0;
	}

	.faq-title {
		font-size: 1.75rem;
	}

	.faq-description {
		font-size: 1rem;
	}

	.faq-category-list {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		padding-bottom: 0.5rem;
		-webkit-overflow-scrolling: touch;
	}

	.faq-category-btn {
		white-space: nowrap;
	}

	.faq-question {
		padding: 1rem 1.25rem;
		font-size: 0.9375rem;
	}

	.faq-answer-content {
		padding: 0 1.25rem 1.25rem;
		font-size: 0.9375rem;
	}
}

@media (max-width: 480px) {
	.faq-header-container,
	.faq-container {
		padding: 0 1rem;
	}

	.faq-search-wrapper--header {
		padding: 0.125rem 0.75rem;
	}

	.faq-search-input {
		font-size: 0.9375rem;
	}
}

/* ==========================================================================
   Animation
   ========================================================================== */

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

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

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }
