/**
 * Petition form styling. Colors are hand-matched to the Protect Lakeville
 * theme's own design tokens (assets/css/tailwind-input.css @theme block)
 * so the plugin looks native wherever it's embedded — this plugin has no
 * hard dependency on that theme (it degrades to these same styles with
 * any theme), but the values happen to be identical when both are active
 * together, which is the expected real-world setup.
 */
.plpet-form {
  --plpet-forest: #173a2b;
  --plpet-pine: #24583e;
  --plpet-sage: #708c72;
  --plpet-cream: #f4f0e6;
  --plpet-cream-deep: #eae3d2;
  --plpet-charcoal: #252b29;
  --plpet-stone-text: #666864;
  --plpet-error: #8f3a3a;
  max-width: 640px;
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--plpet-charcoal);
}

.plpet-field { margin: 0 0 1.1em; }
.plpet-field-row { display: flex; gap: 1em; flex-wrap: wrap; }
.plpet-field-row .plpet-field { flex: 1 1 180px; }

.plpet-form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35em; }
.plpet-form fieldset { border: none; padding: 0; margin: 0 0 1.1em; }
.plpet-form legend { font-weight: 600; font-size: 0.92rem; margin-bottom: 0.5em; padding: 0; }

.plpet-form input[type="text"],
.plpet-form input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65em 0.75em;
  font-size: 1rem;
  border: 1px solid rgba(37, 43, 41, 0.25);
  border-radius: 6px;
  background: #fff;
  color: var(--plpet-charcoal);
}
.plpet-form input:focus {
  outline: 2px solid var(--plpet-pine);
  outline-offset: 1px;
}
.plpet-form input[aria-invalid="true"] {
  border-color: var(--plpet-error);
}

.plpet-radio { font-weight: 400 !important; display: flex; align-items: center; gap: 0.5em; margin-bottom: 0.4em; }
.plpet-checkbox label { font-weight: 400; display: flex; align-items: flex-start; gap: 0.6em; }
.plpet-checkbox input[type="checkbox"] { margin-top: 0.2em; flex-shrink: 0; width: 1.1em; height: 1.1em; }

.plpet-required { color: var(--plpet-error); }
.plpet-error {
  display: block;
  color: var(--plpet-error);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.3em;
  min-height: 1em;
}

.plpet-certification,
.plpet-privacy-notice {
  background: var(--plpet-cream);
  border: 1px solid var(--plpet-cream-deep);
  border-left: 4px solid var(--plpet-pine);
  border-radius: 6px;
  padding: 1em 1.2em;
  margin: 1.2em 0;
  font-size: 0.92rem;
  color: var(--plpet-stone-text);
}
.plpet-certification p:first-child,
.plpet-privacy-notice p:first-child { color: var(--plpet-charcoal); margin-top: 0; }
.plpet-privacy-notice a { color: var(--plpet-pine); }

.plpet-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.plpet-submit-btn {
  display: inline-block;
  background: var(--plpet-pine);
  color: var(--plpet-cream);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.85em 2em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.plpet-submit-btn:hover { background: var(--plpet-forest); }
.plpet-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.plpet-submit-btn:focus-visible { outline: 3px solid var(--plpet-sage); outline-offset: 2px; }

.plpet-status {
  margin-top: 1em;
  padding: 1em 1.2em;
  border-radius: 6px;
  font-weight: 600;
}
.plpet-status[data-state="success"] { background: #e6f4ea; color: #1e6b3c; border: 1px solid #b9dfc4; }
.plpet-status[data-state="error"] { background: #fbe4e4; color: var(--plpet-error); border: 1px solid #e6bcbc; }
.plpet-status[data-state="info"] { background: var(--plpet-cream); color: var(--plpet-charcoal); border: 1px solid var(--plpet-cream-deep); }

.plpet-unavailable {
  background: var(--plpet-cream);
  border: 1px solid var(--plpet-cream-deep);
  border-radius: 6px;
  padding: 1em 1.2em;
}

/* Verified signature count component, rendered by the theme via plpet_verified_count() */
.plpet-count-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-family: "Lora", Georgia, serif;
}
.plpet-count-badge .plpet-count-number {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--plpet-forest);
}
.plpet-count-badge .plpet-count-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--plpet-stone-text);
}

@media (max-width: 480px) {
  .plpet-field-row { flex-direction: column; gap: 0; }
  .plpet-submit-btn { width: 100%; text-align: center; }
}
