/* Smoosh look for Listmonk's public pages. Listmonk's own stylesheet comes in as a cascade layer, so every rule below
   wins over it whatever the specificity, and it keeps styling what this file leaves alone (the admin pages' helpers). */
@import url('style.css') layer(listmonk);

@font-face {
  font-family: 'DM Sans';
  src: url('dm-sans.woff2') format('woff2');
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0b0b0c;
  --surface: #141416;
  --raised: #1c1c1f;
  --line: #2a2a2d;
  --line-strong: #6e6d6a; /* 3.5:1 on the surface, 3.8:1 on ink: edges of fields and outline buttons */
  --paper: #f7f6f4;
  --paper-bright: #ffffff;
  --underline: rgb(247 246 244 / 0.4);
  --muted: #a3a29f;
  --danger: #ff8a7a;
  --column: min(100% - 2rem, 34rem);
  --control-height: 3.25rem;
}

html,
body {
  background: var(--ink);
  color: var(--paper);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.smoosh-header,
.smoosh-wrap,
.smoosh-footer {
  width: var(--column);
  margin-inline: auto;
}
.smoosh-header {
  padding: 2.5rem 0 3rem;
}
.smoosh-wrap {
  flex: 1;
  padding-bottom: 4rem;
}
.smoosh-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--paper);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.smoosh-logo img {
  width: 2.25rem;
  height: auto;
}
/* .login: the admin's login, password and two-factor pages, which keep Listmonk's own markup. */
.smoosh-card,
.login {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 2rem;
}
.smoosh-card + .smoosh-card {
  margin-top: 1.5rem;
}
.smoosh-card > :last-child,
.smoosh-card > form > :last-child,
.login > :last-child {
  margin-bottom: 0;
}
@media (max-width: 30rem) {
  .smoosh-card,
  .login {
    padding: 1.5rem;
  }
}
h1,
h2,
h3 {
  color: var(--paper);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem);
}
h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
}
.manage-form h2 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}
p {
  margin: 0 0 1rem;
}
.smoosh-lead,
.hint {
  color: var(--muted);
  text-wrap: pretty;
}
.smoosh-lead {
  margin-bottom: 1.5rem;
}
.nowrap {
  white-space: nowrap;
}
a {
  color: var(--paper);
  text-decoration-color: var(--underline);
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: currentColor;
}
label {
  color: var(--paper);
}
p:not(.check) > label {
  display: block;
  margin-bottom: 0.5rem;
}
.error {
  color: var(--danger);
}
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height);
  padding: 0 1.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
button:hover {
  background: var(--paper-bright);
}
.button:active,
button:active {
  transform: scale(0.98);
}
.button-outline {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--paper);
}
.button-outline:hover {
  background: var(--raised);
}
.button-danger {
  border-color: var(--danger);
  color: var(--danger);
}
@media (prefers-reduced-motion: no-preference) {
  .button,
  button {
    transition:
      transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
      background-color 150ms;
  }
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}
input[type='text'],
input[type='email'],
input[type='password'] {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--control-height);
  padding: 0 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: none;
  font: inherit;
}
.login input[name='totp_code'] {
  font-size: 2em;
}
input[type='checkbox'] {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0; /* centred on the first line of the label */
  accent-color: var(--paper);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.data-form > :last-child {
  margin-bottom: 0;
}
.data-form + .data-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
ul.lists {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
ul.lists li {
  margin: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}
.smoosh-footer {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  padding: 0.75rem 0 1.75rem;
  font-size: 0.875rem;
}
.smoosh-footer a {
  padding: 0.75rem 0; /* 44px tall targets */
  color: var(--muted);
  text-decoration: none;
}
.smoosh-footer a:hover {
  color: var(--paper);
  text-decoration: underline;
}
/* Both languages are in the markup. With JavaScript (html.l10n) the page shows one and hides the other; without it,
   both show, one under the other, and the German logo link and what only the script does stay hidden. */
html.l10n:lang(en) [lang='de'],
html.l10n:lang(de) [lang='en'] {
  display: none;
}
html:not(.l10n) main [lang]:not(.button) {
  display: block;
}
html:not(.l10n) .button {
  flex-direction: column;
  padding-block: 0.5rem;
}
html:not(.l10n) .smoosh-logo[lang='de'],
html:not(.l10n) .js-only {
  display: none;
}
