/*
 * Movsy look for Listmonk's public pages (unsubscribe, preferences, data export and wipe,
 * opt-in, messages) and the login pages. Loaded by provisioning into
 * appearance.public.custom_css, after Listmonk's own style.css, so it only overrides.
 * Palette: .webcraft/design-contract.md R1. System fonts only, no external requests.
 * Selectors follow static/public/templates and style.css of Listmonk v6.2.0; re-check on upgrades.
 */
:root {
  --mv-bg: #FFFFFF;
  --mv-surface: #F5F4F2;
  --mv-ink: #1F1C1A;
  --mv-muted: #5C5752;
  --mv-line: #E8E6E3;
  --mv-sky: #BFDFFF;
  --mv-error: #BA3A30;
  --mv-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: light;
}

html, body { background: var(--mv-bg); }
body {
  font-family: var(--mv-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--mv-ink);
  -webkit-font-smoothing: antialiased;
}

/* Card */
.container { max-width: 560px; margin: 40px auto 16px auto; }
.wrap {
  background: var(--mv-surface);
  border: 0;
  border-radius: 28px;
  box-shadow: none;
  padding: 36px;
}
.header {
  border-bottom: 1px solid var(--mv-line);
  padding-bottom: 20px;
  margin-bottom: 28px;
}
.header .logo img { width: 150px; max-width: 150px; height: auto; display: block; }

/* Type */
h1, h2, h3, h4 {
  font-family: var(--mv-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--mv-ink);
}
h2 { font-size: 28px; margin: 0 0 20px; }
h3 { font-size: 19px; margin: 0 0 12px; }
.wrap h2 {
  display: block;
  width: fit-content;
  max-width: 100%;
  background: linear-gradient(transparent 64%, var(--mv-sky) 64%, var(--mv-sky) 92%, transparent 92%);
}
p { margin: 0 0 16px; }
.section { margin-bottom: 36px; }
label { color: var(--mv-ink); cursor: pointer; }
strong { font-weight: 700; }
.error { color: var(--mv-error); }

/* Links */
a { color: var(--mv-ink); text-decoration-color: var(--mv-sky); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--mv-ink); text-decoration-color: var(--mv-ink); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid #3E5C4A;
  outline-offset: 2px;
}

/* Buttons: ink pills */
.button, button.button, input[type="submit"].button {
  background: var(--mv-ink);
  color: #FFFFFF;
  border: 1px solid var(--mv-ink);
  border-radius: 999px;
  min-width: 0;
  min-height: 48px;
  padding: 12px 28px;
  font-family: var(--mv-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.button:hover, button.button:hover, input[type="submit"].button:hover {
  background: #3A3632;
  border-color: #3A3632;
  color: #FFFFFF;
}
.button.button-outline, input[type="submit"].button-outline {
  background: transparent;
  color: var(--mv-ink);
  border: 1px solid var(--mv-ink);
}
.button.button-outline:hover, input[type="submit"].button-outline:hover {
  background: var(--mv-ink);
  border-color: var(--mv-ink);
  color: #FFFFFF;
}

/* Fields */
input[type="text"], input[type="email"], input[type="password"], select {
  background: #FFFFFF;
  border: 1px solid var(--mv-line);
  border-radius: 16px;
  box-shadow: none;
  height: 48px;
  padding: 0 16px;
  font-family: var(--mv-font);
  font-size: 16px;
  color: var(--mv-ink);
}
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus {
  border-color: var(--mv-ink);
  outline: none;
}
input[type="checkbox"], input[type="radio"] {
  accent-color: var(--mv-ink);
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
}
.manage-form label:not([for]) { display: block; margin-bottom: 6px; font-weight: 600; }
.manage-form input[name="name"] { margin-bottom: 8px; }
.lists { margin: 0 0 16px; }
.lists li { margin: 0 0 8px; }

/* Privacy block (export, wipe) */
.data-form { margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--mv-line); }
.data-form .row { margin-bottom: 20px; color: var(--mv-muted); font-size: 15px; }
.data-form .row label strong { color: var(--mv-ink); }

/* Admin login (same shell) */
.login .submit { margin-top: 20px; }
.login button { width: 100%; }

/* Footer: Movsy instead of "powered by listmonk" */
footer.container {
  margin: 24px auto 40px auto;
  text-align: center;
  color: var(--mv-muted);
  font-size: 13px;
}
footer.container a { color: var(--mv-muted); text-decoration: underline; text-decoration-color: var(--mv-line); }
footer.container a:hover { color: var(--mv-ink); }
footer a[href*="listmonk.app"] { display: none !important; }

@media screen and (max-width: 650px) {
  .container { margin: 12px; max-width: none; }
  .wrap { margin: 0; padding: 24px 20px; border-radius: 24px; }
  h2 { font-size: 24px; }
  .button, button.button, input[type="submit"].button { width: 100%; }
  .header { margin-bottom: 22px; }
}
