/* Base */
/* smaller font-size */
html {
  font-size: 14px;
}

body {
  padding-bottom: 6rem;
}

label {
  font-weight: bold;
}

/* Layout */
/* add larger max width container */
@media (min-width: 1400px) {
  .container {
    max-width: 1340px;
  }
}

/* Table */
/* . use table-sm padding always */
.table td,
.table th {
  padding: 0.3rem;
}
.table th {
  white-space: nowrap;
}
/* remove space around list item links for even smaller tables*/
.table .beam-list-item-links {
  padding: 0;
}

/* Section Headings */

.section-heading-container {
  position: relative;
  margin-top: 1rem;
}
.section-heading {
  padding-top: 0.5rem;
}

/* Edit Links */
.edit-link {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 32px;
  border-top: 1px solid #007bff;
  margin-top: -1px;
  opacity: 0.2;
  transition: opacity 300ms;
}

.edit-link:hover {
  opacity: 1;
  border-color: #0056b3;
  background: linear-gradient(0deg, transparent 0%, rgba(0, 0, 0, 0.05) 100%);
  background-repeat: no-repeat;
}

.edit-link .fa {
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 1.5rem;
}

/* Beam detail field spacing */
.beam-detail-field > *:last-child {
  margin-bottom: 0;
}

/* Easy Markdown Editor */
.editor-toolbar.fullscreen {
  z-index: 509;
}

.EasyMDEContainer .CodeMirror-fullscreen {
  z-index: 508;
}

.editor-preview-side {
  z-index: 509;
}

/* Form buttons */
.beam-form {
  padding-bottom: 4rem;
}

.beam-form__buttons {
  position: fixed;
  bottom: 0.5rem;
  right: 15px; /* ($grid-gutter-width / 2) */
  z-index: 600;
}

.beam-form__buttons > div {
  border-radius: 0.25rem;
  background-color: #fff;
}

/* Checkbox widget */
.checkbox_widget__toggle {
  cursor: pointer;
  position: relative;
  display: block;
  padding-left: 1rem;
}

.checkbox_widget__toggle::before {
  position: absolute;
  left: 0;
  top: 0.15rem;

  content: "\f0d7";

  font-family: "FontAwesome";
  font-weight: 900;
  margin-right: 0.3rem;

  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
}

.checkbox_widget__toggle.collapsed::before {
  content: "\f0da";
}

/* inline order css */
.drag-handle {
  width: 100%;
  height: 16px;
  background: url("../../pdm/images/drag.png") center no-repeat;
  /*background: url("http://localhost:8000/static/pdm/images/drag.png") center no-repeat;*/
}

[data-inline-type="stacked"] .drag-handle {
  width: 26px;
  height: 12px;
  display: inline-block;
}

.locked .drag-handle {
  display: none;
}

.locked .local {
  display: none;
}
.global {
  display: none;
}
.locked .global {
  display: inline-block;
}
.toggle-sort {
  padding: 4px;
  font-size: 14px;
}
.field-order input {
  display: none;
}
.field-order {
  width: 24px;
}

td.original p {
  visibility: hidden;
}

.inline-group .tabular tr.has_original td {
  padding-top: 5px;
}
.inline-group .placeholder {
  background-color: darkgray;
  max-height: 200px;
}

.row1 {
  background-color: white;
}

/* Full-width containers on certain beam views */
.beam-list-products-productimages > .container,
.beam-update-article_ranges-articlerange > .container,
.beam-detail-article_ranges-articlerange > .container,
.beam-list-documents-document > .container,
.beam-update-products-product > .container,
.beam-update-multimedia-gallery > .container,
.beam-detail-multimedia-gallery > .container,
.beam-list-multimedia-imagemodel > .container,
.beam-list-products-attribute > .container {
  max-width: 100%;
}

/* image model widget */
input[data-image-model] {
  display: inline-block;
  width: 5rem;
  margin-right: 0.5rem;
  text-align: right;
}

img.preview,
.beam-form canvas {
  display: block;
  margin-bottom: 0.5rem;
  /* like bs4 .col-form-label */
  margin-top: calc(0.375rem + 1px);
}

/* Gallery nav-bar */
.gallery-item-nav-container {
  position: sticky;
  top: 1rem;
  margin-right: 1rem;
  padding-right: 1rem;
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
}
.gallery-item-nav .nav-link {
  padding: 0.25rem 0;
}

.left-sidebar-grid {
  display: grid;
  grid-template-columns: clamp(200px, 20vw, 300px) 1fr;
}

.gallery-nav-index {
  text-align: right;
  width: 1rem;
  display: inline-block;
  margin-right: 0.3rem;
}

/* ProductImages */
.beam-list-field.beam-field-logo_image > img {
  max-width: 120px;
}

.beam-field-icon_image img,
.bg-lightgray {
  background-color: lightgray;
}

/* Truncatable */
.truncatable {
  position: relative;
  overflow: hidden;
  padding-bottom: 36px;
  transition: max-height 0.5s, padding-bottom 0.5s;
}

.truncatable.truncated {
  padding-bottom: 0;
}

.truncatable a.read-more-button {
  position: absolute;
  bottom: 0;
  left: 0;
  padding-top: 24px;
  width: 100%;
  text-align: center;
  padding-bottom: 12px;
  background: rgb(255, 255, 255);
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0) 75%
  );
}

.truncatable.truncated .read-more-button {
  background: linear-gradient(
    0deg,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

.truncatable.truncate-disabled {
  padding-bottom: 0;
}

.truncatable.truncate-disabled .read-more-button {
  display: none;
}

/* Dashboard */
.dashboard-sections > .row > .col {
  max-width: 50%;
}
.dashboard-sections > .row > .col > .card {
  height: 100%;
}
.dashboard-sections .card .card-body {
  padding: 0.75rem 1.25rem;
}
.dashboard-sections .card .card-body *:last-child {
  margin-bottom: 0;
}

/* Navigation */
.navbar-brand {
  padding: 0;
}
.navbar-brand img {
  height: 40px;
}

/* product lists */
@media (min-width: 900px) {
  .used-by-products {
    -webkit-column-count: 4; /* Chrome, Safari, Opera */
    -moz-column-count: 4; /* Firefox */
    column-count: 4;
  }
}

/* product attribute update */
/* hide order in table header, it wastes a lot of space */
.beam-update-products-product th:first-child {
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 24px;
}
.beam-update-products-product th:first-child:hover {
  max-width: unset;
}
/* hide inline create button */
.beam-update-products-product td.beam-field-attribute a {
  display: none;
}

/* keep attributes somewhat short, they aren't edited inline anyway */
.beam-update-products-product td.beam-field-attribute {
  max-width: 300px;
}

/* ensure long values will be visible, they are quite common */
.beam-update-products-product td.beam-field-value {
  min-width: 280px;
}
/* make references small, they are only 4 characters */
.beam-update-products-product td.beam-field-reference input,
.beam-update-products-product td.beam-field-reference2 input {
  width: 4rem;
}

/* make the regions list slim and tall */
.beam-update-products-product td.beam-field-regions {
  max-width: 100px;
}

/* stick header on translations table */
.table-sticky-header {
  overflow-y: auto;
  height: calc(100vh - 150px);
}

.table-sticky-header thead th {
  border-top: 1px solid #ccc;
  background: #fff;
  position: sticky;
  top: 0;
}

.table-sticky-header thead th::before,
.table-sticky-header thead th::after {
  content: " ";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  width: 100%;
  background: #dee2e6;
}

.table-sticky-header thead th::before {
  top: -1px;
}

.table-sticky-header thead th::after {
  bottom: -2px;
}

#markings-table .beam-field-url {
  max-width: 300px;
}
