/* Deal with margins */
body:before,
body:after {
  content: '';
  clear: both;
  display: table;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -webkit-user-drag: none;
  -webkit-app-region: drag;
  user-select: none;
  text-rendering: optimizeSpeed;
  font: small-caption;
}
:dir(rtl) html {
  direction: ltr;
}
html:not(.transparent) {
  background-color: Window;
}
body, input, select, textarea {
  font: inherit;
}
body {
  background: transparent;
  color: WindowText;
}

img {
  pointer-events: none;
}

p,
main,
.p,
.row {
  margin: 1rem;
}

/* Tabs */
.tab-buttons {
  display: flex;
}
.tab-buttons > * {
  padding: 0 1em;
  line-height: 1.8em;
  vertical-align: middle;
}
.tab-buttons > .active {
  cursor: default;
}
.tab-content {
  max-height: 70vw;
  overflow: auto;
}

/* Row */
.row {
  display: flex;
}

/* Cells: Left (start) */
.cell-left {
  width: 30%;
  text-align: end;
  vertical-align: top;
  margin-right: 1rem;
  padding-top: 5px;
  overflow-wrap: break-word;
}

/* Cells: Right (end) */
.cell-right {
  width: 70%;
  text-align: start;
  vertical-align: top;
  overflow-wrap: break-word;
}

/* Alignment: Center */
.center {
  text-align: center;
  justify-content: center;
}

/* Alignment: Left */
.left {
  text-align: start;
  justify-content: flex-start;
}

/* Alignment: Right*/
.right {
  text-align: end;
  justify-content: flex-end;
}

/* Form, Fields, and decorations */
[readonly],
[disabled],
.disabled {
  opacity: .6;
  background: #00000010;
}

/* Label: Required */
.label-required {
  font-size: .8rem;
  text-transform: lowercase;
  opacity: .7;
}

/* Label: Help */
.label-help {
  margin-top: .2em;
  margin-bottom: .6em;
  font-style: italic;
  user-select: text;
}
.label-help-inline {
  display: inline;
  margin-left: .6em;
  font-style: italic;
  user-select: text;
}

/* Form elements */
var {
  padding: 5px 6px;
  display: inline-block;
}

input,
textarea {
  user-select: unset
}
fieldset,
section {
  background: #00000010;
  padding: 1rem;
  border: 1px inset #00000010;
}

input[type=checkbox],
input[type=radio] {
  font-size: 1.6em;
  margin: 0;
  margin: 5px 0;
}
input:not([type="checkbox"]):not([type="radio"]) {
  width: 100%;
}
textarea {
  width: 100%;
  resize: none;
  height: 8rem;
  border: 1px solid #00000035;
}
button,
input:not([type="checkbox"]):not([type="radio"]),
textarea {
    padding: 3px 6px;
}
button,
input[type="button"] {
  margin-left: .6rem;
  margin-right: .6rem;
  word-break: keep-all;
}
button:first-child,
input[type="button"]:first-child {
  margin-left: unset;
}
button:last-child,
input[type="button"]:last-child {
  margin-right: unset;
}
