/**
 * Custom Fonts - Theme
 *
 * Main font: Almarai (Google Fonts - Arabic + English)
 * Optional: Bein Arabic, STV (local)
 *
 * @package TeeqCore
 * @since 1.0.0
 */

/* ==========================================================================
   @font-face Declarations - Local Font Files (optional utilities only)
   ========================================================================== */

/* STV Font Family */
@font-face {
    font-family: 'STV';
    src: url('../../font/stv-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bein Arabic Font Family */
@font-face {
    font-family: 'Bein Arabic';
    src: url('../../font/bein-ar-normal.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Global Font Stack - Almarai as main font
   ========================================================================== */

/* CSS Custom Property for font family */
:root {
    --teeqcore-font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    --font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Global font enforcement - HTML and Body */
html,
html[dir="rtl"],
html[dir="ltr"],
body,
body[dir="rtl"],
body[dir="ltr"] {
    font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Universal selector - applies to ALL elements */
*,
*::before,
*::after {
    font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Typography elements - explicit enforcement */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
button,
input,
textarea,
select,
label,
li,
ul,
ol,
dl,
dt,
dd,
blockquote,
cite,
em,
strong,
b,
i,
u,
s,
table,
thead,
tbody,
tfoot,
tr,
td,
th,
pre,
code,
kbd,
samp,
small,
sub,
sup,
mark,
del,
ins {
    font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Language-specific enforcement */
[lang="ar"],
[lang="ar"] *,
[lang="en"],
[lang="en"] *,
[dir="rtl"],
[dir="rtl"] *,
[dir="ltr"],
[dir="ltr"] * {
    font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* Override any Tailwind font utilities using @layer base for highest priority */
@layer base {

    html,
    body,
    * {
        font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    }

    .font-sans,
    .font-serif,
    .font-mono {
        font-family: "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    }
}

/* Utility classes for optional fonts */
.font-bein-arabic {
    font-family: "Bein Arabic", "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.font-stv {
    font-family: "STV", "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ==========================================================================
   Almarai weight utilities (main font)
   ========================================================================== */

.almarai-light {
    font-family: "Almarai", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.almarai-regular {
    font-family: "Almarai", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.almarai-bold {
    font-family: "Almarai", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.almarai-extrabold {
    font-family: "Almarai", sans-serif;
    font-weight: 800;
    font-style: normal;
}