/* School logos: fit arbitrary upload dimensions without distortion */

/* script.js sets data-theme on body; theme CSS expects html[data-theme=dark] */
body[data-theme="dark"] .header .logo-normal {
    display: none !important;
}

body[data-theme="dark"] .header .dark-logo {
    display: block !important;
}

/* Custom school logo uses a single image in .logo-normal */
body[data-theme="dark"] .header-left.has-school-logo .logo-normal {
    display: block !important;
}

body[data-theme="dark"] .header-left.has-school-logo .dark-logo {
    display: none !important;
}

/* App header — must beat theme width:130px and bootstrap img { max-width:100% } */
.header .header-left .logo img.school-brand-logo,
.header .header-left .dark-logo img.school-brand-logo {
    display: block !important;
    height: 40px !important;
    width: auto !important;
    max-width: 160px !important;
    max-height: 40px !important;
    object-fit: contain;
    object-position: left center;
}

.school-brand-logo--header {
    height: 40px;
    width: auto;
    max-width: 160px;
    max-height: 40px;
    object-fit: contain;
}

/* Marketing nav */
.cm-nav-logo .school-brand-logo--nav,
.school-brand-logo--nav {
    height: 32px;
    width: auto;
    max-width: 180px;
    max-height: 32px;
    object-fit: contain;
}

/* Marketing footer */
.school-brand-logo--footer {
    height: 28px;
    width: auto;
    max-width: 160px;
    max-height: 28px;
    object-fit: contain;
}

/* Login pages */
.school-brand-logo--login_hero {
    height: 48px;
    width: auto;
    max-width: 220px;
    max-height: 48px;
    object-fit: contain;
}

.school-brand-logo--login_form {
    height: 56px;
    width: auto;
    max-width: 240px;
    max-height: 56px;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

.school-brand-logo-wrap--center {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Admin preview */
.school-brand-logo--preview {
    height: 50px;
    width: auto;
    max-width: 200px;
    max-height: 50px;
    object-fit: contain;
    padding: 4px 8px;
    border: 1px solid #e9edf4;
    border-radius: 6px;
    background: #fff;
}
