.resource-list {
  margin: 2rem 0;
  overflow-x: auto;
  max-width: 100%;
}

.resource-list__inner {
  min-width: 100rem;
}

.resource-list-item {
  display: flex;
  align-items: center;
  height: 4.8rem;
}

.resource-list-item.expandable {
  background: white;
  transition: 0.1s background-color;
  cursor: default;
}

.resource-list-item.expandable:hover {
  background-color: #f3f3f3;
}

.resource-list-item.expandable:active {
  background-color: var(--color-neutral-light);
}

.resource-disclosure-indicator {
  width: 2.6rem;
  height: 4.6rem;

  background: transparent url("/assets/disclosure.svg") no-repeat center center;
  flex-shrink: 0;

  margin-right: 2.4rem;
  transition: 0.2s transform ease-in-out;
}

.resource-list-item[data-expanded="true"] .resource-disclosure-indicator,
.resource-list-item .resource-disclosure-indicator[data-expanded="true"] {
  transform: rotate(90deg);
}

.resource-title {
  font-weight: 600;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;

  background-color: transparent;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 1.6rem 1.6rem;

  padding-left: 2.8rem;
}

.resource-title__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}

.resource-title__notice {
  font-weight: normal;
  color: var(--color-neutral-highlight);

  font-size: 1.3rem;
  line-height: 1.6rem;
}

.resource-icon,
.resource-group-icon {
  width: 1.6rem;
  height: 1.6rem;

  background: transparent url("/assets/iconography/single-entity.svg") no-repeat
    center center;
  background-size: 1.6rem 1.6rem;

  flex-shrink: 0;
  margin-right: 1.4rem;
}

.resource-icon.icon--group,
.resource-group-icon.icon--group {
  background-image: url("/assets/iconography/group-entity.svg");
}
.resource-icon.icon--virtual,
.resource-group-icon.icon--virtual {
  background-image: url("/assets/iconography/single-entity-virtual.svg");
}

.source-list-item.trace-element .resource-group-title {
  margin-left: -1.2rem;
  font-weight: bold;

  width: 100%;
  border-bottom: 0.1rem solid var(--color-neutral-light);

  margin-bottom: 1.2rem;
  padding-bottom: 1.2rem;

  background-position: 0 0.3rem;
}

.resource-title .resource-linked-title {
  color: inherit;
  vertical-align: middle;
  background: var(--color-neutral-light);
  padding: 0 0.6rem;
  border-radius: 0.4rem;

  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: normal;
}

.resource-title .resource-linked-title::after {
  content: "";

  width: 1rem;
  height: 1.2rem;
  margin-left: 1rem;

  background: transparent url("/assets/disclosure.svg") no-repeat center center;
  background-size: 1.3rem 1.3rem;

  display: inline-block;
  filter: grayscale(1);
}

.resource-list-header .header-label {
  font-weight: 500;
  font-size: 1.4rem;
}

.resource-depiction {
  display: flex;
  flex-grow: 1;
  align-items: center;
  border-bottom: 0.1rem solid var(--color-neutral-light);
  height: 100%;
}

.resource-depiction.lm-table-header {
  font-weight: 600;
  line-height: 3.2rem;
  padding: 0.4rem 0;
}

.resource-depiction:not(.lm-table-header) > div:last-child {
  padding-right: 1.2rem;
}

.resource-depiction > .resource-column {
  flex-shrink: 1;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-depiction > .resource-column.column--short {
  width: 13.2rem;
}

.resource-depiction > .resource-column.column--status {
  overflow: visible;
}

@media screen and (min-width: 1440px) {
  .resource-depiction > .resource-column.column--short {
    width: 16.8rem;
  }
}

.resource-depiction > .resource-column.column--lm-values {
  width: 20rem;
  display: flex;
}

.resource-depiction > .resource-column.column--flexible {
  flex-grow: 1;
}

.resource-depiction > .resource-column.column--flexible:first-child {
  min-width: 28rem;
}

.resource-children
  .resource-depiction
  > .resource-column.column--flexible:first-child {
  min-width: 23.2rem;
}

.resource-depiction > .resource-column.column--value,
.lm-table-header .column--lm-values {
  text-align: right;
  justify-content: flex-end;
  padding-left: 1rem;
}

.resource-column.column--lm-values .lm-value {
  width: 33%;
  text-align: right;
}

.lm-table-subheader .lm-value span {
  font-size: 1.3rem;
  line-height: 1.9rem;

  background: var(--color-neutral-light);
  color: var(--color-neutral-dark);
  border-radius: 0.3rem;
  padding: 0rem 0.4rem;
  margin: 0.6rem 0;

  display: inline-block;
}

.resource-lm {
  display: flex;
  flex-grow: 1;
  flex-shrink: 0;
}

.resource-lm > div {
  min-width: 11rem;
}

.resource-group-status-indicator {
  display: flex;
  flex-shrink: 0;
  margin-right: 3.2rem;
}

.resource-group-status-indicator > div > div {
  border-left: 0.2rem solid white;
}

.resource-group-status-indicator > div > div:first-child {
  border-left: none;
}

/** Legacy styles for supporting Smart Factory implementation */
.resource-depiction > .resource-title,
.resource-depiction > .resource-group-title,
.resource-depiction > .resource-location,
.resource-depiction > .resource-type {
  width: 20%;
  margin-bottom: 0;
}

.resource-title.with-entity-icon,
.source-list-item.with-entity-icon {
  padding-left: 4rem;
  background: transparent url("/assets/iconography/single-entity.svg") no-repeat
    0 center;
  background-size: 1.6rem 1.6rem;
}

.tabs-source-list.source-list-container .tab.source-list-item.with-entity-icon {
  padding-left: 3.6rem;
  background-position: 1rem center;
}

/** Resource type iconography */
.resource-title.resource-type--charging-station,
.with-entity-icon.resource-type--charging-station {
  background-image: url("/assets/iconography/charging-station.svg");
}
.resource-title.resource-type--plug,
.with-entity-icon.resource-type--plug {
  background-image: url("/assets/iconography/plug.svg");
}
.resource-title.resource-type--metering-point,
.with-entity-icon.resource-type--metering-point {
  background-image: url("/assets/iconography/single-entity.svg");
}
.resource-title.resource-type--virtual-metering-point,
.with-entity-icon.resource-type--virtual-metering-point {
  background-image: url("/assets/iconography/single-entity-virtual.svg");
}
.resource-title.resource-type--group,
.with-entity-icon.resource-type--group {
  background-image: url("/assets/iconography/group-entity.svg");
}
.resource-title.resource-type--circuit,
.with-entity-icon.resource-type--circuit {
  background-image: url("/assets/iconography/circuit.svg");
}
.resource-title.resource-type--dynamic-circuit,
.with-entity-icon.resource-type--dynamic-circuit {
  background-image: url("/assets/iconography/dynamic-circuit.svg");
}
.resource-title.resource-type--organization,
.with-entity-icon.resource-type--organization {
  background-image: url("/assets/iconography/organization-group.svg");
}
.resource-title.resource-type--sub-organization,
.with-entity-icon.resource-type--sub-organization {
  background-image: url("/assets/iconography/organization.svg");
}

/** Nested source list items */
.tabs-source-list.source-list-container .tab.source-list-item.nested {
  padding-left: 1rem;
  background-position: 3.2rem center;
}

.tabs-source-list.source-list-container .tab.source-list-item.nested::before {
  width: 1.6rem;
  height: 1.6rem;
  content: "";
  background: url("/assets/iconography/nesting-indicator.svg") no-repeat center
    center;
  margin-right: 3.2rem;
}

.resource-lm label {
  font-size: 1.3rem;
  line-height: 1.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--color-neutral-light);
  border-radius: 0.4rem;
  margin-right: 0.6rem;
  font-weight: 600;
}

.resource-additional {
  flex-grow: 1;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-right: 1rem;
}

.resource-actions a {
  text-overflow: ellipsis;
  overflow: hidden;
}

.resource-sign-options {
  display: flex;
  align-items: center;
  padding: 0 1.4rem;
  flex-shrink: 0;
  margin-right: 1rem;
}

.resource-sign-options .Select-control {
  background: transparent;
}

.resource-children {
  position: relative;
}

.resource-status-indicator {
  width: 16rem;
  line-height: 1.2rem;
}

.resource-status {
  display: inline-block;

  background: var(--color-neutral-highlight);
  color: white;

  padding: 0rem 0.6rem;
  padding-top: 0.5rem;

  line-height: 1rem;
  text-transform: uppercase;

  font-size: 1.05rem;
  font-weight: bold;

  letter-spacing: 0.1rem;
  border-radius: 0.4rem;
}

.resource-status-indicator .resource-status label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 11rem;
  margin-bottom: 0.3rem;
}

.resource-status-overview {
  display: grid;
  gap: 0.8rem;

  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(auto-fill, 3.6rem);
}

.resource-status-overview .state {
  display: flex;

  align-items: baseline;
  justify-content: space-between;

  border: 0.1rem solid var(--color-neutral-light);
  border-radius: 0.3rem;

  font-size: 1.4rem;
  padding: 0 1rem;
  gap: 0.8rem;
}

@media screen and (max-width: 1380px) {
  .resource-status-overview .state {
    flex-direction: column;
    align-items: start;
    gap: 0;
    justify-content: center;
    height: min-content;
    padding: 0.4rem 0.8rem;
    line-height: 1.5;
  }

  .resource-status-overview .state .description {
    flex-shrink: 0;
  }

  .resource-status-overview {
    height: 5.4rem;
  }

  .resource-status-overview .state .count {
    padding: 0 !important;
  }
}

.resource-group-title {
  line-height: 1.8rem;
}

.resource-group-title span {
  display: block;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-group-title .title {
  font-weight: bold;
  font-size: 1.4rem;
}

.resource-group-title .subtitle {
  font-size: 1.3rem;
  opacity: 0.7;
}

.resource-group-description {
  margin-right: auto;
  line-height: 1.6rem;
  font-size: 1.3rem;
  padding: 0 1rem;
  max-height: 3.2rem;
  overflow: hidden;
}

.resource-group-description + .resource-lm {
  flex-grow: 0;
}

.resource-group-description span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-presentation.issue {
  background-color: var(--color-danger);
}
.status-presentation.warning {
  background-color: var(--color-yellow);
  color: var(--color-primary-text);
}
.status-presentation.ok {
  background-color: var(--color-lime);
}
.status-presentation.off {
  background-color: var(--color-primary-text);
}
.status-presentation.unknown {
  background-color: var(--color-neutral-dark);
}

.resource-status.status-presentation {
  padding-left: 2.2rem;

  background-repeat: no-repeat;
  background-position: 0.4rem center;
}

.status-presentation {
  position: relative;
}

.status-presentation-bar {
  display: flex;

  width: 12.6rem;
  height: 1.2rem;
}

.status-presentation-bar.aggregated {
  margin-top: 1.6rem;
}

.status-presentation-bar .status-presentation:first-of-type {
  border-top-left-radius: 0.3rem;
  border-bottom-left-radius: 0.3rem;
}

.status-presentation-bar .status-presentation:last-of-type {
  border-top-right-radius: 0.3rem;
  border-bottom-right-radius: 0.3rem;
}

.status-presentation .count {
  background: var(--color-neutral-light);
  display: block;

  position: absolute;
  top: -2rem;
  left: 50%;
  margin-left: -1rem;

  line-height: 1.7rem;
  padding: 0 0.5rem;
  border-radius: 0.4rem;

  font-size: 1.3rem;
  font-weight: 600;
}

.resource-children .resource-list-item.expandable,
.resource-children .resource-list-item.expandable + .resource-children {
  margin-left: -4.8rem;
  padding-left: 4.8rem;
}

.resource-children .resource-list-item.expandable + .resource-children {
  padding-left: 9.6rem !important;
}

.resource-list-item.expandable--only-indicator:hover {
  background: white;
}

.resource-list-item.expandable--only-indicator
  .resource-disclosure-indicator:hover {
  background-color: #f3f3f3;
}

.resource-list-item.expandable--only-indicator .resource-disclosure-indicator {
  transition: 0.3s background-color;

  height: 3.2rem;
  width: 3.2rem;

  margin-right: 1.6rem;
  border-radius: 0.3rem;
}

.resource-list-item.expandable--only-indicator
  .resource-disclosure-indicator:active {
  background-color: var(--color-neutral-light);
}

.resource-sign {
  padding: 0 1.4rem;
  flex-shrink: 0;
}

.resource-sign span {
  font-size: 2.1rem;
  padding: 0 0.6rem;
  border-radius: 0.4rem;
  margin: 0 0.8rem;
}

.resource-sign.sign--negative span {
  background-color: var(--color-purple);
  color: white;
}

.resource-list-item[data-show-sign="false"]
  + .resource-children
  .resource-sign {
  display: none;
}
.resource-list-item[data-show-sign="true"] + .resource-children .resource-sign {
  display: block;
}

.resource-priority {
  padding-left: 2.4rem;
  background: transparent url("/assets/iconography/priority-medium.svg")
    no-repeat left center;
  background-size: 1.6rem 1.6rem;
}

.resource-priority.priority-always-3 {
  background-image: url("/assets/iconography/priority-low.svg");
}
.resource-priority.priority-always-2 {
  background-image: url("/assets/iconography/priority-medium.svg");
}
.resource-priority.priority-always-1 {
  background-image: url("/assets/iconography/priority-high.svg");
}
.resource-priority.priority-solar_only-81 {
  background-image: url("/assets/iconography/priority-solar.svg");
}
.resource-priority.priority-min_and_solar-71 {
  background-image: url("/assets/iconography/priority-solar.svg");
}
.resource-priority.priority-low_tariff_only-31 {
  background-image: url("/assets/iconography/priority-low-tariff.svg");
}
