/**
 * M4 前台投稿表单样式（`justnews/page-submit.php`），复用全局 tokens.css 变量，
 * 每个 CPT 从归档 +投稿 按钮携带 ?type= 直达对应表单。视觉对齐主站 token 体系，
 * 双栏布局（表单主体 + 投稿要点侧栏），响应式，Space Grotesk 标题。
 */

.submit-page { 
    max-width: 1160px;
    margin: 0 auto;
    margin-top: 0;
    margin-bottom: 48px; 
  }

/* ---------- 通用标题 ---------- */
/* 2026-07-19：投稿分类页 submit-head 增加类似启动SOP列表页 Hero 的顶部渐变光晕 */
.submit-head { position: relative; overflow: hidden; text-align: center; margin-bottom: 60px; padding-top: 40px; }
.submit-head::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 100%;
  pointer-events: none; z-index: 0; filter: blur(2px);
  background:
    radial-gradient(ellipse 65% 100% at 38% -8%, rgba(var(--accent-rgb),.20), transparent 65%),
    radial-gradient(ellipse 50% 90% at 70% -4%, rgba(var(--accent-rgb),.13), transparent 65%);
}
.submit-head .submit-title,
.submit-head .submit-sub { position: relative; z-index: 1; }
.submit-gate-badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  padding: 5px 14px; border-radius: var(--radius-pill); margin-bottom: 14px;
}
.submit-title { font-family: var(--font-display); font-size: 27px; font-weight: 700; color: var(--text); margin: 0 0 8px; letter-spacing: -.01em; }
.submit-sub { font-size: 14px; color: var(--muted); margin: 0 0 4px; line-height: 1.6; }
.submit-sub a { color: var(--accent); text-decoration: none; }
.submit-back { display: inline-block; font-size: 13px; color: var(--muted); text-decoration: none; margin-bottom: 14px; transition: color .15s ease; }
.submit-back:hover { color: var(--accent); }

/* ---------- 登录网关 / 成功页 ---------- */
.submit-login-gate, .submit-success { text-align: center; max-width: 480px; margin: 40px auto; padding: 56px 28px; border: 1px solid var(--line); border-radius: var(--radius-card); background: linear-gradient(180deg, #fff, var(--surface)); }
.submit-login-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
/* 登录网关按钮：纯科技蓝（去除 .btn-solid 蓝紫渐变），并加宽登录/注册按钮 */
.submit-login-actions .btn-solid { background: var(--accent) !important; box-shadow: 0 4px 14px rgba(var(--accent-rgb), .28); }
.submit-login-actions .btn-solid:hover { background: var(--accent-hover) !important; }
.submit-login-actions .btn-solid,
.submit-login-actions .btn-outline { min-width: 132px; padding-left: 28px; padding-right: 28px; justify-content: center; }
.submit-success-check { display: flex; justify-content: center; margin-bottom: 8px; }

/* ---------- 类型引导着陆页 ---------- */
.submit-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.submit-type-card {
  position: relative; display: flex; flex-direction: column; padding: 22px 20px;
  border: 1px solid var(--line); border-radius: var(--radius-card); text-decoration: none;
  background: #fff; overflow: hidden;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.submit-type-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), #7c5cff); opacity: 0; transition: opacity .16s ease;
}
.submit-type-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 30px rgba(var(--accent-rgb), .12); }
.submit-type-card:hover::before { opacity: 1; }
.submit-type-label { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.submit-type-desc { font-size: 13px; color: var(--muted); line-height: 1.6; flex: 1; }
.submit-type-go { margin-top: 16px; font-size: 12.5px; font-weight: 600; color: var(--accent); }

/* ---------- 双栏表单布局 ---------- */
.submit-form-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.submit-form-main { min-width: 0; }

/* ---------- 错误提示 ---------- */
.submit-errors { background: #fdecea; border: 1px solid #f5c2c0; border-radius: 10px; padding: 12px 16px; margin: 18px 0; }
.submit-errors p { margin: 4px 0; font-size: 13px; color: #b3261e; }
.submit-errors a { color: var(--accent); }

/* ---------- 表单字段 ---------- */
.submit-form { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.submit-field { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.submit-field > label { font-size: 13px; font-weight: 600; color: var(--text); }
.submit-req { color: #e5484d; margin-left: 3px; font-weight: 700; }
.submit-hint { font-size: 12px; color: var(--muted-2); margin-top: -2px; }
.submit-field input[type="text"],
.submit-field input[type="url"],
.submit-field select,
.submit-field textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14px; color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; background: #fff;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.submit-field input:focus, .submit-field select:focus, .submit-field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}
.submit-field textarea { resize: vertical; line-height: 1.6; }
.submit-field-row { display: flex; gap: 16px; }
.submit-field-row > label { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); }

/* ---------- pill 单选/多选 ---------- */
.submit-radio-group { display: flex; flex-wrap: wrap; gap: 9px; }
.submit-radio-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); cursor: pointer; color: var(--muted); background: #fff; transition: all .14s ease; }
.submit-radio-pill:hover { border-color: var(--muted-2); }
.submit-radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.submit-radio-pill:has(input:checked) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---------- 富文本编辑器（wp_editor）微调 ---------- */
.submit-field-rich .wp-editor-wrap { border-radius: 10px; }
.submit-field-rich .wp-editor-container { border: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.submit-field-rich .wp-editor-tools { background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; padding-top: 6px; }
.submit-field-rich .mce-toolbar-grp, .submit-field-rich .quicktags-toolbar { border-color: var(--line) !important; }

/* ---------- 自定义文件上传 ---------- */
.submit-file { position: relative; }
.submit-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.submit-file-drop {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: 10px; background: var(--surface);
  transition: border-color .14s ease, background .14s ease;
}
.submit-file-drop:hover, .submit-file-input:focus + .submit-file-drop { border-color: var(--accent); background: var(--accent-soft); }
.submit-file-ic { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--accent); font-weight: 700; }
.submit-file-text { font-size: 13px; font-weight: 600; color: var(--text); }
.submit-file-name { font-size: 12px; color: var(--muted); margin-left: auto; text-align: right; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- repeater ---------- */
.submit-repeater-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.submit-repeater-row input { flex: 1; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; }
.submit-repeater-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1); }
.submit-repeater-row-fields { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.submit-repeater-row-fields input { flex: 1; min-width: 110px; }
.submit-repeater-remove { border: none; background: none; color: #b3261e; font-size: 12px; cursor: pointer; flex-shrink: 0; }
.submit-repeater-add { margin-top: 4px; font-size: 13px; padding: 7px 14px; }

/* ---------- 提交按钮 ---------- */
.submit-actions { margin-top: 12px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.submit-btn-lg { font-size: 14.5px; padding: 12px 28px; border-radius: 10px; }
.submit-actions-note { font-size: 12px; color: var(--muted-2); }

/* ---------- 侧栏投稿要点 ---------- */
.submit-aside { position: sticky; top: 24px; }
.submit-aside-card { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 22px 20px; background: linear-gradient(180deg, #fff, var(--surface)); }
.submit-aside-kicker { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; color: var(--accent); text-transform: uppercase; }
.submit-aside-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--text); margin: 8px 0 16px; }
.submit-aside-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.submit-aside-tips li { position: relative; padding-left: 22px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.submit-aside-tips li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.submit-aside-foot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted-2); display: flex; align-items: center; gap: 8px; }
.submit-aside-dot { width: 7px; height: 7px; border-radius: 50%; background: #34c759; flex-shrink: 0; }

/* 侧边栏字段分组 */
.submit-aside-section { margin-bottom: 24px; }
.submit-aside-section:last-child { margin-bottom: 0; }
.submit-aside-section-title { font-size: 14px; font-weight: 600; color: var(--text); margin: 0 0 12px 0; }
.submit-aside-notice { font-size: 12px; color: var(--muted-2); margin: 8px 0 0 0; }
.submit-aside-section .form-control { width: 100%; box-sizing: border-box; font-size: 13px; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; background: #fff; transition: border-color .14s ease, box-shadow .14s ease; }
.submit-aside-section .form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); }
.submit-aside-section .thumb-wrap { margin-bottom: 12px; }
.submit-aside-section .thumb-selector { display: inline-block; font-size: 13px; color: var(--accent); text-decoration: none; padding: 8px 14px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); transition: all .14s ease; cursor: pointer; }
.submit-aside-section .thumb-selector:hover { background: var(--accent); color: #fff; }

/* 左侧组件标题（LOGO / 城市 / 赛道 / 细分方向）统一 16px；细分方向标题后的内联备注 */
.post-form-sidebar .pf-side-label h3 { font-size: 16px; }
.pf-side-hint { font-size: 12px; font-weight: 400; color: var(--muted-2); margin-left: 4px; }

.post-form-main h3 { font-size: 16px; font-weight: 500; line-height: 20px; }
.post-form-main {padding:0 20px 20px}

.submit-page .filter-block-compact {padding-bottom:0px}

/* ---------- 关联OPC 自动匹配控件（输入即筛选，复用于成功案例 / OPC资讯投稿） ---------- */
.opc-ac { position: relative; }
.opc-ac-input { width: 100%; box-sizing: border-box; }
.opc-ac-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  max-height: 260px; overflow-y: auto; margin: 0; padding: 4px;
  list-style: none; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(var(--accent-rgb), .12);
  display: none;
}
.opc-ac.is-open .opc-ac-panel { display: block; }
.opc-ac-opt {
  padding: 8px 10px; border-radius: 7px; font-size: 13.5px; color: var(--text);
  cursor: pointer; line-height: 1.4; transition: background .12s ease, color .12s ease;
}
.opc-ac-opt:hover, .opc-ac-opt.is-active { background: var(--accent-soft); color: var(--accent); }
.opc-ac-opt mark { background: transparent; color: var(--accent); font-weight: 700; padding: 0; }
.opc-ac-empty { padding: 10px; font-size: 13px; color: var(--muted-2); text-align: center; }
.opc-ac-clear {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 20px; height: 20px; border: 0; padding: 0; cursor: pointer;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; line-height: 20px; text-align: center; display: none;
}
.opc-ac.has-value .opc-ac-clear { display: block; }
.opc-ac.has-value .opc-ac-input { padding-right: 34px; }

/* ---------- 申请合作：单栏水平居中（复刻统一投稿页组件样式，去掉左右分栏） ---------- */
/* .post-form 默认 flex 两栏 space-between，此处覆盖为单列居中限宽 */
.opc-partnership-single { max-width: 960px; margin-left: auto; margin-right: auto; }
.opc-partnership-single.post-form { display: block; }
.opc-partnership-single .post-form-main {
    width: 100%;
    padding: 30px 60px;
    margin: 0 auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: linear-gradient(180deg, #fff, var(--surface));
}
/* 复刻 pf-item-label 组件字号，与统一投稿页一致 */
.opc-partnership-single .pf-item-label h3 { font-size: 16px; font-weight: 500; line-height: 20px; margin: 0 0 8px; color: var(--text); }
.opc-partnership-single .pf-item { margin-bottom: 22px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .submit-form-layout { grid-template-columns: 1fr; }
  .submit-aside { position: static; order: -1; }
  .submit-aside-card { background: var(--surface); }
}
@media (max-width: 640px) {
  .submit-page { padding: 28px 16px 56px; }
  .submit-title { font-size: 23px; }
  .submit-field-row { flex-direction: column; }
  .submit-type-grid { grid-template-columns: 1fr; }
  .submit-actions { flex-direction: column; align-items: flex-start; }
  .submit-btn-lg { width: 100%; text-align: center; }
}
