/*==================== 
* テーブルレイアウト
* ====================*/
table {
	border-collapse: separate;
	border-spacing: 0;
	margin: 0 auto;
	padding: 0;
	margin: auto;
	table-layout: auto;
	color: #000000;
	/* Safariで表示時、本文が長いと文字サイズが大きくなることがあるため100%を設定 */
	text-size-adjust: 100%;
	-webkit-text-size-adjust: 100%;
}
th, td {
	border-bottom: var(--def-border);
	border-right: var(--def-border);
}
tr:first-child > th {
	border-top: var(--def-border);
}
tr > *:first-child {
	border-left: var(--def-border);
}
/* 二行目ヘッダの設定 */
table.sticky thead tr.sub-header:last-child th {
	cursor: pointer;
	z-index: 1;
	border-left: none;
}

table tr {
	background-color: #FFFFFF;
	padding: 30px;
}

table th {
	padding: 5px; /* テーブル見出しの幅 */
	text-align: center;
	background-color: #E4E4E4;
	white-space: nowrap;
}

table th > input[type=checkbox] {
	transform: scale(1.5);
}

table td {
	padding: 5px; /* テーブルセルの幅 */
	text-align: center;
	white-space: nowrap;
	background-color: #FFFFFF;
}
table.w-fixed-table td {
	white-space: normal;
	text-align: left;
}

/* テーブルヘッダがtd要素と同じ行内に存在する場合のボーダー設定 */
table.row-header-table tr:first-child td {
	border-top: var(--def-border);
}

/* 行ごとに色を変更する場合のヘッダ、行の背景色 */
table.row-color-change th:not(.asc-order, .desc-order) {
	background-color: #7FFF00;
}
table.row-color-change tr:nth-child(2n) > td {
	background-color: #FFD700;
}

/* ラベルと同じヘッダ背景色 */
table.label-bacground-color th {
	background-color: var(--def-label-background);
}

/* テーブルのヘッダ固定 */
table.sticky th {
	position: sticky;
}

/* 各ヘッダの位置設定 */
table.sticky thead tr th {
	top: 0;
	cursor: pointer;
}
table.sticky thead tr th[colspan] {
	cursor: initial;
}

/* 昇順が設定されているカラム */
.asc-order {
	background-color: #F0F8FF;
}
/* 降順が設定されているカラム */
.desc-order {
	background-color: #FEEEED;
}

/*==================== 
* テーブルの列固定
* ====================*/
table.sticky tbody .col-fixed {
	position: sticky;
}
/*** 優先順位設定 ***/
/* 未固定のヘッダ項目 */
table.sticky thead th {
	z-index: 2;
}
/* 未固定のデータ項目 */
table.sticky tbody td {
	z-index: 1;
}
/* 固定中のヘッダ項目(左) */
table.sticky thead .l-col-fixed {
	z-index: 6;
}
/* 固定中のデータ列(左) */
table.sticky tbody td.l-col-fixed {
	z-index: 5;
}
/* 固定中のヘッダ項目(右) */
table.sticky thead .r-col-fixed, table.sticky thead .col-fixed {
	z-index: 4;
}
/* 固定中のデータ列(右) */
table.sticky tbody td.r-col-fixed, table.sticky tbody td.col-fixed {
	z-index: 3;
}

/*==================== 
* テーブルのスクロール関連
* ====================*/
/* テーブルを画面内に収める */
.table-wrap {
	overflow: auto;
	width: 100%;
	margin: auto;
}
/* スクロールバーを画面幅に収める状態を解除 */
.scroll-reset {
	overflow: unset;
}

/*==================== 
* テーブル項目移動ボタン
* ====================*/
/* アンカーボタンの設定 */
.anchor-btn {
	width: 40px;
	position: fixed;
	right: 10px;
	top: 5px;
	transition: 1s;
	opacity: 0.7;
	z-index: 151;
	padding: 6px;
}
.anchor-btn:hover {
	opacity:1;
}
.anchor-back {
	left: 10px;
}
