/* ============================================================
   Barcode generator (barcode) - two-column layout
   ============================================================ */

.bc-tool {
  max-width: 1280px;
}

.bc-panels {
  align-items: flex-start;
}

.bc-input-panel,
.bc-result-panel {
  height: auto;
  min-width: 0;
}

.bc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.bc-result-status {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary, #6c757d);
  max-width: 60%;
  text-align: right;
}

.bc-settings-body,
.bc-result-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  overflow: visible;
}

.bc-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.bc-field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #212529);
}

.bc-field small,
.bc-format-hint {
  font-size: 12px;
  color: var(--text-secondary, #6c757d);
  line-height: 1.45;
}

.bc-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bc-color {
  height: 38px;
  padding: 3px 4px;
  cursor: pointer;
}

.bc-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary, #212529);
  line-height: 1.45;
  cursor: pointer;
}

.bc-check input {
  margin-top: 2px;
  accent-color: var(--brand, #0a58ca);
}

.bc-action-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.bc-action-row .btn {
  min-width: 120px;
}

.bc-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fdecea;
  color: #b3261e;
  font-size: 13px;
  line-height: 1.5;
}

.bc-message.hidden {
  display: none;
}

/* ---- preview ---- */

.bc-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 20px;
  border: 1px dashed var(--border-color, #d3d8de);
  border-radius: 10px;
  background:
    repeating-conic-gradient(var(--surface-muted, #f4f5f7) 0% 25%, #ffffff 0% 50%) 0 0 / 18px 18px;
  overflow-x: auto;
}

.bc-preview img {
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.bc-placeholder {
  font-size: 13px;
  color: var(--text-secondary, #6c757d);
  line-height: 1.5;
  text-align: center;
}

.bc-preview img.hidden,
.bc-placeholder.hidden {
  display: none;
}

.bc-meta {
  font-size: 12px;
  color: var(--text-secondary, #6c757d);
  text-align: center;
  font-variant-numeric: tabular-nums;
  min-height: 18px;
}

.bc-result-body .result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color, #e3e6ea);
  padding-top: 12px;
  margin-top: 4px;
}

.bc-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary, #6c757d);
}

.bc-note i {
  margin-top: 2px;
}

/* ---- mobile ---- */

@media (max-width: 767px) {
  .bc-field-grid {
    grid-template-columns: 1fr;
  }

  .bc-result-status {
    max-width: 100%;
    text-align: left;
  }

  .bc-result-body .result-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
