/* ScientificNumber Component Styles */

.mint-sci-number {
  display: inline-flex;
  align-items: baseline;
  gap: 0.125rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.mint-sci-number__mantissa,
.mint-sci-number__plain {
  font-variant-numeric: tabular-nums;
}

.mint-sci-number__times {
  margin: 0 0.125rem;
  color: var(--text-secondary);
}

/* Board 4b: plain digits at 0.72em, raised without growing the line box. Generated
   content is never copied, so a selection yields "10^23" from __sr, not "1023". */
.mint-sci-number__exponent::after {
  content: attr(data-exponent);
  position: relative;
  top: -0.5em;
  font-size: 0.72em;
  line-height: 0;
}

.mint-sci-number__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.mint-sci-number__suffix {
  color: var(--text-secondary);
  font-weight: 500;
}

.mint-sci-number__unit {
  color: var(--text-secondary);
  margin-left: 0.25rem;
}

.mint-sci-number__copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 24px;
  height: 24px;
  margin-left: 0.25rem;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

.mint-sci-number__copy-btn svg {
  width: 12px;
  height: 12px;
}

/* Visible on hover, on keyboard focus (4b), while confirming, and always on touch screens. */
.mint-sci-number:hover .mint-sci-number__copy-btn,
.mint-sci-number__copy-btn:focus-visible,
.mint-sci-number__copy-btn--copied {
  opacity: 1;
}

@media (pointer: coarse) {
  .mint-sci-number__copy-btn {
    opacity: 1;
  }
}

.mint-sci-number__copy-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.mint-sci-number__copy-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring-offset);
}

.mint-sci-number__copy-btn--copied,
.mint-sci-number__copy-btn--copied:hover {
  color: var(--mint-success-hover);
}

.mint-sci-number__copied {
  align-self: center;
  margin-left: 0.25rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .mint-sci-number__copy-btn {
    transition: none;
  }
}
