/* styles.css */
/* モーダル関連のスタイル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  z-index: 1000;
}

.modal-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
}

.modal-content {
  position: relative;
  background: white;
  width: 90%;
  max-width: 600px;
  margin: 20px auto;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease-in-out;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

/* JS の classList.add('is-open') でモーダルを表示（style.display を使わない） */
.modal.is-open {
  display: block;
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 25px;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid #eee;
  text-align: right;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
  outline: none;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* ボタンスタイル */
.btn-primary {
  background-color: #4A90E2;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: #357ABD;
}

/* 人物入力エリアのスタイル */
.person-input {
  margin-bottom: 1px;  /* 人物入力要素間の間隔 */
}

.person-input input {
  width: 98%;
  height: 1em;
  font-size: 14px;
  padding: 0px 2px;
  border: 1px solid;
  border-radius: 3px;
  background-color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s;
}

.person-input input:hover {
  background-color: #e9e9e9;
  border-color: #ccc;
}

.person-input input.has-details {
  color: #333;
  background-color: #e8f0fe;
}

.controls-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.controls-group input {
  flex: 1;
}

/* ボタングループのスタイル */
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 1px;    /* 最後の人物入力要素との間隔 */
  margin-bottom: 4px; /* 追加ボタンの下マージン */
}

.btn-add, .remove-person {
  padding: 1px 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.btn-add {
  background-color: #f5fff5e3;
  color: #333333;
}

.btn-add:hover {
  background-color: #626d63;
}

.btn-add:disabled {
  color: gray;
  background-color: #cccccc33;
  cursor: not-allowed;
}

.remove-person {
  background-color: #be6e68;
  color: white;
}

.remove-person:hover {
  background-color: #da190b;
}

/* アニメーション */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.member-image-container {
  text-align: center;
  margin: 15px 0;
  padding: 10px;
  background-color: #f5f5f5;
  border-radius: 6px;
}

.member-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.member-image-container.show {
  animation: fadeIn 0.3s ease-in-out;
}
