/*------------------------------------------------------------------------------
  Base
------------------------------------------------------------------------------*/

:root {
  --cn-text-normal: #ffffff;
  --cn-bg-normal: #008fd3;
  --cn-warning-text-normal: #ffffff;
  --cn-warning-bg-normal: #e8546b;
  --cn-text-focus: #005bac;
  --cn-bg-focus: #a1cbed;
  --cn-warning-text-focus: #8b3240;
  --cn-warning-bg-focus: #f6bbc4;
  --cn-text-disable: #a0a0a0;
  --cn-bg-disable: #f0f0f0;
  --cn-warning-text-disable: #a0a0a0;
  --cn-warning-bg-disable: #f0f0f0;
  --cn-shadow-push: #a1cbed7f;
  --cn-danger: #dc3545;

  --cn-link-text-normal: #008fd3;
  --cn-link-text-focus: #005bac;
  --cn-link-text-disable: #a0a0a0;

  --cn-label-disabled: #a0a0a0;

  font-size: 12px;
}

@font-face {
  font-family: "cnnw-font";
  src: url("../fonts/NotoSansCJKjp-Regular_Subset.woff2") format("woff2"),
       url("../fonts/NotoSansCJKjp-Regular_Subset.woff") format("woff");
}

html {
  width: 100%;
  height: 100%;
}

body {
  font-family: "cnnw-font",
               -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* bootstrap.css */
  width: 100%;
  height: 100%;
}

.content {
  width: 100%;
  height: 100%;
}

.login-page-content {
  min-width: 800px;
}

.main-page-content {
  min-width: 900px;
  min-height: 825px;
}

.vhidden {
  visibility: hidden;
}

div[disabled],
div[disabled] div,
div[disabled] span,
span[disabled],
span[disabled] div,
span[disabled] span,
input[disabled],
select[disabled] {
  pointer-events: none;
  color: var(--cn-label-disabled);
  /* opacity: 0.6; */
}

select[disabled] { /* Bootstrapでセレクトボックスの矢印をsvgで定義しているため、disabled状態用の矢印を定義(strokeで色変更) */
  --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23a0a0a0' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

label {
  padding: 0px;
  margin: 0px;
  white-space: nowrap;
}

label[disabled] {
  color: var(--cn-label-disabled);
}

button {
  white-space: nowrap;
}

input[type=checkbox],
input[type=radio] {
  width: 22px;
  height: 16px;
}

.bg-black {
  background: black;
}

input::-ms-clear { /* for MS Edge (Note that Bootstrap hide the clear button of other browsers) */
  display: none;
}

select.form-control.form-control-sm {
  height: 25px; /* prevent a lack of letter in select about GHE#1197 */
}

/*------------------------------------------------------------------------------
  Image
------------------------------------------------------------------------------*/

.cn-logo-image {
  display: inline-block;
  width: 300px;
  height: 30px;
  margin-bottom: 3px;
}

.cn-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
}

div[disabled] .cn-icon,
.cn-icon[disabled] {
  opacity: 0.4;
}

.table-view .cn-icon {
  display: flex;
}

.cn-icon.cn-icon-lg {
  width: 20px;
  height: 20px;
}

.cn-icon.cn-icon-xl {
  width: 24px;
  height: 24px;
}

.cn-icon.no-image { /* アイコンは表示しないけどアイコン分の高さだけは確保したいとき用 */
  width: 0px;
}

.cn-icon-btn {
  border: none;
  background-color: transparent;
  width: 24px;
  height: 24px;
  margin: 2px;
}

button.cn-icon-btn-elm { /* for the case of img element in button element. */
  padding: 0;
  border: none;
  background: transparent;
}

img.cn-icon-btn-image { /* for the case of img element in button element. */
  width: 24px;
  height: 24px;
  margin: 2px;
}

img.cn-icon-btn-image.cn-image-sm { /* for the case of img element in button element. */
  width: 20px;
  height: 16px;
}

.caution-image {
  background-image: url(../img/Caution.png);
  width: 10px;
}

.group-image {
  background-image: url(../img/CaseFile_Open.png);
}
.open-image {
  background-image: url(../img/tree_open.svg);
  width: 10px;
}
.close-image {
  background-image: url(../img/tree_close.svg);
  width: 10px;
}

.show-drower-image {
  background-image: url(../img/show_normal.svg);
}
.show-drower-image:hover, .show-drower-image:active {
  background-image: url(../img/show_onmouse.svg);
}

.hide-drower-image {
  background-image: url(../img/hide_normal.svg);
}
.hide-drower-image:hover, .hide-drower-image:active {
  background-image: url(../img/hide_onmouse.svg);
}

.calender-image {
  background-image: url(../img/calendar_normal.svg);
}
.calender-image:hover, .calender-image:active {
  background-image: url(../img/calendar_onmouse.svg);
}
.calender-image:disabled, .calender-image.disabled {
  background-image: url(../img/calendar_disable.svg);
}

.blue-on-image {
  background-image: url(../img/BlueON.png);
}
.blue-off-image {
  background-image: url(../img/BlueOFF.png);
}

.blue-on-self-image {
  background-image: url(../img/BlueON_SelfTarget.png);
}
.blue-off-self-image {
  background-image: url(../img/BlueOFF_SelfTarget.png);
}

.orange-on-image {
  background-image: url(../img/OrangeON.png);
}
.orange-off-image {
  background-image: url(../img/OrangeOFF.png);
}

.orange-on-self-image {
  background-image: url(../img/OrangeON_SelfTarget.png);
}
.orange-off-self-image {
  background-image: url(../img/OrangeOFF_SelfTarget.png);
}

.gray-on-image {
  background-image: url(../img/GrayON.png);
}
.gray-off-image {
  background-image: url(../img/GrayOFF.png);
}

.ok-image {
  background-image: url(../img/ok.svg);
}
.ng-cal-image {
  background-image: url(../img/ng_calibration.svg);
}
.ng-monitor-image {
  background-image: url(../img/ng_monitor.svg);
}
.ng-pc-image {
  background-image: url(../img/ng_pc.svg);
}
.trash-image {
  background-image: url(../img/trash.svg);
}

table.monitor-list-table td.col-status > span[data-filterkey=ok] {
  background-image: url(../img/ok.svg);
  background-repeat: no-repeat;
}
table.monitor-list-table td.col-status > span[data-filterkey=ng-cal] {
  background-image: url(../img/ng_calibration.svg);
  background-repeat: no-repeat;
}
table.monitor-list-table td.col-status > span[data-filterkey=ng-mon] {
  background-image: url(../img/ng_monitor.svg);
  background-repeat: no-repeat;
}
table.monitor-list-table td.col-status > span[data-filterkey=ng-com] {
  background-image: url(../img/ng_pc.svg);
  background-repeat: no-repeat;
}
table.monitor-list-table td.col-status > span[data-filterkey=trash] {
  background-image: url(../img/trash.svg);
  background-repeat: no-repeat;
}

/*------------------------------------------------------------------------------
  Button
------------------------------------------------------------------------------*/

/* btn-cn */

.btn-cn {
  color: var(--cn-text-normal);
  background-color: var(--cn-bg-normal);
  border-color: var(--cn-bg-normal);
}

.btn-cn:focus-visible {
  color: var(--cn-text-normal);
  background-color: var(--cn-bg-normal);
  border-color: var(--cn-bg-normal);
  box-shadow: 0 0 0 0.25rem rgba(49, 132, 253, .5);
}

.btn-cn:hover {
  color: var(--cn-text-focus);
  background-color: var(--cn-bg-focus);
  border-color: var(--cn-bg-focus);
}

.btn-cn:not(:disabled):not(.disabled):active, .btn-cn:not(:disabled):not(.disabled).active {
  color: var(--cn-text-focus);
  background-color: var(--cn-bg-focus);
  border-color: var(--cn-bg-focus);
}

.btn-cn.disabled, .btn-cn:disabled {
  color: var(--cn-text-disable);
  background-color: var(--cn-bg-disable);
  border-color: var(--cn-bg-disable);
}

/* btn-cn-warning */

.btn-cn-warning {
  color: var(--cn-warning-text-normal);
  background-color: var(--cn-warning-bg-normal);
  border-color: var(--cn-warning-bg-normal);
}

.btn-cn-warning:hover {
  color: var(--cn-warning-text-focus);
  background-color: var(--cn-warning-bg-focus);
  border-color: var(--cn-warning-bg-focus);
}

.btn-cn-warning:not(:disabled):not(.disabled):active, .btn-cn-warning:not(:disabled):not(.disabled).active {
  color: var(--cn-warning-text-focus);
  background-color: var(--cn-warning-bg-focus);
  border-color: var(--cn-warning-bg-focus);
}

.btn-cn-warning.disabled, .btn-cn-warning:disabled {
  color: var(--cn-warning-text-disable);
  background-color: var(--cn-warning-bg-disable);
  border-color: var(--cn-warning-bg-disable);
}

/* btn-cn-link */

.btn-cn-link {
  font-weight: 400;
  color: var(--cn-link-text-normal);
  text-decoration: none;
  border: none;
}

.btn-cn-link:hover {
  color: var(--cn-link-text-focus);
  text-decoration: underline;
}
.btn-cn-link.nav-link:hover {
  color: var(--cn-link-text-focus);
  text-decoration: none;
}

.btn-cn-link:focus, .btn-cn-link.focus {
  text-decoration: underline;
  box-shadow: none;
}
.btn-cn-link.nav-link:focus, .btn-cn-link.nav-link.focus {
  text-decoration: none;
  box-shadow: none;
}

.btn-cn-link:disabled, .btn-cn-link.disabled {
  color: var(--cn-link-text-disable);
  pointer-events: none;
}

/* min-width */

button.btn-cn:not(.cn-icon-btn),
button.btn-cn-warning {
  min-width: 140px;
}

button.btn-cn.btn-cn-sm:not(.cn-icon-btn),
button.btn-cn-warning.btn-cn-sm {
  min-width: 80px;
}

button.btn-cn-link,
a.btn-cn-link {
  min-width: 140px;
}

button.btn-cn-link.btn-sm {
  min-width: auto;
}

div.cnnw-header button.btn-cn-link, div.cnnw-header a.btn-cn-link/* in header */ {
  min-width: auto;
  margin-left: 5px;
  margin-right: 5px;
}

/*------------------------------------------------------------------------------

------------------------------------------------------------------------------*/

.table-hover tbody tr:hover {
  background-color: #f8f9fa; /* override to same of .list-group-item-action:hover from rgba(0, 0, 0, 0.075) */
}

/*------------------------------------------------------------------------------
  Layout Boxes
------------------------------------------------------------------------------*/

.hbox {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.hbox-center {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 100%;
}

.hbox-bottom {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: baseline;
  width: 100%;
  height: 100%;
}

.vbox {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  height: 100%;
}

.full-box {
  width: 100%;
  height: 100%;
}

.hfull-box {
  width: 100%;
  height: auto;
}

.vfull-box {
  width: auto;
  height: 100%;
}

.hgrow-box {
  width: 1%;
  height: 100%;
  flex-grow: 1;
}

.vgrow-box {
  width: 100%;
  height: 1%;
  flex-grow: 1;
}

/*------------------------------------------------------------------------------
  Waiting
------------------------------------------------------------------------------*/

.overlay {
  width: 100%;
  height: 100%;
  /* background-color: rgba(0, 0, 0, 0.5); */
  position: fixed;
  margin: 0;
  top: 0;
  left: 0;
  display: table;
  z-index: 2000; /* Bootstrap4 .modal is 1050 (and .modal-backdrop is 1040.) */
  overflow: hidden;
  cursor: wait;
}

.spinner {
  margin: 0 auto;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
}

.spinner-message {
  margin-top: 50px;
}

/*------------------------------------------------------------------------------
 Header
------------------------------------------------------------------------------*/

div.cnnw-header {
  height: 40px;
}

/*------------------------------------------------------------------------------
 Footer
------------------------------------------------------------------------------*/

div.cnnw-footer {
  height: 25px;
}
