.tooth-viewer {
  margin: 0 auto 2rem;
  max-width: 42rem;
  font-style: normal;
}

.tooth-viewer [hidden] {
  display: none !important;
}

.tooth-viewer__viewport {
  position: relative;
  height: clamp(17rem, 45vw, 26rem);
  overflow: hidden;
  border: 1px solid #e2e5e3;
  border-radius: 0.5rem;
  background: #f3f5f3;
}

.tooth-viewer__viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.tooth-viewer__viewport canvas:focus-visible {
  outline: 3px solid #28776c;
  outline-offset: -5px;
}

.tooth-viewer .tooth-viewer__status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
}

.tooth-viewer__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.tooth-viewer__controls button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  height: auto;
  padding: 0.5rem 0.85rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.tooth-viewer__controls button:focus-visible {
  outline: 3px solid #28776c;
  outline-offset: 3px;
}

.tooth-viewer .tooth-viewer__instructions {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.6;
  text-align: center;
}

.tooth-viewer .tooth-viewer__title {
  display: block;
  margin-bottom: 0.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html:not(.viewer-js) .tooth-viewer__viewport {
  display: none;
}
