/* spider diagram styling */

/* We want overflow to be generally visible, as the size is mainly for layouting purposes */

.spiderdiagram {
    /* The diagram it self is only sized for the core circle, we need to make space for the axis labels */
    margin: 60px
}

.spiderdiagram > svg {
    overflow: visible !important;
}

foreignObject,
.spiderdiagram .master-overlay-container,
.spiderdiagram .spider-label-stack {
  overflow: visible;
}

/* Initially hide any content */
div.spiderdiagram > div {
    display: none;
}

/* Grid & Axes */
.spiderdiagram .grid-line { fill: none; stroke: #eee; stroke-width: 1; }
.spiderdiagram .axis-line { stroke: #ddd; stroke-width: 1; }
.spiderdiagram .axis-tick-label { font-size: 10px; fill: #bbb; font-family: sans-serif; }

/* Container for the HTML labels inside SVG */
.spiderdiagram .label-container {
  display: flex;
  flex-direction: column; /* Stack lines if needed */
  height: 100%;
  width: 100%;
  pointer-events: none;
}

/* Vertical centering for all */
.spiderdiagram .label-container {
  justify-content: center; /* Vertical center in this context */
}

/* Horizontal alignment mapping */
.spiderdiagram .align-end {
  align-items: flex-end;   /* Moves the span to the right */
  text-align: right;
}

.spiderdiagram .align-start {
  align-items: flex-start; /* Moves the span to the left */
  text-align: left;
}

.spiderdiagram .align-center {
  align-items: center;     /* Moves the span to the center */
  text-align: center;
}

.spiderdiagram .axis-label {
  font-family: sans-serif;
  font-size: 12px;
  color: #444;
  pointer-events: none;
  line-height: 1.2;
}

.spiderdiagram .spider-label-text {
  font-weight: bold;
  text-align: center;
}

center-labels-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center; /* Center the whole stack vertically */
  align-items: center;     /* Center each label horizontally */
  height: 100%;
  width: 100%;
  gap: 8px;                /* Automatic spacing between spider labels */
  pointer-events: none;
}

/* The stage: sized to the spider diagram circle */
.spiderdiagram .master-overlay-container {
  position: absolute;
  pointer-events: none; /* Allows interacting with SVG paths if needed */
}

/* This centers the spider labels specifically */
.spiderdiagram .spider-label-stack {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    z-index: 1; /* Keep labels on a specific layer */
}

/* Example style for your extra overlays */
.spiderdiagram .my-custom-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.8);
  padding: 5px;
  pointer-events: auto; /* Make this overlay clickable */
}

.spiderdiagram .spider-label-item {
  font-family: sans-serif;
  font-weight: bold;
  text-align: center;
}

/* Spider A: Alpha */
.spiderdiagram .spider-alpha {
  stroke: rgba(0, 0, 0, 0);
  fill: rgba(200, 200, 255, 0.15);
  stroke-width: 0px;
}
.spiderdiagram .spider-alpha-label {
    color: #005a82;
    font-size: 14px;
    font-family: serif;
    font-style: italic;
}

/* Spider B: Beta */
.spiderdiagram .spider-beta {
  stroke: #FFA200;
  fill: rgba(0, 0, 0, 0.0);
  stroke-width: 2pt;
}

.spiderdiagram .spider-3d-capram {
  stroke: #C01414;
  fill: rgba(0, 0, 0, 0.0);
  stroke-width: 3pt;
}
