html, body {
  margin: 0;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  font: caption;
}

.container h1 {
  margin: 0;
}

label {
  font: caption;
}


*::-webkit-scrollbar {
  width: 10px;
}

*::-webkit-scrollbar-track {
  background: #ddd;
  border-radius: 20px;
  box-shadow: inset 1px 0px 2px 0px rgba(0,0,0,0.3);
}

*::-webkit-scrollbar-thumb {
  background: #61808e;
  border-radius: 20px;
  border-top: 1px solid #8499a2;
  border-bottom: 1px solid #566e78;
}

#container {
  position: absolute;
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 169px auto 70px;
  grid-gap: 0px 0px;
  grid-template-areas: "header" "lists" "footer";
}

#documents-block {
  grid-area: lists;
  padding: 10px 15px 0px;
  overflow-y: auto;
  min-height: 150px;
}

#import-selecting {
  position: fixed;
  height: 100%;
  overflow-y: scroll;
}

#buttons-block {
  position: relative;
  display: flex;
  justify-content: flex-end;
  grid-area: footer;
  background-color: #477085;
  box-shadow: 2px -2px 2px rgba(0,0,0,0.2);
  padding: 10px 20px;
}

.document-item.language-button {
  position: absolute;
  left: 20px;
  bottom: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  background: #588094;
  border-top: 1px solid #84b1c7;
}

.document-item.language-button:hover {
  background: #84b1c7;
  border-top: 1px solid #9fcbe0;
}

.language-item {
  flex: auto;
  padding: 3px 10px;
  width: 100%;
  text-align: center;
}

.language-item.selected {
  background: hsl(0, 0%, 100%,0.6);
}

.template-item {
  cursor: pointer;
}
a.template-item {
  color: hsl(0,0%,94%);
  text-decoration: none;
}

.template-thumbnail {
  width: 120px;
  background: white;
  height: 80px;
  margin-bottom: 5px;
  box-shadow: 1px 1px 4px black;
  border: 4px solid transparent;
}

.template-item:hover .template-thumbnail {
  border: 4px solid #a6cc90;
}

.template-title {
  font-weight: bold;
  font-size: 90%;
  max-width: 160px;
}

.template-description {
  font-size: 75%;
  font-style: italic;
  color: #aaa;
  max-width: 120px;
}

.template-thumbnail.new {
  background: url('./docs-blank_1.png');
  background-size: cover;
  background-position-y: center;
}

.template-thumbnail {
  display: flex;
  justify-content: center;
  align-items: center;
}

.list-section-header {
  color: hsl(221, 44%, 88%);
  display: flex;
  margin-bottom: 8px;
  padding-right: 63px;
  justify-content: space-between;
  align-items: baseline;
}

.list-header {
  color: hsl(221, 32%, 77%);
  font-size: 80%;
  font-weight: normal;
}

.document-list {
  max-height: calc(100% - 47px);
  overflow-y: auto;
  padding: 15px;
  background: hsl(202deg 72% 38%);
  box-shadow: inset 2px 2px 2px rgba(0,0,0,0.2);
}

.document-list.archived {
  max-height: 138px;
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: hsl(0, 1%, 90%);
    padding: 0 10px;
    margin-bottom: 4px;
    cursor: pointer;
    box-shadow: 1px 0px 2px hsla(0,0%,0%,0.4);
    border-radius: 2px;
    border-bottom: 1px solid hsl(0,0%,25%);
    border-top: 1px solid white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-item:hover {
    background: white;
}

.doc-title {
  flex: auto;
  color: black;
  text-decoration: none;
}

.doc-title, .doc-opened {
  margin-right: 10px;
  padding: 10px 0;
}

.doc-buttons * {
  width: 18px;
}
.doc-buttons *:hover path {
  background-color: white;
}

#import-selection-list {
  height: 80%;
  overflow-y: scroll;
  box-shadow: inset 2px 2px 3px #e5e1e1;
  border: 1px solid #c6c6c6;
  margin-bottom: 10px;
}
#import-selection-list ul {
  list-style: none;
  padding: 10px;
  margin: 0;
  line-height: 1.4;
}
#import-selection-list ul input[type="checkbox"] {
  margin-right: 10px;
}
#import-selection-list li {
  display: flex;
}
#import-selection-list li span:first-child {
  flex: auto;
}
