#document-container {
  background: #eee;
  background-image: url("../img/texture-dark.png");
  background-size: 256px;
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  overflow: auto;
  z-index: 10;
}

#document-editor {
  position: relative;
  background: #fff;
  width: 1100px;
  max-width: 100%;
  margin: 0px auto;
  min-height: 100%;
  box-sizing: border-box;
  padding: 40px 30px 50px;
  font-size: 13px;
  color: #30f;
  font-family: roboto_mono, Menlo, monospace;
  border-left: 1px solid #ccc;
  border-right: 1px solid #ccc;
}

#duplicate-choice-container,
#offer-state-container {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 100%;
  z-index: 9;
  background-color: rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  cursor: pointer;
}

#duplicate-choice,
#offer-state-choice {
  position: absolute;
  top: 40px;
  left: 0px;
  width: 100%;
  height: 40px;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: #666;
  background-color: #eee;
  border-bottom: #ccc;
  padding: 9px 80px;
  text-align: center;
  font-family: roboto, sans-serif;
  font-size: 15px;
  box-sizing: border-box;
  cursor: auto;
}

#duplicate-choice {
  text-align: right;
}

#offer-state-choice {
  text-align: left;
}

#duplicate-choice-close,
#offer-state-close {
  position: absolute;
  top: 0px;
  right: 20px;
  width: 40px;
  height: 40px;
  box-sizing: border-box;
  background-image: url("../img/close-grey.svg");
  background-position: center center;
  background-size: 20px;
  background-repeat: no-repeat;
  cursor: pointer;
  opacity: 0.5;
}

#duplicate-choice-close:hover {
  opacity: 0.8;
}

#duplicate-choice-close:active {
  opacity: 1;
}

#duplicate-choice .button {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 20px;
  color: #333;
  font-size: 12px;
  background: #fff;
  margin: 0px 10px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
}

.gray-button {
  display: inline-block;
  border-radius: 20px;
  padding: 4px 10px;
  color: #999;
  font-size: 12px;
  background: #eee;
  margin: 0px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
}

.gray-button:hover {
  color: #000;
  background: #ddd;
}

#duplicate-choice .button:hover {
  color: #000;
  background: #ddd;
  opacity: 1;
}

#document-editor.doc-offer {
  color: #00aa66;
}

#document-editor.doc-invoice {
  color: #06f;
}

/**** GENERAL ****/
.helper {
  font-family: roboto, Helvetica, sans-serif;
  font-size: 12px;
  margin: 10px 0px 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /*font-weight: bold;*/
}

input.field,
.field {
  display: block;
  -webkit-user-modify: read-write;
  -moz-user-modify: read-write;
  background: #fff;
  padding: 5px;
  color: #000;
  overflow: hidden;
  width: -webkit-fill-available;
  max-width: 100%;
  margin: 0px;
}

/** DRAFT STYLE ***/
#document-editor.draft input.field,
#document-editor.draft .field {
  border: 1px solid #ddd;
  color: #666;
}

#document-editor.draft #document-client-box {
  border: 1px solid #ddd;
}

#document-editor.draft .item .title,
#document-editor.draft .item .page-break,
#document-editor.draft .item .quantity,
#document-editor.draft .item .unit-price,
#document-editor.draft .item .price,
#document-editor.draft .item .vat {
  border-bottom: 1px solid #ddd;
  border-top: 1px solid #ddd;
}

#document-editor.draft #document-notes-field.field {
  border: 1px solid rgba(220, 220, 220, 0.1);
}

#document-editor.draft .item .sort,
#document-editor.draft .item .title,
#document-editor.draft .item .page-break,
#document-editor.draft .item .price,
#document-editor.draft .item .quantity,
#document-editor.draft .item .unit-price,
#document-editor.draft .item .vat {
  border-right: 1px solid;
  border-color: inherit;
}

#document-editor.draft .item.pagebreak-item .title {
  text-align: center;
}

/**** DRAFT ******/

input.field:focus,
.field:focus {
  background: #ffc;
  outline-color: none;
  outline-style: none;
  outline-width: none;
}

.field.price {
  color: inherit;
}

/***** DOCUMENT TOOLBAR *******/
#document-toolbar {
  font-family: roboto, Helvetica;
  font-size: 12px;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  overflow: hidden;
  padding: 9px 4px;
  padding-left: 60px;
  padding-right: 20px;
  background: #eee;
  border-bottom: 1px solid #ccc;
  z-index: 10;
  -webkit-user-select: none;
  /* Chrome all / Safari all */
  -moz-user-select: none;
  /* Firefox all */
  -ms-user-select: none;
  /* IE 10+ */
  user-select: none;
}

#document-duplicate-button,
#document-delete-button {
  border-radius: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0px 10px;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  float: right;
  /* font-size: .8em; */
  color: #666;
}

#document-close {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 40px;
  height: 100%;
  box-sizing: border-box;
  background-image: url("../img/arrow-back.svg");
  background-position: center center;
  background-size: 20px;
  background-repeat: no-repeat;
  cursor: pointer;
  border-right: 1px solid #ccc;
}

#document-close:active {
  background-color: #ddd;
}

#document-duplicate-button:hover,
#document-delete-button:hover {
  color: #000;
  background: #ddd;
  opacity: 1;
}

#document-duplicate-button:active,
#document-delete-button:active {
  background: #999;
}

.label {
  display: inline;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0px 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-sizing: border-box;
  font-family: roboto_mono, Menlo, monospace;
  font-size: 12px;
  border: 2px solid;
  background-position: 5px center;
  background-repeat: no-repeat;
  background-size: 14px;
  padding-left: 25px;
}

#draft-label {
  background-image: url("../img/label-draft.svg");
  color: #999;
}

#expired-label {
  background-image: url("../img/label-expired.svg");
  color: #ff4050;
  cursor: pointer;
}

#rejected-label,
#new-offer-state-rejected {
  background-image: url("../img/label-rejected.svg");
  color: #ccc;
  cursor: pointer;
}

#paid-label,
#accepted-label,
#new-offer-state-accepted {
  background-image: url("../img/label-paid.svg");
  color: #00bb11;
  cursor: pointer;
}

.document-editor #published-label {
  color: #06f;
  background-image: url("../img/label-published.svg");
  cursor: pointer;
}

#pending-label,
#new-offer-state-pending {
  /*color: #00aa66;*/
  color: #999;
  background-image: url("../img/label-pending.svg");
  cursor: pointer;
}

.doc-invoice.draft #document-date-field,
.doc-invoice.draft #document-expires-field {
  color: #000;
  border: none;
}

.doc-offer.draft #document-date-field,
.doc-offer.draft #document-expires-field {
  color: #000;
  border: none;
}

/****** LANGUAGE SELECT      ********/
/****** OFFER/INVOICE SELECT ********/
.toggle {
  display: inline;
  font-family: roboto, Helvetica;
  font-size: 12px;
  text-align: center;
  /* margin: 0px 10px; */
}

.toggle-left,
.toggle-right {
  display: inline-block;
  padding: 4px 10px;
  color: #666;
  background: #ccc;
  margin: 0px;
  text-align: center;
  cursor: pointer;
}

.toggle-left {
  border-radius: 20px 0px 0px 20px;
  border-right: none;
  padding-right: 5px;
}

.toggle-right {
  border-radius: 0px 20px 20px 0px;
  border-left: none;
  padding-left: 5px;
}

.toggle-left.selected,
.toggle-right.selected {
  background: #fff;
  font-weight: bold;
}

.document-editor .toggle-left.selected,
.document-editor .toggle-right.selected {
  color: #06f;
}

.offer-editor .toggle-left.selected,
.offer-editor .toggle-right.selected {
  color: #00aa66;
}

.toggle-left:hover,
.toggle-right:hover {
  color: #000;
}

/**** TOP BAR *****/
#document-editor .header {
  text-align: center;
  text-transform: uppercase;
  margin: 20px 0px 0px;
  font-size: 2.5em;
  font-family: roboto, Helvetica, sans-serif;
  font-weight: 100;
}

/***** INFO ******/
#document-editor .info {
  display: grid;
  grid-template-columns: 200px auto;
  column-gap: 10px;
  margin: 0px 40px 20px;
  box-sizing: border-box;
}

#document-editor .titlebar {
  margin-bottom: 10px;
}

.date-client-row {
  display: grid;
  grid-template-columns: 200px auto;
  column-gap: 20px;
}

.logo-container {
  text-align: center;
}

.field:empty:not(:focus):before {
  content: attr(placeholder);
}

.field:empty:not(:focus) {
  color: #999;
}

#document-logo {
  margin-top: 0px;
  max-width: 100%;
  height: 150px;
}

#from-field {
  font-family: roboto, Helvetica;
  /* font-size: 14px; */
  /*font-weight: bold;*/
  letter-spacing: 0.03em;
  text-align: left;
}

#document-number-field,
#document-date-field,
#document-client-search {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

#document-number-field,
#document-date-field {
  padding: 5px;
  color: #000;
  /*border:1px solid #ddd;*/
}

#document-client-count {
  display: none;
}

#document-client-list {
  display: none;
  max-height: 350px;
  overflow: auto;
  border: 1px solid;
  border-color: #06f;
  margin-top: -1px;
}

#document-client-list div {
  padding: 10px 5px;
  border-bottom: 1px solid;
  border-top: 1px solid;
  border-color: #06f;
  margin-top: -1px;
  margin-bottom: -1px;
  cursor: pointer;
}

.offer-editor #document-client-list,
.offer-editor #document-client-list div {
  border-color: #00aa66;
}

#document-client-list div:hover {
  background: #fff;
}

#document-client-delete {
  display: none;
  width: 1.5em;
  height: 1.5em;
  float: right;
  clear: none;
  cursor: pointer;
  box-sizing: border-box;
  opacity: 0.2;
  background-image: url("../img/close-small.svg");
  background-position: center center;
  background-size: contain;
  background-repeat: no-repeat;
}

#document-client-delete:hover {
  opacity: 1;
}

#document-client-box {
  display: none;
  padding: 5px;
  color: #000;
}

#document-client-box p {
  margin: 0;
  padding: 0;
  min-height: 1em;
  /*margin-bottom: .5em;*/
}

#document-editor #document-number,
#document-editor #document-date {
  margin-bottom: 10px;
}

/** ***** INTRO *********/

#info-field {
  min-height: 3em;
  line-height: 1.5em;
}

/****** ITEMS ********/
#document-editor .items {
  margin: 0px 10px;
}

#document-editor #additem,
#document-editor #addtextitem,
#document-editor #addpagebreak {
  display: inline-block;
  border-radius: 3px;
  background: #ccc;
  padding: 2px 8px;
  color: #fff;
  text-transform: uppercase;
  cursor: pointer;
  font-size: 20px;
  line-height: 20px;
  height: 20px;
}

#document-editor #additem:hover,
#document-editor #addtextitem:hover,
#document-editor #addpagebreak:hover {
  background: #999;
}

#document-editor .item,
#document-editor #list-header,
#document-editor #list-totals,
#document-editor #list-totals-vat {
  display: grid;
  /* 7 cols: sort, title, Qty, Unit Price, price, VAT, delete */
  grid-template-columns: 30px auto 50px 90px 90px 50px 30px;
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  max-width: 100%;
}

#document-editor .item.text-item {
  grid-template-columns: 30px auto 30px;
  margin-top: 30px;
}

#document-editor .item.pagebreak-item {
  grid-template-columns: 30px auto 30px;
  border-bottom: 1px dashed #ccc;
  margin-bottom: 10px;
  color: #ccc;
  font-style: italic;
}

#document-editor .item.pagebreak-item:hover {
  background-color: #ffc;
}


#document-editor .item.pagebreak-item .title,
#document-editor .item.pagebreak-item .sort {
  border: none;
}

.offer-editor .item,
.offer-editor #list-header,
.offer-editor #list-totals,
.offer-editor #list-totals-vat {
  display: grid;
  /* 7 cols: sort, title, Qty, Unit Price, price, VAT, delete */
  grid-template-columns: 30px auto 50px 90px 90px 30px !important;
  padding: 0px;
  margin: 0px;
  box-sizing: border-box;
  max-width: 100%;
}

.offer-editor #document-editor .item.text-item {
  grid-template-columns: 30px auto 30px !important;
}

#document-editor .item {
  color: inherit;
  box-sizing: border-box;
  border-color: #ddd;
  margin-bottom: -1px;
  line-height: 1.3em;
}

#document-editor .item .title div {
  padding: 0px;
}

#document-editor .item div,
#document-editor #list-header div,
#document-editor #list-totals div {
  box-sizing: border-box;
  padding: 5px;
}

#document-editor #list-totals-vat div {
  padding: 0px 5px;
}

#document-editor .item .sort,
#document-editor .item .delete {
  color: rgba(0, 0, 0, 0.02);
  font-weight: lighter;
  font-size: 20px;
  line-height: 1em;
  text-align: center;
  cursor: pointer;
}

#document-editor .item:hover .delete,
#document-editor .item:hover .sort {
  /*color: #06f;*/
  color: rgba(0, 0, 0, 0.5);
}

#document-editor .item .sort {
  cursor: ns-resize;
}

#document-editor .item .title,
#document-editor .item .quantity,
#document-editor .item .unit-price,
#document-editor .item .price,
#document-editor .item .vat {
  border: none;
}

.ui-sortable-helper {
  background: #fff;
  opacity: 0.8;
  /*box-shadow: 8px 8px 8px rgba(0,0,0,0.2);*/
}

#document-editor .item .quantity,
#document-editor .item .unit-price,
#document-editor .item .price,
#document-editor .item .vat,
#document-editor #list-totals .quantity,
#document-editor #list-totals .unit-price,
#document-editor #list-totals .price,
#document-editor #list-totals .vat,
#document-editor #list-totals-vat .quantity,
#document-editor #list-totals-vat .unit-price,
#document-editor #list-totals-vat .price,
#document-editor #list-totals-vat .vat {
  text-align: right;
}

.offer-editor .vat {
  display: none;
}

.offer-editor #list-totals-vat {
  display: none !important;
}

#document-editor .item .sort,
#document-editor .item .title,
#document-editor .item .price,
#document-editor .item .quantity,
#document-editor .item .unit-price,
#document-editor .item .vat {
  border-right: none;
  border-color: inherit;
}

#document-editor #list-totals .title,
#document-editor #list-totals-vat .title {
  padding: 5px 0px;
}

#document-editor #list-header div {
  text-align: center;
  /* padding: 0px; */
}

#document-editor #list-header,
#document-editor #list-totals,
#document-editor #list-totals-vat {
  margin: 0px 10px;
}

#document-editor #list-totals {
  padding-top: 5px;
}

#document-editor .result,
#document-editor .footer {
  padding: 0px 40px;
  margin: 20px 0px 10px;
  overflow: auto;
  display: grid;
  grid-template-columns: auto 200px;
  gap: 20px;
}

#document-editor .footer {
  padding: 0px 40px;
}

#offer-message {
  font-family: roboto, Helvetica;
}

#document-comment.field {
  font-family: roboto, Helvetica;
  color: inherit;
  margin-top: 1em;
  min-height: 3em;
  line-height: 1.5em;
}

#document-notes-field.field {
  color: red !important;
  border: none !important;
}

#document-notes-field.field:hover,
#document-notes-field.field:focus {
  background-color: #ffc;
}

.document-notes {
  padding: 0px 40px;
}

#document-bankinfo {
  font-family: roboto, Helvetica;
  color: #06f;
}

#document-editor #grand-total {
  vertical-align: middle;
  padding: 0px 10px 10px;
  border: 2px solid #06f;
  font-size: 1.3em;
  text-align: center;
  border-radius: 3px;
  color: #06f;
  box-sizing: border-box;
}

#document-editor #document-grand-total-field {
  margin-top: 10px;
  color: #000;
}

#document-editor #expires {
  box-sizing: border-box;
}

#document-client-notes-container {
  padding: 10px 0px 10px 220px;
}

#document-client-notes {
  font-size: 12px;
  color: #999;
}

@media screen and (max-width: 1240px) {
  #document-editor {
    border: none;
    width: 100%;
  }

  #year-select,
  .quarter-button {
    padding: 4px 10px;
    margin-right: 0px;
    margin-left: 0px;
  }

  .alpha {
    margin-right: -4px;
  }


  .invoice-client,
  .invoice-nr {
    display: none;
  }

  .invoice {
    grid-template-columns: 40px 100px auto 100px;
  }

  .invoice div.invoice-amount {
    text-overflow: clip;
  }

  .offer {
    grid-template-columns: 40px 100px auto 100px;
  }


  #quarter-back,
  #quarter-forward {
    margin: 6px 10px;
  }
}

@media screen and (max-width: 1100px) {

  #year-select,
  .quarter-button {
    max-width: 50px;
    max-height: 20px;
    overflow: hidden;
    text-align: left;
  }

  #alpha-buttons {
    display: none;
  }
}

@media screen and (max-width: 600px) {
  #document-editor {
    padding: 20px 10px 10px;
  }

  #document-editor .logo-container {
    display: none;
  }

  #document-editor .info {
    margin: 0px 0px 10px;
    display: block;
  }

  .date-client-row {
    grid-template-columns: 100px auto;
    column-gap: 10px;
  }

  #document-client-notes-container {
    padding: 10px 0px;
  }

  #document-editor #list-header,
  #document-editor #list-totals,
  #document-editor #list-totals-vat {
    margin: 0px;
  }

  #document-editor .items {
    margin: 0px;
  }

  #document-editor .item {
    grid-template-columns: auto 20px 50px 50px !important;
  }

  .item div {
    overflow: hidden;
  }

  #document-editor .item .sort,
  #document-editor .item .delete {
    display: none;
  }

  #submenu-container {
    padding: 0px;
    position: absolute;
    top: 39px;
    background-color: #eee;

  }

  .submenu {
    height: 100%;
    border-top: 1px solid #ccc;
  }

  #document-list-container {
    padding-top: 120px;
    overflow: hidden;
  }

  #document-list {
    overflow-x: hidden;
  }

  .invoice .invoice-date,
  .offer .invoice-date {
    display: none;
  }

  .invoice,
  .offer {
    grid-template-columns: 40px auto 80px;
  }
}