// ==========================================================================
// Monitor.Cat — Score Visualization (Rings & Progress Bars)
// ==========================================================================

@use 'tokens' as *;

.monitorcat-wrap {
  // ---------------------------------------------------------------------------
  // Score ring (SVG donut chart)
  // ---------------------------------------------------------------------------
  .mc-score-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;

    svg {
      width: 100%;
      height: 100%;
      transform: rotate(-90deg);
    }

    circle {
      fill: none;
      stroke-linecap: round;
      transition: stroke-dashoffset 1s $mc-ease-spring;
    }

    .mc-ring-bg {
      stroke: $mc-base-alt;
      stroke-width: 8;
    }

    .mc-ring-fill {
      stroke-width: 8;
      transition: stroke-dashoffset 1s $mc-ease-spring;
    }
  }

  .mc-score-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-family: $mc-font-heading;
    font-size: 1.5rem;
    font-weight: 600;
    color: $mc-text;
    line-height: 1;
  }

  .mc-score-ring-sublabel {
    display: block;
    font-family: $mc-font-body;
    font-size: 0.6875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: $mc-text-light;
    margin-top: 4px;
  }

  // ---------------------------------------------------------------------------
  // Small ring variant
  // ---------------------------------------------------------------------------
  .mc-score-ring-sm {
    width: 80px;
    height: 80px;

    .mc-ring-bg,
    .mc-ring-fill {
      stroke-width: 6;
    }

    .mc-score-ring-label {
      font-size: 1.125rem;
    }

    .mc-score-ring-sublabel {
      font-size: 0.5625rem;
    }
  }

  // ---------------------------------------------------------------------------
  // Ring color variants by score level
  // ---------------------------------------------------------------------------
  .mc-ring-good .mc-ring-fill  { stroke: $mc-mint-strong; }
  .mc-ring-ok .mc-ring-fill    { stroke: $mc-primary; }
  .mc-ring-bad .mc-ring-fill   { stroke: $mc-coral-strong; }
  .mc-ring-info .mc-ring-fill  { stroke: $mc-cyan-strong; }

  // ---------------------------------------------------------------------------
  // Horizontal progress bar
  // ---------------------------------------------------------------------------
  .mc-progress-bar {
    width: 100%;
    height: 8px;
    background: $mc-base-alt;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
  }

  .mc-progress-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s $mc-ease-spring;
    min-width: 4px;
  }

  // Progress bar color variants
  .mc-progress-good .mc-progress-bar-fill  { background: $mc-mint-strong; }
  .mc-progress-ok .mc-progress-bar-fill    { background: $mc-primary; }
  .mc-progress-bad .mc-progress-bar-fill   { background: $mc-coral-strong; }
  .mc-progress-info .mc-progress-bar-fill  { background: $mc-cyan-strong; }

  // ---------------------------------------------------------------------------
  // Progress bar with label
  // ---------------------------------------------------------------------------
  .mc-progress-labeled {
    display: flex;
    align-items: center;
    gap: 0.75rem;

    .mc-progress-bar {
      flex: 1;
    }

    .mc-progress-value {
      font-family: $mc-font-heading;
      font-size: 0.875rem;
      font-weight: 600;
      color: $mc-text;
      min-width: 3ch;
      text-align: right;
    }
  }

  // ---------------------------------------------------------------------------
  // Thick progress bar variant
  // ---------------------------------------------------------------------------
  .mc-progress-bar-lg {
    height: 12px;
  }
}
