/* ==========================================================================
   PUBLIC PAGES - Shared styles for subscribe, confirm, unsubscribe pages
   ========================================================================== */

/* THEME TOKENS — overridable per-newsletter via injected <style> */
:root {
  --page-bg: #f5f5f5;
  --card-bg: #fff;
}

/* BASE */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--page-bg);
  margin: 0;
  padding: 2.5rem 1.25rem;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

/* LOGO — shown above the card when the newsletter has one */
.page-logo {
  display: block;
  max-width: 12.5rem; /* 50% of the 25rem card max-width */
  height: auto;
}

/* LAYOUT */
.page-card {
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 2.5rem;
  max-width: 25rem;
  width: 100%;
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.1);
}

.page-card.centered {
  text-align: center;
}

/* MODULES */
.page-card h1 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: #1a1a1a;
}

.page-card .subtitle {
  color: #666;
  margin-bottom: 1.5rem;
}

.page-card p {
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Form */
.page-card label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #1a1a1a;
}

.page-card input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  box-sizing: border-box;
}

/* Focus ring - visible replacement for outline: none */
.page-card input:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-color: #1a1a1a;
}

.page-card button {
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.page-card button:hover {
  background: #333;
}

/* UNSUBSCRIBE FEEDBACK */
.unsub-feedback {
  margin-top: 1.5rem;
  text-align: left;
}

.unsub-feedback textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
}

.unsub-feedback textarea:focus {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
  border-color: #1a1a1a;
}

.page-card .resubscribe {
  margin-top: 1.5rem;
}

.resubscribe a {
  color: #666;
  font-size: 0.875rem;
}

.unsub-feedback__thanks {
  color: #155724;
  background: #d4edda;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  text-align: center;
}

/* STATE */
.hidden { display: none; }

.message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

