/* Modern UI for Family Details Capture */
:root {
  --fdc-bg: var(--wp-admin-theme-color) ;
  --fdc-card-bg: rgba(255,255,255,0.98);
  --fdc-text: var(--wp-admin-theme-color, #222);
  --fdc-muted: #6b6b6b;
  --fdc-border: rgba(0,0,0,0.08);
  --fdc-accent: #0073aa; /* fallback */
  --fdc-success: #1e8f58;
  --fdc-error: #d63638;
  --fdc-radius: 10px;
}

.fdc-form {
  background: var(--fdc-card-bg);
  color: var(--fdc-text);
  padding: 28px;
  border-radius: var(--fdc-radius);
  max-width: 900px;
  margin: 18px auto;
  box-shadow: 0 6px 30px rgba(18,38,63,0.06);
  border: 1px solid var(--fdc-border);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.fdc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 22px;
  align-items: start;
}

.fdc-field {
  position: relative;
}

.fdc-field input[type="text"], .fdc-field input[type="date"], .fdc-field select {
  width: 100%;
  padding: 14px 12px 12px 12px;
  border-radius: 8px;
  border: 1px solid var(--fdc-border);
  background: transparent;
  transition: box-shadow .18s ease, border-color .18s ease;
  outline: none;
}

.fdc-field input:focus, .fdc-field select:focus {
  box-shadow: 0 6px 20px rgba(0,115,170,0.08);
  border-color: var(--fdc-accent);
}

.fdc-label {
  display: block;
  font-size: 13px;
  color: var(--fdc-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.fdc-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.fdc-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg,var(--fdc-accent), #006a9d);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,115,170,0.12);
  margin-top: inherit;
}

.fdc-btn.ghost {
  background: transparent;
  color: var(--fdc-text);
  border: 1px solid var(--fdc-border);
  box-shadow: none;
}

.fdc-message { margin-bottom: 12px; padding: 10px 12px; border-radius: 8px; }
.fdc-error { background: rgba(214,54,56,0.08); color: var(--fdc-error); border-left: 4px solid var(--fdc-error); }
.fdc-success { background: rgba(30,143,88,0.06); color: var(--fdc-success); border-left: 4px solid var(--fdc-success); }

.fdc-family-members { margin-top: 18px; }
.fdc-member-fieldset { border: 1px dashed var(--fdc-border); padding: 12px; border-radius: 8px; margin-bottom: 10px; background: rgba(255,255,255,0.01); }
.fdc-member-fieldset legend { font-weight: 700; padding: 0 6px; color: var(--fdc-muted); }

.fdc-add-member { margin-top: 6px; }
.fdc-remove-member { background: transparent; border: none; color: var(--fdc-error); cursor: pointer; font-weight: 600; }

.fdc-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4); border-top-color: rgba(255,255,255,0.95); border-radius: 50%; animation: fdc-spin 1s linear infinite; display: inline-block; }
@keyframes fdc-spin { to { transform: rotate(360deg); } }

@media (max-width: 820px) {
  .fdc-grid { grid-template-columns: 1fr; }
}

/* small helper */
.fdc-field small { color: var(--fdc-muted); display:block; margin-top:6px; }
