/**
 * 與 Plax home-5 一致的深色公共頁（開發文檔、支付測試）
 */
html {
	scroll-behavior: smooth;
}

body.doc-plax-public {
	margin: 0;
	min-height: 100vh;
	background-color: #1b1717;
	color: rgba(255, 255, 255, 0.82);
	font-family: "Switzer", "Segoe UI", system-ui, -apple-system, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ---------- 文檔頁：頂欄（原 layui） ---------- */
body.doc-plax-public #navbar {
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.doc-plax-public #navbar .bg-blur {
	background: rgba(27, 23, 23, 0.92) !important;
	backdrop-filter: blur(12px);
}

body.doc-plax-public #navbar .navbar-body {
	background: transparent;
}

body.doc-plax-public #navbar .layui-nav {
	background: transparent;
}

body.doc-plax-public #navbar .layui-nav .layui-nav-item a {
	color: rgba(255, 255, 255, 0.88) !important;
}

body.doc-plax-public #navbar .layui-nav .layui-nav-item a:hover {
	color: #f27457 !important;
}

body.doc-plax-public #navbar .layui-this a {
	color: #f27457 !important;
}

body.doc-plax-public #navbar .nav-menu .logo img {
	filter: brightness(1.15);
}

body.doc-plax-public #navbar #navMenuLeft i,
body.doc-plax-public #navbar #navMenuRight i {
	color: rgba(255, 255, 255, 0.85);
}

/* ---------- 左側目錄 ---------- */
body.doc-plax-public #leftbar {
	background: #222020 !important;
	border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
	box-shadow: none !important;
}

body.doc-plax-public #leftbar .layui-tab-title {
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.doc-plax-public #leftbar .layui-tab-title li {
	color: rgba(255, 255, 255, 0.55);
}

body.doc-plax-public #leftbar .layui-tab-title .layui-this {
	color: #f27457;
}

body.doc-plax-public #leftbar .copyright {
	color: rgba(255, 255, 255, 0.35) !important;
	border-top-color: rgba(255, 255, 255, 0.06) !important;
}

body.doc-plax-public .ztree * {
	color: rgba(255, 255, 255, 0.78) !important;
}

body.doc-plax-public .ztree li a {
	color: rgba(255, 255, 255, 0.78) !important;
}

body.doc-plax-public .ztree li a:hover {
	color: #f27457 !important;
	background: rgba(242, 116, 87, 0.08) !important;
}

body.doc-plax-public .ztree li a.curSelectedNode {
	color: #f27457 !important;
	background: rgba(242, 116, 87, 0.12) !important;
	border: none !important;
}

/* ---------- 正文區 ---------- */
body.doc-plax-public #body {
	background: #1b1717;
}

body.doc-plax-public #article-content.markdown-body {
	color: rgba(255, 255, 255, 0.82);
}

body.doc-plax-public .markdown-body h1,
body.doc-plax-public .markdown-body h2,
body.doc-plax-public .markdown-body h3,
body.doc-plax-public .markdown-body h4 {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.doc-plax-public .markdown-body a {
	color: #f27457;
}

body.doc-plax-public .markdown-body a:hover {
	color: #ff9a82;
}

body.doc-plax-public .markdown-body table {
	border-color: rgba(255, 255, 255, 0.12);
}

body.doc-plax-public .markdown-body table th,
body.doc-plax-public .markdown-body table td {
	border-color: rgba(255, 255, 255, 0.1);
	background: rgba(255, 255, 255, 0.03);
	color: rgba(255, 255, 255, 0.85);
}

body.doc-plax-public .markdown-body table th {
	background: rgba(255, 255, 255, 0.06);
}

body.doc-plax-public .markdown-body code {
	background: rgba(255, 255, 255, 0.08);
	color: #ffb4a3;
	padding: 0.15em 0.45em;
	border-radius: 4px;
}

body.doc-plax-public .markdown-body pre,
body.doc-plax-public .markdown-body pre code {
	background: #141212 !important;
	color: rgba(255, 255, 255, 0.88) !important;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
}

body.doc-plax-public .markdown-body blockquote {
	border-left-color: #f27457;
	color: rgba(255, 255, 255, 0.65);
	background: rgba(242, 116, 87, 0.06);
}

/* SyntaxHighlighter 深色 */
body.doc-plax-public .syntaxhighlighter {
	background-color: #141212 !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
	border-radius: 8px !important;
}

body.doc-plax-public .syntaxhighlighter .gutter {
	background-color: #1a1818 !important;
	border-right-color: rgba(255, 255, 255, 0.08) !important;
	color: rgba(255, 255, 255, 0.35) !important;
}

body.doc-plax-public .syntaxhighlighter .plain,
body.doc-plax-public .syntaxhighlighter .plain a {
	color: rgba(255, 255, 255, 0.88) !important;
}

body.doc-plax-public .syntaxhighlighter .keyword {
	color: #f27457 !important;
}

body.doc-plax-public .syntaxhighlighter .string,
body.doc-plax-public .syntaxhighlighter .string a {
	color: #7dd3c0 !important;
}

body.doc-plax-public .syntaxhighlighter .comments,
body.doc-plax-public .syntaxhighlighter .comments a {
	color: rgba(255, 255, 255, 0.4) !important;
}

body.doc-plax-public #mask {
	background: rgba(0, 0, 0, 0.55) !important;
}

/* 搜索區 */
body.doc-plax-public .searchBox .layui-input {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
	color: #fff;
}

body.doc-plax-public .searchResultNone {
	color: rgba(255, 255, 255, 0.45);
}

/* ---------- 覆蓋 docView.css / layui 白底（子目錄、表格、標籤） ---------- */
body.doc-plax-public #leftbar .layui-tab,
body.doc-plax-public #leftbar .layui-tab-title,
body.doc-plax-public #leftbar .layui-tab-content,
body.doc-plax-public #leftbar .layui-tab-item {
	background: transparent !important;
	background-color: transparent !important;
}

body.doc-plax-public #leftbar .layui-tab-title {
	border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.doc-plax-public #leftbar .layui-tab-title li {
	background: transparent !important;
}

body.doc-plax-public #leftbar .layui-tab-brief > .layui-tab-title .layui-this {
	color: #f27457 !important;
}

body.doc-plax-public #leftbar .copyright {
	color: rgba(255, 255, 255, 0.45) !important;
	border-top-color: rgba(255, 255, 255, 0.1) !important;
	background: rgba(0, 0, 0, 0.2) !important;
}

/* zTree：子級 ul 在 docView.css 為 #fafafa，導致白塊看不清文字 */
body.doc-plax-public .ztree li ul {
	background-color: rgba(0, 0, 0, 0.22) !important;
	background-image: none !important;
}

body.doc-plax-public .ztree li a {
	color: rgba(255, 255, 255, 0.82) !important;
}

body.doc-plax-public .ztree li a:hover {
	color: #f27457 !important;
}

body.doc-plax-public .ztree li a::before {
	background: transparent !important;
}

body.doc-plax-public .ztree li a:hover::before {
	background: rgba(242, 116, 87, 0.1) !important;
}

body.doc-plax-public .ztree li a.curSelectedNode {
	color: #f27457 !important;
}

body.doc-plax-public .ztree li a.curSelectedNode::before {
	background: rgba(242, 116, 87, 0.18) !important;
}

body.doc-plax-public .ztree li span.button {
	opacity: 0.88;
}

/* 正文滾動區與 layui 表格（onContentChange 會加 layui-table） */
body.doc-plax-public #content_body {
	background: #1b1717 !important;
	color: rgba(255, 255, 255, 0.82);
}

body.doc-plax-public #article-content {
	background: transparent !important;
}

body.doc-plax-public .markdown-body .layui-table,
body.doc-plax-public #article-content .layui-table {
	background-color: rgba(30, 26, 26, 0.95) !important;
	color: rgba(255, 255, 255, 0.9) !important;
}

body.doc-plax-public .layui-table th,
body.doc-plax-public .layui-table td {
	background-color: rgba(255, 255, 255, 0.04) !important;
	color: rgba(255, 255, 255, 0.88) !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
}

body.doc-plax-public .layui-table thead tr,
body.doc-plax-public .layui-table thead th {
	background-color: rgba(255, 255, 255, 0.08) !important;
	color: rgba(255, 255, 255, 0.92) !important;
}

body.doc-plax-public .layui-table tbody tr:hover,
body.doc-plax-public .layui-table-hover {
	background-color: rgba(242, 116, 87, 0.12) !important;
}

body.doc-plax-public .layui-table[lay-skin="line"],
body.doc-plax-public .layui-table[lay-skin="row"],
body.doc-plax-public .layui-table[lay-even] tbody tr:nth-child(even) {
	background-color: rgba(255, 255, 255, 0.02) !important;
}

body.doc-plax-public .layui-table[lay-even] tbody tr:nth-child(even) td {
	background-color: rgba(255, 255, 255, 0.03) !important;
}

body.doc-plax-public .layui-elem-quote {
	background: rgba(255, 255, 255, 0.06) !important;
	border-left: 4px solid #f27457 !important;
	color: rgba(255, 255, 255, 0.82) !important;
}

/* 純 HTML table（未加 layui 類時） */
body.doc-plax-public #article-content > table:not(.layui-table),
body.doc-plax-public .markdown-body > table:not(.layui-table) {
	background: rgba(30, 26, 26, 0.9);
}

body.doc-plax-public #article-content table th,
body.doc-plax-public #article-content table td {
	color: rgba(255, 255, 255, 0.88);
}

/* 搜索區塊邊框 */
body.doc-plax-public #searchForm {
	border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

body.doc-plax-public #treeSearch > li {
	border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

body.doc-plax-public #treeSearch h3,
body.doc-plax-public #treeSearch p {
	color: rgba(255, 255, 255, 0.75);
}

/* 窄屏：頂部下拉導航不要用白底 */
@media screen and (max-width: 768px) {
	body.doc-plax-public #navbar .navbar-body > .layui-nav,
	body.doc-plax-public #navbar .navbar-body > .layui-nav.show-item {
		background-color: #1e1a1a !important;
	}

	body.doc-plax-public #navbar .layui-nav .layui-nav-item a {
		color: rgba(255, 255, 255, 0.88) !important;
		border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	}
}

/* layui 導航子菜單 */
body.doc-plax-public .layui-nav-child {
	background-color: #2a2424 !important;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

body.doc-plax-public .layui-nav-child dd a {
	color: rgba(255, 255, 255, 0.85) !important;
}

body.doc-plax-public .layui-nav-child dd a:hover {
	background: rgba(242, 116, 87, 0.15) !important;
	color: #ffb4a3 !important;
}

/* layer 加載圖標區域可讀性 */
body.doc-plax-public .layui-layer-loading {
	background: rgba(30, 26, 26, 0.9) !important;
}

/* ---------- 公共頂欄（支付測試等） ---------- */
.plax-pub-top {
	position: relative;
	z-index: 100;
	background: rgba(27, 23, 23, 0.96);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	backdrop-filter: blur(12px);
}

.plax-pub-top .plax-pub-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}

.plax-pub-top .plax-pub-logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: #fff;
	font-weight: 600;
	font-size: 1.05rem;
}

.plax-pub-top .plax-pub-logo img {
	height: 32px;
	width: auto;
	display: block;
}

.plax-pub-top nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 22px;
}

.plax-pub-top nav a {
	color: rgba(255, 255, 255, 0.82);
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s;
}

.plax-pub-top nav a:hover {
	color: #f27457;
}

.plax-pub-top nav li.plax-pub-active > a {
	color: #f27457;
}

.plax-pub-top .plax-pub-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.plax-pub-top .plax-pub-btn {
	display: inline-block;
	padding: 8px 20px;
	border-radius: 40px;
	background: #f27457;
	color: #fff !important;
	text-decoration: none;
	font-size: 0.875rem;
	font-weight: 500;
	border: none;
	transition: opacity 0.2s, transform 0.15s;
}

.plax-pub-top .plax-pub-btn:hover {
	opacity: 0.92;
	color: #fff !important;
}

.plax-pub-top .plax-pub-btn.plax-pub-btn-ghost {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.9) !important;
}

.plax-pub-top .plax-pub-btn.plax-pub-btn-ghost:hover {
	border-color: #f27457;
	color: #f27457 !important;
}

/* ---------- 支付測試 / 服務條款：表單與長文卡片 ---------- */
body.test-pay-page .test-pay-wrap,
body.agreement-plax-page .test-pay-wrap {
	max-width: 640px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}

body.agreement-plax-page .test-pay-wrap {
	max-width: 920px;
}

body.test-pay-page .test-pay-card,
body.agreement-plax-page .test-pay-card {
	background: linear-gradient(145deg, rgba(40, 35, 35, 0.95), rgba(28, 24, 24, 0.98));
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	overflow: hidden;
}

body.test-pay-page .test-pay-card .card-head,
body.agreement-plax-page .test-pay-card .card-head {
	padding: 22px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.test-pay-page .test-pay-card .card-head h1,
body.agreement-plax-page .test-pay-card .card-head h1 {
	margin: 0;
	font-size: 1.25rem;
	color: #fff;
	font-weight: 600;
}

body.test-pay-page .test-pay-card .card-head .back-home,
body.agreement-plax-page .test-pay-card .card-head .back-home {
	float: right;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	margin-top: 2px;
}

body.test-pay-page .test-pay-card .card-head .back-home:hover,
body.agreement-plax-page .test-pay-card .card-head .back-home:hover {
	color: #f27457;
}

body.test-pay-page .test-pay-card .card-body,
body.agreement-plax-page .test-pay-card .card-body {
	padding: 24px;
}

body.test-pay-page .test-pay-card .card-foot,
body.agreement-plax-page .test-pay-card .card-foot {
	padding: 14px 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	text-align: center;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.4);
	background: rgba(0, 0, 0, 0.15);
}

body.agreement-plax-page .agreement-plax-lead {
	font-size: 0.95rem;
	line-height: 1.65;
	margin: 0 0 20px;
	color: rgba(255, 255, 255, 0.55) !important;
}

body.agreement-plax-page .agreement-plax-prose {
	font-size: 0.9375rem;
	line-height: 1.75;
	color: rgba(255, 255, 255, 0.82);
	word-break: break-word;
}

body.agreement-plax-page .agreement-plax-prose h4 {
	font-size: 1.05rem;
	font-weight: 600;
	color: #fff;
	margin: 1.35em 0 0.65em;
	line-height: 1.45;
}

body.agreement-plax-page .agreement-plax-prose h4:first-child {
	margin-top: 0;
}

body.agreement-plax-page .agreement-plax-prose p {
	margin: 0 0 0.85em;
}

body.agreement-plax-page .agreement-plax-prose strong {
	color: rgba(255, 255, 255, 0.95);
	font-weight: 600;
}

body.test-pay-page .form-control,
body.test-pay-page .input-group-text {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.9);
}

body.test-pay-page .form-control::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

body.test-pay-page .form-control:focus {
	background: rgba(255, 255, 255, 0.09);
	border-color: #f27457;
	color: #fff;
	box-shadow: 0 0 0 0.2rem rgba(242, 116, 87, 0.2);
}

body.test-pay-page .input-group-text {
	color: rgba(255, 255, 255, 0.65);
}

body.test-pay-page .btn-outline-primary {
	border-color: rgba(242, 116, 87, 0.65);
	color: #ffb4a3;
}

body.test-pay-page .btn-outline-primary:hover {
	background: #f27457;
	border-color: #f27457;
	color: #fff;
}

body.test-pay-page .alert-success {
	background: rgba(46, 160, 67, 0.15);
	border: 1px solid rgba(46, 160, 67, 0.35);
	color: #7ddea0;
}

body.test-pay-page #captcha.list-group-item {
	background: rgba(255, 255, 255, 0.04);
	border-color: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.7);
}

body.test-pay-page .text-muted {
	color: rgba(255, 255, 255, 0.45) !important;
}

/* ---------- V1 旧版文档（无 Bootstrap，与 Plax 公开页一致） ---------- */
body.doc-old-plax-page .doc-old-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: flex-start;
}

body.doc-old-plax-page .doc-old-toc {
	flex: 0 0 220px;
	max-width: 100%;
	box-sizing: border-box;
}

body.doc-old-plax-page .doc-old-toc-inner {
	background: rgba(0, 0, 0, 0.22);
	border-radius: 8px;
	padding: 1rem;
}

body.doc-old-plax-page .doc-old-toc ul {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.45;
}

body.doc-old-plax-page .doc-old-toc li {
	margin-bottom: 0.45rem;
}

body.doc-old-plax-page .doc-old-toc a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
}

body.doc-old-plax-page .doc-old-toc a:hover {
	color: #fff;
}

body.doc-old-plax-page .doc-old-body {
	flex: 1 1 280px;
	min-width: 0;
}

body.doc-old-plax-page .doc-old-body .api_block {
	margin-bottom: 2rem;
}

body.doc-old-plax-page .doc-old-body .table {
	width: 100%;
	border-collapse: collapse;
	color: inherit;
	margin-bottom: 1rem;
	font-size: 0.875rem;
}

body.doc-old-plax-page .doc-old-body .table th,
body.doc-old-plax-page .doc-old-body .table td {
	border: 1px solid rgba(255, 255, 255, 0.14);
	padding: 0.5rem 0.65rem;
	vertical-align: top;
}

body.doc-old-plax-page .doc-old-body .table thead th {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

/* 卡片内主按钮（替代 Bootstrap .btn） */
body.doc-plax-public.test-pay-page .test-pay-card .card-body a.plax-card-primary-btn {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.55rem 1.35rem;
	background: #f27457;
	color: #fff !important;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
}

body.doc-plax-public.test-pay-page .test-pay-card .card-body a.plax-card-primary-btn:hover {
	filter: brightness(1.08);
	color: #fff !important;
}

body.doc-plax-public.test-pay-page .test-pay-card .card-body .wx-tutorial-prose {
	line-height: 1.75;
	font-size: 0.95rem;
}

body.doc-plax-public.test-pay-page .test-pay-card .card-body .wx-tutorial-prose .wx-lead {
	color: #f27457;
	font-weight: 600;
	margin: 0 0 0.75rem;
}

body.doc-plax-public.test-pay-page .test-pay-card .card-body .wx-tutorial-prose .wx-steps {
	color: rgba(255, 255, 255, 0.88);
	margin: 0.5rem 0 0;
	padding-left: 1.1rem;
}

body.doc-plax-public.test-pay-page .test-pay-card .card-body .wx-tutorial-img {
	width: 100%;
	border-radius: 8px;
	margin: 1rem 0;
	display: block;
}
