/* ==========================================================================
   Locafy — Listmonk public pages (unsubscribe / preferences / subscribe)
   Loaded via Settings → Appearance → Public → custom CSS.
   Keep this file in sync with `appearance.public.custom_css` in Listmonk.
   Brand values come from CLAUDE.md (extracted from the real logo + site).
   ========================================================================== */

:root {
  --lf-red:      #EF4146;
  --lf-orange:   #F58555;
  --lf-teal:     #00AF97;
  --lf-blue:     #0082AE;
  --lf-charcoal: #58585A;
  --lf-cyan:     #00B4D8;
  --lf-navy:     #071E33;
  --lf-bg:       #F8FAFC;
  --lf-line:     #E3EAF0;
  --lf-muted:    #6B7C8C;
}

html { background: var(--lf-bg); }

body {
  background: var(--lf-bg);
  color: var(--lf-charcoal);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 32px 16px;
  box-sizing: border-box;
}

/* --- shell ---------------------------------------------------------------- */

.container.wrap {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1 0 auto;
}

/* Logo sits above the card, not inside it. */
.header {
  border: 0;
  background: none;
  padding: 0;
  margin: 0 0 24px 0;
  text-align: center;
}

.header .logo img {
  max-height: 40px;
  width: auto;
  display: inline-block;
}

/* The card. Listmonk wraps every public view in section.section. */
.section {
  background: #FFFFFF;
  border: 1px solid var(--lf-line);
  border-radius: 14px;
  padding: 36px 36px 32px;
  box-shadow: 0 1px 2px rgba(7, 30, 51, .04), 0 8px 28px rgba(7, 30, 51, .07);
  position: relative;
  overflow: hidden;
}

/* Brand bar across the top of the card — the four logo-mark colours. */
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--lf-red)    0%,  var(--lf-red)    25%,
    var(--lf-orange) 25%, var(--lf-orange) 50%,
    var(--lf-teal)   50%, var(--lf-teal)   75%,
    var(--lf-blue)   75%, var(--lf-blue)   100%);
}

/* --- type ----------------------------------------------------------------- */

h1, h2, h3 {
  color: var(--lf-navy);
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 14px 0;
}

h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 17px; }

p { margin: 0 0 16px 0; }

a { color: var(--lf-cyan); }
a:hover { color: var(--lf-blue); }

/* --- form --------------------------------------------------------------- */

label { color: var(--lf-charcoal); font-weight: 400; }

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--lf-cyan);
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -2px;
  cursor: pointer;
}

input[type="text"],
input[type="email"],
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--lf-line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  color: var(--lf-charcoal);
  background: #fff;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--lf-cyan);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, .15);
}

button, .button, input[type="submit"] {
  background: var(--lf-cyan);
  border: 1px solid var(--lf-cyan);
  color: #FFFFFF;
  font: inherit;
  font-weight: 600;
  border-radius: 8px;
  padding: 11px 22px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}

button:hover, .button:hover, input[type="submit"]:hover {
  background: #0098BA;
  border-color: #0098BA;
  color: #FFFFFF;
}

button:focus-visible, .button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 180, 216, .3);
}

/* "Manage preferences" reads as a quiet secondary action, not a second CTA. */
.unsub-form > div > a {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--lf-muted);
  text-decoration: underline;
}
.unsub-form > div > a:hover { color: var(--lf-cyan); }

/* --- messages ------------------------------------------------------------- */

.message, .flash, .box {
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid var(--lf-line);
  background: #F3FAFC;
}

/* --- footer --------------------------------------------------------------- */

footer.container {
  flex-shrink: 0;
  max-width: 560px;
  margin: 24px auto 0;
  text-align: center;
  font-size: 12px;
  color: #A8B4BF;
}
footer.container a { color: #A8B4BF; text-decoration: underline; }

/* --- "why are you leaving?" (injected by listmonk-public-custom.js) -------- */

.lf-why {
  margin: 22px 0 20px;
  padding: 18px 18px 16px;
  background: #F8FAFC;
  border: 1px solid var(--lf-line);
  border-radius: 10px;
}

.lf-why-q {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--lf-navy);
  font-size: 15px;
}

.lf-why-list { margin: 0 0 12px; }

.lf-why-row {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  padding: 5px 0;
}

.lf-why-row label {
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
  flex: 1;
}

.lf-why-note {
  display: block;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-size: 15px;
}

.lf-why-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--lf-muted);
}

/* --- small screens -------------------------------------------------------- */

@media (max-width: 600px) {
  body { padding: 20px 12px; }
  .section { padding: 28px 22px 24px; border-radius: 12px; }
  h2 { font-size: 21px; }
  .lf-why { padding: 15px 14px 13px; }
}
