/*
 * laolicms 网站综合管理系统 v1.0.0
 * 作者：丿king　　联系 QQ：1735737677
 * 本文件作用：在线工具频道三套版式（频道首页 / 列表页 / 内页）专用样式，只补 laoli.css 里没有的新类，旧站已有的 tjgj-* / tool-* 一律复用不重写
 * 变量：无（纯样式文件，配色沿用 laoli.css 的 CSS 变量）
 * 文件路径：application/template/laoli/public/pc/css/sub_gongju.css
 */

/* ===== 频道首页 ===== */
/* 旧站的汇率跑马灯换成纯本地静态提示条，不发任何外部请求 */
.gongju-notice{display:flex;align-items:center;gap:12px;background:var(--bg-color,#fff);border-radius:6px;padding:11px 15px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.06);overflow:hidden;}
.gongju-notice-label{flex:none;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--chengb,#ff7200);}
.gongju-notice-body{flex:1 1 auto;min-width:0;display:flex;flex-wrap:wrap;gap:6px 14px;font-size:13px;color:var(--sub-text-color,#666);}
.gongju-notice-body a{color:var(--sub-text-color,#666);text-decoration:none;padding:2px 8px;border-radius:12px;background:#f5f6f8;}
.gongju-notice-body a:hover{background:#fff8f2;color:var(--chengb,#ff7200);}
.gongju-notice-tip{flex:none;font-size:12px;color:#bbb;}
@media (max-width:768px){.gongju-notice{flex-wrap:wrap;}.gongju-notice-tip{display:none;}}

/* 分类分区里的小卡列表：直接复用 laoli.css 的 ul.tjgj-list，这里只把首页块的间距收一下 */
.gongju-block{margin-bottom:20px;}
.gongju-block .tjgj-list{border-radius:0;padding:0;}
.gongju-block .tjgj-list li{margin-bottom:15px;}

/* ===== 列表页 ===== */
.gongju-subnav{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:15px;}
.gongju-subnav-item{padding:5px 12px;border-radius:14px;background:#f5f6f8;font-size:13px;color:#666;text-decoration:none;}
.gongju-subnav-item.active,.gongju-subnav-item:hover{background:var(--chengb,#ff7200);color:#fff;}
.gongju-toolbar{display:flex;justify-content:space-between;align-items:center;background:var(--bg-color,#fff);border-radius:6px;padding:12px 15px;margin-bottom:15px;box-shadow:0 2px 8px rgba(0,0,0,.06);flex-wrap:wrap;gap:10px;}
.gongju-toolbar-title{font-size:16px;font-weight:600;color:var(--text-color,#333);}
.gongju-toolbar-count{margin-left:8px;font-size:12px;font-weight:400;color:#999;}
.gongju-toolbar-sort{display:flex;flex-wrap:wrap;gap:6px;}
.gongju-toolbar-sort a{padding:5px 12px;border:1px solid #eee;border-radius:4px;font-size:13px;color:#666;text-decoration:none;}
.gongju-toolbar-sort a.active,.gongju-toolbar-sort a:hover{border-color:var(--chengb,#ff7200);color:var(--chengb,#ff7200);background:#fff8f2;}
.gongju-list-wrap{background:var(--bg-color,#fff);border-radius:6px;box-shadow:0 2px 8px rgba(0,0,0,.06);padding:15px 0 0;margin-bottom:20px;}
.gongju-list-wrap .tjgj-list{border-radius:0;}

/* ===== 内页 ===== */
.gongju-info .tool-info-header{align-items:flex-start;}
.gongju-title{margin:0 10px;font-size:20px;font-weight:600;color:var(--text-color,#222);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.gongju-op{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.gongju-go{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border-radius:6px;background:var(--chengb,#ff7200);color:#fff;font-size:14px;text-decoration:none;}
.gongju-go:hover{background:#e56700;color:#fff;}
.gongju-op .collect-btn{display:inline-flex;align-items:center;gap:6px;padding:8px 16px;border:1px solid #eee;border-radius:6px;font-size:14px;color:#666;background:var(--bg-color,#fff);text-decoration:none;cursor:pointer;}
.gongju-op .collect-btn.collected{border-color:var(--chengb,#ff7200);color:var(--chengb,#ff7200);}
.gongju-desc{margin:0;font-size:14px;line-height:1.8;color:var(--sub-text-color,#666);}

/* 内嵌网页：外层容器按 zg 定高并裁溢出，iframe 自身的 height / margin-top 由 tool_embed() 按 zg、di 写好 */
.gongju-embed-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:#f8f9fa;border:1px solid #eef2f6;border-bottom:none;border-radius:8px 8px 0 0;padding:10px 14px;font-size:13px;color:var(--sub-text-color,#666);}
.gongju-embed-bar b{color:var(--text-color,#333);}
.gongju-embed-bar .gongju-bar-op{display:flex;align-items:center;gap:8px;}
.gongju-full,.gongju-blank{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border:1px solid #dce3ec;border-radius:5px;background:var(--bg-color,#fff);font-size:12px;color:#475569;cursor:pointer;text-decoration:none;}
.gongju-full:hover,.gongju-blank:hover{border-color:var(--chengb,#ff7200);color:var(--chengb,#ff7200);}
.gongju-embed{position:relative;height:900px;overflow:hidden;background:var(--bg-color,#fff);border:1px solid #e3e6f0;border-radius:0 0 8px 8px;}
.gongju-embed .tool-iframe-box{height:auto;margin:0;border:none;border-radius:0;box-shadow:none;background:transparent;}
.gongju-embed .tool-full-btn{bottom:10px;right:10px;}

/* 自有代码 */
.gongju-run{margin:20px 0;}
.gongju-pre{margin:0;padding:16px;background:#1e1e2f;color:#cbd5e6;font-family:Consolas,"Courier New",monospace;font-size:13px;line-height:1.7;white-space:pre-wrap;word-break:break-all;border-radius:8px;overflow:auto;max-height:640px;}

/* 本地文件：uploads/tool/ 里的工具文件跑出来的内容，高度跟着内容走、超出自己滚 */
.gongju-local{background:var(--bg-color,#fff);border:1px solid #e3e6f0;border-radius:0 0 8px 8px;max-height:900px;overflow:auto;}
.tool-local-run{padding:14px;}
.tool-local-run iframe{max-width:100%;}
.tool-local-empty{padding:34px 18px;text-align:center;color:#b45309;font-size:14px;line-height:1.9;background:#fffbeb;}
.tool-local-empty b{display:block;font-size:15px;margin-bottom:8px;}
.tool-local-empty p{margin:0 0 6px;}
.tool-local-empty code{padding:1px 6px;background:var(--bg-color,#fff);border:1px solid #fcd34d;border-radius:4px;font-family:Consolas,"Courier New",monospace;font-size:12px;color:#b45309;word-break:break-all;}

/* 站外调用代码生成器（纯本地，只读） */
.gongju-embed-card{background:var(--bg-color,#fff);border:1px solid #eef2f6;border-radius:8px;margin:20px 0;overflow:hidden;}
.gongju-embed-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:13px 18px;background:#fafbfc;border-bottom:1px solid #eef2f6;font-weight:600;color:var(--text-color,#1f2d3d);}
.gongju-embed-head i{color:var(--chengb,#ff7200);margin-right:6px;}
.gongju-embed-tip{font-size:12px;font-weight:400;color:#94a3b8;}
.gongju-code-row{padding:16px 18px;border-bottom:1px dashed #eef2f6;}
.gongju-code-row:last-child{border-bottom:none;}
.gongju-code-label{display:block;font-size:13px;color:var(--sub-text-color,#666);margin-bottom:8px;}
.gongju-code{display:block;width:100%;min-height:62px;padding:12px;box-sizing:border-box;background:#1e1e2f;color:#cbd5e6;border:none;border-radius:8px;font-family:Consolas,"Courier New",monospace;font-size:13px;line-height:1.6;resize:vertical;cursor:text;}

/* 空状态与提示 */
.gongju-warn{padding:40px 15px;text-align:center;color:#dc3545;font-size:14px;}
.gongju-warn h3{margin:0 0 8px;font-size:16px;}

@media (max-width:992px){
    .gongju-title{font-size:17px;margin:0 8px;flex:1 1 auto;}
    .gongju-info .tool-stats{margin:10px 0 0;}
    .gongju-embed,.gongju-embed .tool-iframe-box{height:620px;}
}
@media (max-width:768px){
    .gongju-op{width:100%;justify-content:flex-start;}
    .gongju-embed-bar{font-size:12px;}
    .gongju-pre{font-size:12px;max-height:420px;}
    .gongju-local{max-height:640px;}
    .tool-local-run{padding:10px;}
    .tool-local-empty{padding:24px 12px;font-size:13px;}
    .gongju-embed-head{padding:11px 13px;}
    .gongju-code-row{padding:13px;}
}
