/* Kel Smart Forms Pro */
.kelsf-cond-hidden { display: none !important; }

/* Signature */
.kelsfp-sig { position: relative; height: 150px; border: 1.5px dashed var(--kelsf-border, #cbd5e1); border-radius: var(--kelsf-radius, 8px); background: #fff; touch-action: none; }
.kelsfp-sig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.kelsfp-sig-hint { position: absolute; inset-inline-start: 12px; bottom: 8px; color: #94a3b8; font-size: .8em; pointer-events: none; }
.kelsfp-sig-hint::before { content: "✍ "; }
.kelsfp-sig.is-signed .kelsfp-sig-hint { display: none; }
.kelsfp-sig-clear { position: absolute; top: 4px; inset-inline-end: 4px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; line-height: 1; font-size: 18px; color: #64748b; padding: 0; z-index: 2; }
.kelsfp-sig-clear:hover { color: #dc2626; }
.kelsfp-sig-doc { height: 100%; width: 100%; border-radius: 2px; background: rgba(37, 99, 235, .05); }
.kelsf-slot .kelsfp-sig { height: 110px; }
.kelsf-box .kelsfp-sig-hint { font-size: 10px; bottom: 2px; }
.kelsf-box .kelsfp-sig-clear { width: 18px; height: 18px; font-size: 13px; }
.kelsf-has-error .kelsfp-sig { border-color: var(--kelsf-error, #dc2626); }
.kelsf-doc-value-signature img { max-height: 100%; max-width: 100%; }
.kelsf-slot .kelsf-doc-value-signature img { max-height: 90px; }

/* File upload */
.kelsfp-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kelsfp-drop { display: flex; align-items: center; justify-content: center; gap: .5em; padding: 1.2em; border: 2px dashed var(--kelsf-border, #cbd5e1); border-radius: var(--kelsf-radius, 8px); cursor: pointer; color: var(--kelsf-muted, #64748b); text-align: center; transition: all .15s; }
.kelsfp-drop:hover, .kelsfp-drop.is-over { border-color: var(--kelsf-accent, #2563eb); color: var(--kelsf-accent, #2563eb); background: color-mix(in srgb, var(--kelsf-accent, #2563eb) 6%, transparent); }
.kelsfp-drop-icon { font-size: 1.4em; }
.kelsfp-file input[type=file]:focus-visible + .kelsfp-file-info, .kelsfp-file:focus-within .kelsfp-drop { outline: 2px solid var(--kelsf-accent, #2563eb); outline-offset: 2px; }
.kelsfp-file-info { font-size: .8em; color: var(--kelsf-muted, #64748b); margin-top: .3em; }
.kelsfp-file-list { margin: .4em 0 0; padding: 0; list-style: none; font-size: .9em; }
.kelsfp-file-list li::before { content: "📎 "; }

/* Calculation */
.kelsfp-calc { display: inline-flex; align-items: baseline; gap: .4em; font-size: 1.4em; font-weight: 700; color: var(--kelsf-accent, #2563eb); background: color-mix(in srgb, var(--kelsf-accent, #2563eb) 8%, #fff); padding: .35em .8em; border-radius: var(--kelsf-radius, 8px); }

/* Repeater */
.kelsfp-rep-table { width: 100%; border-collapse: collapse; margin-bottom: .5em; }
.kelsfp-rep-table th { text-align: start; font-size: .85em; color: var(--kelsf-muted, #64748b); font-weight: 600; padding: 0 .3em .3em; }
.kelsfp-rep-table td { padding: .2em .3em; }
.kelsfp-rep-table .kelsf-input { min-height: 2.4em; padding: .4em .6em; }
.kelsfp-rep-act { width: 2em; }
.kelsfp-rep-del { border: 0; background: none; font-size: 1.3em; color: #94a3b8; cursor: pointer; }
.kelsfp-rep-del:hover { color: #dc2626; }
.kelsfp-rep-add { padding: .45em 1em !important; font-size: .9em; }

/* Steps */
.kelsfp-progress { margin-bottom: 1.2em; }
.kelsfp-progress-text { font-weight: 600; margin-bottom: .4em; font-size: .95em; }
.kelsfp-progress-bar { height: 8px; background: #e2e8f0; border-radius: 6px; overflow: hidden; }
.kelsfp-progress-bar span { display: block; height: 100%; background: var(--kelsf-accent, #2563eb); border-radius: 6px; transition: width .3s; }
.kelsfp-step[hidden] { display: none !important; }
.kelsfp-nav { display: flex; gap: .7em; flex-wrap: wrap; align-items: center; margin-top: .5em; }
.kelsfp-nav .kelsf-submit-row { margin: 0; }
.kelsfp-next { margin-inline-start: auto; }

/* Print */
.kelsfp-print-copy { margin-top: .8em; display: inline-block; }
.kelsfp-printout { max-width: none; margin: 0; }
.kelsfp-print-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; margin-bottom: 10px; }
.kelsfp-print-head h1 { font-size: 20px; margin: 0; }
.kelsfp-print-date { color: #64748b; font-size: 11px; }
.kelsfp-print-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.kelsfp-print-table th, .kelsfp-print-table td { border: 1px solid #d1d5db; padding: 6px 8px; text-align: start; vertical-align: top; }
.kelsfp-print-table th { width: 32%; background: #f8fafc; }
.kelsfp-print-table .kelsfp-print-heading { background: #e2e8f0; font-size: 14px; }
.kelsfp-print-body .kelsf-doc-sheet { box-shadow: none; border: 0; padding: 0; }
.kelsfp-print-body .kelsf-page { box-shadow: none; border: 0; break-after: page; page-break-after: always; }
.kelsfp-print-body .kelsf-page:last-child { break-after: auto; page-break-after: auto; }
.kelsfp-print-body .kelsf-doc-pages { gap: 0; }

/* Builder bits */
.kelsfp-logic select { max-width: 100%; }
.kelsfp-sentence { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.kelsfp-rules { list-style: none; margin: 8px 0; padding: 0; }
.kelsfp-rules li { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 8px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 6px; position: relative; }
.kelsfp-rules li .kelsfp-rule-value { grid-column: 1 / -1; }
.kelsfp-rule-del { position: absolute; top: -8px; inset-inline-end: -8px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; cursor: pointer; color: #dc2626; padding: 0; line-height: 1; }
.kelsf-card .kelsfp-rules li { grid-template-columns: 2fr 1fr 2fr; }
.kelsf-card .kelsfp-rules li .kelsfp-rule-value { grid-column: auto; }
.kelsfp-refs { margin-top: 4px; font-size: 12px; line-height: 1.8; }
.kelsfp-pv-sig, .kelsfp-pv-file { border: 1.5px dashed #cbd5e1; border-radius: 6px; padding: 18px; text-align: center; color: #94a3b8; }
.kelsfp-pv-calc { font-weight: 700; color: #2563eb; }
.kelsfp-pv-calc code { font-weight: 400; font-size: 11px; color: #64748b; }
.kelsfp-pv-rep { width: 100%; border-collapse: collapse; }
.kelsfp-pv-rep th, .kelsfp-pv-rep td { border: 1px solid #e2e8f0; padding: 6px; font-size: 12px; height: 26px; }
.kelsfp-pv-break { border-top: 2px dashed #94a3b8; text-align: center; margin: 8px 0; }
.kelsfp-pv-break span { background: #fff; position: relative; top: -10px; padding: 0 10px; color: #475569; font-weight: 600; }
