
/* コンパクト化＆左40%指定 */
.filter-compact .form-group { margin-bottom: .25rem; }
.filter-compact .form-control, .filter-compact .custom-control-label { height: calc(1.5em + .5rem + 2px); padding: .125rem .5rem; font-size: .85rem; }
.filter-compact .input-group-text { padding: .125rem .5rem; font-size: .8rem; min-width: 70px; }
.filter-compact .row-tight { margin-left: 0; margin-right: 0; }
.filter-compact .row-tight > [class^="col-"] { padding-left: .25rem; padding-right: .25rem; }
@media (min-width: 768px){ .filter-left-40 { flex: 0 0 41.6667%; max-width: 41.6667%; } }
.table-active {  background-color: #007bff !important; color: #fff !important; }

/* ボタン群：左寄せ＆最大3行 */
.action-toolbar { display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:flex-start; }
.action-toolbar .btn-group { margin-right: .5rem; margin-bottom: .5rem; }
.action-btn { padding: .4rem .8rem; min-width: 8.5em; white-space: nowrap; }
.action-btn i { margin-right: .4rem; }

.list-wrap { max-height: 80vh; overflow-y: auto; overflow-x: hidden; }
.table thead th.sticky { position: sticky; top: 0; background: #fff; z-index: 2; }

.form-label-fixed { width: 145px; flex-shrink: 0; text-align: right; padding-right: .4rem;}
.form-label-fixed.continue-fixed { width: 5em; text-align: center; padding-right: 0; }
.form-inline-row { display: flex; align-items: center; margin-bottom: .4rem; }
.form-inline-row label { margin-bottom:0; }
.form-inline-row input, .form-inline-row select, .form-inline-row textarea, .form-inline-row span { flex: 1; }
.form-inline-row textarea { resize: vertical; }
.row-disabled {
    opacity: 0.45;
    pointer-events: none;
}
.form-inline-row .form-check {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}
.custom-control.custom-checkbox .custom-control-label::before,
.custom-control.custom-checkbox .custom-control-label::after {
    top: 0.1rem;
    width: 1.2rem;
    height: 1.2rem;
}
.custom-control-label { line-height: 1.4rem; font-size: 0.9rem; }

.row-deleted { background-color: #ffe6e6 !important; color: #999; }
.table-hover tbody tr.row-deleted:hover { background-color: #ffcccc !important; }
.row-deleted.table-active, .table-hover tbody tr.row-deleted.table-active:hover { background-color: #dc3545 !important; }

/* メインの枠 */
.select2-container--bootstrap4 .select2-selection--single {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;

  height: calc(1.5em + .5rem + 2px) !important;  /* form-control-sm と同じ */
  padding: .25rem 1.75rem .25rem .5rem !important; /* 左右の余白（右は矢印分広め） */

  font-size: .875rem !important;   /* form-control-sm と同じ */
  line-height: 1.5 !important;

  color: #495057 !important;
  background-color: #fff !important;
  background-clip: padding-box !important;

  border: 1px solid #ced4da !important;
  border-radius: .2rem !important;
}

/* 表示テキスト部分 */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

/* ▼ 矢印エリア（右端＋縦中央） */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
  position: absolute !important;
  top: 50% !important;
  right: .75rem !important;
  transform: translateY(-50%) !important;
  width: 0 !important;
  height: 0 !important;
}

/* ▼ 本体（三角） */
.select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow b {
  border-style: solid !important;
  border-width: 5px 4px 0 4px !important;
  border-color: #6c757d transparent transparent transparent !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* フォーカス時（普通の input と同じ感じ） */
.select2-container--bootstrap4.select2-container--focus .select2-selection--single {
  border-color: #80bdff !important;
  box-shadow: 0 0 0 .2rem rgba(0,123,255,.25) !important;
}

/* ドロップダウン内だけスクロール */
.select2-container .select2-results > .select2-results__options {
  max-height: 50vh;
  overflow-y: auto;
}

.scroll-list {
  max-height: 400px;      /* 好きな高さに調整 */
  overflow-y: auto;
  overflow-x: hidden;
}
.scroll-list.disabled {
    pointer-events: none;     /* 全操作無効化 */
    opacity: 0.5;             /* グレーアウト */
    background-color: #f5f5f5;
}

.bottom-action {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;              /* モーダルなどより下、ヘッダより上くらいに調整 */
  padding: 0.75rem 1.5rem;    /* 好きに調整 */
}
.bottom-action-spacer {
  height: 52px;  /* ボタンバーの高さに合わせて調整 */
}

.invalid-feedback {
  padding-left:145px;
  margin-top:0;
}
.alert .close {
  color: #fff;
  opacity: 1;
}
.alert .close:hover {
  color: #fff;
  opacity: 1;
}
/* DataTables 標準の矢印は :before 側を消す（自前の ::after は残す） */
table.dataTable thead th.sorting:before,
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:before {
  content: "" !important;
  display: none !important;
}

/* th 右側にアイコンのスペース確保 */
table.dataTable thead th {
  position: relative;
  padding-right: 24px; /* アイコン分。好みで 20〜28px */
}

/* 共通：アイコンの配置（位置が上にズレる対策込み） */
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;              /* Solid */
  position: absolute;
  right: 6px;
  top: calc(50% + 3px) !important; /* ←上過ぎ対策。+2〜+4pxで調整 */
  transform: translateY(-50%) !important;
  display: inline-block !important;
  line-height: 1;
}

/* 未ソート */
table.dataTable thead th.sorting::after {
  content: "\f0dc"; /* fa-sort */
  opacity: .35;
}

/* 昇順 */
table.dataTable thead th.sorting_asc::after {
  content: "\f0de"; /* fa-sort-up */
  opacity: .9;
}

/* 降順 */
table.dataTable thead th.sorting_desc::after {
  content: "\f0dd"; /* fa-sort-down */
  opacity: .9;
}