/* Copyshop Briefbogen – Designer. Schrift und Grundfarben kommen vom Theme. */
.csfak {
	--csfak-accent: #0072B0;
	--csfak-ink: #012547;
	--csfak-muted: #4E5C70;
	--csfak-line: #DCE2EA;
	--csfak-blue: #008AD0;
	--csfak-magenta: #DB0170;
	--csfak-radius: 6px;
	color: var(--csfak-ink);
	font-size: 16px;
	line-height: 1.45;
}
.csfak *, .csfak *::before, .csfak *::after { box-sizing: border-box; }
.csfak-loading { padding: 32px; color: var(--csfak-muted); }
.csfak-brand { display: flex; height: 5px; margin: 0 0 20px; border-radius: 3px; overflow: hidden; }
.csfak-brand span { flex: 1; }
.csfak-intro { max-width: 760px; margin: 0 0 20px; color: var(--csfak-muted); font-size: 17px; }

.csfak-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.csfak-col { flex: 999 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.csfak-side { flex: 1 1 520px; position: sticky; top: 16px; }
@media (max-width: 1080px) { .csfak-side { position: static; } }

.csfak-card { background: #FFFFFF; border: 1px solid var(--csfak-line); border-radius: var(--csfak-radius); padding: 22px; }
.csfak-card h3 { margin: 0 0 14px; font-size: 19px; font-weight: 600; line-height: 1.25; color: inherit; }
.csfak-step { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--csfak-accent); font-size: 14px; margin-right: 8px; }
.csfak-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; }
.csfak-between { justify-content: space-between; margin-top: 0; }
.csfak-between h3 { margin: 0; }
.csfak-lbl { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
.csfak-row .csfak-lbl { margin: 0; min-width: 90px; }
.csfak-muted { color: var(--csfak-muted); font-size: 14px; margin: 0 0 12px; }
.csfak-hint { color: var(--csfak-muted); font-size: 13px; margin: 10px 0 0; }
.csfak-small { font-size: 13px; }
.csfak-mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.csfak button { font: inherit; color: inherit; cursor: pointer; }
.csfak button:focus-visible, .csfak input:focus-visible, .csfak select:focus-visible, .csfak textarea:focus-visible, .csfak-drag:focus-visible { outline: 2px solid var(--csfak-accent); outline-offset: 2px; }

/* Papier & Auflage */
.csfak-papers { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.csfak-paper { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 2px solid #E1E6EC; border-radius: var(--csfak-radius); background: #FFFFFF; text-align: left; }
.csfak-paper.is-on, .csfak-qty.is-on, .csfak-pair.is-on { border-color: var(--csfak-blue); }
.csfak-swatch { display: block; height: 48px; border: 1px solid #E1E6EC; border-radius: 3px; margin-bottom: 4px; }
.csfak-paper-n { font-size: 14px; font-weight: 600; padding: 0 2px; }
.csfak-paper-d { font-size: 12px; color: var(--csfak-muted); padding: 0 2px 2px; }
.csfak-tex-gerippt { background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.045) 0 1px, transparent 1px 5px); }
.csfak-tex-leinen { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(0,0,0,.035) 0 1px, transparent 1px 3px); }
.csfak-qtys { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.csfak-qty { display: flex; flex-direction: column; gap: 2px; min-height: 60px; padding: 10px 12px; border: 2px solid #E1E6EC; border-radius: 4px; background: #FFFFFF; text-align: left; }
.csfak-qty strong { font-size: 16px; font-weight: 600; }
.csfak-qty span { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--csfak-muted); }

/* Felder */
.csfak-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.csfak-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; margin: 0 0 12px; }
.csfak-two .csfak-field, .csfak-contact .csfak-field, .csfak-foot .csfak-field { margin: 0; }
.csfak-field input, .csfak-field select, .csfak-field textarea { min-height: 44px; padding: 8px 12px; border: 1px solid #B4BECB; border-radius: 4px; font: inherit; font-size: 16px; font-weight: 400; background: #FFFFFF; color: var(--csfak-ink); width: 100%; }
.csfak-field textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
.csfak-field [aria-invalid="true"] { border-color: var(--csfak-magenta); box-shadow: 0 0 0 1px var(--csfak-magenta); }
.csfak-opt { font-style: normal; font-weight: 400; color: var(--csfak-muted); }
.csfak-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding-top: 10px; font-size: 15px; cursor: pointer; }
.csfak-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--csfak-accent); flex: none; }
.csfak-check.csfak-small { padding-top: 0; min-height: 36px; align-items: center; }
.csfak-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.csfak-foot textarea { font-size: 14px; }
.csfak-contact { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 6px; }
.csfak-s2 { grid-column: span 2; } .csfak-s4 { grid-column: span 4; } .csfak-s6 { grid-column: span 6; }
@media (max-width: 600px) {
	.csfak-s2 { grid-column: span 3; } .csfak-s4 { grid-column: span 6; }
	.csfak-k-salutation, .csfak-k-vat_id, .csfak-k-country { grid-column: span 6; }
	.csfak-k-zip { grid-column: span 2; } .csfak-k-city { grid-column: span 4; }
	.csfak-card { padding: 16px; }
}
.csfak-subhead { margin: 10px 0 12px; font-size: 16px; font-weight: 600; color: inherit; }
.csfak-warn { margin: 6px 0 0; padding: 10px 14px; border-radius: var(--csfak-radius); background: #FCEBEF; border: 1px solid #E8A5B7; color: #7A0F2E; font-size: 14px; }
.csfak-warn[hidden] { display: none; }

/* Knöpfe */
.csfak-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.csfak-pill { min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid #B4BECB; background: #FFFFFF; font-size: 15px !important; font-weight: 500; line-height: 1.2; }
.csfak-pill.is-on { background: var(--csfak-ink); border-color: var(--csfak-ink); color: #FFFFFF; }
.csfak-up { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 8px; }
.csfak-up .csfak-muted { margin: 0; flex: 1 1 220px; }
.csfak-btn-ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--csfak-ink); border-radius: 4px; background: #FFFFFF; font-weight: 500; cursor: pointer; }
.csfak-btn-ghost:focus-within { outline: 2px solid var(--csfak-accent); outline-offset: 2px; }
.csfak-link { background: none; border: 0; padding: 8px 4px; color: var(--csfak-accent) !important; text-decoration: underline; }
.csfak-range-l { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 4px; }
.csfak-range { display: flex; align-items: center; gap: 10px; }
.csfak-range input[type=range] { flex: 1; min-width: 0; accent-color: var(--csfak-accent); height: 28px; }
.csfak-range output { min-width: 64px; text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.csfak-step-btn { flex: none; width: 44px; height: 44px; border: 1px solid #B4BECB; border-radius: 50%; background: #FFFFFF; font-size: 20px !important; line-height: 1; }

/* Schriften & Farben */
.csfak-pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 14px; }
.csfak-pair { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid #E1E6EC; border-radius: 4px; background: #FFFFFF; text-align: left; overflow: hidden; }
.csfak-pair-h { font-size: 20px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csfak-pair-b { font-size: 13px; color: var(--csfak-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csfak-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.csfak-color { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px #B4BECB; }
.csfak-color.is-on { box-shadow: 0 0 0 3px var(--csfak-blue); }

/* Vorschau */
.csfak-preview-wrap { background: #E6EBF1; border-color: #E6EBF1; }
.csfak-stage { width: 100%; display: flex; justify-content: center; padding: 4px 0 10px; }
.csfak-sheet { position: relative; overflow: hidden; color: #1A1A1A; box-shadow: 0 1px 2px rgba(0,0,0,.10), 0 14px 32px rgba(20,24,28,.16); touch-action: none; user-select: none; -webkit-user-select: none; }
.csfak-t { position: absolute; white-space: nowrap; overflow: visible; }
.csfak-ph { opacity: .35; }
.csfak-drag { position: absolute; cursor: move; }
.csfak-drag:hover { outline: 1px dashed var(--csfak-blue); outline-offset: 2px; }
.csfak-headgrp .csfak-t { pointer-events: none; }
.csfak-logo img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.csfak-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 3px; background: var(--csfak-blue); border: 2px solid #FFFFFF; cursor: nwse-resize; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.csfak-rule { position: absolute; height: 0; }
.csfak-mark { position: absolute; border-top: 1px solid #8A8A8A; }
.csfak-g-trim { position: absolute; border: 1px dashed var(--csfak-magenta); pointer-events: none; }
.csfak-g-safe { position: absolute; border: 1px dotted var(--csfak-accent); pointer-events: none; }
.csfak-g-addr { position: absolute; border: 1px dashed #7CC4EA; background: rgba(0,138,208,.05); pointer-events: none; }
.csfak-g-addr span { position: absolute; right: 4px; bottom: 2px; font-size: 10px; color: #2B7DB0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.csfak-snap { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--csfak-magenta); pointer-events: none; }
.csfak-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: #33425A; margin: 8px 0 4px; }
.csfak-legend span { display: inline-flex; align-items: center; gap: 6px; }
.csfak-legend i { display: inline-block; width: 16px; height: 0; }
.csfak-lg-bleed { height: 10px !important; background: rgba(219,1,112,.18); }
.csfak-lg-trim { border-top: 1px dashed var(--csfak-magenta); }
.csfak-lg-safe { border-top: 1px dotted var(--csfak-accent); }
.csfak-lg-addr { height: 10px !important; border: 1px dashed #7CC4EA; background: rgba(0,138,208,.05); }
.csfak-warnings { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.csfak-warnings li { padding: 8px 12px; border-radius: 4px; background: #FFF4E5; border: 1px solid #F5C58A; color: #6B3200; font-size: 13px; }

/* Bestellung */
.csfak-sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; font-size: 15px; }
.csfak-sum dt { color: var(--csfak-muted); margin: 0; }
.csfak-sum dd { margin: 0; text-align: right; }
.csfak-terms { font-size: 14px; }
.csfak-terms a { color: var(--csfak-accent); }
.csfak-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.csfak-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 14px; margin: 6px 0 14px; border-top: 1px solid var(--csfak-line); }
.csfak-total span { color: var(--csfak-muted); font-size: 15px; }
.csfak-total strong { font-size: 30px; font-weight: 700; }
.csfak-submit { width: 100%; min-height: 52px; border: 0; border-radius: 4px; background: var(--csfak-accent) !important; color: #FFFFFF !important; font-size: 17px !important; font-weight: 600; }
.csfak-submit:disabled { opacity: .7; cursor: default; }
.csfak-msg:empty { display: none; }
.csfak-msg { margin-top: 14px; padding: 14px 16px; border-radius: var(--csfak-radius); font-size: 14px; }
.csfak-msg.is-ok { background: #E5F3FB; border: 1px solid #8FCDEE; }
.csfak-msg.is-err { background: #FCEBEF; border: 1px solid #E8A5B7; color: #7A0F2E; }
.csfak-msg .csfak-mono { font-size: 13px; word-break: break-all; }

/* Aufkleber-spezifisch */
.csfak-lines { display: grid; grid-template-columns: 1fr; gap: 10px; }
.csfak-lines .csfak-field { margin: 0; }
.csfak-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 14px 0; }
.csfak-mat { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 2px solid #E1E6EC; border-radius: 6px; background: #FFFFFF; text-align: left; font-size: 14px !important; font-weight: 600; }
.csfak-mat.is-on, .csfak-font.is-on { border-color: var(--csfak-blue); }
.csfak-swatch { display: block; height: 34px; border-radius: 3px; border: 1px solid #E1E6EC; }
.csfak-fin-glatt { background: var(--c); }
.csfak-fin-metallic { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 35%, color-mix(in srgb, var(--c) 75%, #000) 55%, color-mix(in srgb, var(--c) 60%, #fff) 80%, var(--c) 100%); }
.csfak-fin-transparent { background-color: #fff; background-image: linear-gradient(45deg, #e3e7ec 25%, transparent 25%), linear-gradient(-45deg, #e3e7ec 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e3e7ec 75%), linear-gradient(-45deg, transparent 75%, #e3e7ec 75%); background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.csfak-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-bottom: 8px; }
.csfak-font { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 2px solid #E1E6EC; border-radius: 4px; background: #FFFFFF; text-align: left; overflow: hidden; white-space: nowrap; }
.csfak-font-n { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--csfak-muted); min-width: 16px; }
.csfak-stage { min-height: 120px; align-items: center; padding: 18px 0; }
.csfak-sheet { border-radius: 2px; }
.csfak-cut { position: absolute; pointer-events: none; border-radius: 1px; }
.csfak-real { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.csfak-real .csfak-muted { margin: 0; }
.csfak-mini { box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.csfak-g-trim { position: absolute; border: 1px dashed var(--csfak-magenta); pointer-events: none; }
.csfak-g-safe { position: absolute; border: 1px dotted var(--csfak-accent); pointer-events: none; }
.csfak-lg-bleed { height: 10px !important; background: rgba(219,1,112,.18); }
.csfak-lg-trim { border-top: 1px dashed var(--csfak-magenta); }
.csfak-lg-safe { border-top: 1px dotted var(--csfak-accent); }
.csfak-font > span:last-child { overflow: hidden; text-overflow: ellipsis; }
