/*
 * Dopamine theme for Nova 5.
 * Brand colours are injected by Nova from config('nova.brand.colors');
 * the logo comes from config('nova.brand.logo').
 * Font files live in public/fonts/vazirmatn (served by the app itself).
 */

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
}

html,
body,
.font-sans,
button,
input,
select,
textarea {
    font-family: Vazirmatn, Vazir, Tahoma, ui-sans-serif, system-ui, sans-serif;
}

/* Nova uses semibold headings; Vazirmatn only ships 400/500/700. */
h1, h2, h3, h4, .font-semibold {
    font-weight: 700;
}

/*
 * Logo. Nova inlines resources/img/dopamine-logo.svg through PassthroughLogo
 * (<a><span><svg class="h-6"></svg></span></a>). The svg's width attribute
 * (320px) would otherwise overflow the 15rem header slot and push the artwork
 * away from the sidebar's start edge; let the height drive the width instead.
 *
 * The svg carries two raster layers: the slate wordmark for light mode and a
 * white-wordmark copy for dark mode. Nova toggles `.dark` on <html>.
 */
.dopamine-logo-dark,
.dark .dopamine-logo-light {
    display: none;
}

.dark .dopamine-logo-dark {
    display: inline;
}

header a[href] > span > svg,
.max-w-sm > span > svg {
    display: block;
    width: auto;
    max-width: 100%;
}

header a[href] > span > svg {
    height: 2rem;
}

/* Auth pages: larger, centred wordmark. */
.max-w-sm > span > svg {
    height: 3.5rem;
}

/* Numbers and identifiers stay left-to-right inside the RTL layout. */
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[dir="ltr"],
.ltr {
    direction: ltr;
    text-align: left;
}

/* Tight tables: zebra rows in the brand tint. */
.tight-table tbody tr:nth-child(even),
table.table tbody tr:nth-child(even) {
    background-color: rgba(var(--colors-primary-50), 0.6);
}

.dark .tight-table tbody tr:nth-child(even),
.dark table.table tbody tr:nth-child(even) {
    background-color: rgba(var(--colors-primary-900), 0.25);
}

table.table tbody tr:hover td {
    background-color: rgba(var(--colors-primary-100), 0.9);
}

.dark table.table tbody tr:hover td {
    background-color: rgba(var(--colors-primary-800), 0.4);
}

/* Trix editor and its toolbar in RTL. */
trix-editor {
    direction: rtl;
    text-align: right;
}

trix-toolbar .trix-button-row {
    direction: ltr;
}

/* Breadcrumb separator: Nova hardcodes chevron-right; mirror it for RTL. */
[dusk="breadcrumbs"] svg {
    transform: scaleX(-1);
}
