/* ── Form layout ────────────────────────────────────────────────────────── */

form.rendered-form,
#editMemberForm {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin: 0 auto 2rem;
}

/* Two-column grid for paired fields */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}

/* Section dividers */
.form-section {
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  border-top: 1px solid #e8eaed;
}

.form-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.form-section__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 1rem;
}

/* ── Form groups ────────────────────────────────────────────────────────── */

.form-group {
  margin-bottom: 1.1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #444;
}

/* Required asterisk — visual only */
label .required {
  color: #c0392b;
  margin-left: 0.2rem;
}

/* ── Text inputs, selects, textarea ─────────────────────────────────────── */

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #333;
  background: #fff;
  border: 1.5px solid #d0d5dd;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #265587;
  box-shadow: 0 0 0 3px rgba(38, 85, 135, 0.12);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: #aaa;
}

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 6rem;
}

/* ── Radio buttons ──────────────────────────────────────────────────────── */

.radio-group {
  display: flex;
  gap: 1rem;
  margin-top: 0.25rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  margin: 0;
}

.radio-group input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #d0d5dd;
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease;
  position: relative;
}

.radio-group input[type="radio"]:checked {
  border-color: #265587;
  background: #265587;
  box-shadow: inset 0 0 0 3px #fff;
}

.radio-group input[type="radio"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 85, 135, 0.15), inset 0 0 0 3px #fff;
}

/* ── Checkboxes ─────────────────────────────────────────────────────────── */

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 400;
  color: #333;
  cursor: pointer;
  margin: 0;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid #d0d5dd;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

input[type="checkbox"]:checked {
  background: #265587;
  border-color: #265587;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.75' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(38, 85, 135, 0.15);
}

/* ── Tooltip ────────────────────────────────────────────────────────────── */

.tooltip-element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #d0d5dd;
  color: #555;
  font-size: 0.65rem;
  font-weight: 700;
  margin-left: 0.35rem;
  cursor: help;
  vertical-align: middle;
}

/* ── Form actions ───────────────────────────────────────────────────────── */

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e8eaed;
}

button[type="submit"] {
  background: #265587;
  color: #fff;
  padding: 0.55rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

button[type="submit"]:hover {
  background: #185ca5;
  box-shadow: 0 2px 6px rgba(38, 85, 135, 0.25);
}

button[type="submit"]:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button--cancel {
  background: transparent;
  color: #666;
  padding: 0.55rem 1.25rem;
  border: 1.5px solid #d0d5dd;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.button--cancel:hover {
  border-color: #aaa;
  color: #333;
}

button#deleteSubscriberSubmit[type="button"] {
  background-color: #b21f1f;
  color: white;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

button#deleteSubscriberSubmit[type="button"]:hover {
  background-color: #8f1818;
}

/* ── Skeleton loading ───────────────────────────────────────────────────── */

.form-skeleton {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 680px;
  width: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  margin: 0 auto;
}

.skeleton-form-group {
  margin-bottom: 1.1rem;
}

.skeleton-label,
.skeleton-input,
.skeleton-btn {
  border-radius: 4px;
  background: linear-gradient(90deg, #e8eaed 25%, #f4f4f4 50%, #e8eaed 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-label {
  height: 0.75rem;
  width: 40%;
  margin-bottom: 0.5rem;
}

.skeleton-label--short {
  width: 25%;
}

.skeleton-input {
  height: 2.25rem;
  width: 100%;
}

.skeleton-input--tall {
  height: 6rem;
}

.skeleton-btn {
  height: 2.25rem;
  width: 8rem;
  margin-top: 0.75rem;
}

/* ── Search input ───────────────────────────────────────────────────────── */

.search-input {
  width: 100%;
  max-width: 400px;
  padding: 0.6rem 1rem;
  font-size: 0.9375rem;
  border: 1.5px solid #d0d5dd;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}

.search-input:disabled {
  background-color: #f4f4f4;
  cursor: not-allowed;
  opacity: 0.6;
}

.search-input::placeholder {
  color: #aaa;
}

.search-input:focus {
  border-color: #265587;
  box-shadow: 0 0 0 3px rgba(38, 85, 135, 0.12);
}

/* ── Misc ───────────────────────────────────────────────────────────────── */

.mailchimp-results {
  margin-top: 20px;
}

.horizontal {
  display: flex;
}
