/*
 APADANA CLOUD
 GLOBAL VAZIRMATN
 CLIENT + LAGOM + CART + ADMIN
*/

@font-face {
    font-family: 'ApadanaVazirmatn';
    src: url('../fonts/apadana/Vazirmatn.woff2') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

/* Global font variables */

:root {
    --apadana-font: 'ApadanaVazirmatn', Tahoma, Arial, sans-serif;
    --bs-body-font-family: var(--apadana-font);
}

/*
 Apply font throughout all HTML pages.
 Protect icon fonts, SVG and code blocks.
*/

html,
body,
html body :not(i)
          :not(svg)
          :not(svg *)
          :not(pre)
          :not(pre *)
          :not(code)
          :not(code *)
          :not(kbd)
          :not(samp)
          :not(.fa)
          :not(.fas)
          :not(.far)
          :not(.fal)
          :not(.fab)
          :not(.fad)
          :not(.glyphicon)
          :not(.material-icons)
          :not(.material-symbols-outlined)
          :not(.bi)
          :not(.ls)
          :not(.lm)
          :not([class^="fa-"])
          :not([class*=" fa-"])
          :not([class^="icon-"])
          :not([class*=" icon-"])
          :not([class^="ls-"])
          :not([class*=" ls-"])
          :not([class^="lm-"])
          :not([class*=" lm-"])
          :not([class^="glyphicon-"])
          :not([class*=" glyphicon-"]) {
    font-family: var(--apadana-font) !important;
}

/* Default typography */

html body {
    font-weight: 500 !important;
}

/* Content and forms */

html body :is(
    p,
    li,
    td,
    th,
    label,
    small,
    input,
    textarea,
    select,
    option,
    .form-control,
    .form-label,
    .description,
    .text-muted,
    .panel-body,
    .card-body,
    .alert
) {
    font-weight: 500 !important;
}

/* Navigation, buttons, sidebar */

html body :is(
    button,
    .btn,
    .nav-link,
    .dropdown-item,
    .navbar a,
    .navbar-nav a,
    .sidebar a,
    .main-sidebar a,
    .main-menu a,
    .dropdown-menu a,
    .menu a,
    .btn *
) {
    font-weight: 600 !important;
}

/* Prices */

html body :is(
    .price,
    .price *,
    .price-value,
    .product-price,
    .product-price *,
    .package-price,
    .amount,
    .total-price,
    .invoice-total,
    .price-amount,
    .price-container
) {
    font-weight: 600 !important;
}

/* Headings */

html body :is(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    h1 *,
    h2 *,
    h3 *,
    h4 *,
    h5 *,
    h6 *,
    strong,
    b
) {
    font-weight: 700 !important;
}

/* Placeholders */

html body input::placeholder,
html body textarea::placeholder {
    font-family: var(--apadana-font) !important;
    font-weight: 500 !important;
}

/* Preserve code fonts */

html body :is(
    pre,
    code,
    kbd,
    samp,
    pre *,
    code *
) {
    font-family: monospace !important;
}

/* Better Persian rendering */

html body {
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}

/* END APADANA GLOBAL FONT */


/* APADANA_BUTTON_FONT_START */

/*
 * Apadana Cloud
 * Vazirmatn for buttons and their text.
 * Preserve icon fonts.
 */

html body :is(
    button,
    .btn,
    a.btn,
    .button,
    .rs-btn,
    input[type="submit"],
    input[type="button"],
    input[type="reset"],
    [role="button"],
    .dropdown-toggle,
    .dropdown-item,
    .nav-link,
    .btn-text,
    .btn-label,
    .button-text,
    .button-label
) {
    font-family:
        'ApadanaVazirmatn',
        'ApadanaVazir',
        Vazirmatn,
        Tahoma,
        Arial,
        sans-serif !important;

    font-weight: 600 !important;
}

/*
 * Nested button labels.
 * Exclude known icon elements.
 */

html body :is(
    button,
    .btn,
    a.btn,
    .button,
    .rs-btn,
    [role="button"],
    .dropdown-toggle,
    .dropdown-item,
    .nav-link
) :is(
    span,
    strong,
    b,
    small,
    em,
    label,
    div
):not(i)
 :not(.fa)
 :not(.fas)
 :not(.far)
 :not(.fal)
 :not(.fab)
 :not(.fad)
 :not(.fat)
 :not(.fa-solid)
 :not(.fa-regular)
 :not(.fa-brands)
 :not(.glyphicon)
 :not(.material-icons)
 :not(.material-symbols-outlined)
 :not(.mdi)
 :not(.bi)
 :not(.ri)
 :not(.ls)
 :not(.lm)
 :not([class^="fa-"])
 :not([class*=" fa-"])
 :not([class^="icon-"])
 :not([class*=" icon-"])
 :not([class^="ls-"])
 :not([class*=" ls-"])
 :not([class^="lm-"])
 :not([class*=" lm-"]) {

    font-family:
        'ApadanaVazirmatn',
        'ApadanaVazir',
        Vazirmatn,
        Tahoma,
        Arial,
        sans-serif !important;

    font-weight: 600 !important;
}

/* APADANA_BUTTON_FONT_END */


/* APADANA_CART_ICON_GAP_START */

/*
 * Apadana Cloud
 * Cart icon spacing - Lagom 2 / WHMCS
 */

:root {
    --apadana-cart-icon-gap: 9px;
}

/* Lagom cart navigation */

html body .nav-item-cart > a,
html body .nav-item-cart > button,
html body .menu-item-cart > a,
html body .menu-item-cart > button {
    column-gap: var(--apadana-cart-icon-gap) !important;
}

/* Icon elements inside cart menu */

html body .nav-item-cart > a :is(
    i,
    svg,
    .menu-item-icon,
    .nav-item-icon,
    .icon,
    .ls,
    .lm,
    .fa,
    .fas
),
html body .menu-item-cart > a :is(
    i,
    svg,
    .menu-item-icon,
    .nav-item-icon,
    .icon,
    .ls,
    .lm,
    .fa,
    .fas
) {
    margin-inline-end: var(--apadana-cart-icon-gap) !important;
}

/* Cart links in header and navigation */

html body :is(
    header,
    nav,
    .navbar,
    .top-nav,
    .main-menu
) a[href*="cart.php"] :is(
    i,
    svg,
    .menu-item-icon,
    .nav-item-icon,
    .icon,
    .fa,
    .fas,
    .ls,
    .lm
) {
    margin-inline-end: var(--apadana-cart-icon-gap) !important;
}

/* Icons rendered using pseudo-elements */

html body .nav-item-cart > a::before,
html body .menu-item-cart > a::before {
    margin-inline-end: var(--apadana-cart-icon-gap) !important;
}

/* APADANA_CART_ICON_GAP_END */
