/* style.css */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f4f7f6;
  margin: 0;
  padding: 20px;
  color: #333;
  font-size: 14px;
  /* 全体の基本フォントサイズを小さめに */
}

.container {
  max-width: 900px;
  margin: 30px auto;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

h1,
h2,
h3 {
  color: #0056b3;
  text-align: center;
  margin-bottom: 25px;
}

h2 {
  font-size: 24px;
  /* H2の見出しサイズ */
}

h3 {
  font-size: 18px;
  /* H3の見出しサイズ */
  margin-top: 25px;
  /* 見出し上のマージン */
  margin-bottom: 15px;
  /* 見出し下のマージン */
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
  font-size: 13px;
  /* ラベルのフォントサイズ */
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
  width: calc(100% - 20px);
  padding: 8px;
  /* パディングを少し小さく */
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
  /* 入力フィールドのフォントサイズ */
}

button {
  background-color: #007bff;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  /* ボタンのフォントサイズ */
  transition: background-color 0.3s ease;
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 15px;
  /* ボタン上のマージンを追加 */
}

button:hover {
  background-color: #0056b3;
}

.button {
  display: inline-block;
  padding: 7px 12px;
  /* パディングを少し小さく */
  margin: 5px 5px 5px 0;
  /* マージンを追加: 上、右、下、左 */
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: 13px;
  /* ボタンのフォントサイズ */
  text-align: center;
}

.button:hover {
  background-color: #218838;
}

.logout-button {
  background-color: #dc3545;
  float: right;
  width: auto;
  margin-left: 10px;
  /* 他のボタンとの隙間 */
}

.logout-button:hover {
  background-color: #c82333;
}

.back-button {
  background-color: #6c757d;
}

.back-button:hover {
  background-color: #5a6268;
}

/* CSV出力ボタンのスタイル */
.export-button {
  background-color: #008CBA;
  /* 青系の色 */
  color: white;
  width: auto;
  /* inline-blockに合わせる */
}

.export-button:hover {
  background-color: #007b9e;
}


.actions {
  text-align: right;
  margin-bottom: 20px;
  display: flex;
  /* ボタンを横並びにするため */
  justify-content: flex-end;
  /* 右寄せ */
  gap: 10px;
  /* ボタン間の隙間 */
}

/* 個別のマージン設定を削除し、gapで統一するか、必要に応じて調整 */
.actions .button {
  margin: 0;
  /* gapを使用するので個別マージンをリセット */
}


.inquiry-table,
.user-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
  /* テーブル全体のフォントサイズ */
}

.inquiry-table th,
.inquiry-table td,
.user-table th,
.user-table td {
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  /* テーブルセルのパディングを調整 */
  text-align: left;
}

.inquiry-table th,
.user-table th {
  background-color: #f2f2f2;
  font-weight: bold;
  color: #444;
}

.inquiry-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.inquiry-table td button {
  padding: 5px 8px;
  /* 詳細ボタンのパディング */
  font-size: 12px;
  /* 詳細ボタンのフォントサイズ */
  width: auto;
  display: inline-block;
  margin-top: 0;
  /* テーブル内のボタンなのでマージンをリセット */
}

.user-table .delete-button {
  background-color: #dc3545;
  padding: 5px 8px;
  font-size: 12px;
  width: auto;
  display: inline-block;
  margin-top: 0;
}

.user-table .delete-button:hover {
  background-color: #c82333;
}

.error {
  color: #dc3545;
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 13px;
  /* エラーメッセージのフォントサイズ */
  text-align: center;
}

.success {
  color: #155724;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 13px;
  /* 成功メッセージのフォントサイズ */
  text-align: center;
}

/* モーダル */
.modal {
  display: none;
  /* Hidden by default */
  position: fixed;
  /* Stay in place */
  z-index: 1000;
  /* Sit on top */
  left: 0;
  top: 0;
  width: 100%;
  /* Full width */
  height: 100%;
  /* Full height */
  overflow: auto;
  /* Enable scroll if needed */
  background-color: rgba(0, 0, 0, 0.4);
  /* Black w/ opacity */
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  /* 上からのマージンを少し小さく */
  padding: 25px;
  /* パディングを少し小さく */
  border: 1px solid #888;
  width: 80%;
  /* Could be more or less, depending on screen size */
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  /* モーダル内の基本フォントサイズ */
}

.modal-content h3 {
  text-align: left;
  color: #0056b3;
  margin-bottom: 15px;
  /* モーダル見出し下のマージン */
  font-size: 18px;
  /* モーダル見出しのサイズ */
}

.modal-content p {
  margin-bottom: 8px;
  /* モーダル内の段落のマージン */
  line-height: 1.5;
}

.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  right: 15px;
  top: 10px;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.add-user-form {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #eee;
}

.add-user-form button {
  margin-top: 20px;
}

.campus-checkbox-list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 4px;
  background-color: #fff;
}

.campus-checkbox-option {
  display: block;
  font-weight: normal;
  margin-bottom: 5px;
  cursor: pointer;
}

/* フィルタセクション */
.filter-section {
  margin-bottom: 20px;
  text-align: right;
  display: flex;
  /* 横並びに */
  justify-content: flex-end;
  /* 右寄せ */
  align-items: center;
  /* 垂直方向中央揃え */
  gap: 10px;
  /* 要素間の隙間 */
}

.filter-section label {
  margin-right: 0;
  /* gapを使うためリセット */
  font-weight: bold;
  font-size: 13px;
  /* ラベルのフォントサイズ */
}

.filter-section select {
  padding: 6px;
  /* プルダウンのパディング */
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  /* プルダウンのフォントサイズ */
  margin-left: 0;
  /* gapを使うためリセット */
}

/* 対応状況でテーブル行の色を変える例 */
.inquiry-table tr.completed {
  background-color: #e6ffe6;
  /* 薄い緑色 */
}

.inquiry-table tr.pending {
  /* background-color: #fff0f0;  薄い赤色（必要であれば） */
}

/* 削除済み行のスタイル */
.inquiry-table tr.deleted-row {
  background-color: #f0f0f0;
  /* 薄い灰色 */
  color: #999;
  /* 文字色を薄く */
  text-decoration: line-through;
  /* 取り消し線 */
}

.inquiry-table tr.deleted-row td {
  border-color: #e8e8e8;
  /* 罫線の色も薄く */
}

/* 削除済み行のチェックボックスは無効にする */
.inquiry-table tr.deleted-row input[type="checkbox"] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 一括削除ボタンのスタイル */
.bulk-actions {
  margin-bottom: 15px;
  text-align: left;
  /* 左寄せに */
}

.bulk-actions .button.delete-button {
  background-color: #ffc107;
  /* 警告色 */
  color: #333;
  width: auto;
  display: inline-block;
  padding: 8px 15px;
}

.bulk-actions .button.delete-button:hover {
  background-color: #e0a800;
  /* ホバー時の色 */
}

/* フィルタセクションの調整（もし必要であれば） */
/* filter-sectionを右寄せのまま、bulk-actionsを左寄せにするため */
.container>.actions+.filter-section {
  /* actions要素のすぐ下のfilter-section */
  margin-top: 15px;
  /* 上部に少しマージン */
  margin-bottom: 20px;
}

.container>.bulk-actions+.inquiry-table {
  margin-top: 15px;
  /* bulk-actions のすぐ下のテーブル */
}


/* モーダル内のフォームのスタイル調整 */
#statusUpdateForm {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

#statusUpdateForm .form-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  /* マージンを調整 */
}

#statusUpdateForm .form-group label {
  margin-right: 15px;
  font-weight: normal;
  color: #333;
  flex-shrink: 0;
  font-size: 13px;
  /* ラベルのフォントサイズ */
}

#statusUpdateForm input[type="radio"] {
  margin-right: 5px;
  width: auto;
  font-size: 13px;
  /* ラジオボタンのフォントサイズ */
}

#statusUpdateForm label[for="status_pending"],
#statusUpdateForm label[for="status_completed"] {
  font-size: 13px;
  /* ラジオボタン横のテキストのフォントサイズ */
  margin-right: 10px;
  /* ラジオボタン横のテキストと次の要素との間隔 */
}


#statusUpdateForm button {
  margin-top: 10px;
  width: auto;
  padding: 8px 20px;
  font-size: 13px;
  /* 更新ボタンのフォントサイズ */
}