/* ── Barcode Generator — tool-specific styles ────────────────────────────────
   Global styles are inherited from /css/style.css.
   Colours reference CSS custom properties only — no hardcoded values.
   ─────────────────────────────────────────────────────────────────────────── */

.bg-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card, 8px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.bg-card__heading {
  font-size: 1.05rem;
  margin: 0;
}

.bg-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.bg-field-full { grid-column: 1 / -1; }

.bg-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.bg-help {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.bg-input,
.bg-select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-control, 8px);
  background: var(--bg-input, var(--bg-card));
  color: var(--text-primary);
  font-size: 1rem;
}

.bg-input:focus-visible,
.bg-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.bg-value-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.bg-value-row .bg-input { flex: 1; }

.bg-example-btn {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-control, 8px);
  background: var(--bg-secondary, var(--bg-card));
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.bg-example-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bg-setting-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .bg-setting-grid { grid-template-columns: 1fr; }
}

.bg-color-input {
  width: 100%;
  height: 40px;
  padding: 4px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-control, 8px);
  background: var(--bg-input, var(--bg-card));
  cursor: pointer;
}

.bg-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bg-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.bg-preview-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 200px;
  padding: 1.5rem;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-card, 8px);
  background: #ffffff;
}

.bg-preview-shell.is-placeholder {
  background: var(--bg-card);
}

.bg-svg {
  max-width: 100%;
  height: auto;
}

.bg-placeholder {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: center;
}

.bg-status {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}

.bg-error {
  margin: 0;
  color: var(--color-danger, #ef4444);
  font-size: 0.875rem;
}

.bg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.bg-uses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.bg-uses-grid article h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.bg-uses-grid article p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
