/**
 * Binoise Toman icon system
 * Replaces the visible WooCommerce currency word with the supplied Toman glyph
 * while keeping the original text in the DOM for accessibility and non-frontend uses.
 */

:root {
    --bnoise-toman-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2014%2014%27%3E%3Cpath%20fill%3D%27black%27%20fill-rule%3D%27evenodd%27%20clip-rule%3D%27evenodd%27%20d%3D%27M3.057%201.742L3.821%201l.78.75-.776.741-.768-.749zm3.23%202.48c0%20.622-.16%201.111-.478%201.467-.201.221-.462.39-.783.505a3.251%203.251%200%2001-1.083.163h-.555c-.421%200-.801-.074-1.139-.223a2.045%202.045%200%2001-.9-.738A2.238%202.238%200%20011%204.148c0-.059.001-.117.004-.176.03-.55.204-1.158.525-1.827l1.095.484c-.257.532-.397%201-.419%201.403-.002.04-.004.08-.004.12%200%20.252.055.458.166.618a.887.887%200%2000.5.354c.085.028.178.048.278.06.079.01.16.014.243.014h.555c.458%200%20.769-.081.933-.244.14-.139.21-.383.21-.731V2.02h1.2v2.202zm5.433%203.184l-.72-.7.709-.706.735.707-.724.7zm-2.856.308c.542%200%20.973.19%201.293.569.297.346.445.777.445%201.293v.364h.18v-.004h.41c.221%200%20.377-.028.467-.084.093-.055.14-.14.14-.258v-.069c.004-.243.017-1.044%200-1.115L13%208.05v1.574a1.4%201.4%200%2001-.287.863c-.306.405-.804.607-1.495.607h-.627c-.061.733-.434%201.257-1.117%201.573-.267.122-.58.21-.937.265a5.845%205.845%200%2001-.914.067v-1.159c.612%200%201.072-.082%201.38-.247.25-.132.376-.298.376-.499h-.515c-.436%200-.807-.113-1.113-.339-.367-.273-.55-.667-.55-1.18%200-.488.122-.901.367-1.24.296-.415.728-.622%201.296-.622zm.533%202.226v-.364c0-.217-.048-.389-.143-.516a.464.464%200%2000-.39-.187.478.478%200%2000-.396.187.705.705%200%2000-.136.449.65.65%200%2000.003.067c.008.125.066.22.177.283.093.054.21.08.352.08h.533zM9.5%206.707l.72.7.724-.7L10.209%206l-.709.707zm-6.694%204.888h.03c.433-.01.745-.106.937-.29.024.012.065.035.12.068l.074.039.081.042c.135.073.261.133.379.18.345.146.67.22.977.22a1.216%201.216%200%2000.87-.34c.3-.285.449-.714.449-1.286a2.19%202.19%200%2000-.335-1.145c-.299-.457-.732-.685-1.3-.685-.502%200-.916.192-1.242.575-.113.132-.21.284-.294.456-.032.062-.06.125-.084.191a.504.504%200%2000-.03.078%201.67%201.67%200%2000-.022.06c-.103.309-.171.485-.205.53-.072.09-.214.14-.427.147-.123-.005-.209-.03-.256-.076-.057-.054-.085-.153-.085-.297V7l-1.201-.5v3.562c0%20.261.048.496.143.703.071.158.168.296.29.413.123.118.266.211.43.28.198.084.42.13.665.136v.001h.036zm2.752-1.014a.778.778%200%2000.044-.353.868.868%200%2000-.165-.47c-.1-.134-.217-.201-.35-.201-.18%200-.33.103-.447.31-.042.071-.08.158-.114.262a2.434%202.434%200%2000-.04.12l-.015.053-.015.046c.142.118.323.216.544.293.18.062.325.092.433.092.044%200%20.086-.05.125-.152z%27%2F%3E%3C%2Fsvg%3E");
}

/* WooCommerce prices: preserve the real text node, only replace it visually. */
.woocommerce-Price-currencySymbol {
    position: relative !important;
    display: inline-flex !important;
    width: 1.05em !important;
    height: 1.05em !important;
    min-width: 1.05em !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-indent: -9999px !important;
    flex: 0 0 auto !important;
}

.woocommerce-Price-currencySymbol::before {
    content: "";
    position: absolute;
    inset: 0;
    display: block;
    background-color: currentColor;
    -webkit-mask-image: var(--bnoise-toman-mask);
    mask-image: var(--bnoise-toman-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    text-indent: 0;
}

/* Standalone use for UI labels that are not generated by wc_price(). */
.bnoise-toman-glyph {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask-image: var(--bnoise-toman-mask);
    mask-image: var(--bnoise-toman-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    vertical-align: -0.14em;
}

.archive-filter-currency {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 14px;
    line-height: 1;
}

.archive-filter-currency .bnoise-toman-glyph {
    width: 15px;
    height: 15px;
}

/* Keep the glyph compact in small product-card/search price contexts. */
.bpc-price-current .woocommerce-Price-currencySymbol,
.bpc-price-regular .woocommerce-Price-currencySymbol,
.binoise-search-result-price .woocommerce-Price-currencySymbol,
.sp-related-price .woocommerce-Price-currencySymbol {
    width: 1em !important;
    height: 1em !important;
    min-width: 1em !important;
}
