/* ============================================================
   AppxSoft — Base: fonts, typography, document defaults
   ============================================================ */

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-VariableFont.ttf') format('truetype-variations');
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.customers {
    background: var(--appx-background);
    color: var(--appx-text);
    font-family: var(--appx-font);
    font-size: var(--appx-text-base);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Arabic readability: keep letter-spacing at 0, rely on line-height */
h1, h2, h3, h4, h5, h6 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.35;
    color: var(--appx-text);
}

a {
    color: var(--appx-primary);
}

a:hover,
a:focus {
    color: var(--appx-primary-hover);
}

/* Accessible focus */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--appx-primary);
    outline-offset: 2px;
}

::selection {
    background: var(--appx-primary-soft);
}

/* Subtle scrollbars */
.appx-sidebar::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.appx-sidebar::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: var(--appx-border-strong);
    border-radius: 8px;
}

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Remove the legacy hard-coded forced RTL — direction now follows [dir] */
[dir="rtl"] body.customers,
body.customers[dir="rtl"] {
    text-align: start;
}

/* Legacy helpers used across Appx views */
.text-muted {
    color: var(--appx-text-muted) !important;
}

hr {
    border-color: var(--appx-border);
}

.label {
    border-radius: 999px;
    font-weight: 600;
    padding-inline: 10px;
}
