:root {
  --main-font-color: #000000;
  --lighter-font-color: #55677a;
  --light-font-color: #889aaf;
  --light-font-color: #c1ccd3;
  --selection-text-color: #002040;
  --selection-background-color: #e8f2f6;
  --selection-border-color: #c9d9e4;
  --mini-font-size: 0.5rem;
  --smaller-font-size: 0.75rem;
  --bigger-font-size: 1.25rem;
  --bigger-element-size: 1.5rem;
  --larger-font-size: 1.9rem;
  --enormous-font-size: 4rem;
  --is-mobile-view: false;
  --tag-color-plain: #0091ff;
  --tag-color-address: #f6ac00;
  --tag-color-system: #666666;
  --app-max-width: 900px;
}

* {
  /* force font on all elements, not sure how good this practice is */
  font-family: Helvetica, Arial, sans-serif !important;
  box-sizing: border-box;
}
html, body {
  /* font-size: 1em; */
  font-size: 115% !important;
  color: var(--main-font-color);
  padding: 0;
  margin: 0;
  width: 100%;
}
body > #app {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0rem 3rem 3rem 3rem;
  background: #ffffff;
}
html, body, div, form {
    box-sizing: border-box;
}
ul {
  margin-block-start: 0;
  margin-block-end: 0;
  /* padding-inline-start: 0; */
}

mark {
  background-color: #fffddd;
  /* font-style: italic; */
  padding: 0 .3rem;
}

hr {
  padding: 0;
  margin: 0;
  border: none;
  height: 1px;
  width: 100%;
  background-color: #cccccc;
}


html > body *.hidden {
  display: none;
}


*.mini-font {
  font-size: var(--mini-font-size);
}
*.smaller-font {
  font-size: var(--smaller-font-size);
}
*.bigger-font {
  /* font-size: 1.25rem; */
  font-size: var(--bigger-font-size);
}
*.bigger-font-height {
  height: var(--bigger-font-size);
}
*.bigger-font-width {
  width: var(--bigger-font-size);
}
*.larger-font {
  /* font-size: 2.1rem; */
  font-size: var(--larger-font-size);
}
*.enormous-font {
  font-size: var(--enormous-font-size);
}
*.lighter-color {
  /* color: #999999; */
  /* color: #889aaf; */
  /* color: #445566; */
  color: var(--lighter-font-color);
}
*.light-color {
  color: var(--light-font-color);
}

*.text-transform-capitalize {
  text-transform: capitalize;
}
*.text-transform-uppercase {
  text-transform: uppercase;
}
*.text-transform-lowercase {
  text-transform: lowercase;
}

.padding-normal-left {
  padding-left: .5rem;
}
.padding-normal-right {
  padding-right: .5rem;
}
.padding-normal-top {
  padding-top: .5rem;
}
.padding-normal-bottom {
  padding-bottom: .5rem;
}
.padding-large-right {
  padding-right: 2rem;
}
.margin-normal-top {
  margin-top: .5rem !important;
}
.margin-normal-left {
  margin-left: .5rem;
}
.margin-normal-right {
  margin-right: .5rem;
}
.margin-normal-bottom {
  margin-bottom: .5rem;
}
.margin-bigger-right {
  margin-right: 1rem !important;
}
.margin-bigger-top {
  margin-top: 1rem !important;
}
.margin-bigger-bottom {
  margin-bottom: 1rem !important;
}

.width-25 {
  width: 25%;
}
.width-25-min {
  min-width: 25%;
}
.width-30 {
  width: 30%;
}
.width-30-vw {
  width: 30vw;
}
.width-30-min {
  min-width: 30%;
}
.width-50 {
  width: 50%;
}
.width-100 {
  width: 100%;
}

.height-100 {
  height: 100%;
}

.margin-wide-top {
  margin-top: 1rem !important;
}

.nowrap {
  white-space: nowrap;
}
.align-left {
  text-align: left;
}
.align-center {
  text-align: center;
}
.align-right {
  text-align: right;
}

.kind-of-absolute {
  height: 0;
  overflow: visible;
}

.half-size-text {
  font-size: 45%;
}

.flex-grow {
  flex: 1 0 auto;
}
.flex-shrink {
  flex: 0 1 auto;
}
.flex-grow-shrink {
  flex: 1 1 auto;
}
.flex-unshrinkable {
  flex-shrink: 0;
}
/* TODO: replace expandable with flex-expandable */
.flex-expandable,
.expandable {
  flex: 1 1 auto;
}
.flex-max-content {
  flex: 0 0 max-content;
}
.flex-row-nowrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.flex-column {
  display: flex;
  flex-direction: column;
}
.flex-align-items-center {
  align-items: center;
}
.flex-align-items-end {
  align-items: end;
}

.one-liner {
  white-space: nowrap;
}
.cuttable {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rotate-90-clockwise {
  transform: rotate(90deg);
}
.rotate-90-counterclockwise {
  transform: rotate(-90deg);
}
.transition-all-02s {
  transition: all .2s ease-out;
}

/* body > #info {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0 1rem;
  background: black;
  color: white;
  font-size: 100%;
  width: 100%;
} */

/**
  * Loader
 **/
body > #app > .loader {
  display: none;
  /* css view optimization */
  /* scale: .5; */
  z-index: 102;
}
body > #app > .loader > * {
  scale: .55;
}
/* body.loading > * {
  display: none;
} */
body.loading > #app > div.loader,
body.loading-non-blocking > #app > div.loader {
  position: fixed;
  left: calc(50% - 50px);
  top: 0;
  width: 100px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
/**
  * Loading indicator
 **/
.lds-ellipsis {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, .5);
}
.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #000000;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}

a {
  text-decoration: none;
  color: #0055aa;
  -webkit-tap-highlight-color: transparent;
}
a:hover {
  /* color: #000000; */
  color: inherit;
    /* background-color: rgba(0, 0, 0, .05); */
    /* border-bottom: 1px solid #cccccc; */
}
a:visited {
  color: #003a66;
  color: #00458b; /** 82% **/
  color: #004284; /** 78% **/
  color: #003d7a; /** 72% **/
}

a, select, input, textarea {
    font-size: inherit;
}

a.login {
  margin-top: 3rem;
}
a.disabled {
  pointer-events: none;
  cursor: default;
  color: var(--light-font-color);
}

select, input {
  height: var(--bigger-element-size);
}
select.inline, input.inline, form.inline {
  height: 1.3rem;
  line-height: 1.3rem;
  font-size: 1rem;
}

select, input, textarea {
  box-sizing: border-box;
  border: 1px solid rgba(0, 0, 0, 0);
  border-bottom-color: #cccccc;
  /* background-color: #fafafa; */
  background-color: #00000004;
}
select:focus, input:focus, textarea:focus {
  box-shadow:0 0 15px 4px rgba(0,0,0,0.04);
  border-radius: 3px;
  border-width: 1px;
}
input:required:invalid, select:required:invalid,
input::placeholder, textarea::placeholder {
  color: var(--light-font-color);
}
input[readonly] {
  color: var(--light-font-color);
}
option:not(:disabled) {
  color: var(--main-font-color);
}
/* input::placeholder {
  color: #cccccc;
} */
/* Hide arrow */
/* input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
} */
input[type=checkbox], input[type=radio] {
  width:  1rem;
  height: var(--bigger-element-size);
}
input[type=checkbox] {
  margin: 0;
  vertical-align: bottom;
}
input[type=radio] {
  vertical-align: bottom;
}

label {
  /* color: #999999; */
  /* color: #445566; */
  color: var(--lighter-font-color);
  /* color: var(--light-font-color); */
}
label.colon-closed::after {
  content: ':';
}

.select-item {
    position: relative;
    float: left;
    /* min-width: 200px; */
}
.select-item:after {
    content: '▼';
    /* content: '🠻'; */
    width: 1rem;
    height: var(--smaller-font-size);
    text-align: center;
    font-size: var(--smaller-font-size);
    bottom: 0;
    /* right: -0.125rem; */
    right: 0;
    top: calc((var(--bigger-element-size) - var(--smaller-font-size))/2);
    /* padding: 0px 0px 0px 8px; */
    padding: 0;
    position: absolute;
    pointer-events: none;
}
.select-item select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  display: block;
  /* width: 100%; */
  /* float: right;
  margin: 0; */
  /* color: #333; */
  /* background-color: #ffffff; */
  background-image: none;
  -ms-word-break: normal;
  word-break: normal;
}

a.icon {
  /* margin-left: .5rem; */
  width: 2.5rem;
  text-align: right;
  flex: 0 0 auto;
  display: flex;
  justify-content: end;
}
/*
TODO: figure out if this one is needed
a.icon:hover {
  background: none;
}
*/
a.icon > img {
  width: 100%;
  /* max-width: 1.5rem; */
  height: 100%;
  object-fit: contain;
  opacity: .5;
  /* margin-top: 2px; */
}
a.icon:hover > img {
  opacity: .65;
}
a.icon.bigger, a.icon.bigger > img {
  max-width: 3rem;
}
a.icon.huge > img {
  max-width: 6rem;
}
a.icon.unlimited {
  width: auto;
}
a.icon.unlimited > img {
  max-width: none;
}
a.icon.inline {
  height: .9rem;
  display: inline-block;
}

.buttons {
  height: 3rem;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
}
.buttons > .separator {
  width: 1px;
  background: #e0e0e0;
}
.buttons > * {
  height: 3rem;
}
a.button {
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-repeat: no-repeat;
}
a.button.image-half-size > img {
  width: 50%;
  height: 50%;
}
a.button.image-two-thirds-size > img {
  width: 70%;
  height: 70%;
}
a.button > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .5;
}

a.icon.disabled, a.button.disabled {
  pointer-events: none;
  opacity: 0.1;
}

.one-third-inline-block {
  display: inline-block;
  min-width: 30%;
}

body > #app > div {
  /* display: none; */
  /* max-width: 900px; */
  max-width: var(--app-max-width);
}
html > body > #app:not([data-view=parcels]) > div#parcels,
html > body > #app:not([data-view=parcel]) > div#parcel,
html > body > #app:not([data-view=parcel-edit]) > div#parcel-edit,
html > body > #app:not([data-view=parcel-category]) > div#parcel-category,
html > body > #app:not([data-view=parcel-categories]) > div#parcel-categories,
html > body > #app:not([data-view=pallets]) > div#pallets,
html > body > #app:not([data-view=pallet]) > div#pallet,
html > body > #app:not([data-view=pallet-edit]) > div#pallet-edit,
html > body > #app:not([data-view=dispatches]) > div#dispatches,
html > body > #app:not([data-view=dispatch]) > div#dispatch,
html > body > #app:not([data-view=inventory]) > div#inventory,
html > body > #app:not([data-view=reports]) > div#reports,
html > body > #app:not([data-view=users]) > div#users,
html > body > #app:not([data-view=user]) > div#user,
html > body > #app:not([data-view=parcel-categories]) > div#parcel-categories,
html > body > #app:not([data-view=tags]) > div#tags,
html > body > #app:not([data-view=me]) > div#me,
html > body > #app:not([data-view=error]) > div#error,
html > body:not(.popup) > #app > div#popup {
  display: none !important;
}

body > #app > div#menu {
    width: 100%;
    display: block;
    /* display: flex;
    flex-direction: column;
    gap: 3rem; */
    /* padding-top: 3rem; */
}

div#menu > div#menu-top-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  /* padding: .5rem 0; */
  border-bottom: 1px solid #999999;
  max-height: 3rem;
  align-items: center;
}
div#menu-top-row > .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
div#menu > #menu-items {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding-top: 3rem;
}
body > #app:is([data-view]):not([data-view="admin"]) div#menu > #menu-items {
  display: none;
}
div#menu > #menu-items > * {
  display: none;
}
body > #app:not([data-view]) div#menu > #menu-items *.top-level,
body > #app:not([data-view]) div#menu > #menu-items *:has(.second-level),
body > #app:not([data-view]) div#menu > #menu-items *.second-level,
body > #app[data-view="admin"] div#menu > #menu-items *.admin-level
{
  display: inline-block;
}
div#menu > #menu-items div.second-level > a,
div#menu > #menu-items a.second-level
{
  /* margin-left: 1rem; */
  text-transform: lowercase;
  /* line below supposed to fix bug with latest parcels/pallets font size, but seems like it is not in use anymore and probably not needed either */
  /* display: contents; */
}
div#menu > #menu-items *.second-level::before {
  content: "–";
  padding-left: .5rem;
  padding-right: .5rem;
}
div#menu > #menu-items *.latest-items {
  float: right;
  overflow: hidden;
  text-wrap: nowrap;
  text-overflow: clip;
  max-width: 65%;
  text-align: right;
  display: flex;
  flex-direction: row;
  gap: .2rem;
}
div#menu > #menu-items *.latest-items > a {
  overflow: hidden;
  text-overflow: clip;
}
div#menu > #menu-items *.latest-items:not(:empty)::before {
  content: "[";
  flex-shrink: 0;
  flex-basis: fit-content;
}
div#menu > #menu-items *.latest-items:not(:empty)::after {
  content: "]";
  flex-shrink: 0;
  flex-basis: fit-content;
}
/* div#menu > #menu-items *.latest-items > *:not(:last-child)::after {
  content: ", ";
} */

form.invisible {
  margin: 0;
  padding: 0;
  display: inherit;
}
.form {
  /* margin-bottom: 20px; */
  width: 100%;
  /* padding-top: 1rem; */
  margin: 1rem 0;
  /* position: relative; */
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 1rem;
}
.form.tight {
  gap: 0.25rem;
}
.form.compact {
  gap: 0.75rem;
}
.form.loose {
  gap: 1.25rem;
}
.form.vertical > .form-item > label {
  font-size: var(--bigger-font-size);
}
.side-by-side > .form-item, .form div.form-item.horizontal {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  /* align-items: center; */
  gap: .6rem;
}
.form div.form-item.horizontal.align-items-center {
  align-items: center;
}
.form div.form-item.horizontal.align-items-end {
  align-items: flex-end;
}
.side-by-side > .form-item > label:first-child {
  text-align: right;
}
.side-by-side > .form-item > *:first-child {
  /* width: 30%; */
  max-width: 30%;
  min-width: 30%;
}
.side-by-side > .form-item > *:nth-child(2) {
  width: 70%;
}
.side-by-side.half-by-half > .form-item > *:first-child,
.side-by-side.half-by-half > .form-item > *:nth-child(2),
.form-item.horizontal.half-by-half > *:first-child,
.form-item.horizontal.half-by-half > *:nth-child(2) {
  width: 50%;
  max-width: 50%;
}
 /* {
  width: 50%;
} */
.form-item {
  /* padding: 20px 0; */
  width: 100%;
  display: flex;
  flex-direction: column;
  /* justify-content: end; */
}
.form-item.compact {
  padding: 0;
}
.form-item.tight {
  gap: 0 !important;
}
/* .form div.form-item.horizontal {
  flex-direction: row;
} */
/* .form div.form-item.text-only > div {
  line-height: 3rem;
} */
.form  div.form-item > input, form div.form-item > select, form div.form-item > label, form div.form-item > textarea {
    display: block;
}
.form div.form-item > select#category, form div.form-item > textarea {
    width: 100%;
}

.form-item > .icon.label-related {
  position: absolute;
  width: var(--bigger-element-size);
  height: var(--bigger-element-size);
  right: 0;
}

.form-item.horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  /* justify-content: end; */
  /* justify-content: flex-start; */
  /* align-items: center; */
  align-items: baseline;
  /* margin: 1rem 0; */
  gap: .6rem;
}
.form-item.horizontal.tight {
  margin: 0;
  padding: 0;
}
.form-item.horizontal.compact {
  margin: 0;
}
.form-item.horizontal.align-bottom {
  align-items: flex-end !important;
}
.form-item.horizontal.multiline {
  flex-wrap: wrap;
}
.form-item.horizontal.align-top {
  align-items: baseline;
}
.form-item.horizontal.align-left {
  justify-content: flex-start;
}
.form-item.horizontal.align-right {
  justify-content: flex-end;
}
.form-item.horizontal > label {
  /* width: 30%; */
  /* text-align: right; */
  /* color: #333333; */
  /* padding-right: 1rem; */
  box-sizing: border-box;
  /* flex: 0 0 auto; */
}
.form-item.horizontal.align-left > label {
  text-align: left;
}
.form-item.horizontal.half-by-half > label {
  width: 50%;
}
.form-item.horizontal.eight-by-two > label {
  width: 80%;
}
.form-item.horizontal.seven-by-three > label {
  width: 70%;
}
/* .form-item.horizontal > .field {
  width: 70%;
} */
.form-item.horizontal.half-by-half > .field {
  width: 50%;
}
.form-item.horizontal.one-by-two-thirds > *:first-child {
  width: 30%;
}
.form-item.horizontal.two-by-three-fifths > *:first-child {
  width: 40%;
  min-width: 40%;
  max-width: 40%;
}
.form-item.horizontal.two-by-three-fifths > *:nth-child(2) {
  width: 60%;
}

/* .search {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.search > input {
  flex: 1 0 auto;
} */

body > #app[data-view="error"] > div#error {
  width: 100%;
  display: flex;
  flex-direction: column;
}
div#error > div {
  font-size: 4rem;
  text-align: center;
  width: 100%;
  padding: 4rem 0;
}

*[data-resource-type='parcel'] *[data-resource-type]:not([data-resource-type='parcel']),
*[data-resource-type='product'] *[data-resource-type]:not([data-resource-type='product']) {
  display: none;
}

/* body > #app[data-view="parcel"] > div#parcel {
  width: 100%;
  display: flex;
  flex-direction: column;
} */
/* div.info > .form > .code {
  font-size: 4rem;
  text-align: center;
  width: 100%;
  margin: 1rem 0;
} */
/* .info[data-deleted='true'] > .form > .code,
.info[data-deleted='true'] > .info > .code,
.info.deleted > .code {
  text-decoration: line-through;
} */
/* div#package > .item {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: end;
  margin: 1rem 0;
}
div#package > .item > label {
  width: 30%;
  text-align: right;
  color: #999999;
  padding-right: 1rem;
  box-sizing: border-box;
} */
/* div#parcel:not([data-pallet-id]) .buttons > .button.add-to-pallet {
  display: none;
} */
div#parcel > .form-item > .category,
div#parcel > .form-item > .comment,
div#parcel > .form-item > .quantity,
div#parcel > .form-item > .weight,
div#parcel > .form-item > .created-at,
div#parcel > .form-item > .status {
  width: 70%;
}
div#parcel .form-item > .comment.ua,
div#pallet .form-item > .comment.ua {
  padding-bottom: .5rem;
}
div#parcel .form-item > .comment.en,
div#pallet .form-item > .comment.en {
  padding-top: .5rem;
  border-top: 1px solid #cccccc;
}
div#parcel .form-item.parcels > .field, div#parcel .form-item.dispatches > .field {
  display: flex;
  flex-direction: column;
}
div#parcel .form-item.parcels > .field > *, div#parcel .form-item.dispatches > .field > * {
  overflow: hidden;
  text-wrap: nowrap;
  text-overflow: ellipsis;
}

body > #app[data-view="parcel-edit"] > div#parcel-edit {
  display: flex;
  /* width: 100%;
  padding-top: 1rem;
  position: relative;
  flex-direction: column;
  align-items: end; */
}
div#parcel-edit.edit > *.create-mode,
div#parcel-edit.create *.edit-mode {
  display: none;
}

body > #app[data-view="parcels"] > div#parcels {
  width: 100%;
  display: block;
}
div#parcels > .filters,
div#inventory > .filters {
  display: none;
}
div#parcels > .filters.show,
div#inventory > .filters.show {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  margin: .2rem 0;
}
/* div#parcels .list > div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
} */
/* .list.parcels > div .code {
  width: 25%;
  text-align: left;
  flex-shrink: 0;
} */
/* div#parcels .list > div > a.info > .quantity {
  text-align: right;
  white-space: nowrap;
} */

body.popup > #app > div#popup {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  /* top: 18rem; */
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  z-index: 101;
}
div#popup.shifted-upwards {
  /* padding-bottom: 25%; */
  padding-bottom: 10%;
}
div#popup > .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
}
div#popup > .content > .info {
  color: #999999;
  /* padding-bottom: 3rem; */
  padding: 1rem 0;
}
div#popup > .content > .tools {
  width: 100%;
  text-align: right;
  margin-bottom: 3rem;
}
.buttons.bottom,
div#popup > .buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  border: none;
  height: unset;
}
div#popup > .buttons.vertical {
  flex-direction: column;
  gap: 1rem;
}
div#popup > .buttons > a {
  height: unset;
}
div#popup .description {
  color: #999999;
  font-size: 65%;
  padding-bottom: 1rem;
  margin-top: -1rem;
}

body > #app[data-view="pallet"] > div#pallet {
  width: 100%;
  display: block;
  /* flex-direction: column;
  flex-wrap: nowrap; */
}
div#pallet {
  display: none;
}
body > #app[data-view="pallet-edit"] > div#pallet-edit {
  display: flex;
}


div#pallet:not(.items) .dispatchable-item-form,
div#pallet:not(.items) > .list,
div#pallet:not(.items) > .list-summary {
  display: none;
}
/* div#pallet:not(.info) > .code, */
div#pallet:not(.info) > .form {
  display: none;
}
div#pallet > .form-item > .field.weight {
  display: flex;
  flex-direction: row;
}

div#pallet.items > .list-summary {
  display: block;
  border-top: 1px solid;
  text-align: right;
}

body > #app[data-view="pallets"] > div#pallets {
  width: 100%;
  display: block;
}

body > #app[data-view="dispatches"] div#dispatches,
body > #app[data-view="dispatch"] div#dispatch,
body > #app[data-view="reports"] div#reports,
body > #app[data-view="me"] div#me,
body > #app[data-view="users"] div#users,
body > #app[data-view="parcel-categories"] div#parcel-categories,
body > #app[data-view="inventory"] div#inventory,
body > #app[data-view="tags"] div#tags
{
  display: flex;
  flex-direction: column;
  width: 100%;
  /* gap: 1rem; */
  /* padding-top: 2rem; */
}
div#x > .form {
  border-bottom: 1px solid #999999;
  height: 3rem;
  display: flex;
  align-items: center;
}
div#dispatches > .list > * {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0);
}
div#dispatches > .list > *:hover {
  background-color: #fafafa;
}
div#dispatches > .list > * > a:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
div#dispatches > .list > * > input {
  flex: auto 1 0;
}

div#dispatch > .name-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
div#dispatch > .name-container > .reports {
  width: 100%;
  border-bottom: 1px solid #999999;
  padding-bottom: 1rem;
}
div#dispatch.boxes > .list.pallets {
  display: none;
}
div#dispatch.pallets > .list.dispatch-items {
  display: none;
}
div#dispatch.pallets .dispatchable-item-form {
  display: none;
}
div.dispatchable-item-form > .scanner {
  display: none;
}
body.scanner div.dispatchable-item-form > .scanner {
  display: flex;
  flex-direction: row;
  justify-content: center;
}
div.dispatchable-item-form > .scanner > .viewport {
  position: relative;
}
div.dispatchable-item-form > .scanner > .viewport > canvas {
  position: absolute;
  top: 0;
  left: 0;
}
div.dispatchable-item-form > .inputs {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
/* div.dispatchable-item-form input[name='code'] {
  width: 250px;
} */
div.dispatchable-item-form.pallet select[name='pallet-id'] {
  display: none;
}

#dispatches > .form > input {
  width: 100%;
}
div#dispatch > .list > .placeholder {
  text-align: center;
  padding: 3rem 0;
  color: #666666;
}

/**
 * List related styles. TODO: make those generic
 **/
.list {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 1rem;
  padding-top: 1rem;
}
.list > div {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.list > *.no-render > * {
  display: none;
}
/* Add space text for `no-render` items so that they get non-zero height. Ideally height should be
   the same as for rendered items. */
.list > *.no-render::after {
  content: "\00a0";
}
.list > div > a.info:not(.button) {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  flex: 1 0 auto;
}
.list.dispatch-items > *[data-package-id="0"] {
  color: #aa0000;
}
.list > *[data-deleted='true'],
.list > *.deleted,
a[data-deleted='true'] {
  text-decoration: line-through;
}
.list > *.duplicate {
  color: #cc0000;
}
.list > *.duplicate > a {
  color: inherit;
}

.list.compact {
  gap: 0;
}

.list.tree > * > .branch {
  min-width: 1rem;
  text-align: center;
}
.list.tree.selectable > * {
  border: 1px solid transparent;
}
.list.tree.selectable > *.selected {
  background: var(--selection-background-color);
  border: 1px solid var(--selection-border-color);
  border-radius: .15rem;
}
.list.tree.selectable > *.selected > a {
  color: var(--selection-text-color);
}

/* .list.dispatch-items > * > *.code {
  min-width: 30%;
  flex-basis: max-content;
  white-space: nowrap;
  flex: 0 0 max-content;
  padding-right: 1rem;
} */
/* .list.dispatch-items > *[data-pallet-deleted='true'] > *.code > .pallet {
  text-decoration: line-through;
} */
.list.dispatch-items > * > input {
  padding: 1px;
  width: 250px;
  margin-right: 1rem;
}

.list-item-extra {
  /* flex-basis: 100%; */
  /* margin-bottom: -.75rem; */
  font-size: 0.5rem !important;
  font-weight: bolder !important;
  margin-top: -0.3rem;
  position: absolute;
  user-select: none;
}
.list-item-extra > * {
  display: inline-block;
  /* font-size: 1rem !important; */
  /* font-weight: bolder !important; */
  margin-right: .3rem;
  padding: 0;
  border: none;
  background: none;
  color: #999999;
  min-width: 2.4rem;
}
/* .list-item-extra > *.dispatch-id {
  width: 5rem;
} */
/* .list-item-extra > *.date {
  width: 3.5rem;
  text-align: right;
} */

div.dispatch-reports {
  width: 100%;
}
div.dispatch-reports.padded {
  padding: 3rem;
}
div.dispatch-reports > .links {
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
}

div#blocker {
  display: none;
}
body.loading > #app > div#blocker, body.popup > #app > div#blocker {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(13px);
  z-index: 100;
}

div#infobox {
  display: block !important;
  position: fixed;
  color: #bd0000;
  background: #ffe1e1;
  width: calc(100% - 2rem);
  text-align: center;
  padding: 1rem 0;
  margin: 3rem 1rem 0 1rem;
  /* left: 1rem; */
  /* left: calc((100vw - var(--app-max-width))/2); */
  bottom: -10rem;
  transition: bottom .2s ease-in-out;
  z-index: 102;
}
div#infobox.show {
  bottom: 1rem;
}

div#me > div:first-child {
  margin: 3rem 0;
  text-align: center;
}

div#users > .list > div {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}
div#users > .list > div > div.number {
  flex: auto;
}
div#users > .list > div > ul {
  color: #999999;
  flex-basis: 100%;
}
div#users > .list > div > ul > li::marker {
  content: '- ';
}

body > #app[data-view="user"] > div#user {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-top: 3rem;
}

div#who-are-you {
  display: block;
  margin: 3rem;
}

div#inventory[data-mode="parcels"] > .list:not(.parcels),
div#inventory[data-mode="pallets"] > .list:not(.pallets) {
  display: none;
}

#print-area {
  display: none;
}
body.print > #app > *:not(#print-area) {
  display: none !important;
}
body.print > #app > #print-area {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  position: absolute;
  top: 0;
  padding-top: 1rem;
  font-size: 2rem;
}


.semi-transparent,
#parcel-categories > .list > *[data-enabled="false"] > .name {
  opacity: .4;
}


body:has(+ *.dragging) {
  overscroll-behavior: contain;
}
.dragging::before {
  content: ".";
  color: rgba(0, 0, 0, 0);
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  background: repeating-linear-gradient(
    145deg,
    #ffce44 0,
    #ffce44 .4rem,
    #00000000 0,
    #00000000 .75rem
  );
  opacity: .5;
}


.tags {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .1rem;
}
.tags.parcel-list-item {
  position: absolute;
  margin-top: -0.4rem;
  /* margin-left: 20%; */
  /* margin-left: calc(1rem + (100% - 2rem)*.2); */
  /* left: calc(1rem + (100vw - 2rem)*.25); */
  margin-left: calc(min(100vw - 2rem, var(--app-max-width)) * .25);
  opacity: .88;
}
.tags.parcel-list-item > .tag {
  padding: 0.1rem 0.2rem;
  font-size: .35rem;
  line-height: .4rem;
  min-width: .8rem;
}
.tag {
  display: inline-block;
  padding: .15rem .25rem;
  border: 1px solid var(--tag-color-system);
  border-radius: .1rem;
  border-color: var(--tag-color-system);
  background: var(--tag-color-system);
  color: #ffffff;
  /* margin: 0 .1rem; */
  margin: 0;
  line-height: .8rem;
  text-align: center;
  text-wrap: nowrap;
  min-width: 1.3rem;
  cursor: pointer;
  user-select: none;
}
.tag:not(.selected) {
  background: none !important;
  color: var(--main-font-color);
}
.tag > .icon {
  height: 100%;
}
.tag.selected > .icon {
  filter: invert(100%);
}
.tag.plain {
  border-color: var(--tag-color-plain);
  background: var(--tag-color-plain);
}
.tag.address {
  border-color: var(--tag-color-address);
  background: var(--tag-color-address);
}


.recipients {
  white-space: pre-line;
}

html > body > #app > #infoOverlay {
  pointer-events: none;
  position: absolute;
  left: 0;
  min-width: 100vw;
  max-width: 100vw;
  width: 100vw;
  z-index: 100;
  top: 20%;
  font-weight: bold;
  font-size: 4.1rem;
  opacity: .6;
  transition: font-size 1.2s, opacity 1.2s, top 1.2s;
  overflow: hidden;
  text-overflow: clip;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
html > body > #app > #infoOverlay.show {
  opacity: .6;
}
html > body > #app > #infoOverlay > .info {
  opacity: 0;
  transition: opacity .3s;
}
html > body > #app > #infoOverlay.expand {
  font-size: 5.6rem;
  top: 18%;
  opacity: 0;
}
html > body > #app > #infoOverlay.expand > .info {
  opacity: 1;
}
html > body > #app > div#infoOverlay.show {
  display: flex;
}


@media print
{
  @page {
    /* size: 8.5in 11in; */
    /* size: 5.8in 8.3in; */
    size: A5 portrait !important;
  }

  body {
    padding: 0;
    margin: 0;
    width: 148mm !important;
    height: 209mm !important;
  }

  body > *:not(#print-area) {
    display: none !important;
  }
  body > #print-area {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    position: absolute;
    top: 0;
    /* padding-top: 1rem; */
    padding: 1rem;
    font-size: 2rem;
    border: 1px solid #cccccc;
  }
  body > #print-area .title {
    font-size: 7rem;
    text-align: center;
  }
  body > #print-area svg.barcode {
    width: 100%;
    height: 30%;
  }
  body > #print-area .content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 3rem;
    margin-top: 2rem;
  }
  body > #print-area .content .category {
    width: 70%;
  }
  body > #print-area .content .quantity {
    width: 30%;
    text-align: right;
  }
  body > #print-area .content .comment {
    width: 100%;
    padding-left: 2rem;
  }
}

.strikethrough {
  text-decoration: line-through;
}
.strikethrough.diagonal, .tag.excluded {
  text-decoration: none;
  position: relative;
}
.strikethrough.diagonal:before, .tag.excluded:before {
  position: absolute;
  content: "";
  left: 0;
  top: 45%;
  right: 0;
  border-top: 0.1rem solid;
  /* border-color: inherit; */

  transform: rotate(-40deg);
}



@media screen and (orientation: portrait) and (device-width <= 600px) {
  html {
    /* font-size: 3em; */
    /* css view optimization */
    /* font-size: 1.2em; */
    /* font-size: 4.5vw; */
    /* font-size: 1em; */
  }
}
@media screen and (orientation: portrait) and (600px < device-width <= 1000px) {
  html {
    /* font-size: 1.5em; */
    /* font-size: 1.2em; */
  }
}
/* @media only screen and (orientation: landscape) and (max-width: 1000px) { */
@media only screen and (orientation: landscape) and (device-width <= 1000px) {
  html {
    /* font-size: 1.5em; */
    /* font-size: 5vh; */
    /* font-size: 1rem; */
  }
}


@media only screen and (device-width <= 1000px) {

    :root {
      --is-mobile-view: true;
      font-size: 100%;
    }

    /* html {
        font-size: 1em;
    } */

    body > #app {
      padding: 0rem 1rem 1rem 1rem;
    }

    /* input[type=checkbox] {
      width: 3rem;
      height: 3rem;
    } */

    /* input[type=radio] {
      width: 2rem;
      height: 2rem;
    } */

    /* *.larger-font {
      font-size: 6rem;
    } */

    a.icon {
      width: 1rem;
      height: 1rem;
    }

    .buttons {
      height: 2rem;
    }
    .buttons > * {
      height: 100%;
    }
    a.button {
      width: 2rem;
      height: 2rem;
    }

    /* div#menu > div#menu-top-row {
      max-height: 6rem;
    } */

    /* .form div.form-item.text-only > div {
      line-height: 5rem;
    } */

    /* div.info > .code {
      font-size: 10rem;
    } */|

    body > #app > .loader > * {
      scale: .55;
    }

    body > #app > div#menu > #menu-items {
      display: flex !important;
      gap: 1rem;
      padding-top: 1.5rem;
    }
    body > #app:is([data-view]):not([data-view=admin]) > div#menu > #menu-items {
      /* padding-left: 1rem; */
      position: absolute;
      z-index: 100;
      background-color: #ffffff;
      left: -100vw;
      top: 2.1rem;
      width: 100vw;
      /* max-width: 900px; */
      max-width: var(--app-max-width);
      height: calc(100% + 4rem);
      transition: left .25s ease-in-out;
      overflow: scroll;
      box-sizing: border-box;
      border-bottom: 6rem solid #ffffff;
      padding-bottom: 2rem;
    }
    body > #app:is([data-view]):not([data-view=admin]):is([data-mobile-menu=true]) > div#menu > #menu-items {
      /* left: 0; */
      /* left: calc((100vw - 900px)/2); */
      left: max(1rem, calc((100vw - var(--app-max-width))/2));
      width: calc(100vw - 1rem);
      max-width: calc(100vw - 1rem);
      padding-right: 1rem;
    }
    body:has(> *:is([data-mobile-menu=true])) {
      overflow: hidden;
    }
    body > #app:is([data-view]):not([data-view=admin]) > div#menu > #menu-items > * {
      display: block;
    }
    body > #app:is([data-view]):not([data-view=admin]) > div#menu > #menu-items > *.admin-level {
      margin-left: 1rem;
    }

    .list {
      gap: 0.5rem;
    }
    /* .list > * {
      min-height: 3.5rem;
    } */

}
