/* Shared offer/invoice editor and native chat, with separate drafts per document type. */
.ri-native-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.ri-native-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; white-space: normal; }
.ri-native-actions button { padding: 9px 14px; min-height: 40px; border: 1px solid #d6e3f7; background: #f7faff; border-radius: 10px; color: #2b60b8; font: 500 12px/1.4 Inter, sans-serif; cursor: pointer; }
.ri-native-actions button:hover { border-color: #94b5ee; background: #edf4ff; }
.ri-native-actions button:is([data-value="Rechnung erstellen"], [data-value="Angebot erstellen"]) { background: #2366e8; border-color: #2366e8; color: #fff; }
.ri-suggestion { padding: 18px; margin: 18px 0; border: 1px solid #dbe6f7; border-radius: 13px; background: #f6f9ff; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ri-suggestion > strong, .ri-review-heading strong { color: #2b579a; }
.ri-suggestion p { margin: 6px 0 12px; color: #647791; white-space: pre-wrap; }
.ri-customer-suggestion, .ri-review-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.ri-customer-suggestion { padding-top: 12px; border-top: 1px solid #e0e8f5; }
.ri-text-change { padding: 14px 0; border-top: 1px solid #dfe7f4; }
.ri-text-change p { padding: 10px 12px; background: #fff; border-radius: 8px; color: #354c6b; }
.ri-text-change p:last-child { background: #eaf4f0; }
.ri-text-change p span { display: block; font-size: 10px; font-weight: 600; color: #7b8ca3; margin-bottom: 4px; }
.ri-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ri-native-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 9px; border-bottom: 1px solid #e8eef7; color: #336ac4; font: 600 12px/1.5 Inter, sans-serif; }
.ri-native-status > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ri-native-status small { color: #8492a6; font-size: 11px; font-weight: 400; }
.ri-native-status > div { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ri-native-status button { min-height: 32px; padding: 6px 9px; border: 0; border-radius: 7px; background: transparent; color: #70819a; font: 500 11px Inter, sans-serif; cursor: pointer; }
.ri-native-status button:hover { color: #2366da; background: #edf4ff; }
.ri-native-actions button:focus-visible, .ri-native-status button:focus-visible { outline: 3px solid #82b0ff; outline-offset: 2px; }
@media (max-width: 600px) { .ri-native-status small { flex-basis: 100%; font-size: 10px; } .ri-native-actions button { min-height: 44px; } }
.ri-overlay { position: fixed; inset: 0; z-index: 12000; display: flex; align-items: center; justify-content: center; padding: 28px; background: #13233d75; backdrop-filter: blur(7px); font-family: Inter, sans-serif; color: #23334b; }
.ri-overlay *, .ri-overlay *::before, .ri-overlay *::after { box-sizing: border-box; }
.ri-overlay [hidden] { display: none !important; }
.ri-dialog { width: min(1200px, 100%); max-height: calc(100dvh - 56px); display: flex; flex-direction: column; border: 1px solid #ffffffb3; border-radius: 24px; background: #fff; box-shadow: 0 32px 100px #0b1a3f38; overflow: hidden; }
.ri-header { display: flex; align-items: center; flex-shrink: 0; gap: 14px; padding: 25px 30px; border-bottom: 1px solid #e9edf3; }
.ri-heading-icon, .ri-choice-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #eef4ff; color: #2366da; font-size: 20px; flex-shrink: 0; }
.ri-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .15em; color: #7b899e; margin-bottom: 6px; }
.ri-header h2 { margin: 0; font: 700 22px/1.3 'Plus Jakarta Sans', Inter, sans-serif; letter-spacing: -.6px; }
.ri-header > .ri-btn:last-child { margin-left: auto; flex-shrink: 0; }
.ri-btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 42px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #53657e; font: 600 13px/1.35 Inter, sans-serif; cursor: pointer; transition: background .15s, box-shadow .15s; }
.ri-btn:hover { background: #f0f4fa; }
.ri-btn:disabled { opacity: .5; cursor: wait; }
.ri-overlay :is(button, input, textarea, select):focus-visible { outline: 3px solid #82b0ff; outline-offset: 3px; }
.ri-icon-btn { width: 40px; padding: 8px; min-height: 40px; }
.ri-primary { color: #fff; background: #2366e8; border-color: #2366e8; box-shadow: 0 3px 8px #2366e820; }
.ri-primary:hover { background: #1854ce; }
.ri-secondary { border-color: #dbe4f1; color: #245bc0; background: #fff; }
.ri-link { color: #245bc0; padding-inline: 0; justify-content: flex-start; }
.ri-full { width: 100%; }
.ri-choice { padding: 30px 48px; overflow-y: auto; }
.ri-lead { font-size: 15px; line-height: 1.8; color: #68778d; margin: 0 0 27px; }
.ri-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ri-choice-card { position: relative; text-align: left; background: #fff; border: 1px solid #e0e6ef; border-radius: 18px; padding: 28px; font-family: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ri-choice-card:hover { transform: translateY(-3px); border-color: #81a9f2; box-shadow: 0 12px 28px #263e7110; }
.ri-choice-card h3 { font: 700 21px/1.4 'Plus Jakarta Sans', sans-serif; letter-spacing: -.45px; margin: 20px 0 10px; }
.ri-choice-card p { color: #6b7a90; font-size: 14px; line-height: 1.7; margin: 0; max-width: 310px; }
.ri-choice-card ul { list-style: none; margin: 24px 0 26px; padding: 0; font-size: 13px; line-height: 2.25; color: #52647b; }
.ri-choice-card li i { color: #4a79c9; margin-right: 9px; font-size: 11px; }
.ri-choice-featured { border-color: #a9c5f8; background: linear-gradient(150deg, #f6f9ff, #fff 75%); }
.ri-choice-featured .ri-choice-icon { background: #2366e8; color: #fff; }
.ri-recommend { position: absolute; right: 21px; top: 27px; font-size: 9px; font-weight: 700; letter-spacing: .07em; color: #2366da; background: #e9f1ff; padding: 7px 9px; border-radius: 6px; }
.ri-choice-cta { display: flex; align-items: center; justify-content: space-between; padding-top: 19px; border-top: 1px solid #e5ebf4; font-size: 13px; font-weight: 650; color: #2366da; }
.ri-choice-footer { text-align: center; color: #7d8a9c; font-size: 12px; line-height: 1.6; margin-top: 26px; }
.ri-choice-footer i { margin-right: 8px; }
.ri-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 30px; gap: 16px; border-bottom: 1px solid #e9edf3; flex-shrink: 0; }
.ri-switch { display: flex; gap: 4px; border-radius: 12px; background: #f1f4f8; padding: 4px; }
.ri-switch .ri-btn { min-height: 36px; padding: 8px 13px; }
.ri-switch .is-active { background: #fff; color: #235dcc; box-shadow: 0 1px 5px #172c4e12; }
.ri-switch-note { color: #7e8ca1; font-size: 11px; white-space: nowrap; }
.ri-switch-note i { color: #45a38a; margin-right: 5px; }
.ri-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, 1fr); min-height: 0; overflow: hidden; }
.ri-editor { padding: 26px 30px; overflow-y: auto; min-width: 0; overscroll-behavior: contain; }
.ri-preview { background: #f3f6fb; padding: 25px; overflow-y: auto; min-width: 0; border-left: 1px solid #e6ecf4; overscroll-behavior: contain; }
.ri-section { margin: 0 0 27px; }
.ri-section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 19px; }
.ri-section-title > span { display: grid; place-items: center; height: 25px; width: 25px; background: #edf3fe; color: #4279d5; font-size: 10px; font-weight: 700; border-radius: 7px; }
.ri-section-title h3 { font-size: 14px; font-weight: 650; margin: 0; letter-spacing: -.2px; }
.ri-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ri-field { display: flex; flex-direction: column; min-width: 0; gap: 7px; font-size: 12px; color: #4a5e79; font-weight: 550; }
.ri-field small { color: #96a1b2; font-size: 10px; font-weight: 400; }
.ri-field :is(input, textarea, select) { display: block; width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #dce4ef; border-radius: 9px; background: #fff; color: #23334b; font: 400 13px/1.5 Inter, sans-serif; box-shadow: 0 1px 2px #13294a03; }
.ri-field textarea { resize: vertical; }
.ri-field :is(input, textarea)::placeholder { color: #99a5b5; }
.ri-field :is(input, textarea, select):focus { border-color: #80a9f2; }
.ri-field [aria-invalid="true"] { border-color: #cf4b4b; background: #fffafa; }
.ri-field select:disabled { background: #f3f6fa; color: #77879e; }
.ri-wide { grid-column: 1 / -1; }
.ri-rows { margin-top: 20px; }
.ri-row { background: #f9fbfe; border: 1px solid #e3eaf3; padding: 13px; border-radius: 12px; margin-bottom: 12px; }
.ri-row-header { display: flex; align-items: center; margin-bottom: 8px; gap: 8px; }
.ri-row-header strong { font-size: 11px; color: #75879e; }
.ri-row-header > span { margin-left: auto; font-size: 12px; color: #506888; }
.ri-row-header .ri-icon-btn { min-height: 32px; width: 32px; }
.ri-row-fields { display: grid; grid-template-columns: .65fr .8fr 1.3fr; gap: 11px; }
.ri-row-name { grid-column: 1 / -1; }
.ri-description { margin-top: 12px; }
.ri-description textarea { font-size: 12px; }
.ri-form-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ri-form-bottom > span, .ri-caption { font-size: 11px; line-height: 1.7; color: #8491a4; }
.ri-caption { margin: 15px 0 0; }
.ri-error { color: #a83636; background: #fff2f2; border: 1px solid #f3d5d5; padding: 12px 14px; border-radius: 9px; font-size: 12px; line-height: 1.6; margin: 12px 0; }
.ri-notes { font-size: 12px; line-height: 1.6; color: #60738e; padding: 15px 0; }
.ri-notes p { white-space: pre-wrap; }
.ri-preview-label { display: flex; align-items: center; justify-content: space-between; color: #7b8ca4; font-size: 9px; font-weight: 650; letter-spacing: .1em; margin-bottom: 18px; }
.ri-preview-label i { margin-right: 6px; }
.ri-draft-badge { background: #e6edf8; padding: 5px 9px; border-radius: 6px; color: #677f9e; letter-spacing: 0; font-weight: 500; }
.ri-paper { padding: 27px 24px; background: #fff; border: 1px solid #e2e9f3; border-radius: 3px; box-shadow: 0 6px 18px #243d6507; font-size: 10px; }
.ri-paper-brand { color: #294c7d; font-weight: 750; font-size: 14px; overflow-wrap: anywhere; }
.ri-paper-address { color: #99a4b4; font-size: 8px; line-height: 1.7; margin-top: 4px; }
.ri-paper-recipient { margin: 28px 0 24px; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.ri-paper-recipient span { display: block; white-space: pre-wrap; font-size: 9px; font-weight: 400; line-height: 1.8; margin-top: 5px; color: #8190a5; }
.ri-paper-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ri-paper-title h3 { margin: 0; font: 700 22px/1.4 'Plus Jakarta Sans', sans-serif; letter-spacing: -.7px; color: #273e60; }
.ri-paper-title > span { color: #7d8da4; font-size: 9px; white-space: nowrap; }
.ri-paper-meta { color: #8b99ad; font-size: 8px; line-height: 1.9; margin: 7px 0 20px; overflow-wrap: anywhere; }
.ri-paper-project { font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
.ri-paper-table-head, .ri-paper-row { display: flex; justify-content: space-between; gap: 15px; }
.ri-paper-table-head { padding: 9px 0; border-block: 1px solid #e6ebf3; color: #8b98aa; font-size: 8px; }
.ri-paper-row { padding: 12px 0; border-bottom: 1px solid #f0f3f8; font-size: 9px; }
.ri-paper-row > div { min-width: 0; overflow-wrap: anywhere; }
.ri-paper-row strong { font-weight: 550; }
.ri-paper-row small { display: block; color: #8a9bb2; font-size: 8px; margin-top: 5px; }
.ri-paper-row > span { white-space: nowrap; }
.ri-paper-placeholder { padding: 23px 0; }
.ri-paper-placeholder > span { display: block; height: 6px; border-radius: 4px; background: #f0f3f8; width: 70%; margin-bottom: 10px; }
.ri-paper-placeholder > span:nth-child(2) { width: 45%; }
.ri-paper-placeholder > span:nth-child(3) { width: 58%; }
.ri-paper-placeholder p { font-size: 9px; color: #a0acbc; margin: 16px 0 0; }
.ri-totals { margin-top: 16px; }
.ri-totals > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; color: #7c8da6; padding: 5px 0; }
.ri-totals > .ri-total { margin-top: 9px; padding: 12px 0 0; border-top: 1px solid #dfe8f7; font-size: 11px; color: #264c84; align-items: baseline; }
.ri-total strong { font-size: 19px; letter-spacing: -.5px; white-space: nowrap; }
.ri-paper-payment { font-size: 8px; line-height: 1.9; color: #92a1b5; margin: 23px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ri-completion { margin-top: 20px; }
.ri-completion > span { font-size: 11px; color: #53729e; }
.ri-completion i { margin-right: 5px; }
.ri-completion p { color: #92a0b3; font-size: 10px; line-height: 1.7; margin-top: 8px; }
.ri-business-note { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border-radius: 10px; background: #eaf0f9; margin-top: 16px; font-size: 11px; color: #6580a3; }
.ri-business-note > i { margin-top: 3px; }
.ri-business-note p { font-size: 10px; line-height: 1.7; margin: 5px 0 0; }
.ri-business-note .ri-link { font-size: 10px; min-height: 30px; padding-block: 5px; }
.ri-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .ri-overlay { padding: 16px; } .ri-dialog { max-height: calc(100dvh - 32px); } .ri-header, .ri-toolbar { padding-inline: 22px; } .ri-editor { padding: 22px; } .ri-preview { padding: 18px; } .ri-paper { padding: 22px 17px; } .ri-switch-note { display: none; } .ri-workspace { grid-template-columns: minmax(0, 1.2fr) minmax(275px, 1fr); } .ri-choice { padding: 26px; } .ri-recommend { position: static; display: inline-block; margin-bottom: 13px; } }
@media (max-width: 680px) { .ri-overlay { padding: 0; } .ri-dialog { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; } .ri-header { padding: 17px; gap: 10px; } .ri-header h2 { font-size: 17px; } .ri-heading-icon { height: 38px; width: 38px; font-size: 16px; border-radius: 11px; } .ri-toolbar { padding: 12px 16px; } .ri-switch { width: 100%; } .ri-switch .ri-btn { flex: 1; font-size: 11px; padding: 8px; } .ri-workspace { display: block; overflow-y: auto; } .ri-editor { padding: 22px 17px; overflow: visible; } .ri-preview { overflow: visible; border-left: 0; border-top: 1px solid #e6ecf4; padding: 22px; } .ri-paper { max-width: 420px; margin-inline: auto; padding: 28px; } .ri-preview-label, .ri-completion, .ri-business-note { max-width: 420px; margin-inline: auto; } .ri-fields { grid-template-columns: 1fr; } .ri-field :is(input,textarea,select) { font-size: 16px; } .ri-choice { padding: 24px 18px; } .ri-lead { font-size: 13px; } .ri-choice-grid { grid-template-columns: 1fr; gap: 15px; } .ri-choice-card { padding: 22px; } .ri-choice-card h3 { font-size: 19px; margin-top: 14px; } .ri-choice-card ul { margin-block: 15px; } .ri-recommend { position: absolute; top: 22px; right: 20px; } .ri-choice-footer { font-size: 11px; } .ri-row-fields { grid-template-columns: .6fr .7fr 1.15fr; gap: 8px; } .ri-row-fields .ri-field > span { font-size: 10px; } .ri-row-fields input { padding-inline: 8px; } }
@media (prefers-reduced-motion: reduce) { .ri-overlay * { transition: none !important; scroll-behavior: auto !important; } }
