/*
 * barcode-generator.css
 * Premium Barcode Generator - Light theme, dark-blue accent
 * Scoped under .bcg-wrap to avoid any global conflicts
 * ──────────────────────────────────────────────────────────────────
 */

/* ── Variables ──────────────────────────────────────────────────── */
.bcg-wrap {
    /* Brand */
    --bcg-blue:        #1e40af;
    --bcg-blue-dark:   #1e3a8a;
    --bcg-blue-mid:    #3b82f6;
    --bcg-blue-light:  #dbeafe;
    --bcg-blue-xlight: #eff6ff;

    /* Neutrals */
    --bcg-text:        #0f172a;
    --bcg-text-2:      #334155;
    --bcg-text-3:      #64748b;
    --bcg-border:      #e2e8f0;
    --bcg-border-focus:#3b82f6;
    --bcg-bg:          #ffffff;
    --bcg-bg-card:     #f8fafc;
    --bcg-bg-input:    #ffffff;

    /* Status */
    --bcg-green:       #16a34a;
    --bcg-green-light: #dcfce7;
    --bcg-red:         #dc2626;
    --bcg-red-light:   #fee2e2;
    --bcg-yellow:      #d97706;
    --bcg-yellow-light:#fef3c7;

    /* Shadows */
    --bcg-shadow-sm:   0 1px 3px rgba(0,0,0,.07);
    --bcg-shadow-md:   0 4px 16px rgba(0,0,0,.09);
    --bcg-shadow-lg:   0 8px 32px rgba(0,0,0,.12);

    /* Shape */
    --bcg-radius:      14px;
    --bcg-radius-sm:   8px;
    --bcg-radius-lg:   20px;

    /* Motion */
    --bcg-transition:  .17s ease;
    --bcg-font-mono:   'DM Mono', 'Roboto Mono', 'Courier New', monospace;
}

/* ── Reset / Base ───────────────────────────────────────────────── */
.bcg-wrap *,
.bcg-wrap *::before,
.bcg-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.bcg-wrap {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    color: var(--bcg-text);
    background: transparent;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 140px;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.bcg-hero {
    text-align: center;
    padding: 40px 20px 32px;
}

.bcg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bcg-blue-light);
    color: var(--bcg-blue);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .4px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.bcg-hero-badge svg { width: 14px; height: 14px; flex-shrink: 0; }

.bcg-hero h1 {
    font-size: clamp(24px, 5vw, 38px);
    font-weight: 800;
    color: var(--bcg-text);
    margin: 0 0 12px;
    line-height: 1.15;
    letter-spacing: -.5px;
}

.bcg-hero h1 span {
    color: var(--bcg-blue);
}

.bcg-hero p {
    font-size: 15.5px;
    color: var(--bcg-text-3);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Two-column Layout ──────────────────────────────────────────── */
.bcg-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    padding: 0 16px;
}

@media (max-width: 900px) {
    .bcg-layout {
        grid-template-columns: 1fr;
    }
}

/* ── Card ───────────────────────────────────────────────────────── */
.bcg-card {
    background: var(--bcg-bg);
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--bcg-shadow-sm);
    transition: box-shadow var(--bcg-transition);
}

.bcg-card:hover {
    box-shadow: var(--bcg-shadow-md);
}

.bcg-card-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--bcg-border);
}

.bcg-card-icon {
    width: 18px;
    height: 18px;
    color: var(--bcg-blue);
    flex-shrink: 0;
}

.bcg-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--bcg-text-2);
    letter-spacing: .2px;
    text-transform: uppercase;
}

/* ── Format Grid ────────────────────────────────────────────────── */
.bcg-format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.bcg-fmt-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    background: var(--bcg-bg-card);
    cursor: pointer;
    transition: all var(--bcg-transition);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--bcg-text-2);
    line-height: 1.2;
    text-align: center;
    font-family: var(--bcg-font-mono);
}

.bcg-fmt-btn .bcg-fmt-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--bcg-text);
}

.bcg-fmt-btn .bcg-fmt-sub {
    font-size: 10px;
    color: var(--bcg-text-3);
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}

.bcg-fmt-btn:hover {
    border-color: var(--bcg-blue-mid);
    background: var(--bcg-blue-xlight);
    color: var(--bcg-blue);
}

.bcg-fmt-btn:hover .bcg-fmt-name { color: var(--bcg-blue); }

.bcg-fmt-btn.is-active {
    border-color: var(--bcg-blue);
    background: var(--bcg-blue-light);
    color: var(--bcg-blue);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.bcg-fmt-btn.is-active .bcg-fmt-name { color: var(--bcg-blue-dark); }

/* ── Input ──────────────────────────────────────────────────────── */
.bcg-field {
    margin-bottom: 14px;
}

.bcg-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bcg-text-2);
    margin-bottom: 6px;
    letter-spacing: .2px;
}

.bcg-label-hint {
    font-size: 11px;
    font-weight: 500;
    color: var(--bcg-text-3);
    font-family: var(--bcg-font-mono);
}

.bcg-input,
.bcg-select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    background: var(--bcg-bg-input);
    font-size: 14px;
    color: var(--bcg-text);
    font-family: inherit;
    transition: border-color var(--bcg-transition), box-shadow var(--bcg-transition);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.bcg-input:focus,
.bcg-select:focus {
    border-color: var(--bcg-border-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,.14);
}

.bcg-input.is-error {
    border-color: var(--bcg-red);
    box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}

.bcg-input.is-valid {
    border-color: var(--bcg-green);
    box-shadow: 0 0 0 3px rgba(22,163,74,.10);
}

.bcg-input-large {
    font-size: 15px;
    padding: 12px 14px;
    font-weight: 600;
    font-family: var(--bcg-font-mono);
    letter-spacing: .5px;
}

.bcg-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* validation message */
.bcg-validation-msg {
    font-size: 11.5px;
    margin-top: 5px;
    min-height: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bcg-validation-msg.is-error  { color: var(--bcg-red); }
.bcg-validation-msg.is-valid  { color: var(--bcg-green); }
.bcg-validation-msg.is-warn   { color: var(--bcg-yellow); }

/* ── Slider Row ─────────────────────────────────────────────────── */
.bcg-slider-row {
    display: grid;
    grid-template-columns: 1fr 48px;
    gap: 10px;
    align-items: center;
}

.bcg-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 99px;
    background: var(--bcg-border);
    outline: none;
    cursor: pointer;
    transition: background var(--bcg-transition);
}

.bcg-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bcg-blue);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(30,64,175,.30);
    transition: transform var(--bcg-transition), box-shadow var(--bcg-transition);
}

.bcg-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(30,64,175,.40);
}

.bcg-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--bcg-blue);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(30,64,175,.30);
}

.bcg-slider-val {
    text-align: right;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bcg-blue);
    font-family: var(--bcg-font-mono);
    background: var(--bcg-blue-light);
    padding: 3px 7px;
    border-radius: 6px;
}

/* ── Toggle Row ─────────────────────────────────────────────────── */
.bcg-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--bcg-border);
    gap: 12px;
}

.bcg-toggle-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bcg-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bcg-text-2);
}

.bcg-toggle-desc {
    font-size: 11.5px;
    color: var(--bcg-text-3);
    margin-top: 2px;
}

/* iOS-style toggle */
.bcg-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.bcg-toggle input { opacity: 0; width: 0; height: 0; }

.bcg-toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bcg-border);
    border-radius: 99px;
    cursor: pointer;
    transition: background var(--bcg-transition);
}

.bcg-toggle-track::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.15);
}

.bcg-toggle input:checked + .bcg-toggle-track {
    background: var(--bcg-blue);
}

.bcg-toggle input:checked + .bcg-toggle-track::before {
    transform: translateX(18px);
}

/* ── Colour Row ─────────────────────────────────────────────────── */
.bcg-color-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bcg-color-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bcg-color-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bcg-text-2);
}

.bcg-color-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    padding: 6px 10px;
    background: var(--bcg-bg-input);
    cursor: pointer;
    transition: border-color var(--bcg-transition);
}

.bcg-color-wrap:hover { border-color: var(--bcg-border-focus); }

.bcg-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 5px;
    border: 1.5px solid rgba(0,0,0,.12);
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.bcg-color-swatch input[type="color"] {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

.bcg-color-hex {
    font-size: 12.5px;
    font-weight: 600;
    font-family: var(--bcg-font-mono);
    color: var(--bcg-text);
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    text-transform: uppercase;
    cursor: pointer;
}

/* ── Presets ────────────────────────────────────────────────────── */
.bcg-presets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.bcg-preset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    background: var(--bcg-bg-card);
    cursor: pointer;
    transition: all var(--bcg-transition);
    text-align: left;
}

.bcg-preset-btn:hover {
    border-color: var(--bcg-blue-mid);
    background: var(--bcg-blue-xlight);
}

.bcg-preset-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--bcg-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bcg-preset-icon svg {
    width: 14px;
    height: 14px;
    color: var(--bcg-blue);
}

.bcg-preset-text .bcg-preset-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bcg-text);
    display: block;
}

.bcg-preset-text .bcg-preset-desc {
    font-size: 10.5px;
    color: var(--bcg-text-3);
    font-weight: 500;
}

/* ── Preview Panel ──────────────────────────────────────────────── */
.bcg-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bcg-preview-card {
    background: var(--bcg-bg);
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius);
    overflow: hidden;
    box-shadow: var(--bcg-shadow-sm);
}

.bcg-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1.5px solid var(--bcg-border);
    background: var(--bcg-bg-card);
}

.bcg-preview-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--bcg-text-2);
    letter-spacing: .2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
}

.bcg-preview-title svg {
    width: 15px;
    height: 15px;
    color: var(--bcg-blue);
}

.bcg-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bcg-green-light);
    color: var(--bcg-green);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.bcg-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--bcg-green);
    animation: bcgBlink 1.4s ease-in-out infinite;
}

@keyframes bcgBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}

.bcg-preview-body {
    padding: 28px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #fff;
    position: relative;
}

.bcg-preview-canvas {
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bcg-preview-canvas svg {
    max-width: 100%;
    height: auto;
}

#bcg-barcode-svg {
    max-width: 100%;
    height: auto;
    display: block;
}

.bcg-preview-empty {
    text-align: center;
    color: var(--bcg-text-3);
}

.bcg-preview-empty svg {
    width: 48px;
    height: 48px;
    opacity: .25;
    margin-bottom: 10px;
    display: block;
    margin: 0 auto 10px;
}

.bcg-preview-empty p {
    font-size: 13.5px;
    font-weight: 500;
}

.bcg-preview-footer {
    padding: 14px 18px;
    border-top: 1.5px solid var(--bcg-border);
    background: var(--bcg-bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.bcg-meta-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bcg-meta-chip {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--bcg-text-3);
    font-family: var(--bcg-font-mono);
    background: var(--bcg-bg);
    border: 1px solid var(--bcg-border);
    padding: 3px 9px;
    border-radius: 6px;
}

.bcg-meta-chip span {
    color: var(--bcg-blue);
}

/* ── Action Buttons ─────────────────────────────────────────────── */
.bcg-actions-card {
    background: var(--bcg-bg);
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius);
    padding: 16px;
    box-shadow: var(--bcg-shadow-sm);
}

.bcg-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.bcg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    border-radius: var(--bcg-radius-sm);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--bcg-transition);
    letter-spacing: .1px;
    white-space: nowrap;
    font-family: inherit;
}

.bcg-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.bcg-btn-primary {
    background: var(--bcg-blue);
    color: #fff;
    box-shadow: 0 2px 8px rgba(30,64,175,.22);
    grid-column: 1 / -1;
}

.bcg-btn-primary:hover {
    background: var(--bcg-blue-dark);
    box-shadow: 0 4px 14px rgba(30,64,175,.30);
    transform: translateY(-1px);
}

.bcg-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(30,64,175,.20);
}

.bcg-btn-outline {
    background: var(--bcg-bg);
    color: var(--bcg-text-2);
    border: 1.5px solid var(--bcg-border);
}

.bcg-btn-outline:hover {
    border-color: var(--bcg-blue-mid);
    background: var(--bcg-blue-xlight);
    color: var(--bcg-blue);
}

.bcg-btn-ghost {
    background: var(--bcg-bg-card);
    color: var(--bcg-text-2);
    border: 1.5px solid var(--bcg-border);
}

.bcg-btn-ghost:hover {
    background: var(--bcg-blue-light);
    color: var(--bcg-blue);
    border-color: var(--bcg-blue-mid);
}

.bcg-btn-success {
    background: var(--bcg-green-light);
    color: var(--bcg-green);
    border: 1.5px solid #bbf7d0;
}

.bcg-btn-success:hover {
    background: #bbf7d0;
}

.bcg-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Batch Section ──────────────────────────────────────────────── */
.bcg-batch-area {
    margin-top: 4px;
    display: none;
}

.bcg-batch-area.is-open {
    display: block;
}

.bcg-batch-input {
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    background: var(--bcg-bg-input);
    font-size: 13px;
    color: var(--bcg-text);
    font-family: var(--bcg-font-mono);
    resize: vertical;
    outline: none;
    transition: border-color var(--bcg-transition);
    line-height: 1.7;
}

.bcg-batch-input:focus {
    border-color: var(--bcg-border-focus);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}

.bcg-batch-hint {
    font-size: 11px;
    color: var(--bcg-text-3);
    margin-top: 5px;
    font-weight: 500;
}

/* Batch results */
.bcg-batch-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 8px;
}

.bcg-batch-item {
    background: var(--bcg-bg);
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius-sm);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.bcg-batch-item-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bcg-text-3);
    font-family: var(--bcg-font-mono);
    align-self: flex-start;
}

.bcg-batch-item svg {
    max-width: 100%;
    height: auto;
}

.bcg-batch-item-actions {
    display: flex;
    gap: 8px;
    align-self: flex-end;
}

.bcg-batch-item-btn {
    font-size: 11.5px;
    padding: 6px 12px;
    gap: 5px;
}

.bcg-batch-item-btn svg {
    width: 13px;
    height: 13px;
}

/* ── Toast ──────────────────────────────────────────────────────── */
.bcg-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1e293b;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    z-index: 9999;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.bcg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bcg-toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.bcg-toast.success { background: #14532d; }
.bcg-toast.error   { background: #7f1d1d; }

/* ── Mobile Fixed Bar ───────────────────────────────────────────── */
.bcg-mobile-bar {
    display: none;
}

@media (max-width: 640px) {
    .bcg-mobile-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bcg-bg);
        border-top: 1.5px solid var(--bcg-border);
        padding: 10px 14px;
        gap: 10px;
        z-index: 900;
        box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    }

    .bcg-mobile-bar .bcg-btn {
        flex: 1;
        padding: 12px 8px;
        font-size: 12.5px;
    }
}

/* ── SEO Content ────────────────────────────────────────────────── */
.bcg-seo {
    padding: 40px 16px 0;
    max-width: 820px;
    margin: 0 auto;
}

.bcg-seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.bcg-seo-card {
    background: var(--bcg-bg);
    border: 1.5px solid var(--bcg-border);
    border-radius: var(--bcg-radius);
    padding: 18px;
    box-shadow: var(--bcg-shadow-sm);
}

.bcg-seo-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bcg-blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.bcg-seo-icon svg {
    width: 18px;
    height: 18px;
    color: var(--bcg-blue);
}

.bcg-seo-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--bcg-text);
    margin-bottom: 6px;
}

.bcg-seo-card p {
    font-size: 13px;
    color: var(--bcg-text-3);
    line-height: 1.6;
}

.bcg-seo h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--bcg-text);
    margin-bottom: 14px;
    letter-spacing: -.2px;
}

.bcg-seo > p {
    font-size: 14px;
    color: var(--bcg-text-3);
    line-height: 1.7;
    margin-bottom: 28px;
}

/* Types table */
.bcg-types-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 32px;
    font-size: 13.5px;
    border-radius: var(--bcg-radius);
    overflow: hidden;
    box-shadow: var(--bcg-shadow-sm);
}

.bcg-types-table th {
    background: var(--bcg-blue-light);
    color: var(--bcg-blue-dark);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.bcg-types-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--bcg-border);
    color: var(--bcg-text-2);
    background: var(--bcg-bg);
}

.bcg-types-table tr:last-child td {
    border-bottom: none;
}

.bcg-types-table tr:hover td {
    background: var(--bcg-bg-card);
}

.bcg-type-code {
    font-family: var(--bcg-font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--bcg-blue);
    background: var(--bcg-blue-light);
    padding: 2px 7px;
    border-radius: 4px;
}

/* FAQ */
.bcg-faq {
    margin-bottom: 40px;
}

.bcg-faq-item {
    border-bottom: 1.5px solid var(--bcg-border);
}

.bcg-faq-item:last-child {
    border-bottom: none;
}

.bcg-faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--bcg-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: inherit;
    transition: color var(--bcg-transition);
}

.bcg-faq-q:hover {
    color: var(--bcg-blue);
}

.bcg-faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--bcg-text-3);
    transition: transform .2s ease;
}

.bcg-faq-item.is-open .bcg-faq-chevron {
    transform: rotate(180deg);
    color: var(--bcg-blue);
}

.bcg-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease, padding .2s ease;
}

.bcg-faq-item.is-open .bcg-faq-a {
    max-height: 300px;
}

.bcg-faq-a-inner {
    padding-bottom: 16px;
    font-size: 14px;
    color: var(--bcg-text-3);
    line-height: 1.7;
}

/* ── Spinner (generate animation) ───────────────────────────────── */
.bcg-spin {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bcgSpin .6s linear infinite;
    flex-shrink: 0;
}

@keyframes bcgSpin {
    to { transform: rotate(360deg); }
}

/* ── Error overlay ──────────────────────────────────────────────── */
.bcg-error-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--bcg-red);
    text-align: center;
}

.bcg-error-overlay svg {
    width: 36px;
    height: 36px;
    opacity: .7;
}

.bcg-error-overlay p {
    font-size: 13px;
    font-weight: 600;
    max-width: 280px;
}

/* ── Responsive tweaks ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .bcg-hero { padding: 28px 16px 22px; }
    .bcg-hero p { font-size: 14px; }

    .bcg-layout { padding: 0 12px; gap: 12px; }

    .bcg-card { padding: 16px; margin-bottom: 12px; }

    .bcg-format-grid { grid-template-columns: repeat(3, 1fr); }

    .bcg-actions-grid { grid-template-columns: 1fr; }

    .bcg-btn-primary { grid-column: unset; }

    .bcg-color-row { grid-template-columns: 1fr; }

    .bcg-presets-grid { grid-template-columns: 1fr 1fr; }

    .bcg-batch-results .bcg-batch-item { padding: 12px; }

    .bcg-seo { padding: 28px 12px 0; }
    .bcg-seo-grid { grid-template-columns: 1fr; }

    .bcg-types-table { font-size: 12px; }
    .bcg-types-table th,
    .bcg-types-table td { padding: 8px 10px; }
}

@media (max-width: 380px) {
    .bcg-format-grid { grid-template-columns: repeat(2, 1fr); }
}
