:root {
  --color-primary: #1a4480;
  --color-link: #1a4480;
  --color-cta: #357edd;
  /* exact hues pending design review */
}

.mac-form {
  max-width: 600px;
}

.mac-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.mac-form input[type="text"],
.mac-form input[type="email"],
.mac-form select,
.mac-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}

.mac-form-field {
  margin-bottom: 1.25rem;
}

.mac-form-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.mac-form-checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.mac-form-checkbox-row .mac-form-note {
  color: #666;
  font-size: 0.9rem;
}

.mac-form-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.mac-form button[type="submit"] {
  background-color: var(--color-cta);
  color: white;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.mac-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mac-form-status {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-size: 0.95rem;
}

.mac-form-status-success {
  background-color: #e6f4ea;
  border: 1px solid #34a853;
  color: #1e4620;
}

.mac-form-status-pending {
  background-color: #fef7e0;
  border: 1px solid #f9ab00;
  color: #5c4200;
}

.mac-form-status-error {
  background-color: #fce8e6;
  border: 1px solid #d93025;
  color: #5c1a15;
}

.mac-form-status ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* Reused outside .mac-form (e.g. content/member/_index.md), which has no
   <form class="mac-form"> ancestor for the button[type=submit] selector
   above to match — same visual weight, scoped to a standalone class. */
.mac-form-btn {
  background-color: var(--color-cta);
  color: white;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.mac-form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* De-emphasized text-link-styled button (the member page's inline-confirm
   "Cancel" action) — same touch target padding, no primary-button weight. */
.mac-form-link-btn {
  background: none;
  border: none;
  padding: 0.5rem 0.25rem;
  color: #666;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
}

/* The initial "Leave [CoP]" trigger button — was previously styled with
   .mac-form-link-btn (tiny gray underlined text), which read as an
   afterthought rather than a real, findable action, even though leaving
   is fully reversible (rejoin any time). Visible outlined button, but
   deliberately not the solid CTA color used by .mac-form-btn, so it
   doesn't compete with primary actions like "Confirm choices". */
.mac-form-leave-btn {
  background: none;
  border: 1px solid #b33;
  color: #b33;
  padding: 0.5rem 1.25rem;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.mac-form-inline-confirm {
  margin-top: 0.5rem;
}

.mac-form-status,
.mac-form-note {
  overflow-wrap: break-word;
}
