/* ProntoNube brand display font.
   Temporary stand-in (Fredoka, variable 300-700) for the real brand font "Rounds Black".
   Use ONLY for the brand wordmark and brand taglines - never for body/form text. */
@font-face {
    font-family: 'Fredoka';
    src: url('/fonts/fredoka-latin-variable.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --pn-font-display: 'Fredoka', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Brand wordmark ("ProntoNube"). */
.pn-wordmark {
    font-family: var(--pn-font-display);
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* Ignito's friendly error page (Ignito.Web.Server) renders its own wordmark span, so it cannot carry
   .pn-wordmark. Bridge it here so the brand reads the same on that page as everywhere else. */
.ign-err-wordmark {
    font-family: var(--pn-font-display);
}

/* Theme-aware logo mark.
   Light theme shows the colored SVG; dark theme swaps to the white variant.
   Both images are in the DOM; CSS hides the inactive one. */
.pn-brand-img {
    height: 1.5rem;
    width: auto;
    display: block;
}

.pn-brand-img--white {
    display: none;
}

.theme-dark .pn-brand-img--color {
    display: none;
}

.theme-dark .pn-brand-img--white {
    display: block;
}

/* Main app layout brand.
   Class="brand-logo" is rendered by IgnitoBrand (not MainLayout), so it carries
   IgnitoBrand's scoped attribute — MainLayout.razor.css can't reach it. These rules
   must live in global CSS to apply, same pattern as .platform-brand below. */
.brand-logo {
    margin-right: 2rem;
    --ignito-brand-color: var(--primary-color);
    --ignito-brand-font-family: var(--pn-font-display);
    --ignito-brand-font-weight: 600;
    --ignito-brand-letter-spacing: 0.2px;
}

/* Main app layout — dark-mode logo invert. Same technique as .platform-brand below.
   .brand-logo is on the ignito-brand element; .ignito-brand-img is the <img> inside it. */
.theme-dark .brand-logo .ignito-brand-img {
    filter: brightness(0) invert(1);
}

/* Platform layout brand (PlatformLayout uses IgnitoBrand via PlatformBlazorOptions,
   which only accepts a single BrandImage URL — no dual-image slot exists).
   Wire the display font and invert the colored logo to white in dark mode. */
.platform-brand {
    --ignito-brand-font-family: var(--pn-font-display);
}

.theme-dark .platform-brand .ignito-brand-img {
    filter: brightness(0) invert(1);
}
