/* Tighten icon-to-text gap and link side padding on OS menu items */
.td-header-style-5 .sf-menu > li.menu-win > a,
.td-header-style-5 .sf-menu > li.menu-mac > a,
.td-header-style-5 .sf-menu > li.menu-linux > a,
.td-header-style-5 .sf-menu > li.menu-android > a,
.td-header-style-5 .sf-menu > li.menu-ios > a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding-left: 7px !important;
    padding-right: 7px !important;
}

/* Base icon size */
.td-header-style-5 .sf-menu > li.menu-win > a::before,
.td-header-style-5 .sf-menu > li.menu-mac > a::before,
.td-header-style-5 .sf-menu > li.menu-linux > a::before,
.td-header-style-5 .sf-menu > li.menu-android > a::before,
.td-header-style-5 .sf-menu > li.menu-ios > a::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Windows */
.td-header-style-5 .sf-menu > li.menu-win > a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M0 3.449L9.75 2.1v9.451H0m10.949-9.602L24 0v11.4H10.949M0 12.6h9.75v9.451L0 20.699M10.949 12.6H24V24l-12.9-1.801'/%3E%3C/svg%3E");
}

/* Mac & iOS */
.td-header-style-5 .sf-menu > li.menu-mac > a::before,
.td-header-style-5 .sf-menu > li.menu-ios > a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.96 6.32c.67-.81 1.12-1.94 1-3.07-.96.04-2.13.64-2.82 1.45-.61.7-.14 1.85-1.01 2.96 1.07.08 2.16-.53 2.83-1.34z'/%3E%3C/svg%3E");
}

/* Linux */
.td-header-style-5 .sf-menu > li.menu-linux > a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 1.5c-2.1 0-3.6 1.7-3.6 3.9 0 1.2.4 2.4.1 3.6-.3 1.5-1.8 2.9-2.2 4.7-.4 1.3-.3 2.7.4 3.9-.8.3-1.4.8-1.4 1.5 0 .9 1.3 1.5 3.1 1.5 1.3 0 2.4-.3 2.9-.8.5.2 1.1.3 1.7.3s1.2-.1 1.7-.3c.5.5 1.6.8 2.9.8 1.8 0 3.1-.6 3.1-1.5 0-.7-.6-1.2-1.4-1.5.7-1.2.8-2.6.4-3.9-.4-1.8-1.9-3.2-2.2-4.7-.3-1.2.1-2.4.1-3.6 0-2.2-1.5-3.9-3.6-3.9zm-1.4 3.2c.4 0 .7.4.7.9s-.3.9-.7.9-.7-.4-.7-.9.3-.9.7-.9zm2.8 0c.4 0 .7.4.7.9s-.3.9-.7.9-.7-.4-.7-.9.3-.9.7-.9zM12 7.2c1.2 0 2.2.5 2.2 1.1s-1 1.1-2.2 1.1-2.2-.5-2.2-1.1.9-1.1 2.2-1.1zm0 3.1c2.1 0 3.7 2.4 3.7 5.2 0 2.3-1.5 3.9-3.7 3.9s-3.7-1.6-3.7-3.9c0-2.8 1.6-5.2 3.7-5.2zm-1.7 1.7c-.8.7-1.2 1.9-1.2 3.3 0 1.5.7 2.5 1.8 2.8-.5-.7-.7-1.7-.7-2.8 0-1.3.4-2.5 1.1-3.3zm3.4 0c.7.8 1.1 2 1.1 3.3 0 1.1-.2 2.1-.7 2.8 1.1-.3 1.8-1.3 1.8-2.8 0-1.4-.4-2.6-1.2-3.3z'/%3E%3C/svg%3E");
}

/* Android */
.td-header-style-5 .sf-menu > li.menu-android > a::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M17.523 15.341a.999.999 0 0 1-.998-1 .999.999 0 0 1 .998-1c.552 0 1 .448 1 1s-.448 1-1 1m-11.046 0a.999.999 0 0 1-.998-1 .999.999 0 0 1 .998-1c.552 0 1 .448 1 1s-.448 1-1 1m11.405-6.02l1.997-3.46a.416.416 0 0 0-.152-.567.416.416 0 0 0-.568.152L17.137 8.95C15.619 8.257 13.868 7.87 12 7.87s-3.619.387-5.137 1.08L4.841 5.446a.417.417 0 0 0-.568-.152.416.416 0 0 0-.152.567l1.997 3.46C2.688 11.187.343 14.659 0 18.761h24c-.343-4.102-2.688-7.574-6.118-9.44'/%3E%3C/svg%3E");
}




/* Per-OS optical size tuning — keep Windows, scale up others */
.td-header-style-5 .sf-menu > li.menu-win > a::before {
    width: 15px !important;
    height: 15px !important;
}

.td-header-style-5 .sf-menu > li.menu-mac > a::before,
.td-header-style-5 .sf-menu > li.menu-ios > a::before {
    width: 16px !important;
    height: 18px !important;
}

.td-header-style-5 .sf-menu > li.menu-linux > a::before {
    width: 16px !important;
    height: 19px !important;
}

.td-header-style-5 .sf-menu > li.menu-android > a::before {
    width: 18px !important;
    height: 15px !important;
}