@layer components {
  .ekg {
    position: relative;
    width: 100%;
    min-height: 120px;
    background: var(--color-surface);
    border-radius: var(--radius-m);
    overflow: hidden;

    & .ekg__canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    & .ekg__overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0;
      font-family: var(--font-serif);
      font-style: italic;
      color: color-mix(in oklab, var(--color-text) 40%, transparent);
      pointer-events: none;
      transition: opacity 0.3s ease;
      background: rgba(var(--color-surface), 0.8);
      z-index: 10;

      &[hidden] {
        display: none;
        opacity: 0;
      }
    }
  }
}
