/* Auswertungsansicht: nur Bildschirm, nicht Druck. */

.overview {
  --rating-independent: #3f8a5b;
  --rating-little-help: #9dcea6;
  --rating-much-help: #e7ad55;
  --rating-not-yet: #c9ddea;
  --rating-not-observed: #e5e5e3;
  --rating-unrated: #f8f8f6;
  --rating-unrated-border: #bfc2c0;
  --rating-label: #222222;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem 1.25rem;
  padding: 0.85rem 0.9rem 1.1rem;
}

.overview__chart {
  min-width: 0;
}

.sunburst-svg {
  display: block;
  width: min(100%, 720px);
  height: auto;
  margin: 0 auto;
}

.sunburst-svg [data-kind] {
  cursor: pointer;
}

.sunburst-svg [data-kind]:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.sunburst-svg [data-kind]:hover:not(.sunburst-skill) {
  filter: brightness(0.96);
}

.sunburst-svg .sunburst-skill:hover:not(.is-selected) {
  stroke-width: 1.15;
}

.sunburst-skill--selbststaendig,
.overview-legend__swatch.sunburst-skill--selbststaendig {
  fill: var(--rating-independent);
  stroke: var(--rating-independent);
  background: var(--rating-independent);
  border-color: var(--rating-independent);
}

.sunburst-skill--wenig-hilfe,
.overview-legend__swatch.sunburst-skill--wenig-hilfe {
  fill: var(--rating-little-help);
  stroke: var(--rating-little-help);
  background: var(--rating-little-help);
  border-color: var(--rating-little-help);
}

.sunburst-skill--viel-hilfe,
.overview-legend__swatch.sunburst-skill--viel-hilfe {
  fill: var(--rating-much-help);
  stroke: var(--rating-much-help);
  background: var(--rating-much-help);
  border-color: var(--rating-much-help);
}

.sunburst-skill--noch-nicht,
.overview-legend__swatch.sunburst-skill--noch-nicht {
  fill: var(--rating-not-yet);
  stroke: var(--rating-not-yet);
  background: var(--rating-not-yet);
  border-color: var(--rating-not-yet);
}

.sunburst-skill--nicht-beobachtet,
.overview-legend__swatch.sunburst-skill--nicht-beobachtet {
  fill: var(--rating-not-observed);
  stroke: var(--rating-not-observed);
  background: var(--rating-not-observed);
  border-color: var(--rating-not-observed);
}

.sunburst-skill--open,
.overview-legend__swatch.sunburst-skill--open {
  fill: var(--rating-unrated);
  stroke: var(--rating-unrated-border);
  background: var(--rating-unrated);
  border-color: var(--rating-unrated-border);
}

.sunburst-svg .is-selected {
  stroke: #1f1c18;
  stroke-width: 1.4;
  filter: none;
}

.sunburst-svg .is-related {
  stroke: #1f1c18;
  stroke-width: 0.9;
}

.sunburst-svg .is-dimmed {
  opacity: 0.42;
}

.sunburst-area-label {
  fill: #2a2723;
  font-size: 6.2px;
  font-weight: 700;
  pointer-events: none;
}

.sunburst-skill-label {
  fill: var(--rating-label);
  font-size: 4.4px;
  font-weight: 650;
  pointer-events: none;
}

.sunburst-center-count {
  fill: #1f1c18;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
}

.sunburst-center-caption {
  fill: #6b655b;
  font-size: 6.2px;
  font-weight: 600;
  pointer-events: none;
}

.overview__side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.overview-side-title {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
}

.overview-legend {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.overview-legend__item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
}

.overview-legend__swatch {
  flex: 0 0 0.85rem;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid;
  border-radius: 999px;
}

.overview-legend__swatch--open {
  box-shadow: none;
}

.overview-details,
.overview-detail {
  min-width: 0;
}

.overview-detail p {
  margin: 0 0 0.2rem;
  font-size: 0.88rem;
}

.overview-detail__summary {
  font-weight: 650;
}

.overview-detail__percent {
  margin-top: 0.35rem;
  color: var(--color-muted);
}

.overview-detail__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.overview-detail__counts-title {
  margin-top: 0.55rem;
  font-weight: 650;
}

.overview-detail__counts {
  margin: 0.15rem 0 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.88rem;
}

.overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.4rem, 1fr));
  gap: 0.5rem;
}

.overview-card {
  display: grid;
  gap: 0.2rem;
  min-height: 3.6rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--card-fill);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.overview-card.is-active,
.overview-card:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 1px;
}

.overview-card__name {
  font-size: 0.82rem;
  font-weight: 700;
}

.overview-card__progress {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.competency-register--overview {
  --section-fill: #efeae0;
  --section-line: #c9c2b6;
  --section-wash: #fbf9f4;
}

.competency-register__tab--overview {
  border-color: #c9c2b6;
  background: #efeae0;
}

@media (min-width: 900px) {
  .overview {
    grid-template-columns: minmax(0, 1fr) minmax(15.5rem, 20rem);
    align-items: start;
  }

  .overview__chart {
    min-height: 28rem;
  }

  .sunburst-svg {
    width: min(100%, 750px);
  }

  .overview-cards {
    grid-column: 1 / -1;
  }
}

@media (max-width: 899px) {
  .sunburst-svg {
    width: min(100%, 36rem);
  }
}

@media (max-width: 599px) {
  .overview {
    padding: 0.7rem 0.65rem 0.95rem;
  }

  .sunburst-svg {
    width: 100%;
  }
}
