/* Hide Element auth footer: Blog / Mastodon / GitHub / Powered by Matrix */
.mx_AuthFooter,
.mx_AuthFooter_matrixLogo,
.mx_AuthPage .mx_AuthFooter,
footer.mx_AuthFooter,
.mx_AuthPage footer,
.mx_AuthPage .mx_AuthFooter_mxLogo,
.mx_AuthFooter_mxLogo,
div.mx_AuthFooter,
a[href="https://matrix.org"],
a[href="https://matrix.org/"],
a[href*="matrix.org/blog"],
a[href*="mastodon.matrix.org"],
a[href*="github.com/element-hq"],
a[href*="github.com/matrix-org"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* MeanMsg — sky / cloud M branding */
:root {
  --mm-sky: #197ed8;
  --mm-sky-mid: #0c4a94;
  --mm-sky-deep: #083068;
  --mm-cloud: #e8f4fc;
  --mm-cloud-bright: #f7fbff;
}

html,
body,
#matrixchat,
.mx_AuthPage,
.mx_AuthPage_modal,
.mx_WelcomePage,
.mx_HomePage_default {
  background:
    radial-gradient(ellipse 130% 90% at 50% -10%, #5bb4f5 0%, #197ed8 38%, #0c4a94 72%, #083068 100%) !important;
  background-color: #0c4a94 !important;
}

/* Download APK on main/login screen */
.meanmsg-dl {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  background: var(--mm-cloud-bright);
  color: #083068 !important;
  font: 650 0.95rem/1.2 "Segoe UI", system-ui, sans-serif;
  text-decoration: none !important;
  padding: 0.75rem 1.1rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(8, 48, 104, 0.35);
}
.meanmsg-dl:hover {
  filter: brightness(1.05);
}

/* Hide after login */
body:has(.mx_MatrixChat) .meanmsg-dl,
body:has(.mx_RoomView) .meanmsg-dl,
body:has(.mx_HomePage) .meanmsg-dl {
  display: none !important;
}

/* Auth slogan */
.meanmsg-slogan {
  display: block;
  margin: 0.35rem 0 1.25rem;
  text-align: center;
  font: italic 500 1.05rem/1.35 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
  color: rgba(247, 251, 255, 0.82);
}
.meanmsg-slogan em {
  font-style: italic;
  font-weight: 650;
  color: #f7fbff;
}
body:has(.mx_MatrixChat) .meanmsg-slogan,
body:has(.mx_RoomView) .meanmsg-slogan {
  display: none !important;
}

/* MeanMsg auth logo — rounded plate + soft shadow */
.mx_AuthHeaderLogo img,
.mx_AuthPage img.mx_AuthHeaderLogo,
.mx_AuthPage .mx_AuthHeaderLogo,
.mx_WelcomePage img.mx_Logo,
.mx_HomePage_default img {
  max-width: min(240px, 70vw) !important;
  max-height: 120px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 1.15rem !important;
  box-shadow: 0 12px 36px rgba(8, 48, 104, 0.4), 0 0 0 1px rgba(247, 251, 255, 0.18) !important;
}

/* Kill any leftover Element marketing links on welcome/home */
.mx_WelcomePage a[href*="element.io"],
.mx_HomePage a[href*="element.io"],
.mx_AuthPage a[href*="element.io"] {
  pointer-events: none;
}
.mx_WelcomePage a[href*="element.io"] {
  cursor: default;
  text-decoration: none;
}
