/* Lubb Team Vault - brand layer over the Vaultwarden web vault.
 *
 * Injected by nginx (sub_filter, see /etc/nginx/sites-available/vault) so it
 * survives Vaultwarden upgrades: it only overrides CSS custom properties and a
 * few logo hooks the web vault already exposes. Name/title changes live in
 * vault-brand.js. Brand teal #247b8c, same as the webmail and Lubb Team Photos.
 *
 * The web vault defines its palette on :root / .theme_dark (0,1,0); html:root
 * and html.theme_dark (0,1,1) win regardless of load order.
 */

/* Plus Jakarta Sans (SIL OFL 1.1, fonts/OFL.txt), variable 200-800. */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url(/lubb-brand/fonts/pjs-latin.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url(/lubb-brand/fonts/pjs-latin-ext.woff2) format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

html:root {
    --font-sans: "Plus Jakarta Sans", Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

    /* legacy palette: space-separated RGB triplets */
    --color-primary-100: 211 234 239;
    --color-primary-600: 36 123 140;
    --color-primary-700: 29 100 114;
    --color-background-alt2: 36 123 140;
    --color-hover-default: rgb(36 123 140 / 0.1);
    --color-bw-blue: 36 123 140;
    --color-marketing-logo: 36 123 140;
    --color-illustration-outline: 17 59 68;
    --color-illustration-bg-primary: 211 234 239;
    --color-illustration-bg-secondary: 169 212 222;
    --color-illustration-tertiary: 31 163 122;
    --color-illustration-logo: 36 123 140;

    /* new palette (hex); 700 is the light theme's button/link colour */
    --color-brand-050: #eef7f9;
    --color-brand-100: #dff0f3;
    --color-brand-200: #c6e3ea;
    --color-brand-300: #a9d4de;
    --color-brand-400: #7bbccb;
    --color-brand-500: #4fa1b4;
    --color-brand-600: #2f8fa2;
    --color-brand-700: #247b8c;
    --color-brand-800: #1d6472;
    --color-brand-900: #174f5b;
    --color-brand-950: #113b44;
    --color-brand-950-rgb: 17, 59, 68;
}

html.theme_dark {
    --color-primary-100: 16 40 46;
    --color-primary-300: 36 94 107;
    --color-primary-600: 123 188 203;
    --color-primary-700: 169 212 222;
    --color-hover-default: rgb(169 212 222 / 0.1);
    --color-bw-blue: 36 123 140;
    --color-marketing-logo: 255 255 255;
    --color-illustration-outline: 79 161 180;
    --color-illustration-bg-primary: 169 212 222;
    --color-illustration-bg-secondary: 123 188 203;
}

body, button, input, select, textarea {
    font-family: var(--font-sans);
}
h1, h2, h3, .tw-text-3xl, .tw-text-2xl {
    letter-spacing: -0.01em;
}

/* Frontend (login / unlock) logo, top-left. Vaultwarden sets it via content:url(). */
html.theme_light img.new-logo-themed,
html:not(.theme_dark) img.new-logo-themed {
    content: url(/lubb-brand/logo-wide.png) !important;
    width: 260px !important;
    height: auto;
}
html.theme_dark img.new-logo-themed {
    content: url(/lubb-brand/logo-wide-dark.png) !important;
    width: 260px !important;
    height: auto;
}

/* Landing header logo (login, unlock, SSO pages) - an inline SVG once Angular runs. */
bit-landing-header header > a bit-svg {
    visibility: hidden;
}
bit-landing-header header > a {
    width: 300px !important;
    max-width: 70vw;
    background: url(/lubb-brand/logo-wide.png) no-repeat left center / contain;
}
html.theme_dark bit-landing-header header > a {
    background-image: url(/lubb-brand/logo-wide-dark.png);
}

/* Signed-in side navigation logo (dark nav in both themes) - full logo incl. slogan. */
bit-nav-logo a bit-svg {
    visibility: hidden;
}
bit-nav-logo a {
    background: url(/lubb-brand/logo-wide-dark.png) no-repeat 12px center / 210px auto;
}
bit-nav-logo a:before {
    display: none !important;
}
/* collapsed rail: mark only */
bit-nav-logo a[class*="tw-h-[55px]"] {
    background: url(/lubb-brand/mark-dark.png) no-repeat center / 32px auto;
}

/* Vaultwarden's "not associated with Bitwarden" footer note (vault-brand.js tags it). */
.lubb-hide {
    display: none !important;
}

/* Two-step login > Authenticator app: no App Store / Google Play badges for
   Bitwarden's Authenticator app (owner, 2026-10-01: "remove bitwarden and immich
   from the setup processes"). The sentence above them now names Aegis and 2FAS
   (vault-brand.js fixAuthenticatorChoice). */
a[href*="bitwarden-authenticator"],
a[href*="com.bitwarden.authenticator"] {
    display: none !important;
}

/* Sign-in = email + master password ONLY (owner, 2026-10-15: "only master
   password required"). vault-brand.js presses Continue when the webmail pane
   passes ?email= and adds the newcomers' "First time here? Create your vault"
   link (.lubb-vault-new).
   Vaultwarden's web build has its OWN login layout while SSO is enabled: its
   /css/vaultwarden.css hides the real email field (.vw-email-continue) and
   Continue (.vw-continue-login) and shows an SSO copy of the field
   (.vw-email-sso, Enter = SSO), "Use single sign-on" (.vw-sso-login), "or"
   (.vw-or-text) and "Other" (.vw-other-login, data-testid login-sso-button,
   which is really the master-password path). Swap that back: field + Continue
   only. Passkey (the server has none) and "Log in with device" go too. */
html .vw-email-sso,
html .vw-sso-login,
html .vw-or-text,
html .vw-other-login,
button[data-testid="login-sso-button"],
button[data-testid="login-with-passkey-button"],
button[data-testid="login-with-device-button"],
button[data-testid="login-continue-button"] ~ div.tw-text-center,
button[data-testid="login-submit-button"] ~ div.tw-text-center {
    display: none !important;
}
html input.vw-email-continue,
html button.vw-continue-login {
    display: block !important;   /* beats Vaultwarden's .vw-* display:none !important by specificity */
}
.lubb-vault-new {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.875rem;
    color: rgb(var(--color-text-muted, 95 107 122));
}
.lubb-vault-new a {
    color: var(--color-brand-700, #247b8c);
    font-weight: 600;
    text-decoration: none;
}
.lubb-vault-new a:hover {
    text-decoration: underline;
}
