/* location menu icon */
:root {
  --location-menu-item: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z' fill='none' stroke='currentcolor' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3e%3ccircle cx='12' cy='10' r='3'/%3e%3c/svg%3e");
}
a[data-drupal-link-system-path="locations"]:before {
  background-image: var(--location-menu-item);
}
.toolbar .toolbar-bar a[data-drupal-link-system-path="locations"]:before {
  -webkit-mask-image: var(--location-menu-item);
  mask-image: var(--location-menu-item);
}

/* title */
.region-sticky__items .block-page-title-block:has(.location) {
  flex-direction: column;
  flex-basis: 100%;
}

.region-sticky__items .block-page-title-block:has(.location) .page-title {
  align-self: start;
}

.page-title.page-title--subtitle {
  font-size: var(--gin-font-size-xs);
  font-weight: var(--gin-font-weight-normal);
  margin: 0;
}

@media (min-width: 61em) {
  .page-title.page-title--subtitle {
    font-size: var(--gin-font-size-s);
  }
}

@media (min-width: 64em) {
  .region-sticky--is-sticky .page-title.page-title--subtitle {
    font-size: var(--gin-font-size-xxs);
  }
}

@media (min-width: 90em) {
  .page-title.page-title--subtitle {
    font-size: var(--gin-font-size-m);
  }
}

.page-title--subtitle:before,
.page-title.location:before {
  position: relative;
  top: 0.25em;
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: calc(var(--gin-font-size-h1) * 0.5);
  padding: 0 calc((var(--gin-font-size-h1) - 1em) / 2);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  content: "";
}

@media (min-width: 64em) {
  .region-sticky--is-sticky {
    .page-title--subtitle:before,
    .page-title.location:before {
      margin-right: calc(var(--gin-font-size-h3) * 0.5);
      padding: 0 calc((var(--gin-font-size-h3) - 1em) / 2);
    }
  }
}

.page-title.location:before {
  top: 0.125em;
  background-image: var(--location-menu-item);
}

.page-title--subtitle.process-name:before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3e%3cpath d='M14,4C8.5,4,4,8.5,4,14c0,4.8,3.5,8.9,8,9.8V36H6c-1.1,0-2,0.9-2,2v16c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V38 c0-1.1-0.9-2-2-2h-6V23.8c3.9-0.8,7-3.9,7.8-7.8h13.4l6.8,6.8v13.4c-4.5,0.9-8,5-8,9.8c0,5.5,4.5,10,10,10s10-4.5,10-10 c0-4.8-3.5-8.9-8-9.8V22.8l7.4-7.4c0.8-0.8,0.8-2,0-2.8l-8-8C47,4.2,46.5,4,46,4c-0.5,0-1,0.2-1.4,0.6L37.2,12H23.8 C22.9,7.5,18.8,4,14,4z M14,8c3.3,0,6,2.7,6,6s-2.7,6-6,6c-3.3,0-6-2.7-6-6S10.7,8,14,8z M46,8.8l5.2,5.2L46,19.2L40.8,14L46,8.8z M8,40h12v12H8V40z M46,40c3.3,0,6,2.7,6,6c0,3.3-2.7,6-6,6c-3.3,0-6-2.7-6-6C40,42.7,42.7,40,46,40z' fill='none' stroke='currentColor' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

.page-title--subtitle.task-name:before {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3e%3cpath d='M18.6,8.1L12,14.7l-2.6-2.6l-2.8,2.8l5.4,5.4l9.4-9.4L18.6,8.1z M28,12v4h28v-4H28z M18.6,24.1L12,30.7 l-2.6-2.6l-2.8,2.8l5.4,5.4l9.4-9.4L18.6,24.1z M28,28v4h28v-4H28z M10,40c-1.1,0-2,0.9-2,2v8c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2v-8 c0-1.1-0.9-2-2-2H10z M12,44h4v4h-4V44z M28,44v4h28v-4H28z' fill='none' stroke='currentColor' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
}

.location-title {
  display: block;
  padding-left: 2rem;
  background-image: var(--location-menu-item);
  background-repeat: no-repeat;
  background-position: 0 .25rem;
  background-size: 1.5rem;
}
span.location_title,
span.location_subtitle {
  display: blocK;
  font-weight: bold;
  font-size: 1rem;
}
span.location_subtitle {
  font-weight: normal;
}

article .location_title,
.region-sticky .location_title {
  font-size: 2rem;
}

.region-sticky:has(.location) {
  height: auto;
}

.gin--edit-form .region-sticky:has(.page-title--subtitle) {
  inset-block-start: calc(var(--gin-toolbar-y-offset) - var(--gin-spacing-xxxl) - var(--gin-spacing-xxs));
  padding-block-start: var(--gin-spacing-m);
}

.gin--edit-form .region-sticky:has(.process-name) {
  inset-block-start: calc(var(--gin-toolbar-y-offset) - var(--gin-spacing-xxxl) - var(--gin-spacing-xl) - var(--gin-spacing-s));
  padding-block-start: var(--gin-spacing-m);
}

@media (min-width: 64em) {
  .gin--edit-form .region-sticky:has(.location) {
    inset-block-start: var(--gin-toolbar-y-offset);
    padding-block-start: var(--gin-spacing-s);
  }
}

.ui-dialog.flexiflow-off-canvas {
  .region-sticky:has(.location) {
    padding-block: 0 var(--gin-spacing-s);
  }
}

/* Location view */
.view-flexiflow-locations table {
  margin: 0;
}
#views-exposed-form-flexiflow-locations-locations {
  margin-top: 1rem;
}
div.view-flexiflow-locations .gin-table-scroll-wrapper {
  overflow: visible;
}
.view-flexiflow-locations td,
.view-flexiflow-locations td.views-field-operations .dropbutton-wrapper {
  vertical-align: top;
}

.view-flexiflow-locations .view-footer {
  margin-top: 1rem;
  margin-left: 1.5rem;
}

@media (min-width: 976px) and (max-width: 1440px) {
  .view-flexiflow-locations .views-field-field-process .process-state .process-state-icon.start,
  .view-flexiflow-locations .views-field-field-process .process-state .process-state-icon.finished,
  .view-flexiflow-locations .views-field-field-process .process-state .process-state-icon.deadline {
    width: 25px;
    display: block;
    min-width: 10px;
    overflow: hidden;
  }
}
@media (max-width: 575px) {
  .view-flexiflow-locations td.views-field-operations .dropbutton-wrapper {

  }
  .view-flexiflow-locations .views-field-field-process .process-state td {
    padding-left: 10px;
  }
  .view-flexiflow-locations .views-field-field-process table.process-state td {
    display: none;
  }
}

/* Node Location */
.node-location-edit-form,
.node--type-location {
  .field--label-above {
    margin: .5rem 0;
  }

  .field__items, .field__item {
    margin: .25rem 0;
  }

}

form.entity-browser-locations-form {
  margin-left: -66px !important;
  width: calc(100% + 66px) !important;
}

form.entity-browser-locations-form .location-title {
  background-image: none;
  padding-left: 3rem;
}
