/*
 * @Descripttion: 图标层 —— 替代 Font Awesome CDN
 *
 * 背景：全站此前依赖 https://cdn.bootcss.com/font-awesome/5.13.0/css/all.css
 * （第三方公共镜像、渲染阻塞、不可控）。实际只用到 16 个图标，其中 6 个还是
 * 后端接口 fileId 字段返回的类名（见 /web/information/api/webRelease/list）。
 *
 * 方案：用 CSS mask + 内联 SVG data-URI，保持所有原有 class 名不变，
 * 因此 `.feature i.fas { font-size:34px; color:var(--brand) }` 这类规则一行都不用改
 * —— width/height 用 1em 跟随 font-size，颜色靠 background-color:currentColor 继承。
 *
 * 图标为自绘 24x24 线性图标，风格统一（圆角端点、1.75 描边）。
 */

i.fas,
i.far,
i.fa,
i.fab {
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  display: inline-block;
}

i[class*="fa-"]::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  background-color: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* ---- 兜底：未映射的类名（后端可能新增 fileId）渲染为通用图标。
       与具体规则同为 (0,1,1) 特异性，靠源序决胜，因此这条必须在最前。 ---- */
i[class*="fa-"]::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E");
}

/* ================= 功能模块（后端 fileId 返回值，共 6 个） ================= */

/* fas fa-store —— 图纸管理 */
i.fa-store::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3Cpath d='M9 13h6M9 17h4'/%3E%3C/svg%3E");
}

/* fas fa-user —— 任务管理 */
i.fa-user::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M4.5 20a7.5 7.5 0 0 1 15 0'/%3E%3C/svg%3E");
}

/* fas fa-comments —— 手续办理 */
i.fa-comments::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a7 7 0 0 1-7 7H9l-4 3v-3.6A7 7 0 0 1 4 12v-1a7 7 0 0 1 7-7h2a7 7 0 0 1 7 7z'/%3E%3Cpath d='M9 11h6M9 14h3'/%3E%3C/svg%3E");
}

/* fas fa-sign-in-alt —— 表单管理 */
i.fa-sign-in-alt::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 14l2 2 4-4'/%3E%3C/svg%3E");
}

/* fas fa-sign-out-alt —— 头部「退出登录」。门框 + 向右穿出的箭头。
   注意不要省掉这条：未映射的类名会落进上面那条兜底规则，渲染成一个通用方块，
   看着像图标加载失败，而不是明显缺图标。 */
i.fa-sign-out-alt::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8'/%3E%3Cpath d='M16.5 8.5L20 12l-3.5 3.5'/%3E%3Cpath d='M20 12H10'/%3E%3C/svg%3E");
}

/* fas fa-paper-plane —— 进度管理 */
i.fa-paper-plane::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L10.5 13.5'/%3E%3Cpath d='M21 3l-6.5 18-4-7.5L3 9.5z'/%3E%3C/svg%3E");
}

/* fas fa-landmark —— BIM 管理 */
i.fa-landmark::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-6 9 6'/%3E%3Cpath d='M5 10v9M9.5 10v9M14.5 10v9M19 10v9'/%3E%3Cpath d='M3 21h18'/%3E%3C/svg%3E");
}

/* ================= 关于平台 · 特色（首页硬编码，共 6 个） ================= */

/* fas fa-server —— 全程管控 */
i.fa-server::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='7' rx='2'/%3E%3Crect x='3' y='13' width='18' height='7' rx='2'/%3E%3Cpath d='M7 7.5h.01M7 16.5h.01'/%3E%3C/svg%3E");
}

/* fas fa-lightbulb —— 经验复用 */
i.fa-lightbulb::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 1 3.5 10.9c-.4.3-.5.7-.5 1.1H9c0-.4-.1-.8-.5-1.1A6 6 0 0 1 12 3z'/%3E%3C/svg%3E");
}

/* fas fa-chart-line —— 质量把控 */
i.fa-chart-line::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 20h18'/%3E%3Cpath d='M4 15l4.5-5 4 3.5L20 6'/%3E%3Cpath d='M20 10V6h-4'/%3E%3C/svg%3E");
}

/* fas fa-desktop —— 数模结合 */
i.fa-desktop::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4' width='19' height='12.5' rx='2'/%3E%3Cpath d='M9 20.5h6'/%3E%3Cpath d='M12 16.5v4'/%3E%3C/svg%3E");
}

/* fas fa-tachometer-alt —— 精准隔离 */
i.fa-tachometer-alt::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17a9 9 0 1 1 16 0'/%3E%3Cpath d='M12 13.5l4-3.5'/%3E%3Ccircle cx='12' cy='14.5' r='1.6'/%3E%3C/svg%3E");
}

/* fas fa-shopping-cart —— 标准化的配置 */
i.fa-shopping-cart::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2.2l2.3 10.4a1.6 1.6 0 0 0 1.6 1.3h7.6a1.6 1.6 0 0 0 1.6-1.2L20 7H6'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.4'/%3E%3Ccircle cx='17' cy='19.5' r='1.4'/%3E%3C/svg%3E");
}

/* ================= 其它界面图标 ================= */

/* far fa-calendar —— 发布日期 */
i.fa-calendar::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M8 3v4M16 3v4'/%3E%3C/svg%3E");
}

/* fa fa-angle-left —— 轮播左箭头 */
i.fa-angle-left::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E");
}

/* fa fa-angle-right —— 轮播右箭头 */
i.fa-angle-right::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
}

/* fas fa-chevron-up —— 回到顶部（页脚组件） */
i.fa-chevron-up::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 15l7-7 7 7'/%3E%3C/svg%3E");
}

/* fas fa-phone —— 联系方式 */
i.fa-phone::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3h3l1.5 4-2 1.5a12 12 0 0 0 6 6L16.5 12l4 1.5v3a2 2 0 0 1-2.2 2A17 17 0 0 1 3.5 5.2 2 2 0 0 1 5.5 3z'/%3E%3C/svg%3E");
}

/* fas fa-envelope —— 邮箱 */
i.fa-envelope::before {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3.5 7l8.5 6 8.5-6'/%3E%3C/svg%3E");
}
