.query-table-box {
  break-inside: avoid-column;
  width: fit-content;
  max-width: 100%;
  position: relative;
}

.query-table-box .wrapper {
  width: fit-content;
  max-width: 100%;
  margin-top: .15em;
  overflow: auto;
}

.db-query-table {
  border-collapse: separate;
  background-color: #0000;
  border: .05em solid #e0e0e0;
}

.db-query-table .no-data {
  color: var(--text-disabled-color);
  text-align: center;
}

.db-query-table th, .db-query-table td {
  border-left: 1px solid var(--background-color);
  border-top: 1px solid var(--background-color);
  vertical-align: top;
  padding: .1em .3em;
}

.db-query-table tr:first-child > th:first-child {
  z-index: 1;
  position: sticky;
  top: 0;
  left: 0;
}

.db-query-table tr > th:first-child, .db-query-table tr > td:first-child {
  position: sticky;
  left: 0;
}

.db-query-table th:last-child, .db-query-table td:last-child {
  border-right: 1px solid var(--background-color);
}

.db-query-table tr:last-child th, .db-query-table tr:last-child td {
  border-bottom: 1px solid var(--background-color);
}

.db-query-table th {
  background-color: var(--background-inverse-color);
  color: var(--link-inverse-color);
  padding: .1em .2em;
  font-weight: 300;
}

.db-query-table th.delete {
  min-width: 1.8em;
}

.db-query-table th a {
  color: var(--link-inverse-color);
  background-position: 100%;
  background-repeat: no-repeat;
  background-size: 1.3em;
  padding: 0 .3em;
  text-decoration: none;
  display: block;
}

.db-query-table th.asc a {
  background-image: url("../../img/icon/arrow-down-white.svg");
  padding-right: 1.1em;
}

.db-query-table th.desc a {
  background-image: url("../../img/icon/arrow-up-white.svg");
  padding-right: 1.1em;
}

.db-query-table th:hover {
  background: var(--background-focused-inverse-color);
}

.db-query-table tr:hover td, .db-query-table tr:nth-child(odd):hover > td:first-child, .db-query-table tr:nth-child(2n):hover > td:first-child {
  background-color: var(--panel-background-focused-color);
}

.db-query-table td.delete input[type="image"] {
  opacity: 0;
  width: 1.5em;
  margin: .1em;
}

.db-query-table tr:hover td.delete input[type="image"] {
  opacity: 1;
}

.db-query-table td > form {
  display: flex;
}

.first-column-show-icon .db-query-table tr > td:first-child > a {
  text-indent: -1000%;
  background-image: url("../../img/icon/detail.svg");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.1em;
  width: 1.2em;
  margin: 0 auto;
  display: block;
  overflow: hidden;
}

.first-column-show-icon .db-query-table tr:hover > td:first-child > a {
  background-size: 1.3em;
}

.db-query-table tr:nth-child(odd), .db-query-table tr:nth-child(odd) > td:first-child {
  background-color: var(--panel-background-color);
}

.db-query-table tr:nth-child(2n), .db-query-table tr:nth-child(2n) > td:first-child {
  background-color: var(--background-color);
}

.query-table-box .pager {
  margin: .2em .3em 0;
  display: block;
}

.query-table-box .pager a, .query-table-box .pager b {
  border: 1px solid #0000;
  border-radius: .2em;
  padding: 0 .35em;
  display: inline-block;
}

.query-table-box .pager a:hover {
  border-color: var(--border-light-color);
}

.query-table-box .pager b {
  border-color: var(--border-color);
  padding: 0 .3em;
  font-weight: 400;
}

.query-table-box .pager form {
  margin-left: .66em;
  display: inline-block;
}

.query-table-box .pager form select {
  margin-left: .66em;
}

.query-table-box .export {
  background-image: url("../../img/icon/download-white.svg");
  background-position: .33em;
  background-size: 1.1em;
  margin: 0 .2em 0 .1em;
  padding: 0 .6em 0 2em;
  font-size: .9em;
}

.query-table-box .columns-switch {
  margin: 0 .3em;
  display: inline-block;
}

.query-table-box .columns-switch .button {
  width: max-content;
  padding: 0 .6em;
  font-size: .9em;
}

.query-table-box .columns-switch span {
  display: none;
}

.query-table-box .columns-switch input[type="checkbox"] {
  margin: 0 .1em 0 .5em;
}

.query-table-box .columns-switch {
  border: 1px solid #0000;
  padding: .12em .6em .3em .2em;
  display: block;
  position: absolute;
  top: -.2em;
  left: 9.4em;
}

.query-table-box .columns-switch.switch-on {
  background-color: var(--panel-background-color);
  border: 1px solid var(--panel-border-color);
  border-radius: var(--default-border-radius);
  z-index: 10;
  box-shadow: 0 0 1.2em .1em #0003;
}

.query-table-box .columns-switch.switch-on span {
  margin: .3em 0 0;
  font-weight: 300;
  display: block;
}

.query-table-box .selectform {
  flex-direction: row;
  align-items: center;
  padding: .5em 0 0;
  display: flex;
}

.query-table-box .selectform input[type="submit"], .query-table-box .selectform select {
  height: 1.66em;
  max-height: 1.66em;
  margin-left: .33em;
}

.query-table-box .selectform > button {
  flex-direction: row;
  align-items: center;
  margin-left: 0;
  margin-right: .5em;
  padding: 0 .5em 0 .36em;
  display: flex;
}

.query-table-box .selectform input[type="submit"] {
  padding: 0 .6em;
}

.query-table-box .selectform input[type="checkbox"] {
  margin-right: .5em;
}

