/* SUcure branding for the Matrix Authentication Service (auth.sucure.org).
 *
 * Loaded via an overridden MAS base.html <link>. MAS pages use the Compound
 * design system (cpd-* classes, --cpd-color-* tokens) and send no CSP, so a
 * cross-origin stylesheet from sucure.org loads fine.
 *
 * Two changes: re-point the relevant Compound semantic colour tokens to SUcure
 * turquoise (the default primary button is gray-1400/near-black and accents are
 * green), and brand the round page-heading icon with the Bosphorus drop.
 */

/* Tokens are defined at ":root,[class*=cpd-theme-]"; this later same-selector
 * rule wins the cascade, so the primary button + accent links turn turquoise. */
:root,
[class*="cpd-theme-"] {
    --cpd-color-bg-action-primary-rest: #629e9b;
    --cpd-color-bg-action-primary-hovered: #518280;
    --cpd-color-bg-action-primary-pressed: #46716f;
    --cpd-color-text-action-accent: #518280;
    --cpd-color-icon-accent-primary: #518280;
}

/* Replace the generic user icon in the page heading with the SUcure drop.
 * Skip the .invalid/.success states so error/success colouring is preserved. */
.page-heading .icon:not(.invalid):not(.success) {
    background-color: #efece5;
    background-image: url("https://sucure.org/favicon.svg");
    background-size: 58%;
    background-position: center;
    background-repeat: no-repeat;
}
.page-heading .icon:not(.invalid):not(.success) > svg {
    display: none;
}
