/* ========================================
 * 锁车音效库 - 阿里Iconfont自定义样式
 * 替换原 Bootstrap Icons + CSS Fallback 方案
 * 
 * 使用说明：
 * 1. 在 https://www.iconfont.cn 创建项目并添加所需图标
 * 2. 获取在线CSS链接或下载字体文件
 * 3. 将获取的链接替换 header.php 中的引入地址
 * 4. 本文件提供基础样式、尺寸、颜色、动画等工具类
 * ======================================== */

/* ========== 图标基础样式 - 核心 ========== */
.iconfont,
.icon {
    display: inline-block;
    font-family: "iconfont" !important;
    font-size: inherit;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
    vertical-align: middle;
    font-weight: normal;
    color: inherit;
    speak: none;
    text-rendering: optimizeLegibility;
    transition: color 0.2s ease;
}

/* 兼容旧代码：保留 .icon 类名支持 */
.icon {
    font-family: "iconfont" !important;
}

/* ========== 尺寸工具类 ========== */
.icon-xs { font-size: 12px; }
.icon-sm { font-size: 14px; }
.icon-md { font-size: 18px; }
.icon-lg { font-size: 24px; }
.icon-xl { font-size: 32px; }
.icon-xxl { font-size: 48px; }

/* ========== 颜色工具类 ========== */
.icon-primary { color: #FF6B00; }
.icon-primary-dark { color: #E85D00; }
.icon-primary-light { color: #FF8C00; }
.icon-secondary { color: #FFB800; }
.icon-accent { color: #FFD700; }
.icon-success { color: #07C160; }
.icon-danger { color: #E53935; }
.icon-warning { color: #FF9800; }
.icon-info { color: #2196F3; }
.icon-muted { color: #999; }
.icon-white { color: #fff; }

/* ========== 背景色工具类（圆形图标按钮用） ========== */
.icon-bg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.icon-bg-primary { background: #FF6B00; color: #fff; }
.icon-bg-success { background: #07C160; color: #fff; }
.icon-bg-danger { background: #E53935; color: #fff; }
.icon-bg-warning { background: #FF9800; color: #fff; }
.icon-bg-info { background: #2196F3; color: #fff; }
.icon-bg-gray { background: #f5f5f5; color: #666; }

/* ========== 动画效果 ========== */
.icon-spin {
    display: inline-block;
    animation: icon-spin 1s infinite linear;
}
@keyframes icon-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.icon-pulse {
    display: inline-block;
    animation: icon-pulse 1.5s ease-in-out infinite;
}
@keyframes icon-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.icon-bounce {
    display: inline-block;
    animation: icon-bounce 0.6s ease infinite alternate;
}
@keyframes icon-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

/* ========== 按钮图标间距 ========== */
.btn .iconfont,
.btn .icon {
    margin-right: 6px;
}

.btn-icon-only {
    padding: 8px;
    min-width: 36px;
    justify-content: center;
}
.btn-icon-only .iconfont,
.btn-icon-only .icon {
    margin-right: 0;
}

/* ========== 垂直居中修复 ========== */
.icon-offset-1 { transform: translateY(1px); }
.icon-offset-2 { transform: translateY(2px); }
.icon-offset-n1 { transform: translateY(-1px); }
.icon-offset-n2 { transform: translateY(-2px); }

/* ========== 禁用态 ========== */
.icon[disabled],
.disabled .iconfont,
.disabled .icon {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========== hover效果 ========== */
.hover\:icon-primary:hover .iconfont,
.hover\:icon-primary:hover .icon {
    color: #FF6B00;
}

/* ========== Safari/iOS 兼容修复 ========== */
@supports (-webkit-touch-callout: none) {
    .iconfont,
    .icon {
        line-height: 1.2;
    }
}

/* ========== 高清屏优化 ========== */
@media (-webkit-min-device-pixel-ratio: 2) {
    .iconfont,
    .icon {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========== 响应式尺寸 ========== */
@media (max-width: 768px) {
    .icon-lg { font-size: 20px; }
    .icon-xl { font-size: 26px; }
    .icon-xxl { font-size: 36px; }
}

@media (max-width: 480px) {
    .icon-lg { font-size: 18px; }
    .icon-xl { font-size: 24px; }
}

/* ========== 特定场景图标样式 ========== */

/* 状态图标默认色 */
.icon-success { color: #07C160; }
.icon-error  { color: #E53935; }
.icon-warn   { color: #FF9800; }
.icon-info   { color: #2196F3; }

/* 播放按钮特殊处理 */
.icon-play-btn {
    font-size: 22px;
}

/* Logo区域图标 */
.logo-icon {
    font-size: 20px;
    color: #fff;
}

/* Toast弹窗图标 */
.toast-icon-wrap {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.toast-success .toast-icon-wrap { background: #07C160; color: #fff; }
.toast-error .toast-icon-wrap { background: #E53935; color: #fff; }
.toast-warning .toast-icon-wrap { background: #FF9800; color: #fff; }
.toast-info .toast-icon-wrap { background: #2196F3; color: #fff; }

/* 统计卡片图标 */
.stat-icon-wrap {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #FFF0D9, #FFE0A8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon-wrap .iconfont,
.stat-icon-wrap .icon {
    font-size: 22px;
    color: #FF6B00;
}

/* 侧边菜单图标 */
.menu-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* 空状态图标 */
.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    color: #ddd;
}

/* 加载状态 */
.loading-icon {
    font-size: 20px;
    color: #FF6B00;
}

/* 支付方式图标 */
.pay-method-icon {
    font-size: 24px;
}

/* 二维码/扫码图标 */
.qrcode-icon {
    font-size: 48px;
}

/* 社交图标 */
.social-icon {
    font-size: 20px;
}
.social-wechat { color: #07C160; }
.social-alipay { color: #1677FF; }
.social-weibo { color: #E6162D; }
.social-qq { color: #12B7F5; }

/* 文件类型图标 */
.file-icon {
    font-size: 32px;
}
.file-icon-audio { color: #FF6B00; }
.file-icon-image { color: #2196F3; }
.file-icon-video { color: #9C27B0; }
.file-icon-document { color: #4CAF50; }

/* ========== CSS Fallback: 图标字符映射 ========== */
.iconfont.icon-yinyue::before    { content: "\1F50A"; }
.iconfont.icon-bofang::before     { content: "\25B6"; }
.iconfont.icon-zanting::before    { content: "\23F8"; }
.iconfont.icon-xiazai::before     { content: "\2B07"; }
.iconfont.icon-shangchuan::before { content: "\2B06"; }
.iconfont.icon-yonghu::before    { content: "\1F464"; }
.iconfont.icon-qiche::before      { content: "\1F697"; }
.iconfont.icon-riqi::before       { content: "\1F4C5"; }
.iconfont.icon-daxiao::before    { content: "\1F4CF"; }
.iconfont.icon-shijian::before   { content: "\23F1"; }
.iconfont.icon-qianbao::before   { content: "\1F4B0"; }
.iconfont.icon-erji::before       { content: "\1F3A7"; }
.iconfont.icon-xinyongka::before  { content: "\1F4B3"; }
.iconfont.icon-shujufenxi::before { content: "\1F4CA"; }
.iconfont.icon-fenxiang::before  { content: "\1F4E4"; }
.iconfont.icon-close::before      { content: "\2716"; }
.iconfont.icon-fuzhi::before      { content: "\1F4CB"; }
.iconfont.icon-qrcode::before    { content: "\1F4F7"; }
.iconfont.icon-wechat::before     { content: "\1F4AC"; }
.iconfont.icon-shuaxin::before    { content: "\21BB"; }
.iconfont.icon-zhifubao::before  { content: "\1F4B3"; }
.iconfont.icon-gouxuan::before   { content: "\2714"; }
.iconfont.icon-trophy::before     { content: "\1F3C6"; }
.iconfont.icon-chuangjian::before { content: "\26A1"; }
.iconfont.icon-caidan::before    { content: "\2630"; }
.iconfont.icon-shezhi::before    { content: "\2699"; }
.iconfont.icon-bangzhu::before   { content: "\2753"; }
.iconfont.icon-shijie::before    { content: "\1F310"; }
.iconfont.icon-icon::before      { content: "\1F3B5"; }