/* =================================== */
/* 編集ページ専用スタイル (edit.css) */
/* =================================== */

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

/* form-groupの直下にあるラベル（項目の見出し）に適用 */
.form-group > label {
    display: inline-block; /* 幅をコンテンツに合わせる */
    margin-bottom: 8px;    /* 入力欄とのマージンを少し調整 */
    font-weight: bold;
    font-size: 0.9rem;
    background-color: #A7D7C5; /* 背景色: パステルグリーン */
    color: white;              /* 文字色: 白 */
    padding: 5px 12px;         /* 余白を追加 */
    border-radius: 5px;        /* 角を丸くする */
    white-space: nowrap; /* 追加: テキストの改行を防ぐ */
}


/* 横並びレイアウト用のコンテナ */
.form-row {
    display: flex;
    flex-wrap: wrap; /* 画面が狭い場合に折り返す */
    gap: 15px;
}
/* form-row内の各要素の幅を調整 */
.form-row .form-group {
    flex: 1 1 120px; /* 基本幅120pxで、スペースがあれば伸びる */
}
/* 表示番号など短い入力欄用のクラス */
.form-row .form-group-short {
    flex-grow: 0; /* 他の要素に合わせて伸びない */
    flex-basis: 80px; /* 基本の幅を80pxに */
}

/* 入力欄とセレクトボックスのスタイル */
input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
}
input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: #A7D7C5;
    box-shadow: 0 0 0 3px rgba(167, 215, 197, 0.4);
}

/* 読み取り専用の入力欄 */
input[readonly] {
    background-color: #E6F5F0; /* パステルグリーン */
    color: #333;
    border: 1px dashed #A7D7C5; /* 編集不可がわかるように破線に */
    cursor: not-allowed;
}
input[readonly]:focus {
    box-shadow: none; /* フォーカス時の影を消す */
}

/* チェックボックス・ラジオボタンのグループ */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 5px;
}
/* 各選択肢のアイテム */
.choice-item {
    display: flex;
    align-items: center; /* inputとlabelを垂直方向に中央揃え */
}
.choice-item label {
    margin-bottom: 0; /* 親のスタイルを上書き */
    font-weight: normal;
    cursor: pointer;
}
.choice-item input[type="checkbox"],
.choice-item input[type="radio"] {
    margin-right: 8px;
    /* 大きさを少し大きくしてタップしやすくする */
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ボタンエリア */
.button-area {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}
.button-area button {
    flex: 1;
    max-width: 200px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}
.button-update {
    background-color: #A7D7C5;
    order: 2;
}
.button-update:hover {
    background-color: #88B9A9;
}
.button-back {
    background-color: #6c757d;
    order: 1;
}
.button-back:hover {
    background-color: #5a6268;
}

.button-icon {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline;
}
.button-icon:hover {
    opacity: 0.7;
}

/* 完了メッセージ用のスタイル */
.completion-message {
    text-align: center;
    padding: 40px 20px;
    background-color: #f0f9ff;
    border: 1px solid #bde0fe;
    border-radius: 8px;
    margin: 20px 0;
}
.completion-message h1 {
    color: #0c5460;
    font-size: 1.5em;
    margin-bottom: 25px;
}
.back-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1em;
    transition: background-color 0.3s;
}
.back-link:hover {
    background-color: #0056b3;
}

#member-list caption {
    white-space: nowrap;
}

/* ボタンが無効化された時の見た目を設定 */
.button-update:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}
/* 処理中メッセージのスタイル */
#processing-message {
    display: none; /* 最初は非表示にしておく */
    margin-left: 15px;
    font-weight: bold;
    color: #0056b3;
}

.form-group img,
.form-group input[type="checkbox"] {
    vertical-align: middle;
}