/*!
 * branddam26 – Brand Annotation element
 * An image with numbered markers, explained in a legend; stacked on small screens.
 * © 2026 Atelier 26 AG – part of digiscapes®. All rights reserved. digiscapes® and brandscapes® are registered trademarks.
 */

.content-brand-annotation { display: block; container-type: inline-size; }
.content-brand-annotation .header .name { font-weight: 600; margin-bottom: var(--bs-gutter-y); }

.content-brand-annotation .brand-annotation {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--bs-gutter-x);
  align-items: flex-start;
}
.content-brand-annotation .brand-annotation-stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 0;
}
.content-brand-annotation .brand-annotation-stage img,
.content-brand-annotation .brand-annotation-stage picture,
.content-brand-annotation .brand-annotation-stage .svg-original {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--bs-border-radius-8);
}
.content-brand-annotation .brand-annotation-legend { width: 100%; flex: 0 0 auto; }

@container (min-width: 768px) {
  .content-brand-annotation .brand-annotation[data-legend="right"],
  .content-brand-annotation .brand-annotation[data-legend="left"] {
    flex-direction: row;
    align-items: flex-start;
  }
  .content-brand-annotation .brand-annotation[data-legend="right"] .brand-annotation-legend,
  .content-brand-annotation .brand-annotation[data-legend="left"] .brand-annotation-legend {
    width: 20rem;
    flex: 0 0 20rem;
  }
  .content-brand-annotation .brand-annotation[data-legend="left"] .brand-annotation-stage { order: 2; }
  .content-brand-annotation .brand-annotation[data-legend="left"] .brand-annotation-legend { order: 1; }
}

/* Pins */
.content-brand-annotation .brand-annotation-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid var(--bs-white);
  background: var(--bs-primary-base);
  color: var(--bs-white);
  font-family: var(--bs-font-sans-serif);
  font-size: var(--bs-font-size-small);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px hsl(from var(--bs-overlay-black) h s l / 0.35);
  transition: transform 120ms ease-out;
  touch-action: none;
}
.content-brand-annotation .brand-annotation-pin:hover,
.content-brand-annotation .brand-annotation-pin.is-active {
  transform: translate(-50%, -50%) scale(1.2);
  z-index: 2;
}
/* Draggable while editing in frontendedit26 */
body.fe--edit-mode-active .content-brand-annotation .brand-annotation-pin { cursor: move; }
.content-brand-annotation .brand-annotation-pin.is-dragging { transition: none; z-index: 3; }

/* Legend */
.content-brand-annotation .brand-annotation-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.content-brand-annotation .brand-annotation-litem {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.6rem;
  align-items: start;
  padding: 0.35rem 0.5rem;
  border-radius: var(--bs-border-radius-8);
}
.content-brand-annotation .brand-annotation-litem.is-active { background: var(--bs-surface-50); }
.content-brand-annotation .brand-annotation-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--bs-primary-base);
  color: var(--bs-white);
  font-size: var(--bs-font-size-small);
  font-weight: 700;
}
.content-brand-annotation .brand-annotation-title { display: block; }
.content-brand-annotation .brand-annotation-text { font-size: var(--bs-font-size-small); opacity: 0.85; }
.content-brand-annotation .brand-annotation-text > *:last-child { margin-bottom: 0; }
