/*
 Font Awesome 6 -> 4.5 Compatibility Layer
 Maps FA6 icon classes used in templates to FA4 equivalents or unicode fallbacks
 */

/* FA6 solid prefix -> FA4 base */
[class*=" fas fa"],
[class*=" fab fa"],
[class*=" far fa"] {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Icon alias mappings */
.fa-sign-out-alt:before { content: "\f08b"; }
/* .fa-phone-alt 见文件末尾：改用 SVG mask + currentColor（避免 emoji 彩色字形） */
.fa-comment-dots:before { content: "\f075"; }
.fa-laptop-house:before { content: "\f236"; }
.fa-mobile-alt:before { content: "\f10b"; }
.fa-user-graduate:before { content: "\f19d"; }
.fa-chart-line:before { content: "\f201"; }
.fa-award:before { content: "\f091"; }
.fa-medal:before { content: "\f0a3"; }
.fa-headset:before { content: "\f025"; }
.fa-check-circle:before { content: "\f058"; }
.fa-question-circle:before { content: "\f059"; }
.fa-angle-double-right:before { content: "\f101"; }
.fa-star:before { content: "\f005"; }

/* Also support .fa-* aliases that exist in both versions */
.fas, .far, .fab, .fa {
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Make .fas map to .fa for FA4 compatibility */
.fas:before { content: ""; }

/* CSS-drawn fallbacks for icons without unicode equivalents */
.fa-headset {
    font-size: 0;
    width: 1em;
    height: 1em;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M632 240H8c-4.4 0-8 3.6-8 8v24c0 35.3 28.7 64 64 64h8.4c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4C571.5 173.4 590.5 217.4 591.6 264H488c-30.9 0-56 25.1-56 56v48h-8.4C408.7 368 384 392.7 384 424v48c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-48c0-31.3-24.7-56-55.6-56H488v-48c0-30.9-25.1-56-56-56h103.6c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4C790.5 173.4 809.5 217.4 810.6 264H632c-4.4 0-8 3.6-8 8v24c0 35.3 28.7 64 64 64h8.4c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4c36.3 33.8 55.3 77.8 56.4 124.4H952c30.9 0 56 25.1 56 56v48h32c17.7 0 32-14.3 32-32V248c0-82.5-53-154.4-128-187.2V8c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192C0 233.5 53 305.4 128 348.2V248c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192c0 17.7 14.3 32 32 32h32v48c0 30.9 25.1 56 56 56h64c4.4 0 8-3.6 8-8v-8h208v8c0 4.4 3.6 8 8 8h64c30.9 0 56-25.1 56-56v-48h32c17.7 0 32-14.3 32-32V248c0-82.5-53-154.4-128-187.2V8c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192c0 17.7 14.3 32 32 32h32v48c0 30.9 25.1 56 56 56h64c4.4 0 8-3.6 8-8v-8h208v8c0 4.4 3.6 8 8 8h64c30.9 0 56-25.1 56-56v-48h32c17.7 0 32-14.3 32-32V240z'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M632 240H8c-4.4 0-8 3.6-8 8v24c0 35.3 28.7 64 64 64h8.4c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4C571.5 173.4 590.5 217.4 591.6 264H488c-30.9 0-56 25.1-56 56v48h-8.4C408.7 368 384 392.7 384 424v48c0 4.4 3.6 8 8 8h240c4.4 0 8-3.6 8-8v-48c0-31.3-24.7-56-55.6-56H488v-48c0-30.9-25.1-56-56-56h103.6c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4C790.5 173.4 809.5 217.4 810.6 264H632c-4.4 0-8 3.6-8 8v24c0 35.3 28.7 64 64 64h8.4c1.1-46.6 20.1-90.6 56.4-124.4l4.3-4c17.3-16.5 40.8-25.6 64.8-25.6h63c24 0 47.5 9.1 64.8 25.6l4.3 4c36.3 33.8 55.3 77.8 56.4 124.4H952c30.9 0 56 25.1 56 56v48h32c17.7 0 32-14.3 32-32V248c0-82.5-53-154.4-128-187.2V8c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192C0 233.5 53 305.4 128 348.2V248c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192c0 17.7 14.3 32 32 32h32v48c0 30.9 25.1 56 56 56h64c4.4 0 8-3.6 8-8v-8h208v8c0 4.4 3.6 8 8 8h64c30.9 0 56-25.1 56-56v-48h32c17.7 0 32-14.3 32-32V248c0-82.5-53-154.4-128-187.2V8c0-4.4-3.6-8-8-8H8c-4.4 0-8 3.6-8 8v192c0 17.7 14.3 32 32 32h32v48c0 30.9 25.1 56 56 56h64c4.4 0 8-3.6 8-8v-8h208v8c0 4.4 3.6 8 8 8h64c30.9 0 56-25.1 56-56v-48h32c17.7 0 32-14.3 32-32V240z'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: 100%;
    mask-size: 100%;
}

/* For elements using fa-*-alt patterns, alias them */
/* 电话图标：原来用 emoji「📞」，彩色字形会无视 CSS color，
   导致凡是 .fa-phone-alt 的地方都显示成红色话机，跟品牌色不搭。
   这里改成 SVG mask + currentColor，颜色可完全由 CSS 控制（默认 logo 黄 #f9d100）。 */
.fa-phone-alt {
    font-size: inherit;
    color: #f9d100;
}
.fa-phone-alt:before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M497.39 361.8l-112-48a24 24 0 0 0-28 6.9l-49.6 60.6A370.66 370.66 0 0 1 130.6 204.11l60.6-49.6a23.94 23.94 0 0 0 6.9-28l-48-112A24.16 24.16 0 0 0 122.6.61l-104 24A24 24 0 0 0 0 48c0 256.5 207.9 464 464 464a24 24 0 0 0 23.4-18.6l24-104a24.34 24.34 0 0 0-14.01-27.6z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M497.39 361.8l-112-48a24 24 0 0 0-28 6.9l-49.6 60.6A370.66 370.66 0 0 1 130.6 204.11l60.6-49.6a23.94 23.94 0 0 0 6.9-28l-48-112A24.16 24.16 0 0 0 122.6.61l-104 24A24 24 0 0 0 0 48c0 256.5 207.9 464 464 464a24 24 0 0 0 23.4-18.6l24-104a24.34 24.34 0 0 0-14.01-27.6z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.fa-comment-dots { font-size: 0; }
.fa-comment-dots:before { content: "💬"; font-size: 14px; }
.fa-headset { font-size: 0; }
.fa-headset:before { content: "🎧"; font-size: 14px; }
.fa-laptop-house { font-size: 0; }
.fa-laptop-house:before { content: "🏠"; font-size: 14px; }
.fa-mobile-alt { font-size: 0; }
.fa-mobile-alt:before { content: "📱"; font-size: 14px; }
.fa-user-graduate { font-size: 0; }
.fa-user-graduate:before { content: "🎓"; font-size: 14px; }
.fa-chart-line { font-size: 0; }
.fa-chart-line:before { content: "📈"; font-size: 14px; }
.fa-award { font-size: 0; }
.fa-award:before { content: "🏆"; font-size: 14px; }
.fa-medal { font-size: 0; }
.fa-medal:before { content: "🥇"; font-size: 14px; }
.fa-sign-out-alt { font-size: 0; }
.fa-sign-out-alt:before { content: "🚪"; font-size: 14px; }

/* Fix: make icons inside buttons/links not inherit weird sizes */
.chat-contact-item .fa-phone-alt:before { font-size: 16px; }
.floating-chat .chat-toggle-btn .fa-comments:before { font-size: 16px; }
