.bv-device-copy {
  display: grid;
  gap: 8px;
  margin: 0 14px 14px;
  padding: 10px;
  border: 1px solid var(--bv-border-main, rgba(15, 23, 42, 0.18));
  border-radius: 6px;
  background: color-mix(
    in srgb,
    var(--bv-bg-card, #fff) 94%,
    var(--bv-accent-primary, #2563eb)
  );
  box-shadow:
    0 2px 0 rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.bv-device-copy__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.bv-device-copy__state {
  color: var(--bv-text-main, #172033);
  font-family: "Courier Prime", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1.2;
}

.bv-device-copy__state.is-ready {
  color: #247044;
}

.bv-device-copy__state.is-stale,
.bv-device-copy__state.is-error,
.bv-device-copy__state.is-missing {
  color: #a43b3b;
}

.bv-device-copy__size {
  min-width: 0;
  overflow: hidden;
  color: var(--bv-text-subtle, #64748b);
  font-size: 10px;
  line-height: 1.25;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bv-device-copy__track {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 2px;
  background: rgba(37, 99, 235, 0.08);
  box-sizing: border-box;
}

.bv-device-copy__track > span {
  display: block;
  min-width: 4px;
  height: 100%;
  background: var(--bv-accent-primary, #2563eb);
  transition: width 160ms linear;
}

.bv-device-copy__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--bv-border-main, rgba(15, 23, 42, 0.32));
  border-radius: 3px;
  background: var(--bv-bg-card, #fff);
  box-shadow:
    0 2px 0 rgba(15, 23, 42, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--bv-text-main, #172033);
  cursor: pointer;
  font: 700 11px/1 "Courier Prime", ui-monospace, monospace;
  text-align: center;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease,
    transform 80ms ease;
}

.bv-device-copy__button:hover {
  border-color: var(--bv-accent-primary, #2563eb);
  background: color-mix(
    in srgb,
    var(--bv-bg-card, #fff) 88%,
    var(--bv-accent-primary, #2563eb)
  );
  color: var(--bv-accent-primary, #174ea6);
}

.bv-device-copy__button:active {
  transform: translateY(2px);
  box-shadow: none;
}

.bv-device-copy__button:focus-visible {
  outline: 2px solid var(--bv-accent-primary, #2563eb);
  outline-offset: 2px;
}

.bv-device-copy__button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.bv-device-copy[data-state="ready"] {
  border-color: rgba(36, 112, 68, 0.34);
  background: rgba(36, 112, 68, 0.055);
}

.bv-device-copy[data-state="stale"],
.bv-device-copy[data-state="failed"],
.bv-device-copy[data-state="missing"] {
  border-color: rgba(164, 59, 59, 0.34);
  background: rgba(164, 59, 59, 0.05);
}

@media (max-width: 560px) {
  .bv-device-copy__summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .bv-device-copy__size {
    max-width: 100%;
    text-align: left;
  }
}
