/* Group-photo face tagging. Keep above canvas and Edit modal (edit overlay is 12000). */
.tree-slimbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}
.hc-faces-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: none;
  place-items: center;
  padding: 0.75rem;
  pointer-events: auto;
}
.hc-faces-overlay.is-open,
.hc-faces-overlay:not([hidden]) {
  display: grid;
}
.hc-faces-overlay[hidden] {
  display: none !important;
}
.hc-faces-overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 28, 36, 0.55);
  cursor: pointer;
}
.hc-faces-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(96vw, 92rem);
  height: min(96vh, 1100px);
  max-height: 96vh;
  overflow: hidden;
  background: #fff;
  border: 1px solid #c5d8d4;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(16, 28, 36, 0.28);
}
.hc-faces-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem 0.7rem;
  border-bottom: 1px solid #e4eeec;
}
.hc-faces-bar h2 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.25rem;
  font-weight: 650;
  color: #142033;
}
.hc-faces-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.hc-faces-lead {
  margin: 0;
  color: #3d4f4b;
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 0 0 auto;
}
.hc-faces-drop[hidden],
.hc-faces-stage[hidden] {
  display: none !important;
}
.hc-faces-drop {
  display: grid;
  place-items: center;
  gap: 0.55rem;
  min-height: 10rem;
  padding: 1.25rem 1rem;
  border: 2px dashed #9bb8b2;
  border-radius: 14px;
  background: #f4faf8;
  text-align: center;
  color: #35534e;
}
.hc-faces-drop.is-drag {
  border-color: #0b6f65;
  background: #e5f4f1;
}
.hc-faces-drop input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}
.hc-faces-pick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.hc-faces-status {
  margin: 0;
  font-weight: 650;
  color: #0a5a52;
  flex: 0 0 auto;
}
.hc-faces-status.is-error {
  color: #9b2c2c;
}
.hc-faces-workspace {
  display: none;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.hc-faces-workspace:has(.hc-faces-stage:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
  gap: 0.85rem;
}
.hc-faces-stage {
  position: relative;
  container-type: size;
  overflow: visible;
  min-height: 0;
  height: 100%;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #142033;
}
.hc-faces-photo-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
  vertical-align: top;
}
.hc-faces-photo-wrap img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
@supports (max-height: 100cqh) {
  .hc-faces-photo-wrap img {
    max-width: 100cqi;
    max-height: 100cqh;
  }
}
.hc-faces-boxes {
  position: absolute;
  inset: 0;
  cursor: crosshair;
}
.hc-faces-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid #0b6f65;
  background: rgba(11, 111, 101, 0.14);
  color: #fff;
  font: 700 0.75rem/1 Source Sans 3, sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  padding: 0.15rem 0.28rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.hc-faces-box.is-dragging {
  cursor: grabbing;
  z-index: 5;
}
.hc-faces-box-name {
  pointer-events: none;
}
.hc-faces-resize {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  border: 2px solid #0b6f65;
  background: #fff;
  cursor: nwse-resize;
  pointer-events: auto;
}
.hc-faces-box.is-labeled {
  border-color: #0b6f65;
  background: rgba(11, 111, 101, 0.28);
}
.hc-faces-box.is-skip {
  border-color: #8a9a96;
  background: rgba(80, 90, 88, 0.2);
}
.hc-faces-box.is-active {
  border-color: #c2410c;
  box-shadow: 0 0 0 2px #c2410c;
}
.hc-faces-list {
  display: grid;
  gap: 0.65rem;
  align-content: start;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.15rem;
}
.hc-faces-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem;
  border: 1px solid #d7e4e0;
  border-radius: 12px;
  background: #fff;
}
.hc-faces-row.is-active {
  border-color: #0b6f65;
  box-shadow: 0 0 0 2px rgba(11, 111, 101, 0.18);
}
.hc-faces-row.is-skip {
  opacity: 0.62;
}
.hc-faces-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: #d7ece7;
}
.hc-faces-pickbox {
  display: grid;
  gap: 0.3rem;
  position: relative;
}
.hc-faces-pickbox label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #35534e;
}
.hc-faces-pickbox input[type="search"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid #c5d8d4;
  border-radius: 10px;
}
.hc-faces-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 3;
  max-height: 12rem;
  overflow: auto;
  margin: 0;
  padding: 0.2rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #c5d8d4;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 24px rgba(16, 28, 36, 0.16);
}
.hc-faces-suggest[hidden] {
  display: none;
}
.hc-faces-suggest button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.7rem;
  font: inherit;
  cursor: pointer;
}
.hc-faces-suggest button:hover,
.hc-faces-suggest button.is-hi {
  background: #e5f4f1;
}
.hc-faces-suggest button[disabled] {
  color: #8a9a96;
  cursor: default;
}
.hc-faces-actions,
.hc-faces-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.hc-faces-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.75rem 1.1rem 0.95rem;
  border-top: 1px solid #e4eeec;
  background: #f7fbfa;
}
body.is-faces-open {
  overflow: hidden;
}
body.is-faces-open #hc-chart,
body.is-faces-open .tree-chrome,
body.is-faces-open #share-panel,
body.is-faces-open #people-tray,
body.is-faces-open .topbar,
body.is-faces-open .hc-edit-overlay {
  pointer-events: none !important;
}
body.is-faces-open .hc-faces-overlay,
body.is-faces-open .hc-faces-overlay * {
  pointer-events: auto;
}
@media (max-width: 860px) {
  .hc-faces-card {
    width: 100%;
    height: 96vh;
    max-height: 96vh;
    border-radius: 12px;
  }
  .hc-faces-workspace:has(.hc-faces-stage:not([hidden])) {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(14rem, 1fr) minmax(10rem, 38%);
  }
  .hc-faces-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .hc-faces-row-actions {
    grid-column: 1 / -1;
  }
}
