/**
 * FBA Q&A Frontend Styles
 *
 * FBA Childテーマの --fba-* 変数を利用。テーマ非適用時のフォールバック値も指定。
 */

.fba-qa {
	/* フォールバック（FBA Childテーマ未適用時） */
	--fbaqa-red: var(--fba-corporate-red, #DF0515);
	--fbaqa-red-soft: var(--fba-function-red, #F24E4B);
	--fbaqa-ink: var(--fba-ink, #333333);
	--fbaqa-mute: var(--fba-ink-mute, #676767);
	--fbaqa-line: var(--fba-line, #E8E5D8);
	--fbaqa-line-soft: #EFECE0;
	--fbaqa-bg: #FFFFFF;
	--fbaqa-beige: var(--fba-bg-beige, #F7F6EC);
	--fbaqa-beige-soft: var(--fba-bg-beige-soft, #FBFAF3);
	--fbaqa-gray-bg: var(--fba-bg-gray, #F2F2F2);

	font-family: var(--fba-font-sans, "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", Meiryo, sans-serif);
	color: var(--fbaqa-ink);
	line-height: 1.85;
	letter-spacing: 0.02em;
	max-width: 1000px;
	margin: 0 auto;
}

.fba-qa * { box-sizing: border-box; }

/* ---- Buttons ---- */
.fba-qa-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 26px;
	border-radius: 4px;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.06em;
	transition: all 0.2s ease;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
}
.fba-qa-btn-primary {
	background: var(--fbaqa-red);
	color: #fff;
	border-color: var(--fbaqa-red);
}
.fba-qa-btn-primary:hover {
	background: var(--fbaqa-red-soft);
	border-color: var(--fbaqa-red-soft);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(223,5,21,0.18);
}
.fba-qa-btn-secondary {
	background: #fff;
	color: var(--fbaqa-ink);
	border-color: var(--fbaqa-line);
}
.fba-qa-btn-secondary:hover {
	background: var(--fbaqa-beige);
	border-color: var(--fbaqa-mute);
}

/* ---- Search ---- */
.fba-qa-search {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
}
.fba-qa-search input[type="search"] {
	flex: 1;
	padding: 11px 16px;
	border: 1px solid var(--fbaqa-line);
	border-radius: 4px;
	background: var(--fbaqa-beige-soft);
	font-size: 14px;
}
.fba-qa-search input[type="search"]:focus {
	outline: none;
	border-color: var(--fbaqa-red);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(223,5,21,0.08);
}
.fba-qa-search-btn {
	padding: 11px 22px;
	background: var(--fbaqa-ink);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.fba-qa-search-btn:hover { background: #000; }

/* ---- Tabs ---- */
.fba-qa-tabs {
	display: flex;
	gap: 4px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--fbaqa-line);
	flex-wrap: wrap;
}
.fba-qa-tab {
	padding: 10px 20px;
	font-size: 13px;
	color: var(--fbaqa-mute);
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.2s;
}
.fba-qa-tab:hover { color: var(--fbaqa-ink); }
.fba-qa-tab.active {
	color: var(--fbaqa-red);
	border-bottom-color: var(--fbaqa-red);
	font-weight: 700;
}

/* ---- Status row ---- */
.fba-qa-status-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 12px;
}
.fba-qa-status-filters { display: flex; gap: 8px; }
.fba-qa-status-filter {
	padding: 6px 14px;
	border: 1px solid var(--fbaqa-line);
	border-radius: 100px;
	font-size: 12px;
	background: #fff;
	color: var(--fbaqa-mute);
	text-decoration: none;
	transition: all 0.2s;
}
.fba-qa-status-filter:hover { border-color: var(--fbaqa-mute); color: var(--fbaqa-ink); }
.fba-qa-status-filter.active {
	background: var(--fbaqa-ink);
	color: #fff;
	border-color: var(--fbaqa-ink);
}
.fba-qa-search-note { font-size: 13px; color: var(--fbaqa-mute); }

/* ---- List ---- */
.fba-qa-list {
	background: #fff;
	border: 1px solid var(--fbaqa-line);
	border-radius: 8px;
	overflow: hidden;
}
.fba-qa-item {
	display: block;
	padding: 20px 24px;
	border-bottom: 1px solid var(--fbaqa-line-soft);
	text-decoration: none;
	color: inherit;
	transition: background 0.15s;
}
.fba-qa-item:last-child { border-bottom: none; }
.fba-qa-item:hover { background: var(--fbaqa-beige-soft); }

.fba-qa-badges {
	display: flex;
	gap: 6px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}
.fba-qa-badge {
	font-size: 11px;
	padding: 3px 10px;
	border-radius: 3px;
	font-weight: 600;
	letter-spacing: 0.05em;
	line-height: 1.6;
}
.fba-qa-badge-answered { background: #DBF1EC; color: #0E5A4F; }
.fba-qa-badge-waiting { background: var(--fbaqa-gray-bg); color: var(--fbaqa-mute); }
.fba-qa-badge-category { background: var(--fbaqa-beige); color: var(--fbaqa-ink); }

.fba-qa-item-title {
	font-size: 17px;
	font-weight: 700;
	color: var(--fbaqa-ink);
	line-height: 1.5;
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}
.fba-qa-item-meta {
	font-size: 12px;
	color: var(--fbaqa-mute);
	display: flex;
	gap: 6px;
	align-items: center;
}
.fba-qa-dot {
	width: 3px;
	height: 3px;
	background: var(--fbaqa-mute);
	border-radius: 50%;
	opacity: 0.5;
}

.fba-qa-empty {
	padding: 60px 24px;
	text-align: center;
	color: var(--fbaqa-mute);
}

/* ---- Pagination ---- */
.fba-qa-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 32px;
	flex-wrap: wrap;
}
.fba-qa-page-num {
	min-width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 8px;
	border: 1px solid var(--fbaqa-line);
	border-radius: 4px;
	font-size: 13px;
	background: #fff;
	color: var(--fbaqa-ink);
	text-decoration: none;
}
.fba-qa-page-num:hover { border-color: var(--fbaqa-mute); }
.fba-qa-page-num.active {
	background: var(--fbaqa-ink);
	color: #fff;
	border-color: var(--fbaqa-ink);
}

/* ---- Breadcrumb ---- */
.fba-qa-breadcrumb {
	font-size: 13px;
	color: var(--fbaqa-mute);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.fba-qa-breadcrumb a { color: var(--fbaqa-mute); text-decoration: none; }
.fba-qa-breadcrumb a:hover { color: var(--fbaqa-red); }
.fba-qa-breadcrumb-current { color: var(--fbaqa-ink); }
.fba-qa-breadcrumb-sep { color: var(--fbaqa-line); }

/* ---- Single (detail) ---- */
.fba-qa-single { max-width: 820px; }

.fba-qa-question-card {
	background: #fff;
	border: 1px solid var(--fbaqa-line);
	border-radius: 8px;
	padding: 32px;
}
.fba-qa-question-title {
	font-size: 24px;
	line-height: 1.5;
	font-weight: 700;
	margin: 14px 0 12px;
	letter-spacing: 0.03em;
	color: var(--fbaqa-ink);
}
.fba-qa-question-meta {
	font-size: 13px;
	color: var(--fbaqa-mute);
	padding-bottom: 20px;
	border-bottom: 1px solid var(--fbaqa-line-soft);
	margin-bottom: 24px;
	display: flex;
	gap: 6px;
	align-items: center;
}
.fba-qa-question-body {
	font-size: 15px;
	line-height: 1.95;
	color: var(--fbaqa-ink);
}
.fba-qa-attachment { margin-top: 20px; }
.fba-qa-attachment img { max-width: 100%; height: auto; border-radius: 4px; }

/* ---- Answer card ---- */
.fba-qa-answer-card {
	background: var(--fbaqa-beige);
	border: 1px solid var(--fbaqa-red);
	border-radius: 8px;
	padding: 28px 32px;
	margin-top: 24px;
}
.fba-qa-answer-badge {
	display: inline-block;
	background: var(--fbaqa-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 14px;
	border-radius: 100px;
	letter-spacing: 0.1em;
	margin-bottom: 16px;
}
.fba-qa-answer-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}
.fba-qa-answer-avatar {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--fbaqa-red);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 11px;
	letter-spacing: 0.05em;
	flex-shrink: 0;
}
.fba-qa-answer-author-name { font-weight: 700; color: var(--fbaqa-ink); font-size: 14px; }
.fba-qa-answer-author-meta { font-size: 12px; color: var(--fbaqa-mute); }

.fba-qa-answer-body {
	background: #fff;
	border-radius: 6px;
	padding: 24px;
	font-size: 14.5px;
	line-height: 1.95;
}
.fba-qa-answer-body h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 18px 0 8px;
	letter-spacing: 0.03em;
}
.fba-qa-answer-body h3:first-child { margin-top: 0; }
.fba-qa-answer-body p { margin: 0 0 0.6em; }
.fba-qa-answer-body ul, .fba-qa-answer-body ol { padding-left: 1.4em; margin: 0.6em 0; }

.fba-qa-pending-note {
	background: var(--fbaqa-beige-soft);
	border: 1px dashed var(--fbaqa-line);
	border-radius: 8px;
	padding: 24px;
	margin-top: 24px;
	text-align: center;
	color: var(--fbaqa-mute);
	font-size: 14px;
}

.fba-qa-disclaimer {
	margin-top: 24px;
	padding: 14px 20px;
	background: var(--fbaqa-gray-bg);
	border-radius: 4px;
	font-size: 12.5px;
	color: var(--fbaqa-mute);
	text-align: center;
	line-height: 1.7;
}

.fba-qa-back { margin-top: 32px; text-align: center; }

/* ---- Form ---- */
.fba-qa-form-wrap { max-width: 760px; }
.fba-qa-form-card {
	background: #fff;
	border: 1px solid var(--fbaqa-line);
	border-radius: 8px;
	padding: 36px 40px;
}
.fba-qa-form-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	letter-spacing: 0.03em;
}
.fba-qa-form-desc {
	font-size: 13px;
	color: var(--fbaqa-mute);
	margin-bottom: 28px;
	line-height: 1.8;
}

.fba-qa-field { margin-bottom: 22px; }
.fba-qa-field label {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: var(--fbaqa-ink);
	margin-bottom: 8px;
	letter-spacing: 0.03em;
}
.fba-qa-required { color: var(--fbaqa-red); margin-left: 4px; }

.fba-qa-field input[type="text"],
.fba-qa-field select,
.fba-qa-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fbaqa-line);
	border-radius: 4px;
	background: #fff;
	font-size: 14px;
	line-height: 1.7;
	font-family: inherit;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.fba-qa-field input:focus,
.fba-qa-field select:focus,
.fba-qa-field textarea:focus {
	outline: none;
	border-color: var(--fbaqa-red);
	box-shadow: 0 0 0 3px rgba(223,5,21,0.08);
}
.fba-qa-field textarea { min-height: 160px; resize: vertical; }

.fba-qa-upload-zone {
	display: flex;
	flex-direction: column;
	gap: 4px;
	border: 1.5px dashed var(--fbaqa-line);
	border-radius: 4px;
	padding: 24px;
	text-align: center;
	font-size: 13px;
	color: var(--fbaqa-mute);
	cursor: pointer;
	transition: all 0.2s;
	background: var(--fbaqa-beige-soft);
}
.fba-qa-upload-zone:hover { border-color: var(--fbaqa-red); color: var(--fbaqa-ink); }
.fba-qa-upload-zone strong { color: var(--fbaqa-red); }
.fba-qa-upload-hint { font-size: 11px; }
.fba-qa-upload-filename { font-size: 12px; font-weight: 600; color: var(--fbaqa-ink); margin-top: 4px; }

.fba-qa-checkbox-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 24px 0;
	padding: 14px 16px;
	background: var(--fbaqa-beige-soft);
	border-radius: 4px;
	font-size: 14px;
}
.fba-qa-checkbox-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--fbaqa-red);
	cursor: pointer;
}
.fba-qa-checkbox-row label { cursor: pointer; margin: 0; font-weight: 400; }

.fba-qa-form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding-top: 20px;
	border-top: 1px solid var(--fbaqa-line-soft);
	margin-top: 28px;
}

/* ---- Notices ---- */
.fba-qa-notice {
	padding: 18px 22px;
	border-radius: 8px;
	margin-bottom: 24px;
	font-size: 14px;
	line-height: 1.8;
	display: flex;
	gap: 14px;
	align-items: flex-start;
}
.fba-qa-notice-success {
	background: #DBF1EC;
	color: #0E5A4F;
}
.fba-qa-notice-error {
	background: rgba(223,5,21,0.08);
	color: #B00410;
}
.fba-qa-notice-icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #0E5A4F;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 15px;
}

/* ---- Access denied ---- */
.fba-qa-access-denied {
	background: var(--fbaqa-beige);
	border: 1px solid var(--fbaqa-line);
	border-radius: 8px;
	padding: 40px;
	text-align: center;
}
.fba-qa-access-denied p { margin: 0 0 16px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
	.fba-qa-question-card,
	.fba-qa-form-card { padding: 24px 20px; }
	.fba-qa-answer-card { padding: 22px 20px; }
	.fba-qa-answer-body { padding: 18px; }
	.fba-qa-item { padding: 16px 18px; }
	.fba-qa-item-title { font-size: 15px; }
	.fba-qa-question-title { font-size: 20px; }
	.fba-qa-tab { padding: 10px 14px; font-size: 12px; }
	.fba-qa-form-actions { flex-direction: column-reverse; }
	.fba-qa-form-actions .fba-qa-btn { width: 100%; justify-content: center; }
}
