/*
 * SPDX-FileCopyrightText: 2025-present Tobias Kunze
 * SPDX-License-Identifier: Apache-2.0
 */

#stats {
  display: flex;
  flex-wrap: wrap;
  .card {
    display: inline-flex;
    flex-grow: 1;
    margin: 4px;
    &.stats-timeline {
      width: 100%;
    }
  }
  .pie svg,
  .pie {
    min-height: 400px;
    min-width: 500px;
    max-width: 500px;
    margin: 0 auto;
  }
}
.toggle-group {
  display: flex;
  align-items: center;
  label.toggle-label {
    color: var(--color-grey);
    font-family: var(--font-family-title);
    font-size: 16px;
    margin: 0;
    padding: 0;
    font-weight: bold;
  }
  label.toggle-label:has(+ input[type="checkbox"]:not(:checked)),
  input[type="checkbox"]:checked + label.toggle-label {
    color: var(--color-primary);
  }
  #toggle-button {
    height: 1.5rem;
    width: 3rem;
    color: var(--color-success);
    background: var(--color-success);
    margin: 0 8px;
    padding: 0;
    position: relative;
    border: none;
    border-radius: 1.5rem;
    position: relative;

    &:after {
      border-radius: 50%;
      width: 15px;
      height: 15px;
      background: var(--color-offwhite);
      box-shadow: inset var(--shadow-lightest);
      content: "";
      display: block;
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      left: 6px;
      transition: left 0.2s;
    }
    &:checked:after {
      left: calc(100% - 21px);
    }
  }
}

#question-stats {
  display: flex;
  flex-wrap: wrap;
  .table {
    width: auto;
    padding: 16px;
  }
  #question-answers {
    margin-right: 32px;
  }
}
