/*
  ConfirmedCritical theme for Listmonk's public pages
  (subscribe form, manage preferences, opt-in/unsubscribe messages, archive, login).
  Loaded after Listmonk's /public/static/style.css, so it overrides those rules.
  Palette matches confirmedcritical.com and the email templates.
*/
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --cc-bg: #0b090c;
  --cc-surface: #1a1620;
  --cc-surface-2: #221d29;
  --cc-surface-3: #2a2434;
  --cc-border: #2f2838;
  --cc-input: #120f16;
  --cc-primary: #7b2cbf;
  --cc-primary-light: #9d4edd;
  --cc-primary-dark: #5a189a;
  --cc-link: #c77dff;
  --cc-text: #e9e6ee;
  --cc-heading: #f8f9fa;
  --cc-muted: #adb5bd;
  --cc-faint: #7d7486;
  --cc-error: #ff6b8b;
  --cc-success: #5ee0a0;
  color-scheme: dark;
}

/* Background lives on <html> so it always reaches the top edge of the page. */
html {
  min-height: 100%;
  background-color: var(--cc-bg);
  background-image:
    linear-gradient(rgba(11, 9, 12, 0.45), rgba(11, 9, 12, 0.65)),
    url("https://confirmedcritical.com/assets/background.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
body {
  background: transparent;
  /* Padding, not a child margin: a child's top margin would collapse through
     <body> and push the whole page down from the top edge. */
  padding: 12vh 16px 64px 16px;
  font-family: "Outfit", "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--cc-text);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--cc-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
h2 {
  font-size: 1.6em;
  margin: 0 0 20px 0;
}
a {
  color: var(--cc-link);
  text-decoration-color: rgba(199, 125, 255, 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover {
  color: #e0c3fc;
}
label {
  color: var(--cc-muted);
  font-size: 0.95em;
}
::selection {
  background: var(--cc-primary);
  color: #fff;
}

/* Main card */
.container {
  margin-top: 0;
}
.wrap {
  background: var(--cc-surface);
  border: 1px solid var(--cc-border);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(157, 78, 221, 0.04);
  padding: 40px 44px;
}

/* Header + logo */
.header {
  border-bottom: 1px solid var(--cc-border);
  padding-bottom: 24px;
  margin-bottom: 32px;
  text-align: center;
}
.header .logo img {
  max-width: 230px;
  height: auto;
  display: inline-block;
}

/* Form fields */
input[type="text"],
input[type="email"],
input[type="password"],
select {
  background: var(--cc-input);
  color: var(--cc-heading);
  border: 1px solid var(--cc-surface-3);
  border-radius: 8px;
  box-shadow: none;
  padding: 12px 14px;
  margin-top: 6px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: var(--cc-primary-light);
  box-shadow: 0 0 0 3px rgba(157, 78, 221, 0.25);
}
input::placeholder {
  color: var(--cc-faint);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--cc-primary-light);
  width: 17px;
  height: 17px;
  margin: 0 8px 0 0;
  vertical-align: -3px;
  cursor: pointer;
}
/* Chrome autofill would otherwise paint fields pale yellow. */
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 100px var(--cc-input) inset;
  -webkit-text-fill-color: var(--cc-heading);
  caret-color: var(--cc-heading);
}

/* List checkboxes on subscribe / manage pages */
.lists {
  margin: 28px 0;
}
.lists h2 {
  font-size: 1.1em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cc-muted);
  font-weight: 600;
  margin-bottom: 12px;
}
.lists li {
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 10px 0;
  transition: border-color 0.15s ease;
}
.lists li:hover {
  border-color: var(--cc-primary-dark);
}
.lists li label {
  color: var(--cc-heading);
  font-weight: 500;
}
.lists .description {
  color: var(--cc-muted);
  margin: 4px 0 0 25px;
}

/* Buttons */
.button {
  background: var(--cc-primary);
  color: #fff;
  border-radius: 8px;
  padding: 13px 28px;
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(123, 44, 191, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.button:hover {
  background: var(--cc-primary-light);
  color: #fff;
  box-shadow: 0 8px 26px rgba(157, 78, 221, 0.45);
  transform: translateY(-1px);
}
.button:focus-visible {
  outline: 2px solid var(--cc-link);
  outline-offset: 3px;
}
.button.button-outline {
  background: transparent;
  border: 1px solid var(--cc-primary-light);
  color: #e0c3fc;
  box-shadow: none;
}
.button.button-outline:hover {
  background: rgba(157, 78, 221, 0.15);
  border-color: var(--cc-link);
  color: #fff;
}

/* Status text */
.error {
  color: var(--cc-error);
}
.small {
  color: var(--cc-muted);
}

/* Unsubscribe-from-all block on the manage page */
.unsub-all {
  border-top: 1px solid var(--cc-border);
}

/* Archive */
.archive li {
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease;
}
.archive li:hover {
  border-color: var(--cc-primary-dark);
}
.archive li a {
  color: var(--cc-heading);
  font-weight: 600;
  text-decoration: none;
}
.archive li a:hover {
  color: var(--cc-link);
}
.archive .date {
  color: var(--cc-faint);
}
/* Listmonk's RSS icon is dark; lighten it for the dark background. */
.feed {
  filter: invert(1) brightness(0.8);
  vertical-align: -2px;
}

/* Pagination */
.pg-page {
  color: var(--cc-muted);
  border-radius: 6px;
  padding: 2px 10px;
}
.pg-page:hover {
  color: var(--cc-heading);
  background: var(--cc-surface-3);
}
.pg-page.pg-selected {
  color: #fff;
  background: var(--cc-primary);
  text-decoration: none;
}

/* Login */
.login .submit {
  margin-top: 28px;
}

/* Footer: only holds "Powered by listmonk", so hide it. */
footer.container {
  display: none;
}

@media screen and (max-width: 650px) {
  body {
    padding: 0;
  }
  html {
    /* Fixed backgrounds are janky on mobile browsers. */
    background-attachment: scroll;
  }
  .wrap {
    padding: 28px 22px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .button {
    width: 100%;
  }
}
