/**
 * Copyright © Magneto. All rights reserved.
 *
 * Frontend styles for custom currency symbol font
 * Only applies when Unicode character U+E900 is detected in price elements
 * Works with multiple stores/currencies - font only applies to stores using U+E900
 */
@font-face {
    font-family: 'SaudiRiyal';
    src: url('../fonts/saudi-riyal.woff') format('woff'),
         url('../fonts/saudi-riyal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Only apply font when body has custom-currency-active class (set by JavaScript when U+E900 is detected) */
.custom-currency-active .product-item .price-box .price,
.custom-currency-active .cart-summary .block .price {
    font-family: 'SaudiRiyal', 'Open Sans';
}

/* Luma theme selectors */
.custom-currency-active .block-minicart .amount .price-wrapper:first-child .price,
.custom-currency-active .opc-block-summary .product-item .price,
.custom-currency-active .table-checkout-shipping-method tbody .col-price,
.custom-currency-active .opc-block-summary .table-totals tbody .amount .price,
.custom-currency-active .opc-block-summary .table-totals .grand strong .price {
    font-family: 'SaudiRiyal', 'Open Sans';
}

.custom-currency-active .minicart-items .product-item-details .price {
    font-family: 'SaudiRiyal', 'Open Sans';
}

.custom-currency-active .cart.table-wrapper .col.price .price-excluding-tax .price,
.custom-currency-active .cart.table-wrapper .col.subtotal .price-excluding-tax .price,
.custom-currency-active .cart-totals tbody .amount .price,
.custom-currency-active .cart-totals .grand strong .price,
.custom-currency-active .product-info-price .price-box .price-container .price {
    font-family: 'SaudiRiyal', 'Open Sans';
}

.custom-currency-active .price-box .price {
    font-family: 'SaudiRiyal', 'Open Sans';
}

/* Hyvä theme selectors (Alpine.js data attributes) */
.custom-currency-active [x-html*="cart.subtotal"] .price,
.custom-currency-active [x-text*="hyva.formatPrice(segment.value)"],
.custom-currency-active [x-text*="hyva.formatPrice(totalsData.subtotal)"],
.custom-currency-active [x-text*="hyva.formatPrice(rate.price_excl_tax)"] {
    font-family: 'SaudiRiyal', 'Open Sans';
}