
#header {
  background: #2b2b2b;
  text-shadow: none;
  color: #EEE;
  height: 50px;
}

.header a {
  color: #CCC;
}
@media (max-width: 1024px) {
  #header {
    flex-direction: row !important;
  }

  #hamburger {
    margin-right: 20px;
  }

  #user-tools {
    text-align: right !important;
  }
}

#user-tools a:nth-child(2) {
  display: none;
}

#footer { display: none; }

body.login h1 { display: none !important; }

h1#site-name {
  text-indent: -9999em;
  background-image: url(../img/logo-white.png);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  margin: 0;
  width: 100%;
}
.header #branding h1 {
  margin: 0;
}

.header div#branding {
  border: none;
}

#changelist-filter h3 {
  text-transform: uppercase;
}

.app-quote.model-quote.change-list #content {
  max-width: 1800px;
}

.field-_row_actions {
  white-space: nowrap;
}

#id_permissions_to, #id_permissions_from { height: 400px; }

textarea.vLargeTextField, div.controls textarea {
  width: 100%;
  box-sizing: border-box;
  margin-right: 20px;
}


.results small {
  display: block;
  line-height: 1.2em;
  font-size: 95%;
}

.results img.check {
  display: block;
  margin: 3px auto;
}

th._timezone-column {
  text-align: center;
}

th._overspeeding_ratio-column {
  width: 40px;
}

th._max_speed-column, th._distance-column {
  width: 30px;
}

input[name="where_field"] {
  width: 450px;
  max-width: 450px !important;
}

input[name="null_fields"] {
  max-width: 100px;
}

a.model-link {
color: #01537C !important;
}

div.analyze-icon {
  width: 12px;
  height: 12px;
  margin: 0 auto;
  background: rgb(1, 202, 154);
  border-radius: 6px;
  border: 1px solid rgb(209, 209, 209);
}

/* JSON editor (no schema) */
.jsoneditor {
  border-color: #DCDEE0;
}
.jsoneditor .menu {
  background-color: #EDEFF1;
  border-color: #DCDEE0;
}

.jsoneditor .search .frame {
  border: none;
  margin-top: 3px;
  margin-right: 3px;
}

.jsoneditor textarea.text {
  min-height: 400px !important;
}

/* JSON editor (schema) */

div[data-schemaid] .row {
  margin-left: 0;
}

div[data-schemaid] > h3 {
  padding-left: 0;
}

div[data-schematype="object"] input {
  margin-bottom: 9px !important;
}
div[data-schematype="object"] > h3 {
  margin: 10px 0 -5px 0;
}
div[data-schematype="object"] > p {
  margin-left: 10px;
}

div[data-schemaid] > div {
  padding: 5px 5px 0px !important;
  margin: 5px -2px !important;
  border: none !important;
}

div[data-schemaid] .form-control p {
  font-size: 0.9em !important;
  margin: 0px 16px !important;
}

button.json-editor-btn-collapse, button.json-editor-btn-edit {
  display: none;
}

/* CodeMirror */

.CodeMirror-gutters {
  background-color: #EDEFF1 !important;
}

/* Handsontable */
td.handsontable-error {
  background: rgb(253, 137, 155);
}


span.GeoSearch {
  margin: 0 0 0 10px;
  cursor: pointer;
}

span.GeoSearch:hover {
  color: gray;
}

#result_list input {
  width: auto;
}

.not-superuser .control-group.form-row.field-context {
  display: none;
}

/* Django 2 CSS */

.results td, .results th {
  padding: 5px 5px;
}

#changelist table thead th {
  white-space: normal !important;
}

body.login #header {
  display: none;
}

#changelist-filter li.selected a {
  color: #50a040 !important;
  font-weight: bold;
}

#changelist-filter a {
  color: #616161;
}

div.breadcrumbs, .module h2, .module caption, .inline-group h2 {
  background: #50a040;
}

#changelist-filter input[type=reset], #changelist-filter  input[type=submit]  {
  background: #50a040 !important;
}

#changelist table input[type="submit"] {
  padding: 3px 10px;
  background: #50a040;
}

/* Quote admin */

/*
.app-quote.model-quote.change-list #content h1 {
  display: none;
}

.app-quote.model-quote.change-list .object-tools {
  display: none;
}
*/

.app-quote.model-quote.change-list .field-_total_price,
.app-invoice.model-invoice.change-list .field-_amount,
.app-invoice.model-invoice.change-list .field-_vat {
  text-align: right;
  font-family: monospace, sans-serif;
  font-weight: bold;
  padding-right: 20px;
}

.app-quote.model-quote.change-list .field-_status {
  text-align: center;
}

.app-quote.model-quote.change-list .field-_period {
  font-size: 10px;
}

.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(3),
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(5),
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(7),
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(9),
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(11) {
  display: flex;
}

.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(3) li,
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(5) li,
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(7) li,
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(9) li,
.app-quote.model-quote.change-list  #changelist-filter ul:nth-child(11) li {
  margin-right: 12px;
}

.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(3),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(5),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(7),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(9),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(11),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(13),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(15),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(17),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(19),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(21),
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(23) {
  display: flex;
}

.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(3) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(5) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(7) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(9) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(11) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(13) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(15) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(17) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(19) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(21) li,
.app-totem.model-screen.change-list  #changelist-filter ul:nth-child(23) li {
  margin-right: 12px;
}

.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(3),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(5),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(7),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(9),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(11),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(13),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(15),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(17),
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(19) {
  display: flex;
}

.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(3) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(5) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(7) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(9) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(11) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(13) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(15) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(17) li,
.app-postbuy.model-postbuyday.change-list  #changelist-filter ul:nth-child(19) li {
  margin-right: 12px;
}

.stringtrim {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-quote.model-quote.change-list .field-_status {
  white-space: nowrap;
}

.app-quote.model-quote.change-list .field-_edit {
  white-space: nowrap;
}

.app-quote.model-quote.change-list .field-_tags {
  white-space: nowrap;
  font-size: 14px;
  user-select: none;
}

.app-quote.model-quote.change-list .field-_status img:nth-child(4) {
  margin-left: 5px;
}

html[data-theme="light"] {
  .app-quote.model-quote.change-list tr:hover {
    background: #e5f3ff;
  }

  .app-invoice.model-invoice.change-list tr:hover {
    background: #e5f3ff;
  }
}

html[data-theme="dark"] {
  .app-quote.model-quote.change-list tr:hover {
    background: #e5f3ff;
  }

  .app-invoice.model-invoice.change-list tr:hover {
    background: #e5f3ff;
  }
}

@media (prefers-color-scheme: dark) {
  .app-quote.model-quote.change-list tr:hover {
    background: #e5f3ff;
  }

  .app-invoice.model-invoice.change-list tr:hover {
    background: #e5f3ff;
  }
}

.theme-toggle {
  display: none;
}

/* Sidemenu */

#hamburger {
  height: 30px;
  user-select: none;
  cursor: pointer;
}

#sidemenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background-color: #f8f8f8;
  box-shadow: 2px 0px 5px 5px rgba(0, 0, 0, 0.2);
  transform: translateX(-340px);
  transition: transform 100ms ease-in;
  overflow-y: auto;
  box-sizing: border-box;
  padding: 115px 0px 0px 0px;
}

#sidemenu ul {
  padding: 0;
}

#sidemenu li {
  list-style: none;
  padding: 0;
  font-size: 14px;
  border-bottom: 1px solid #d8d8d8;
}

#sidemenu li a {
  display: block;
  padding: 10px 5px 10px 30px;
  color: #555;
}

#sidemenu li a:hover {
  color: #222;
  text-decoration: none;
}

#sidemenu li:nth-child(1) {
  border-top: 1px solid #d8d8d8;
}

#sidemenu h2 {
  text-transform: uppercase;
  margin: 30px 0 15px 30px;
}

#sidemenu.show {
  transform: translateX(0px);
}

#content {
  transition: transform 100ms ease-in;
}

@media (min-width: 1200px) {
  body.sidemenu-open {
    overflow-x: hidden;
  }

  body.sidemenu-open #content {
    transform: translateX(280px);
  }

  body.sidemenu-open #changelist-filter {
    transform: translateX(-5px);
  }

  body.sidemenu-open #changelist-filter > h2 {
    user-select: none;
    transform: rotate(90deg);
    transform-origin: left top;
    transition: transform 0ms ease-out;
    transition-delay: 100ms;
  }
}


/* Actions */

td.field-_row_actions {
  position: relative;
}

th.field-_row_actions, td.field-_row_actions {
  width: 70px;
}

.jq-dropdown.jq-dropdown-tip {
  right: 30px;
}

.jq-dropdown.jq-dropdown-tip:before, .jq-dropdown.jq-dropdown-tip:after {
  right: 15px !important;
  left: unset !important;
}

@media (min-width: 1600px) {
  #changelist-form .results {
    overflow: visible !important;
  }

  .jq-dropdown.jq-dropdown-tip {
    position: absolute;
  }
}


@media (max-width: 1599px) {
  #changelist-form .results {
    padding-bottom: 300px;
  }
}


#adcopy_set-group .field-share input {
  width: 40px;
  font-size: 0.9em;
}

#adcopy_set-group .field-name input {
  width: 160px;
}

#adcopy_set-group .field-starts_at input, #adcopy_set-group .field-ends_at input {
  width: 70px;
  min-width: 70px;
  font-size: 0.9em;
}

#adcopy_set-group .field-original a {
  font-size: 0.8em;
}

body.model-postbuyday .field-_views_adjusted,
body.model-postbuyday .field-_ots_adjusted,
body.model-postbuyday .field-cars,
body.model-postbuyday .field-buses
{
  font-weight: bold;
  font-family: monospace;
  text-align: right;
}
