/* Barcode Generator - tool-specific styles. Accent #b45309 (amber-700). */

:root {
    --bc-accent: #b45309;
    --bc-accent-dark: #92400e;
    --bc-accent-tint: #fffbeb;
    --bc-border: #e2e8f0;
}

.page-hero h1 .bc-hero-mark {
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin-right: 0.4rem;
    color: var(--bc-accent);
}

.bc-app { display: block; }

/* ---- Type tabs ---- */
.bc-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.bc-type {
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 7px 14px;
    border: 1px solid var(--bc-border);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.bc-type:hover { border-color: var(--bc-accent); color: var(--bc-accent-dark); }
.bc-type.is-active { background: var(--bc-accent); border-color: var(--bc-accent); color: #fff; }

/* ---- Data field ---- */
.bc-data-field { display: flex; flex-direction: column; }
.bc-field-label { font-weight: 600; font-size: 0.88rem; color: #334155; margin-bottom: 5px; }
/* flex: 0 0 auto neutralises the shared .text-input { flex: 1 1 320px }
 * 320px flex-basis (which would become a 320px HEIGHT in this column-flex
 * field and make the single-line input look like a big textarea). */
.bc-input { width: 100%; box-sizing: border-box; flex: 0 0 auto; font-size: 1rem; }
.bc-hint { margin: 6px 0 0; font-size: 0.82rem; color: #94a3b8; min-height: 1.1em; }
.bc-hint--error { color: #b91c1c; }
.bc-hint--ok { color: var(--bc-accent-dark); }

/* ---- Customize ---- */
.bc-customize {
    margin-top: 18px;
    border-top: 1px solid var(--bc-border);
    padding-top: 8px;
}
.bc-customize-summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--bc-accent-dark);
    padding: 8px 0;
    list-style: none;
}
.bc-customize-summary::-webkit-details-marker { display: none; }
.bc-customize-summary::before { content: '\25B8'; margin-right: 8px; font-size: 0.8em; transition: transform 0.15s; display: inline-block; }
.bc-customize[open] .bc-customize-summary::before { transform: rotate(90deg); }
.bc-customize-body { padding: 6px 0 4px; }

.bc-opt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.bc-opt { display: flex; flex-direction: column; gap: 6px; }
.bc-opt-label { font-weight: 600; font-size: 0.84rem; color: #334155; }
.bc-color {
    width: 100%;
    height: 40px;
    padding: 3px;
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
.bc-num {
    width: 100%;
    box-sizing: border-box;
    font: inherit;
    font-size: 0.9rem;
    padding: 9px 12px;
    border: 1px solid #d7dbe0;
    border-radius: 8px;
    background-color: #fff;
    color: #1f2937;
}
.bc-num:focus { outline: 2px solid var(--bc-accent); border-color: var(--bc-accent); }
.bc-opt--check { justify-content: flex-end; }
.bc-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: #334155; cursor: pointer; padding: 8px 0; }
.bc-check input { width: 16px; height: 16px; accent-color: var(--bc-accent); }

/* ---- Preview ---- */
.bc-preview-card {
    margin-top: 20px;
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 14px;
    padding: 22px 18px 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.bc-preview-wrap {
    position: relative;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    padding: 6px 0;
}
.bc-canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}
/* display:block above beats the UA [hidden] rule; without this override a
   hidden canvas keeps showing the STALE previous barcode above an error. */
.bc-canvas[hidden] { display: none; }
.bc-preview-wrap.is-placeholder .bc-canvas { opacity: 0.3; }
.bc-placeholder-note {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    padding: 8px 14px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--bc-border);
    border-radius: 8px;
}
.bc-meta {
    margin: 12px 0 0;
    font-size: 0.82rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}
.bc-downloads {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.bc-downloads .primary-btn,
.bc-downloads .ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bc-downloads button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .bc-opt-grid { grid-template-columns: 1fr 1fr; }
    .bc-types { gap: 6px; }
    .bc-type { padding: 6px 11px; font-size: 0.84rem; }
    .bc-downloads .primary-btn, .bc-downloads .ghost-btn { width: 100%; }
}
