/* Kopnota marketing site · invoice builder demo */
/* ---------- Builder demo ---------- */
.bd-body { padding: 16px; }
.bd-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.bd-label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.chip { border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); padding: 7px 13px; border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: grab; touch-action: none; user-select: none; transition: transform .15s, background .15s; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip { color: #A9B8FF; } }
:root[data-theme="dark"] .chip { color: #A9B8FF; }
.chip:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--blue) 16%, transparent); }
.chip:active { cursor: grabbing; }
.chip.ghost { position: fixed; z-index: 90; pointer-events: none; box-shadow: var(--shadow-lg); transform: rotate(-3deg) scale(1.05); background: var(--surface); }
.bd-lines { list-style: none; margin: 0; padding: 6px 0; min-height: 210px; counter-reset: ln; }
.bd-lines li { position: relative; display: grid; grid-template-columns: 22px 1fr 52px 110px 26px; gap: 8px; align-items: center; padding: 9px 6px; border-radius: 10px; border-bottom: 1px solid var(--line); animation: line-in .45s cubic-bezier(.2, .8, .2, 1) both; font-size: .9rem; }
.bd-lines li.out { animation: line-out .3s ease forwards; }
@keyframes line-out { to { opacity: 0; transform: translateX(20px); height: 0; padding-block: 0; } }
.bd-lines li::before { counter-increment: ln; content: counter(ln); font: 500 .72rem var(--font-mono); color: var(--muted); text-align: center; }
.bd-lines .ttl { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-lines .qty { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.bd-lines .qty button { width: 20px; height: 20px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 6px; cursor: pointer; line-height: 1; font-size: .8rem; padding: 0; }
.bd-lines .qty span { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.bd-lines .amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.bd-lines .del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; line-height: 1; border-radius: 6px; padding: 2px; }
.bd-lines .del:hover { color: var(--red); }
.bd-lines .drop-line { height: 3px; border-radius: 3px; background: var(--blue); padding: 0; border: 0; animation: none; display: block; }
.bd-lines .drop-line::before { content: none; }
.bd-lines.over { background: color-mix(in srgb, var(--blue) 5%, transparent); border-radius: 12px; }
.bd-empty { color: var(--muted); font-size: .88rem; text-align: center; padding: 40px 0; border: 1.5px dashed var(--line-strong); border-radius: 12px; }
.bd-empty::before { content: none !important; }
.bd-foot { display: grid; grid-template-columns: auto 1fr 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: end; }
.bd-field { display: grid; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.bd-field output { color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 4px; }
.bd-field select { font: 600 .9rem var(--font-body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 7px 10px; }
input[type="range"] { accent-color: var(--blue); width: 100%; }
.bd-totals { display: grid; gap: 4px; margin-left: auto; width: min(300px, 100%); font-variant-numeric: tabular-nums; font-size: .9rem; }
.bd-totals div { display: flex; justify-content: space-between; color: var(--muted); }
.bd-totals b { color: var(--ink); font-weight: 600; transition: color .3s; }
.bd-totals b.flash { color: var(--mint-deep); }
.bd-grand { border-top: 2px solid var(--blue); margin-top: 4px; padding-top: 8px; }
.bd-grand span { color: var(--ink); font-weight: 700; }
.bd-grand b { font: 800 1.25rem var(--font-display); color: var(--blue); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bd-grand b { color: var(--blue-soft); } }
:root[data-theme="dark"] .bd-grand b { color: var(--blue-soft); }
.bd-field input[type="text"] { font: 600 .95rem var(--font-body); color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.bd-field input[type="text"]:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 1px; }
