#content {
  padding: 0;
  margin: 15px;
}

#header {
  background: var(--secondary);
  color: var(--header-color);
  padding: 0;
  flex-shrink: 0;
}

#header #bookmark-button {
  top: 40px;
}

a:hover {
  text-decoration: underline;
}

a.button {
  padding: 9px 15px;
  height: 35px;
  line-height: 15px;
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button {
  background: var(--primary);
}

a.button:link,
a.button:visited {
  color: white;
}

a:link,
a:visited {
  color: var(--secondary);
}

div.breadcrumbs a {
  background-color: var(--breadcrumbs-bg);
  margin-top: 10px;
  display: inline;
}

.object-tools {
  margin-top: auto;
  float: none;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.object-tools li {
  height: auto;
  white-space: nowrap;
  padding-bottom: 5px;
}

.object-tools a.change-list-link-tree-view {
  background-image: url("../../images/core/tree_icon.svg");
  background-position: right 10px center;
  padding-right: 30px;
}

.object-tools a.change-list-link-list-view {
  background-image: url("../../images/core/list_icon.svg");
}

ul.field-warnings li {
  background: none;
  padding: 0;
  margin-bottom: 5px;
}

ul.field-warnings h4 {
  margin: 0;
}

ul.field-warnings ul {
  padding-left: 15px;
}

div.form-row ul > li {
  display: inline-block;
}

form .inline-tabs ul li {
  list-style-type: none;
}

/* stylelint-disable selector-class-pattern */

li.select2-selection__choice {
  padding-left: 5px !important;
  display: inline-flex !important;
  color: white;
}

li.select2-results__option--highlighted > a {
  color: var(--primary-fg) !important;
}

li.select2-results__option > a {
  color: var(--body-fg);
}

li.select2-selection__choice > a {
  color: white !important;
}

ul#content-style-list > li {
  display: inline;
  border: 1px solid var(--secondary);
  border-bottom: 0;
  margin: 0 3px 0 0;
  padding: 8px 30px;
  background-color: var(--primary);
  color: white;
  cursor: pointer;
}

ul#content-style-list > li[marked="true"] {
  background-color: var(--secondary);
}

ul#content-style-list {
  padding: 0 0 6px;
  margin: 0 0 0 170px;
}

ul.select2-results__options li span > a {
  color: #333;
}

ul.select2-selection__rendered li span > a {
  color: white;
}

ul.select2-selection__rendered li span > a:hover {
  text-decoration: underline;
}

.select2-container--admin-autocomplete
  .select2-selection--multiple
  .select2-selection__rendered {
  position: relative;
}

.select2-container--admin-autocomplete
  .select2-selection--multiple
  .select2-selection__clear {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  line-height: 1;
  margin-top: 0;
}

/* stylelint-enable */

#changelist-filter li.selected a {
  color: var(--secondary);
}

#changelist-filter .help {
  margin-left: 20px;
}

.image-field-preview {
  max-width: 300px;
  max-height: 300px;
  border: 1px solid silver;
  vertical-align: initial;
}

.inline-item .image-field-preview {
  max-width: 100px;
  max-height: 100px;
}

#header #branding h1 {
  margin: 0;
  padding: 5px 10px;
  background: var(--branding-logo);
  background-size: 80% 80%;
  background-position: center;
  white-space: nowrap;
  display: block;
  height: 30px;
  width: 115px;
  background-color: var(--header-branding-bg);
}

#header #branding h1 a {
  display: none;
}

#header #user-tools {
  padding-right: 1.2em;
  height: 40px;
  display: flex;
  align-items: center;
}

#bookmark-form {
  clear: both;
}

.button.default,
input[type="submit"].default,
.submit-row input.default {
  background: var(--secondary);
}

select.one-to-one-field {
  display: none;
}

#changelist-filter {
  width: 240px;
}

/* stylelint-disable selector-class-pattern */
#changelist-filter li.select2-selection__choice {
  max-width: 175px;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background-color: var(--darkened-select2-results-option);
}

.select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background-color: var(--select2-option-highlighted-background);
  color: var(--primary-fg);
}

.select2-dropdown,
ul.select2-results__options {
  background: var(--darkened-select2-dropdown);
  border-color: var(--border-color);
}

.select2-container--default .select2-selection--single {
  background-color: var(--darkened-select2-container-default);
  border-color: var(--border-color);
}

.select2-search__field {
  color: var(--body-fg);
  background-color: var(--body-bg);
}

.select2-search__field:focus-visible {
  outline-color: var(--darkened-select2-search-field-focus-visible);
}

.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  color: var(--body-fg);
}

.select2-container--default .select2-selection--multiple {
  color: var(--body-fg);
  background-color: var(--body-bg);
  border-color: var(--border-color);
}

.select2.select2-container.select2-container--admin-autocomplete {
  width: 100% !important;
  max-width: 700px !important;
  flex: 1;
}

.select2-container--admin-autocomplete
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: var(--select2-selection-color);
  border: 1px solid var(--select2-selection-color);
  color: white;
}

.select2-container--admin-autocomplete
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: white;
  margin-right: 4px;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: var(--select2-selection-color);
  border: 1px solid var(--select2-selection-color);
  color: white;
  border-radius: 4px;
}

.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: white;
}

.select2.select2-container.select2-container--default {
  flex: 1;
  max-width: 700px;
}

div.form-row
  > span.select2-container.select2-container.select2-container--default {
  box-sizing: border-box;
  width: 700px !important;
}

/* stylelint-enable */

/* stylelint-disable selector-class-pattern */

.form-row .datetime {
  width: 700px !important;
}

.form-row .datetime input.vDateField {
  min-width: 70px;
  max-width: 90px !important;
  margin-bottom: 0;
}

.form-row .datetime > span:first-of-type {
  margin-right: 40px;
}

.form-row .datetime input.vTimeField {
  min-width: 70px;
  max-width: 80px !important;
  margin-bottom: 0;
}

/* stylelint-enable */

.form-row .datetime > br:first-of-type {
  display: none;
}

input[type="text"]:not(#searchbar, [rendercode], [datefilter]),
input[type="email"],
input[type="password"],
input[type="url"] {
  box-sizing: border-box;
  max-width: 700px;
  width: 100%;
  flex: 1;
  line-height: 20px;
}

.teaser-field + p.help {
  width: 100%;
}

fieldset div.help {
  padding: 10px 0 0 10px;
  cursor: default;
}

fieldset .checkbox-row div.help {
  padding: 6px 0 0;
  margin-left: 0;
}

form .aligned input + p.help,
form .aligned .form-row div.help {
  width: 100%;
}

div.tabular.inline-related
  input[type="text"]:not(#searchbar, [rendercode], [datefilter]),
div.tabular.inline-related input[type="email"],
div.tabular.inline-related input[type="url"] {
  width: auto;
}

textarea {
  box-sizing: border-box;
}

.form-row select {
  width: 700px;
}

div.tabular.inline-related .form-row select {
  width: auto;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}

.related-widget-wrapper > label {
  box-sizing: border-box;
  width: 700px;
  border: 1px solid;
  border-radius: 4px;
  padding-left: 8px;
  padding-right: 0;
  margin-right: 3px;
  border-color: var(--border-color);
  color: var(--body-fg);
}

.teaser-field {
  height: 90px;
  resize: none;
  width: 700px;
}

select.image-field {
  display: none;
}

.image-filled-file-name {
  display: block;
  text-align: center;
}

.clear-generic-field img {
  width: 13px;
  height: 13px;
}

.related-widget-wrapper-link,
.clear-generic-field {
  opacity: 0.5;
  border: 1px solid;
  border-radius: 3px;
  padding: 5px;
}

.change-related img,
.delete-related img,
.add-related img,
.add-from-library img {
  width: 13px;
  height: 13px;
}

.esn-translate > img {
  height: 16px;
  width: 16px;
  margin: 0 2px;
}

.clear-generic-field img,
.related-widget-wrapper-link img,
.related-widget-wrapper-link:link img,
.clear-generic-field:link img {
  display: block;
}

.related-widget-wrapper-link:hover,
.clear-generic-field:hover {
  border: 1px solid;
}

.related-widget-wrapper {
  display: flex;
  align-items: center;
  flex: 1;
  width: 100%;
  max-width: 700px;
  flex-wrap: nowrap;
  gap: 0;
}

.aligned label:not(.vCheckboxLabel)::after {
  height: 1.625rem;
}

.related-widget-wrapper-link:link,
.clear-generic-field:link {
  opacity: 1;
}

div.image-gallery {
  max-width: 698px;
  border-radius: 3px;
}

.image-gallery-item {
  max-width: 65px;
  max-height: 65px;
  border: 1px solid silver;
  margin: 5px;
  float: right;
}

.image-gallery-item:hover {
  border: 1px solid var(--primary);
}

.image-gallery-item-background {
  height: 90px;
  float: left;
  margin: 5px 3px 3px 5px;
}

.image-gallery-item-remove {
  line-height: 0.1;
  float: right;
  margin-right: -7px;
}

.image-gallery-item-remove:hover {
  color: red;
  cursor: pointer;
  font-weight: bolder;
}

.post-preview {
  border: none;
  width: 770px;
  height: 300px;
}

.webinar-preview {
  border: none;
  width: 360px;
  height: 560px;
}

.change-related,
.add-related,
.delete-related {
  margin-left: 5px !important;
}

.select2-container {
  min-width: 16em;
}

.image-gallery-item-name {
  display: block;
  font-size: 12px;
  padding-left: 4px;
}

.module .form-row textarea {
  min-width: 700px;
}

.aligned label {
  min-width: 165px;
  display: inline-block;
}

/* stylelint-disable selector-class-pattern */

.cke_dialog_body tbody label,
.cke_dialog_body tbody legend,
.cke_dialog_body tbody .cke_dialog_link_info_parameter {
  color: var(--body-fg);
}

.cke_dialog_body tbody tr,
.cke_dialog_body tbody td {
  background: var(--body-bg);
}

.cke_dialog_body tbody input.cke_dialog_ui_input_text,
.cke_dialog_body tbody input.cke_dialog_ui_input_password,
.cke_dialog_body tbody textarea.cke_dialog_ui_input_textarea {
  color: var(--body-fg);
  background-color: var(--body-bg);
}

.colM .aligned textarea.vLargeTextField {
  min-width: 700px;
}

div.tabular.inline-related .colM .aligned textarea.vLargeTextField {
  width: auto;
}

.vCheckboxLabel {
  width: auto !important;
}

/* stylelint-enable */

button.buttonhistorylink {
  display: block;
  float: left;
  padding: 3px 12px;
  background: #999;
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  border-radius: 15px;
  border: 0;
  height: 26px;
  cursor: pointer;
  font-family:
    Roboto, "Lucida Grande", "DejaVu Sans", "Bitstream Vera Sans", Verdana,
    Arial, sans-serif;
}

button.buttonhistorylink:hover {
  background-color: #417690;
}

div#main-field-area > div {
  margin: 0 0 0 170px;
}

/* stylelint-disable selector-class-pattern */

.CodeMirror,
.CodeMirror-gutter {
  background: var(--codemirror-bg);
}

div.CodeMirror {
  width: 700px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

div.django-ckeditor-widget .cke_contents.cke_reset div.CodeMirror {
  width: 100%;
}

/* stylelint-enable */

.django-ckeditor-widget {
  flex: 1;
}

div.submit-row > a.button {
  margin-left: 5px;
  text-decoration: none;
}

div.submit-row .collapsable {
  flex-basis: 100%;
}

div.submit-row .toggle {
  margin-bottom: 5px;
}

div.form-row a.chips-copy {
  margin-left: 5px;
}

div.form-row div.wrap-chips-copy {
  display: flex;
  align-items: center;
}

span.gfk-object-type {
  color: #949494;
}

#esn-platform-version {
  font-size: 8px;
  line-height: 1.2;
  color: var(--platform-version);
}

#esn-platform-version-wrap {
  display: flex;
  justify-content: flex-end;
}

.timedelta {
  max-width: 700px;
}

.timedelta input {
  max-width: 15%;
}

.timedelta span.select2 {
  max-width: 82% !important;
}

.login #esn-platform-version {
  display: none;
}

.login #footer {
  display: none;
}

.login #container {
  width: 400px;
  min-height: 340px;
}

.login #header {
  padding: 0;
}

.login #header #branding h1 {
  width: 150px;
  height: 45px;
  background-size: 100% 100%;
  padding: 0;
  display: inline-block;
}

.login #branding {
  margin-top: 32px;
  float: none;
  text-align: center;
  height: 45px;
}

.login #content {
  margin: 0 50px;
  padding: 0;
}

.login .submit-row {
  padding: 0;
  text-align: center;
}

.login .submit-row input {
  margin: 29px 0 20px;
  padding: 0;
  width: 88px;
  height: 38px;
}

.login .form-row label {
  margin-left: 2px;
  font-size: 0.9em;
}

.login .form-row {
  padding: 20px 0 0;
}

.login #content .errornote {
  margin-top: 10px;
}

img.esn-translate-icon {
  height: 10px;
  width: 10px;
}

fieldset.disabled {
  opacity: 0.5;
  pointer-events: none;
}

fieldset.collapsed .form-row {
  display: none;
}

.inline-related h3 span.convert {
  float: right;
  margin-right: 4px;
}

.inline-related h3 span.convert label {
  font-size: 11px;
}

.changelink,
.inlinechangelink,
.viewlink,
.inlineviewlink {
  background-position: 3px 0;
  background-size: 10px 10px;
}

div.search-help {
  width: 100%;
  margin: 5px 0 0 25px;
}

.richtext-readonly {
  width: 700px;
  height: 200px;
  white-space: pre-wrap;
  border: 1px solid var(--secondary);
  overflow-y: auto;
  resize: both;
}

.image-readonly {
  max-width: 65px;
  max-height: 65px;
  border: 1px solid silver;
  margin: 5px;
  float: left;
}

.image-readonly:hover {
  max-width: 120px;
  max-height: 120px;
}

.table.permissions-widget tbody th {
  background-color: var(--secondary);
  color: #fff;
}

.badge-app {
  background: var(--badge-app-bg);
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  margin-right: 5px;
  padding: 2px 5px;
  color: var(--badge-app-color);
}

.badge-app:first-child {
  border: 1px solid var(--badge-app-border);
}

.model-icon {
  width: 14px;
  height: 14px;
  margin-bottom: -2px;
}

:root {
  --delete-button-bg: #ba2121;
  --delete-button-hover-bg: #a41515;
  --object-tools-fg: var(--button-fg);
  --object-tools-bg: var(--close-button-bg);
  --object-tools-hover-bg: var(--close-button-hover-bg);
  --accent: #f5dd5d;
  --header-color: #ffc;
  --header-branding-color: var(--accent);
  --header-bg: var(--secondary);
  --header-link-color: var(--primary-fg);
  --breadcrumbs-fg: #c4dce8;
  --button-fg: #fff;
  --button-bg: var(--primary);
  --button-hover-bg: #407f89;
  --default-button-bg: var(--secondary);
  --default-button-hover-bg: #205067;
  --error-bg: #b91616;
  --error-hover-bg: #ea3d3d;
  --changeform-width: 85%;
}

.login #header #branding h1,
.login #header {
  background-color: var(--login-header-bg);
}

/* Change webkit-autofill for main login page */
/* stylelint-disable selector-id-pattern */

form#login-form input#id_username:-webkit-autofill,
form#login-form input#id_username:-webkit-autofill:hover,
form#login-form input#id_username:-webkit-autofill:focus,
form#login-form input#id_username:-webkit-autofill:active,
form#login-form input#id_password:-webkit-autofill,
form#login-form input#id_password:-webkit-autofill:hover,
form#login-form input#id_password:-webkit-autofill:focus,
form#login-form input#id_password:-webkit-autofill:active {
  box-shadow: 0 0 0 30px var(--body-bg) inset !important;
  -webkit-text-fill-color: var(--body-fg) !important;
}

/* stylelint-enable */

form#login-form input[type="submit"] {
  background: var(--login-submit);
}

.constance #changelist {
  width: var(--changeform-width);
}

.constance #changelist-form {
  width: 100%;
}

.copy-img {
  width: 16px;
  height: 16px;
}

.field-warnings {
  padding: 0;
  margin-left: 15px;
}

#title-field-warnings {
  margin: 0;
}

@media screen and (width <= 920px) {
  div#main-field-area > div {
    margin: 0;
  }

  ul#content-style-list {
    margin: 0;
  }
}

@media screen and (width <= 767px) {
  .related-widget-wrapper {
    display: flex;
    align-items: center;
    flex: none;
  }

  form .form-row .timezonewarning,
  form .aligned textarea + p.help,
  form .aligned input + p.help {
    margin-left: 0;
    padding-left: 0;
  }
}

#id_password p a.button {
  line-height: 24px;
}
