/* Testfirma-specific brand asset mapping. Layout stays in the shared light CI. */
body[data-tenant-slug='testfirma'] {
    --testfirma-document-logo-filter: none;
    --testfirma-logo-object-fit: contain;
    --testfirma-logo-object-position: center;
    --testfirma-sidebar-active-background: var(--premium-sidebar-hover);
    --testfirma-sidebar-active-border: rgba(var(--theme-primary-rgb), 0.7);
    --testfirma-sidebar-active-icon-background: rgba(var(--theme-primary-rgb), 0.14);
    --testfirma-sidebar-active-icon-color: var(--theme-primary-readable);
    --testfirma-sidebar-logo-scale: 1.24;
    --testfirma-mobile-logo-scale: 1.16;
    --testfirma-mobile-logo-width: min(
        calc(var(--company-navigation-logo-width, var(--layout-mobile-logo-width, var(--premium-mobile-logo-max-width))) * var(--testfirma-mobile-logo-scale)),
        var(--premium-mobile-logo-max-width)
    );
    --testfirma-mobile-logo-height: min(
        calc(var(--layout-mobile-logo-height, var(--premium-mobile-logo-max-height)) * var(--testfirma-mobile-logo-scale)),
        var(--premium-mobile-logo-max-height)
    );
    --premium-sidebar-active: var(--testfirma-sidebar-active-background);
}

/* Keep the active item calm and legible on the testfirma dark navigation. */
body[data-tenant-slug='testfirma'] .sidebar .nav-link.active {
    background: var(--testfirma-sidebar-active-background);
    box-shadow: inset var(--premium-border-width) 0 0 var(--testfirma-sidebar-active-border);
}

body[data-tenant-slug='testfirma'] .sidebar .nav-link.active .nav-icon {
    background: var(--testfirma-sidebar-active-icon-background);
    color: var(--testfirma-sidebar-active-icon-color);
    box-shadow: var(--premium-shadow-none);
    transform: none;
}

/* Compensate for transparent padding in the supplied RailPilot wordmark. */
body[data-tenant-slug='testfirma'] .sidebar-logo {
    width: calc(var(--company-navigation-logo-width, var(--layout-sidebar-logo-width)) * var(--testfirma-sidebar-logo-scale));
    max-width: calc(var(--company-navigation-logo-width, var(--layout-sidebar-logo-width)) * var(--testfirma-sidebar-logo-scale));
    height: calc(var(--layout-sidebar-logo-height) * var(--testfirma-sidebar-logo-scale));
    max-height: calc(var(--layout-sidebar-logo-height) * var(--testfirma-sidebar-logo-scale));
}

body[data-tenant-slug='testfirma'] .mobile-brand-logo {
    width: var(--testfirma-mobile-logo-width);
    max-width: var(--testfirma-mobile-logo-width);
    height: var(--testfirma-mobile-logo-height);
    max-height: var(--testfirma-mobile-logo-height);
}

body.login-premium[data-tenant-slug='testfirma'] {
    --login-daylight-logo-brightness: 1;
    --login-daylight-logo-saturation: 100%;
    --login-daylight-logo-shadow: var(--premium-shadow-sm);
}

body.login-premium[data-tenant-slug='testfirma'] .login-logo {
    object-fit: var(--testfirma-logo-object-fit);
    object-position: var(--testfirma-logo-object-position);
}

body[data-tenant-slug='testfirma'] .documents-page .documents-brand-logo,
body[data-tenant-slug='testfirma'] .document-container .logo-wrapper img {
    filter: var(--testfirma-document-logo-filter);
    object-fit: var(--testfirma-logo-object-fit);
    object-position: var(--testfirma-logo-object-position);
}
