html {
    height: 100%;
    font-family: sans;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;

    display: flex;
    flex-direction: column;
}

/* Based on https://codepen.io/imprakash/pen/GgNMXO */
#loadingOverlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
}
#loadingOverlay > div {
  font-size: 2rem;
  text-align: center;
  margin: 70px auto;
  padding: 20px;
  background: white;
  border-radius: 5px;
  width: 30%;
  position: relative;
}

#topBar { display: flex; }
#topBar > * { margin: 0.5rem; }
#statusText { flex-grow: 1; }

h3 {
    margin-top: 0px;
    margin-bottom: 0px;
    user-select: none;
}

main {
    flex-grow: 1;
    overflow: auto;
    display: flex;
}
main > * {
    width: 50%;
    margin: 0.5rem;
    padding: 0.5rem;
    background-color: powderblue;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
}

.itemList {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp */
.itemList::-webkit-scrollbar {
    width: 1rem;
}
/* Bigger scrollbar for touch devices */
@media (hover: none) {
    .itemList::-webkit-scrollbar {
        width: 1.5rem;
    }
}
.itemList::-webkit-scrollbar-track {
    box-shadow: inset 0 0 0.5rem grey;
    border-radius: 0.5rem;
}
::-webkit-scrollbar-thumb {
    background-color: #336acc;
    box-shadow: inset 0 0 0.5rem cornflowerblue;
    border-radius: 0.5rem;
}

.item, #newItemButton {
    margin: 0.2rem;
    padding: 0.2rem;
    border-radius: 0.5rem;
    background-color: cornflowerblue;
    color: black;
}

.item.dragged {
    background-color: blueviolet;
}

.item {
    display: flex;
}

.item > span, .item > input, #newItemButton {
    font-size: 1rem;
    text-align: center;
}

.item > span, .item > input {
    flex-grow: 1;
}

.item > span {
    user-select: none;
    overflow-wrap: anywhere;
}

.item > input {
    width: 0;   /* let flexbox decide */
}

.item > button {
    font-size: 0.5em;
    height: 1rem;
    padding: 0em;
}

#newItemButton {
    user-select: none;
}
