/* =====================================================================
   Rostan Theme — Branding overrides (loaded into Desk + website pages)
   ===================================================================== */

/* Force the navbar app logo to be the Rostan logo with sensible sizing.
   We use background-image so we win against ERPNext's <img src=""> swap. */
:root {
    --rostan-logo: url('/assets/rostan_theme/images/rostan-navbar-logo.png');
    --rostan-logo-mobile: url('/assets/rostan_theme/images/rostan-favicon.png');
}

/* Desk navbar (inside /app) — Frappe v15+v16 markup */
header.navbar .navbar-brand .app-logo,
header.navbar .navbar-brand img,
.navbar.navbar-expand .navbar-brand img,
.standard-image.app-logo,
.app-logo {
    height: 32px !important;
    width: auto !important;
    max-width: 180px !important;
    object-fit: contain !important;
}

/* If ERPNext renders an empty <a class="navbar-brand"> the Frappe JS will
   inject an <img>. We override its src via attribute. */
header.navbar .navbar-brand img[src*="erpnext-logo"],
header.navbar .navbar-brand img[src*="favicon"],
header.navbar .navbar-brand img[src*="frappe-framework"] {
    content: var(--rostan-logo) !important;
}

/* Login + portal navbar (web pages) */
.web-footer-logo img,
.navbar-brand-logo,
.brand-image img {
    height: 32px !important;
    width: auto !important;
}

/* "Powered by Frappe / ERPNext" footer link — hide cleanly */
.web-footer .copyright,
.web-footer .powered,
.footer-subscribe + .container .text-muted a[href*="erpnext"],
.footer-subscribe + .container .text-muted a[href*="frappe"] {
    /* Keep visibility but you can change later */
}

/* Splash / loading state */
.splash, .frappe-loading {
    background-image: var(--rostan-logo) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 200px auto !important;
}

/* Settings panel / About / App switcher icons */
.app-switcher-dropdown .app-icon img,
.app-switcher .erpnext-logo,
.app-switcher img[alt="erpnext"],
.app-switcher img[alt="ERPNext"] {
    content: var(--rostan-logo) !important;
}

/* Print formats: replace ERPNext default print logo by class — only if no
   custom letterhead is set. Letterheads override this anyway. */
.print-format .print-format-letter-head img.standard-image,
.print-format .print-format-letter-head img[src*="erpnext"] {
    content: var(--rostan-logo) !important;
    max-height: 60px !important;
}
