/* SBAGhana Pro — shared logo sizing for menus and public pages */

.app-brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.app-brand-logo {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

/* Landing + schools directory + similar public headers */
.app-brand-logo-wrap--header {
    flex: 1 1 auto;
    overflow: hidden;
}

.app-brand-logo--header {
    max-height: calc(var(--lp-header-h, var(--sd-header-h, 4.75rem)) - 0.75rem);
    max-width: min(700px, calc(100vw - 4.75rem));
}

.sd-page .app-brand-logo--header {
    max-height: calc(var(--sd-header-h, 4rem) - 0.5rem);
}

/* Sidebar (school admin, teacher, parent) */
.app-brand-logo-wrap--sidebar {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    padding-right: 0.25rem;
}

.app-brand-logo--sidebar {
    max-height: 2.35rem;
    max-width: 100%;
}

/* Super admin dark sidebar */
.app-brand-logo-wrap--super-admin {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.app-brand-logo--super-admin {
    max-height: 2.5rem;
    max-width: 100%;
}

/* Mobile top navbar */
.app-brand-logo-wrap--topbar {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.app-brand-logo--topbar {
    max-height: 2rem;
    max-width: min(700px, calc(100vw - 7.5rem));
}

.app-brand-logo--topbar-product {
    max-height: 1.85rem;
    max-width: 8.5rem;
    flex-shrink: 0;
}

/* Auth cards (login, register, platform sign-in) */
.app-brand-logo-wrap--auth {
    justify-content: center;
    margin: 0 auto 0.5rem;
}

.app-brand-logo--auth {
    max-height: 3.25rem;
    max-width: min(700px, 100%);
}

/* Footer lockup on dark backgrounds */
.app-brand-logo-wrap--footer {
    margin-bottom: 0.75rem;
}

.app-brand-logo--footer {
    max-height: 3rem;
    max-width: min(700px, 100%);
}

@media (min-width: 900px) {
    .app-brand-logo--header {
        max-height: calc(var(--lp-header-h, 4.75rem) - 0.75rem);
        max-width: 700px;
        height: calc(var(--lp-header-h, 4.75rem) - 0.75rem);
    }

    .app-brand-logo-wrap--header {
        flex: 0 1 auto;
    }
}

@media (max-width: 899px) {
    .app-brand-logo--header {
        max-width: min(700px, calc(100vw - 4.25rem));
    }
}

@media (max-width: 380px) {
    .app-brand-logo--header {
        max-width: min(700px, calc(100vw - 3.75rem));
        max-height: calc(var(--lp-header-h, 4.75rem) - 1rem);
    }
}

/* Portals (app shell): hide primary product logo on mobile — landing page keeps it */
@media (max-width: 767px) {
    .app-container .app-brand-logo-wrap--variant-primary {
        display: none !important;
    }

    .app-container .portal-topbar-brand .portal-topbar-brand__sep {
        display: none;
    }

    .app-container .portal-topbar-brand--mobile .portal-topbar-brand__school {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .app-container .top-navbar .brand:has(.portal-topbar-brand--mobile) {
        flex: 1;
        min-width: 0;
    }
}
