/* MG Broker: gentle number fade without a visible cut-off. */
.mg-phone-reveal {
    cursor: pointer;
}

/* Do not blur only the final three digits: it creates a dark, abrupt patch. */
.mg-phone-reveal .mg-phone-number {
    display: inline-block;
    white-space: nowrap;
}
.mg-phone-reveal .mg-phone-tail {
    display: inline;
    opacity: 1;
    filter: none;
    -webkit-mask-image: none;
    mask-image: none;
}

/* For numbers on photos, gradients or light backgrounds, fade the WHOLE
   number gently over its last few characters instead of fading a separate tail. */
.mg-phone-reveal:not(.top-line__phone):not(.footer__phone):not(.is-revealed) .mg-phone-number {
    -webkit-mask-image: linear-gradient(to right,
        #000 0%,
        #000 calc(100% - 5.5ch),
        rgba(0, 0, 0, .92) calc(100% - 4.5ch),
        rgba(0, 0, 0, .62) calc(100% - 3.1ch),
        rgba(0, 0, 0, .22) calc(100% - 1.6ch),
        transparent 100%);
    mask-image: linear-gradient(to right,
        #000 0%,
        #000 calc(100% - 5.5ch),
        rgba(0, 0, 0, .92) calc(100% - 4.5ch),
        rgba(0, 0, 0, .62) calc(100% - 3.1ch),
        rgba(0, 0, 0, .22) calc(100% - 1.6ch),
        transparent 100%);
}
.mg-phone-reveal.is-revealed .mg-phone-number {
    -webkit-mask-image: none;
    mask-image: none;
}

/* Header and footer: restore the original navy overlay gradient from mg.css.
   It blends with the dark background much better than blurring three digits. */
.top-line__phone.mg-phone-reveal,
.footer__phone.mg-phone-reveal {
    display: inline-block;
    position: relative;
    width: max-content;
    max-width: 100%;
}
.top-line__phone.mg-phone-reveal::after,
.footer__phone.mg-phone-reveal::after {
    display: block;
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 4ch;
    pointer-events: none;
    background: linear-gradient(to right,
        rgba(12, 35, 66, 0.12) 0%,
        rgba(12, 35, 66, 0.84) 42%,
        #0c2342 90%);
    opacity: 1;
    transition: opacity 200ms ease;
}
.top-line__phone.mg-phone-reveal.is-revealed::after,
.footer__phone.mg-phone-reveal.is-revealed::after {
    opacity: 0;
}
