.apPreviews {
  font-family: "Arial";
  color: #e9e9e9;
  background: rgba(255, 255, 255, 0);
  display: none;
  z-index: 0;
}

.apPreviews.vertical {
  overflow-y: auto;
  overflow-x: hidden;
  margin-top: 0.5em;
  display: inline-block;
  grid-area: previews;
}

.apPreviews.horizontal {
  width: 100vw;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
}

#pathology-container.closed .apPreviews.vertical {
  width: 0;
  height: 0;
}

.apPreviews.horizontal {
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
}

.ap-previews-collapse {
  cursor: pointer;
  transition: all 0.25s;
}

.ap-previews-collapse.horizontal {
  display: none;
}

.ap-previews-collapse-rotate-anticlockwise {
  transform: rotate(-90deg);
}

.ap-previews-collapse-rotate-clockwise {
  transform: rotate(0deg);
}

.apPreviews.horizontal.lbp-open {
  /* if you modify this width check out if the littleBigPanel opens correctly*/
  width: 79vw;
}

#main-layout.west.inner .apPreviews.horizontal {
  width: 50vw;
}

.ap-previews-header {
  padding: 0.5em;
  margin: 0 0.5em;
  background-color: #191b1e;
  border-radius: 3px;
  display: grid;
  grid-gap: 0.3em;
  grid-template-columns: 5fr 1fr;
  grid-template-rows: auto;
  grid-template-areas:
    "patient-data pathoOovObjects"
    "case-data case-data";
}

.ap-previews-header #patient-data {
  font-size: 0.8em;
  font-weight: bold;
  grid-area: patient-data;
}

.ap-previews-header #pathoOovObjects {
  grid-area: pathoOovObjects;
}

.ap-previews-header #case-data {
  font-size: 0.8em;
  grid-area: case-data;
  display: -webkit-box;
  max-height: 6.5em;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apPreviews.horizontal .ap-previews-header {
  grid-template-rows: 1fr 2fr;
  min-width: 10em;
  max-width: 10em;
  margin: 0 0 0.5em 0;
}

#headerCaseDescription {
  font-size: 0.8em;
}

.apPreviews.horizontal .ap-previews-header #headerCaseDescription {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.ap-specimen {
  background: #191b1e;
  border-radius: 3px;
  padding: 0.5em;
}

.ap-specimen.vertical {
  margin: 0 0.5em;
  margin-top: 3px;
}

.ap-specimen.horizontal {
  margin-left: 3px;
  margin-bottom: 0.5em;
  margin-right: 0;
  margin-top: 0;
}

.ap-specimen-header-wrapper {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.35em;
  padding-bottom: 0.6em;
  border-bottom: 1px solid var(--secondary);
}

.ap-specimen-header-wrapper.collapsed {
  padding-bottom: 0px;
  border-bottom: none;
}

.ap-specimen-header-wrapper.horizontal {
  grid-template-columns: auto;
}

.ap-specimen-header {
  display: grid;
  grid-template-areas:
    "title buttons"
    "description description";
  grid-gap: 0 1em;
}

.ap-specimen-header-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.8em;
  font-weight: bold;
  grid-area: title;
}

.ap-specimen-header-description {
  font-size: 0.7em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.5em;
  grid-area: description;
  margin-top: 0.1em;
}

.ap-specimen-header .sorting {
  text-align: end;
}

.ap-specimen-sort-buttons {
  padding-right: 0.3em;
  grid-area: buttons;
  display: flex;
  gap: 0.3em;
  justify-content: flex-end;
}

.ap-specimen-blocks {
  display: flex;
  transition: all 0.2s;
  max-height: var(--specimen-max-height);
}

.ap-specimen-blocks-collapsed {
  max-height: 0px;
  overflow: hidden;
}

.ap-specimen-blocks.vertical {
  flex-direction: column;
}

.ap-specimen-blocks.horizontal {
  flex-direction: row;
}

.ap-block {
  background: rgba(255, 255, 255, 0);
  display: block;
  padding-top: 0.5rem;
}

.ap-block.vertical {
  padding-bottom: 1rem;
}

.ap-block.vertical:last-child {
  padding-bottom: 0;
}

.ap-block.horizontal {
  padding-right: 3rem;
}

.ap-block.horizontal:last-child {
  padding-right: 0;
}

.ap-block-header {
  font-size: 0.7em;
  padding-bottom: 0.5em;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-block-alias {
  font-weight: bold;
}

.ap-block-separator {
  height: 1em;
  border-left: 1px solid #e9e9e9;
  margin-left: 0.5em;
  margin-right: 0.5em;
}

.ap-block-header.horizontal {
  height: 1em;
}

.ap-block-previews.horizontal {
  display: grid;
  grid-auto-flow: column;
  grid-gap: 0.5em 0.2em;
  justify-content: start;
}

.ap-block-previews.horizontal.large {
  grid-template-rows: 1fr;
}

.ap-block-previews.horizontal.small {
  grid-template-rows: 1fr 1fr;
}

.ap-block-previews.vertical {
  display: grid;
  grid-auto-flow: row;
  grid-gap: 0.5em;
}

.ap-block-previews.vertical.large {
  grid-template-columns: 1fr;
}

.ap-block-previews.vertical.small {
  grid-template-columns: 1fr 1fr;
}

.ap-preview-container {
  background: #191b1e;
  text-align: center;
}

.ap-block-previews.horizontal .ap-preview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5em;
}

.apPreview {
  color: white;
  padding: 0.2em;
  border: 1px solid;
  border-radius: 5px;
  text-align: center;
  margin: auto;
  border-color: #888888;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.apPreview.selected {
  border-color: var(--primary);
  opacity: 1;
}

#panel-left .ap-block-previews.vertical.small .apPreview {
  height: 3.5em;
  width: 7em;
}

#panel-left .ap-block-previews.vertical.large .apPreview {
  height: 7.5em;
  width: 15em;
}

#horizontalPreviewsDiv {
  height: 0em;
  transition: height 0.2s;
}

#horizontalPreviewsDiv.open {
  height: 16em;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  transition: height 0.2s;
}

#horizontalPreviewsDiv .ap-block-previews.horizontal.small .apPreview {
  width: 2em;
  height: 4em;
  margin: auto;
}

#horizontalPreviewsDiv .ap-block-previews.horizontal.large .apPreview {
  width: 4.5em;
  height: 9em;
}

.apPreviewImage {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

.ap-preview-image-container {
  width: 100%;
  height: 100%;
  background-color: rgb(255, 255, 255);
  border-radius: 5px;
  text-align: center;
}

.ap-preview-sort-alphabetic,
.ap-preview-sort-date {
  bottom: 3px;
  right: 3px;
  padding-left: 0.5em;
  float: right;
  width: 1.5em;
  height: 1.1em;
  opacity: 0.7;
}

.ap-preview-sort-alphabetic:hover,
.ap-preview-sort-date:hover {
  opacity: 1;
  cursor: pointer;
}

.ap-preview-footer {
  font-size: 0.7em;
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: auto auto;
  grid-gap: 0 1em;
  margin-top: 0.5em;
}

.ap-block-previews.horizontal .ap-preview-container .ap-preview-footer {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 2fr 1fr;
  justify-items: start;
}

.ap-block-previews.horizontal.large .ap-preview-container .ap-preview-footer {
  grid-template-rows: auto 2fr 1fr;
}

.ap-preview-footer .label {
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-preview-footer .ap-preview-icons {
  display: flex;
  gap: 0.3em;
  justify-content: flex-end;
  align-items: center;
}

.ap-block-previews.horizontal .ap-preview-container .ap-preview-footer .ap-preview-icons {
  grid-row: 3/4;
  align-items: end;
}

.ap-preview-footer .ap-preview-icons .ai-alert {
  width: 12px;
}

.ap-preview-footer .ap-preview-icons .ai-alert.high {
  fill: #f44336;
}

.ap-preview-footer .ap-preview-icons .ai-alert.medium {
  fill: #ffab00;
}

.ap-preview-footer .ap-preview-icons .ai-alert.low {
  fill: #00c853;
}

.ap-preview-footer .ap-preview-icons .bookmark {
  width: 1em;
  cursor: pointer;
  fill: var(--secondary);
}

.ap-preview-footer .ap-preview-icons .tag {
  width: 12px;
  fill: var(--primary);
}

.ap-block-previews.horizontal .ap-preview-footer .ap-preview-icons .tag {
  width: 10px;
  fill: var(--primary);
}

.ap-preview-footer .ap-preview-icons .bookmark:hover:not(.favourite) {
  fill: var(--primary);
  opacity: 0.8;
}

.ap-preview-footer .ap-preview-icons .bookmark.favourite {
  fill: var(--primary);
}

.ap-preview-footer .ap-preview-icons .review-status {
  width: 1em;
  cursor: default;
  --change-status-time: 0.2s;
  transition: color var(--change-status-time);
}

.ap-preview-footer .ap-preview-icons .review-status.started,
.ap-preview-footer .ap-preview-icons .review-status.completed {
  cursor: pointer;
  transition: scale var(--change-status-time);
  scale: 1;
  transform-origin: center;
}

.ap-preview-footer .ap-preview-icons .review-status.started.updated,
.ap-preview-footer .ap-preview-icons .review-status.completed.updated {
  transition: scale var(--change-status-time);
  scale: 0;
  transform-origin: center;
}
.ap-preview-footer .ap-preview-icons .review-status.none:hover {
  opacity: 1;
}

.ap-preview-footer .stain-code {
  grid-column: 1/3;
  text-align: start;
}

.ap-sort-preview {
  width: 1em;
  height: 1em;
  opacity: 0.7;
  cursor: pointer;
}

.ap-sort-preview:hover {
  opacity: 1;
}

.ap-sort-preview.selected {
  opacity: 1;
}

#thumb-hider-container {
  grid-area: hider;
  cursor: pointer;
  align-self: end;
}

#pathology-container:not(.closed) #thumb-hider-container {
  width: 81%;
}

#ap-previews-container {
  display: flex;
  flex-direction: row;
  height: 100%;
  gap: 0.5em;
  z-index: 2;
}

#thumb-hider {
  margin: 0.5em;
  height: 1.5em;
  background: #191b1e;
  border-radius: 3px;
  text-align: center;
}

#thumb-hider-image {
  opacity: 0.7;
  fill: white;
  color: white;
  margin: auto;
  transition: opacity 0.3s;
}

#thumb-hider-container:hover #thumb-hider-image {
  opacity: 1;
  transition: opacity 0.3s;
}

#horizontalPreviewsDiv #thumb-hider-container {
  height: 100%;
  margin: 0.5em;
  left: 0.5em;
  position: sticky;
  margin-right: 0;
}

#horizontalPreviewsDiv #ap-previews-container.closed {
  display: none;
}

#horizontalPreviewsDiv #thumb-hider {
  height: 100%;
  width: 1.5em;
  margin: 0;
  position: relative;
}

#horizontalPreviewsDiv #thumb-hider-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.ai-container {
  margin-top: 0.5em;
  padding-top: 0.5em;
  border-top: 1px solid #4d5357;
}

.tags-container {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
  grid-gap: 0.5em;
  width: 30em;
  margin-top: 0.5em;
}

.ai-classifications {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8em, 1fr));
  grid-gap: 0.5em;
  width: 30em;
  margin-top: 0.5em;
}

.tooltip-ai-outcome {
  border-radius: 1em;
  color: white;
  font-size: 1em;
  text-align: center;
  line-height: 1.5em;
  padding: 0 0.7em;
  width: 8em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #191b1e;
}

.tooltip-tag-outcome {
  border-radius: 1em;
  color: white;
  font-size: 1em;
  text-align: center;
  line-height: 1.5em;
  padding: 0 0.7em;
  width: 8em;
  background-color: #191b1e;
  display: flex;
}

.tooltip-tag-outcome-text {
  width: 6em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  margin-top: 0.1em;
}

.tooltip-tag-outcome-icon {
  width: 0.8em;
  fill: white;
  margin-right: 0.6em;
  margin-top: 0.18em;
}

.tooltip-ai-outcome.high {
  background-color: #f44336;
}

.tooltip-ai-outcome.medium {
  background-color: #ffab00;
}

.tooltip-ai-outcome.low {
  background-color: #00c853;
}
