html {
  height: 100%;
}

body {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0.5vh 1vw;
  background-color: #f6f6f6;
  color: #333;
  min-height: 99%;
  justify-content: space-between;
}
  
.main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  max-width: 100%;
}
 
h1 {
  color: #0056b3;
  font-size: clamp(25px, 2.5vw, 30px);
  text-wrap: nowrap;
  margin: 0 1em 0 0;
}
  
.header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 1em 0;
}
  
.header > .header-ctrls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-end;
  justify-content: space-between;
  flex: auto;
}

.header > .header-ctrls > a {
  font-size: clamp(12px, 1.5vw, 15px);
  background-color: #CDe;
  padding: 0.3em 0.5em 0.2em;
  color: #08f;
  margin: 2px 0 0 1em;
  cursor: pointer;  
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.4;	
  text-decoration: none;
  max-height: 3em;
}
.header > .header-ctrls > a:hover,
.header > .header-ctrls > span:hover  {
  background-color: #BCe;
  box-shadow: 0px 1px 4px #68a8;
}
  
.main-table{ 
  overflow-x: auto;  margin-bottom: 20px;
  box-shadow: 0 0px 3px #0005;
  margin-bottom: 20px;
}
  
table {
  border-collapse: separate;
  margin: 0;
  border: solid 1px #000;
}

#shiftLeftX, #shiftRightX {
  padding: 4px 8px;
}

#shiftLeftAmount, #shiftRightAmount {
  width: 3.1em;
  text-align: center;
  padding: 1px;
  margin: 1px;
  background: #FFF5;
  border: #fff5 solid 1px;
  color: #FFF;
}
	
th,
td {
  padding: 5px;
  text-align: center;
  white-space:nowrap;
}
  
th {
  background-color: #68a;
  color: white;
  width: 4em;
	position: sticky;
  left: 0;
  z-index: 1;
}
  
span.for-hex-input, input#decValue {
  position: sticky;
  left: 80px;
  z-index: 1;
}
  
tr[id^="field"] > th {
  background-color: #69A;
  color: white;
  font-size: 15px;
}
  
tr#fieldValue > th,
tr#fieldDecValue > th {
  font: 13px normal;
}

td {
  background-color: #DDD;
}
  
td.bitlabel {
  color: #0056b3;
  font-size: small;
  width: 2em;
  padding: 8px 0px;
  cursor: cell;
  user-select: none;
  -webkit-user-select: none;
  background-color: #C5D5D5;
}
  
td.bitlabel:hover {
  background-color: #CDe;
  box-shadow: 0 1px 4px #0005;
  transform: scale(1.05);
}

.invalid-input {
    box-shadow: #F003 0px 0px 10px 3px inset;
    color: #900;
    text-decoration-line: line-through;
}

#decWarning {
    color: #900;
    font-size: 15px;
    padding: 5px;
}

#hexValueOverlay {
	position: absolute;
    top: -2px;
    left: 1.7em;
    pointer-events: none;
    padding: 0px;
    white-space: pre-wrap;
    word-wrap: revert-layer;
    overflow: hidden;
    font-family: 'Consolas', 'Courier New', 'Lucida Console', 'Monaco', 'Source Code Pro', 'Fira Code', 'Ubuntu Mono', 'Menlo', 'DejaVu Sans Mono', monospace;
    background: #fdd8;
    font-size: 15px;
    margin: 0;
    text-decoration: line-through;
    letter-spacing: 2px;
    padding: 2px 0;
}

td.bitlabel.selecting {
  background-color: #ADE;
  box-shadow: 0 0 0 1px #ADE;
}

td.bitctrl {
  background-color: #888;
  cursor: pointer;
  padding: 6px 0px;
  transition: background-color 0.2s ease-in-out;
  min-width: 1em;
}
  
td.bitctrl:hover {
  box-shadow: 0 1px 4px #0088;
  transform: scale(1.05);
}
  
td.bit_0 {
  background-color: #888;
}
  
td.bit_1 {
  background-color: #79C;
}
  
input {
  padding: 3px;
  width: 200px;
  box-sizing: border-box;
  letter-spacing: 2px;
  font-family: 'Consolas', 'Courier New', 'Lucida Console', 'Monaco', 'Source Code Pro', 'Fira Code', 'Ubuntu Mono', 'Menlo', 'DejaVu Sans Mono', monospace;
  font-size: 15px;
}
  
#byteValue td,
#fieldValue td,
#fieldDecValue td {
  letter-spacing: 2px;
  font-family: 'Consolas', 'Courier New', 'Lucida Console', 'Monaco', 'Source Code Pro', 'Fira Code', 'Ubuntu Mono', 'Menlo', 'DejaVu Sans Mono', monospace;
  font-size: 15px;
}
   
#fieldLabel {
  transition: all 0.3s ease-out;;
}

#fieldLabel td {
  color: #2b833b;
  background-color: #CCD;
  font-size: small;
  padding: 8px 0px;
}
  
#fieldValue td,
#fieldDecValue td {  
  padding: 6px 0px;
}
  
button {
  line-height: 1em;
  padding: 9px;
  margin: 5px;
  background-color: #68a;
  color: white;
  border: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  min-width: 4em;
}
  
button:hover {
  background-color: #47a;
  box-shadow: 0 1px 4px #0005;
  transform: scale(1.05);
}
  
hr {
  max-width:1800px;
  margin:20px; 
  margin-left:0;
}
  
ul ul {
  list-style-type: circle;
  font-weight: normal; 
  padding-left: 1.5em;
}
  
ul {
  list-style-type: disc;
  line-height: 1.6em;
  font-weight: bold;
  color: #333;
	padding-left: 1em;
}
  
li > span {
  background-color: #5Aa3;
  padding: 3px;
  margin: 3px;
  font-size: 14px;
}
  
input#customFieldName {
  transition: background-color 0.3s ease-in-out;
  background-color: #EEE;
  padding: 5px;
  margin-left: 5px;
  letter-spacing: 0;
}
input#customFieldName::placeholder {
  font-size: 12px;
  color: gray;
}
  
button#customFieldAdd {
  padding: 9.342px;
  background-color: #6AA;
}
  
#customBitFields > button{
  padding: 9px;
  background-color: #6AA;
  min-width: 6em;
  margin-right: 15px;
}
  
#customBitFields button.btn-del{
  line-height: 1em;
  float: right;
  padding: 3px;
  margin: -8px;
  margin-left: 8px;
  background-color: #6AA;
  min-width: unset;
}
  
#customBitFields button.btn-del:hover {
  font-weight: bold;
  text-shadow: #F20 0 0 5px;
  color: #F7a;
  box-shadow: unset;
  transform: unset;
}

footer {
  margin-bottom: 5px;
}

footer > a {
  color:#000;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
}
  
span#userGuideHide {
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  margin:0 5px; 
  padding: 4px 5px;
  background:#eee;
}
 
#userGuideHide::after {
  padding-bottom: 5px;
  content: "我已了解,点击隐藏";
  font-weight: normal; 
  font-size: 0px;
  width: 0px;
  transition: all 0.25s;
}

#userGuideHide:hover::after {
  font-size: 14px;
  width: auto;
}
  
#userGuideInfo {
  transition: all 0.3s ease;
}
  
#userGuideInfo.hidden {
  height: 0px;
  transform: translate(-30%, 40vh) scale(0); 
} 

#userGuideShow {
  cursor: pointer;
  transition: all 0.3s ease;
}
#userGuideShow.hidden {
  font-size: 0px;
}

.js-modal-container {
    position: fixed;
    bottom: 100px; right: 100px;
    z-index: 1000;
    background-color: #fefefe;
    padding: 0;
    box-shadow: 0px 0px 15px #888A;
    width: 500px;		
    height: 500px;
    max-height: 80%;
    max-width: 80%;
    min-height: 320px;
    min-width: 320px;
    display: block;
    overflow: hidden;
	-webkit-user-select: none; 
	-moz-user-select: none;    
	-ms-user-select: none;     
	user-select: none;         
}
.js-header {
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    flex-wrap: nowrap; 
    flex-direction: row;
    cursor: move;
    background-color: #f1f1f1;
    padding: 3px;
    border-bottom: 1px solid #ddd;
}
.js-header-ctrl {
    margin-left: auto;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.js-header-ctrl > a {
    padding: 3px;
    color: #69A;
    text-decoration: unset;
}

.js-header-ctrl > a:hover {
    color: #06A;;
    text-shadow: 0 0 3px #06A8;
}

.js-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 0 8px;
	line-height: 24px;
}
.js-close:hover,
.js-close:focus {
    color: black;
    text-decoration: none;
}
.js-iframe {
    height: calc(100% - 36px);
    width: 100%;
    border: none;
} 