/* ================================================================
   R-LLM SEO F05 — Tailwind-inspired design
   ================================================================ */

/* ── デザイントークン ── */
/* slate-50:#f8fafc  slate-100:#f1f5f9  slate-200:#e2e8f0  slate-300:#cbd5e1
   slate-400:#94a3b8  slate-500:#64748b  slate-600:#475569  slate-700:#334155
   slate-800:#1e293b  blue-50:#eff6ff  blue-100:#dbeafe  blue-600:#2563eb
   blue-700:#1d4ed8  green-50:#f0fdf4  green-600:#16a34a  */

/* ────────────────────────────────────────────────────────────────
   共通ボタン
──────────────────────────────────────────────────────────────── */
.rllm-f05-primary-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: #2563eb;
	color: #fff !important;
	border: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	text-decoration: none;
	line-height: 1.4;
}
.rllm-f05-primary-btn:hover:not(:disabled) { background: #1d4ed8; }
.rllm-f05-primary-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.rllm-f05-outline-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	background: #fff;
	color: #334155;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	line-height: 1.4;
}
.rllm-f05-outline-btn:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; }
.rllm-f05-outline-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.rllm-f05-ghost-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	background: transparent;
	color: #475569;
	border: 1px solid transparent;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
	line-height: 1.4;
}
.rllm-f05-ghost-btn:hover { background: #f1f5f9; color: #1e293b; }

/* ────────────────────────────────────────────────────────────────
   投稿一覧
──────────────────────────────────────────────────────────────── */
.rllm-f05-list-section {
	margin-top: 8px;
}

.rllm-f05-list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	flex-wrap: wrap;
	gap: 8px;
}

.rllm-f05-list-desc {
	font-size: 13px;
	color: #64748b;
	margin: 0;
}

/* ページャー */
.rllm-f05-pager a,
.rllm-f05-pager-bottom a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	font-size: 12px;
	color: #475569;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.15s;
}
.rllm-f05-pager a:hover,
.rllm-f05-pager-bottom a:hover { background: #f1f5f9; }
.rllm-f05-pager .current,
.rllm-f05-pager-bottom .current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 28px;
	padding: 0 8px;
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: #2563eb;
	border-radius: 6px;
}
.rllm-f05-pager-bottom {
	margin-top: 12px;
	display: flex;
	justify-content: flex-end;
	gap: 4px;
}

/* テーブルカード */
.rllm-f05-list-card {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* テーブル本体 */
.rllm-f05-list-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.rllm-f05-list-table thead tr {
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
}

.rllm-f05-list-table thead th {
	padding: 12px 14px;
	font-size: 13px;
	font-weight: 700;
	color: #475569;
	text-align: left;
	white-space: nowrap;
}

.rllm-f05-list-table tbody tr {
	border-bottom: 1px solid #f1f5f9;
	transition: background 0.1s;
}
.rllm-f05-list-table tbody tr:last-child { border-bottom: none; }
.rllm-f05-list-table tbody tr:hover { background: #f8fafc; }

.rllm-f05-list-table td {
	padding: 11px 14px;
	color: #334155;
	vertical-align: middle;
}

/* 列幅 */
.rllm-f05-list-table .col-id     { width: 56px; }
.rllm-f05-list-table .col-type   { width: 80px; }
.rllm-f05-list-table .col-status { width: 72px; }
.rllm-f05-list-table .col-date   { width: 100px; white-space: nowrap; color: #64748b; font-size: 12px; }
.rllm-f05-list-table .col-action { width: 160px; text-align: right; }

.rllm-f05-id-num {
	font-family: ui-monospace, monospace;
	font-size: 12px;
	color: #94a3b8;
}

.rllm-f05-type-tag {
	display: inline-block;
	padding: 2px 8px;
	background: #f1f5f9;
	color: #475569;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
}

/* ステータスバッジ */
.rllm-f05-status-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	background: #e2e8f0;
	color: #475569;
}
.rllm-f05-status-publish { background: #dcfce7; color: #16a34a; }
.rllm-f05-status-draft   { background: #fef9c3; color: #a16207; }
.rllm-f05-status-private { background: #fee2e2; color: #dc2626; }

/* 一覧アクションリンク */
.rllm-f05-open-link {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s;
	white-space: nowrap;
}
.rllm-f05-open-link:hover {
	background: #dbeafe;
	border-color: #93c5fd;
	color: #1d4ed8;
}

/* 空行 */
.rllm-f05-empty-row {
	text-align: center;
	padding: 32px 14px !important;
	color: #94a3b8;
	font-size: 13px;
}

/* ────────────────────────────────────────────────────────────────
   ワークベンチ共通
──────────────────────────────────────────────────────────────── */
.rllm-f05-wb-wrap {
	max-width: 900px;
	margin: 12px auto 0;
}

/* ── ヘッダーバー ── */
.rllm-f05-wb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 16px;
	margin-bottom: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	flex-wrap: wrap;
}

.rllm-f05-wb-header-left,
.rllm-f05-wb-header-right {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rllm-f05-back-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	font-weight: 500;
	color: #64748b;
	text-decoration: none;
	transition: color 0.15s;
}
.rllm-f05-back-link:hover { color: #1e293b; }

/* 投稿タイトルバー */
.rllm-f05-post-title-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	margin-bottom: 10px;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-left: 4px solid #2563eb;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	flex-wrap: wrap;
}

.rllm-f05-post-title-heading {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #1e293b;
	line-height: 1.5;
}

/* 合計文字数 */
.rllm-f05-total-stat {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	color: #64748b;
	white-space: nowrap;
	flex-shrink: 0;
}

.rllm-f05-stat-label {
	font-weight: 600;
	margin-right: 2px;
}

/* ブロック文字数 */
.rllm-f05-char-stat {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
	font-size: 11px;
	color: #94a3b8;
}

.rllm-f05-char-stat-result {
	justify-content: flex-end;
	margin-top: 4px;
	margin-bottom: 4px;
}

.rllm-f05-char-diff {
	font-weight: 600;
}
.rllm-f05-char-diff.is-plus  { color: #16a34a; }
.rllm-f05-char-diff.is-minus { color: #dc2626; }

.rllm-f05-message {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: 6px;
}
.rllm-f05-message.is-success {
	background: #f0fdf4;
	color: #16a34a;
	border: 1px solid #bbf7d0;
}
.rllm-f05-message.is-error {
	background: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}

/* ── 全体最適化バー ── */
.rllm-f05-bulk-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 14px;
	flex-wrap: wrap;
}

.rllm-f05-select-all-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	user-select: none;
}
.rllm-f05-select-all-label input[type="checkbox"] {
	margin: 0;
	cursor: pointer;
	width: 14px;
	height: 14px;
}

.rllm-f05-bulk-sep {
	width: 1px;
	height: 18px;
	background: #cbd5e1;
	flex-shrink: 0;
}

.rllm-f05-bulk-label {
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	white-space: nowrap;
}

.rllm-f05-bulk-select {
	font-size: 12px;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	padding: 3px 6px;
	background: #fff;
	color: #334155;
}

.rllm-f05-bulk-progress {
	font-size: 12px;
	font-weight: 700;
	color: #2563eb;
}

.rllm-f05-count-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	font-size: 11px;
	font-weight: 700;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.3);
	color: #fff;
	margin-left: 2px;
}

/* ────────────────────────────────────────────────────────────────
   ブロックリスト
──────────────────────────────────────────────────────────────── */
.rllm-f05-block-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rllm-f05-empty-notice {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 40px;
	text-align: center;
	color: #94a3b8;
	font-size: 13px;
}

/* ── ブロックカード ── */
.rllm-f05-block {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-left: 3px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.rllm-f05-type-paragraph { border-left-color: #60a5fa; }
.rllm-f05-type-heading   { border-left-color: #a78bfa; }
.rllm-f05-type-list      { border-left-color: #fbbf24; }
.rllm-f05-type-table     { border-left-color: #34d399; }

.rllm-f05-block.is-accepted {
	border-color: #86efac;
	border-left-color: #22c55e;
	background: #f0fdf4;
	box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
}
.rllm-f05-block.has-result {
	border-color: #93c5fd;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.rllm-f05-block.is-readonly { opacity: 0.5; }

/* ── ブロックヘッダー ── */
.rllm-f05-block-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	flex-wrap: wrap;
}

.rllm-f05-block-meta {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.rllm-f05-check-wrap {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
}
.rllm-f05-check-wrap input[type="checkbox"] {
	width: 14px;
	height: 14px;
	margin: 0;
	cursor: pointer;
}

/* ── バッジ ── */
.rllm-f05-block-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569;
	flex-shrink: 0;
}
.rllm-f05-badge-paragraph { background: #dbeafe; color: #1d4ed8; }
.rllm-f05-badge-heading   { background: #ede9fe; color: #6d28d9; }
.rllm-f05-badge-list      { background: #fef9c3; color: #a16207; }
.rllm-f05-badge-image     { background: #fce7f3; color: #9d174d; }
.rllm-f05-badge-table     { background: #d1fae5; color: #065f46; }
.rllm-f05-badge-classic   { background: #f3f4f6; color: #6b7280; }

.rllm-f05-heading-level {
	font-size: 10px;
	font-weight: 600;
	opacity: 0.6;
}

.rllm-f05-accepted-tag {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
	background: #dcfce7;
	color: #16a34a;
}

/* ── ブロックアクション ── */
.rllm-f05-block-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ── ボリュームヒント（proofread時） ── */
.rllm-f05-volume-hint {
	font-size: 11px;
	color: #94a3b8;
	font-style: italic;
}

/* ── 編集タブ フォーマットガイド ── */
.rllm-f05-edit-hint {
	margin: 4px 0 0;
	font-size: 11px;
	color: #94a3b8;
}

.rllm-f05-mode-label {
	font-size: 11px;
	font-weight: 600;
	color: #94a3b8;
	white-space: nowrap;
}

.rllm-f05-mode-select {
	font-size: 12px;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	padding: 3px 6px;
	height: 27px;
	background: #fff;
	color: #334155;
}

.rllm-f05-opt-btn {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	height: 27px;
	background: #eff6ff;
	color: #2563eb;
	border: 1px solid #bfdbfe;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	white-space: nowrap;
}
.rllm-f05-opt-btn:hover:not(:disabled) { background: #dbeafe; }
.rllm-f05-opt-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.rllm-f05-undo-btn {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	height: 26px;
	background: transparent;
	color: #64748b;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	font-size: 11px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s;
}
.rllm-f05-undo-btn:hover { background: #f8fafc; color: #334155; }

/* ── 元のテキスト ── */
.rllm-f05-original-text {
	font-size: 13px;
	line-height: 1.75;
	color: #334155;
	white-space: pre-wrap;
	word-break: break-all;
	background: #f8fafc;
	border-radius: 5px;
	padding: 9px 11px;
}
.rllm-f05-original-text.is-html { white-space: normal; }
.rllm-f05-block.is-accepted .rllm-f05-original-text {
	background: #f0fdf4;
	color: #166534;
}

.rllm-f05-readonly-note {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 4px;
}

/* ── リスト/テーブル HTML プレビュー ── */
.rllm-f05-original-text ul,
.rllm-f05-result-text ul {
	list-style: disc;
	padding-left: 18px;
	margin: 2px 0;
}
.rllm-f05-original-text ol,
.rllm-f05-result-text ol {
	list-style: decimal;
	padding-left: 18px;
	margin: 2px 0;
}
.rllm-f05-original-text li,
.rllm-f05-result-text li { margin: 2px 0; }
.rllm-f05-original-text figure,
.rllm-f05-result-text figure { margin: 0; }
.rllm-f05-original-text table,
.rllm-f05-result-text table { border-collapse: collapse; width: 100%; }
.rllm-f05-original-text th,
.rllm-f05-original-text td,
.rllm-f05-result-text th,
.rllm-f05-result-text td {
	border: 1px solid #e2e8f0;
	padding: 4px 8px;
	font-size: 12px;
	text-align: left;
	vertical-align: top;
}
.rllm-f05-original-text th,
.rllm-f05-result-text th { font-weight: 700; background: #f1f5f9; }

/* ── ローダー ── */
@keyframes rllm-f05-spin { to { transform: rotate(360deg); } }

.rllm-f05-block-loading {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #2563eb;
	margin-top: 8px;
}
.rllm-f05-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #dbeafe;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: rllm-f05-spin 0.7s linear infinite;
	flex-shrink: 0;
}

/* ── 最適化結果エリア ── */
.rllm-f05-block-result { margin-top: 8px; }

.rllm-f05-result-divider {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 6px 0 8px;
	font-size: 11px;
	font-weight: 700;
	color: #2563eb;
}
.rllm-f05-result-divider::before,
.rllm-f05-result-divider::after { content: ''; flex: 1; height: 1px; background: #bfdbfe; }

/* ── プレビュー/編集タブ ── */
.rllm-f05-result-tabs {
	display: flex;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 6px;
}
.rllm-f05-tab-btn {
	padding: 4px 12px;
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	cursor: pointer;
	margin-bottom: -1px;
	transition: color 0.15s, border-color 0.15s;
}
.rllm-f05-tab-btn:hover { color: #2563eb; }
.rllm-f05-tab-btn.is-active { color: #2563eb; border-bottom-color: #2563eb; }

.rllm-f05-result-text {
	font-size: 13px;
	line-height: 1.75;
	color: #1e3a5f;
	white-space: pre-wrap;
	word-break: break-all;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 5px;
	padding: 9px 11px;
	margin-bottom: 8px;
}
.rllm-f05-result-text.is-html { white-space: normal; }

.rllm-f05-result-textarea {
	width: 100%;
	min-height: 80px;
	font-size: 13px;
	line-height: 1.75;
	color: #1e3a5f;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 5px;
	padding: 9px 11px;
	margin-bottom: 8px;
	resize: vertical;
	box-sizing: border-box;
	font-family: inherit;
}
.rllm-f05-result-textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ── 採用/取消ボタン ── */
.rllm-f05-result-btns { display: flex; gap: 6px; justify-content: flex-end; }

.rllm-f05-accept-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}
.rllm-f05-accept-btn:hover { background: #1d4ed8; }

.rllm-f05-reject-btn {
	display: inline-flex;
	align-items: center;
	padding: 5px 14px;
	background: #fff;
	color: #475569;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s;
}
.rllm-f05-reject-btn:hover { background: #f8fafc; }
