@import url('https://fonts.bunny.net/css?family=instrument-sans:400,500,600&display=swap');
@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../views/**/*.blade.php';
@source '../js/**/*.{ts,tsx}';

/* Modo oscuro controlado por la clase .dark en <html> */
@custom-variant dark (&:where(.dark, .dark *));

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

/*
 * Color primario configurable: --app-primary se inyecta desde el layout
 * (valor guardado en la base de datos). Las variantes se derivan con color-mix.
 */
@theme inline {
    --color-primary: var(--app-primary, #4f46e5);
    --color-primary-dark: color-mix(in srgb, var(--app-primary, #4f46e5) 82%, black);
    --color-primary-light: color-mix(in srgb, var(--app-primary, #4f46e5) 12%, white);
}

[x-cloak] {
    display: none !important;
}

/*
 * Font Awesome 7: sobrescribimos las @font-face del bundle de Vite
 * (que usan rutas /build/assets/ con hash) por rutas estables en
 * public/webfonts/, accesibles directamente vía Apache sin depender
 * de la configuración de DocumentRoot ni de hashes de build.
 */
@font-face {
    font-family: 'Font Awesome 7 Free';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url('../../webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 7 Free';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../../webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 7 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../../webfonts/fa-brands-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-display: block;
    font-weight: 900;
    src: url('../../webfonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Free';
    font-display: block;
    font-weight: 400;
    src: url('../../webfonts/fa-regular-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-display: block;
    font-weight: 400;
    src: url('../../webfonts/fa-brands-400.woff2') format('woff2');
}
@font-face {
    font-family: 'FontAwesome';
    font-display: block;
    src: url('../../webfonts/fa-solid-900.woff2') format('woff2');
}

/*
 * FA7 usa `content: var(--fa) / ""` (CSS Values 4 con slash de
 * accesibilidad) que Chrome/Edge/Safari aún no soportan y descartan
 * la regla entera. Forzamos la sintaxis clásica.
 */
.fa-solid::before,
.fa-regular::before,
.fa-brands::before,
.fa-classic::before,
.fa::before {
    content: var(--fa, '') !important;
}
