/* What only the live estimate needs on top of /shared/playground.css. Tokens only. */
@layer pp.page {
  /* The demo lives in full screen only: the page shows the button that opens it. */
  .live-card:not(.pp-plot-fullscreen) {
    display: none;
  }

  /* While the model is fitted: the chart greyed out under a large spinner, and not editable. */
  .live-busy {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ds-size-3);
    color: var(--ds-color-neutral-text-default);
    font-size: var(--ds-font-size-4);
    font-weight: var(--ds-font-weight-medium);
  }

  .live-busy::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ds-color-neutral-background-default);
    opacity: 0.75;
  }

  .live-busy[hidden] {
    display: none;
  }

  /* the 95% interval under an estimate, in the stat tiles */
  .live-range {
    display: block;
    margin-block-start: var(--ds-size-1);
    color: var(--ds-color-neutral-text-subtle);
    font-size: var(--ds-font-size-1);
    font-weight: var(--ds-font-weight-regular);
  }

  /* The browser's full screen shows the card itself, so it needs its own background. */
  .pp-plot:fullscreen {
    background: var(--ds-color-neutral-background-default);
  }

  /* Editing one sample: a popover inside the card, so it also works in full screen. */
  .live-pop {
    position: absolute;
    z-index: 20;
    width: 17rem;
    padding: var(--ds-size-3);
    border: var(--ds-border-width-default) solid var(--ds-color-neutral-border-default);
    border-radius: var(--ds-border-radius-md);
    background: var(--ds-color-neutral-background-default);
    box-shadow: var(--ds-shadow-md);
  }

  .live-pop[hidden] {
    display: none;
  }

  .live-pop p {
    margin: 0;
  }

  .live-pop .pp-controls {
    margin: var(--ds-size-2) 0 0;
    gap: var(--ds-size-2);
  }

  .live-pop .ds-input {
    width: 6.5rem;
  }
}
