/**
 * JRH One brand marks — visibility by theme, surface, and accent.
 * Loaded last so page CSS cannot force every lockup visible at once.
 */

.brand-logo-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    line-height: 0;
}

.login-marketing__logo.brand-logo-slot {
    justify-content: flex-start;
}

.brand-logo {
    display: none;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 2rem;
    object-fit: contain;
    object-position: left center;
    background: transparent;
}

.brand-logo-slot .brand-logo--on-light {
    display: inline-block;
}

.brand-logo-slot .brand-logo--app-icon {
    display: inline-block;
}

html[data-theme="dark"] .brand-logo-slot .brand-logo--on-light {
    display: none;
}

html[data-theme="dark"] .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green {
    display: inline-block;
}

html[data-theme="dark"] body.is-login-page .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green,
html[data-theme="dark"] body.is-jrh-ask-page .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green,
html[data-theme="dark"] body.is-home-v2 .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green {
    display: none;
}

html[data-theme="dark"] body.is-login-page .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet,
html[data-theme="dark"] body.is-jrh-ask-page .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet,
html[data-theme="dark"] body.is-home-v2 .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet {
    display: inline-block;
}

/* Sidebar chrome is always dark, including light theme. */
.jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green {
    display: inline-block;
}

.jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet,
.jrh-sidebar .brand-logo-slot .brand-logo--on-light {
    display: none;
}

html[data-theme="dark"] body.is-jrh-ask-page .jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green,
html[data-theme="dark"] body.is-home-v2 .jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green {
    display: none;
}

html[data-theme="dark"] body.is-jrh-ask-page .jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet,
html[data-theme="dark"] body.is-home-v2 .jrh-sidebar .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet {
    display: inline-block;
}

.auth-brand-panel .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-green {
    display: inline-block;
}

.auth-brand-panel .brand-logo-slot .brand-logo--on-dark.brand-logo--accent-violet {
    display: none;
}

.jrh-sidebar__logo--icon.brand-logo-slot {
    display: inline-flex;
}

html[data-sidebar="pinned"] .jrh-sidebar__logo--icon.brand-logo-slot,
.app-rail.jrh-sidebar.is-hover-open .jrh-sidebar__logo--icon.brand-logo-slot {
    display: none;
}

.jrh-sidebar__logo--full.brand-logo-slot {
    display: none;
}

html[data-sidebar="pinned"] .jrh-sidebar__logo--full.brand-logo-slot,
.app-rail.jrh-sidebar.is-hover-open .jrh-sidebar__logo--full.brand-logo-slot {
    display: inline-flex;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
}

.jrh-sidebar__logo--icon .brand-logo,
.footer-brand-icon .brand-logo {
    max-height: 2rem;
}

.jrh-sidebar .brand-logo-slot,
.jrh-sidebar .brand-logo {
    background: transparent;
}

.jrh-sidebar__logo--full .brand-logo {
    max-height: 1.85rem;
    max-width: min(11.5rem, 100%);
    width: auto;
    object-position: left center;
}

.site-brand-logo .brand-logo,
.mobile-drawer-brand-logo .brand-logo {
    max-height: 2rem;
}

.login-card .auth-brand-logo,
.login-marketing__logo,
.auth-brand-logo.brand-logo-slot {
    max-height: none;
    height: auto;
}

.auth-brand-logo .brand-logo {
    max-height: none;
    max-width: 220px;
    width: 100%;
    height: auto;
}

.auth-brand-logo--compact .brand-logo {
    max-width: 8.5rem;
}

.login-marketing__logo .brand-logo {
    max-height: none;
    max-width: min(17.5rem, 100%);
    width: auto;
    height: auto;
    margin: 0;
    object-position: left center;
}

.auth-brand-panel-logo .brand-logo {
    max-width: 11rem;
    max-height: none;
    height: auto;
    margin: 0 auto;
}

.footer-brand-icon .brand-logo {
    max-height: 1.75rem;
}

img.jrh-bot-hero,
img.jrh-bot-avatar,
img.jrh-bot-floating {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    background: transparent;
    border: 0;
}

/* Mascot light/dark rasters. Loaded last so page CSS cannot show both. */
img.jrh-mascot--on-dark.jrh-bot-hero,
img.jrh-mascot--on-dark.jrh-bot-avatar,
img.jrh-mascot--on-dark.jrh-bot-floating {
    display: none !important;
}

html[data-theme="dark"] img.jrh-mascot--on-light.jrh-bot-hero,
html[data-theme="dark"] img.jrh-mascot--on-light.jrh-bot-avatar,
html[data-theme="dark"] img.jrh-mascot--on-light.jrh-bot-floating {
    display: none !important;
}

html[data-theme="dark"] img.jrh-mascot--on-dark.jrh-bot-hero,
html[data-theme="dark"] img.jrh-mascot--on-dark.jrh-bot-avatar,
html[data-theme="dark"] img.jrh-mascot--on-dark.jrh-bot-floating {
    display: block !important;
}

.site-brand-logo--lockup .brand-logo,
.mobile-drawer-brand-logo .brand-logo {
    max-height: none;
    width: 100%;
    height: auto;
}
