/* Smart Cancel letter and controls: screen shell follows the app;
   the editable document stays a conventional white German letter. */
html body .main-content #view-smart_cancel .sc-preview-row { align-items:start !important; grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr) !important; }
html body .main-content #view-smart_cancel .sc-preview-row > .col-md-5 { align-self:start; min-width:0; }
html body .main-content #view-smart_cancel .sc-delivery-card { height:auto !important; margin-bottom:0 !important; }
html body .main-content #view-smart_cancel .sc-preview-actions {
  position:sticky; top:var(--sc-sticky-top,8px); z-index:15; display:flex !important; flex-direction:row !important;
  justify-content:space-between !important; align-items:center !important; gap:12px !important;
  margin:0 0 20px !important; padding:10px 0 14px !important;
  background:var(--studio-surface); border-top:0 !important; border-bottom:1px solid var(--studio-line);
  border-radius:0; box-shadow:0 8px 12px -12px rgba(0,0,0,.2);
}
html body .main-content #view-smart_cancel .sc-preview-actions > button { width:auto !important; min-width:0; white-space:normal; }
html body .main-content #view-smart_cancel .sc-preview-actions > button { min-height:44px; }
html body .main-content #view-smart_cancel .sc-preview-actions > button:focus-visible { outline:3px solid var(--studio-accent,#7953cc); outline-offset:3px; }
html body .main-content #view-smart_cancel .sc-preview-actions > .btn-primary { margin-inline-start:auto; }
html body .main-content #view-smart_cancel .sc-letter-paper {
  background:#fff !important; color:#202020 !important; border:1px solid #cbd1dc !important;
  border-radius:8px !important; padding:clamp(18px,2.5vw,34px) !important;
  box-shadow:0 10px 30px rgba(0,0,0,.12) !important; margin-bottom:0 !important; min-height:0 !important;
}
html body .main-content #view-smart_cancel .sc-polished-letter {
  background:#fff !important; color:#202020 !important; font-family:Arial,Helvetica,sans-serif !important;
  font-size:11pt !important; line-height:1.55 !important; text-align:left !important; direction:ltr;
}
html body .main-content #view-smart_cancel #sc-letter-master-editable {
  background:#fff !important; margin:0 !important; padding:0 !important; box-shadow:none !important;
  border-radius:0 !important; color:#202020 !important; transition:box-shadow .15s;
}
html body .main-content #view-smart_cancel #sc-letter-master-editable:hover { background:#fff !important; box-shadow:none !important; }
html body .main-content #view-smart_cancel #sc-letter-master-editable:focus { outline:2px solid #7953cc !important; outline-offset:8px; }
html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-header { margin-bottom:32px !important; }
html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-recipient { margin-top:8px !important; min-width:0; }
html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-sender { margin-top:0 !important; min-width:0; color:#202020 !important; text-align:left !important; }
html body .main-content #view-smart_cancel .sc-polished-letter table { min-width:0; }
html body .main-content #view-smart_cancel .sc-polished-letter td { overflow-wrap:anywhere; }
html body .main-content #view-smart_cancel .sc-letter-context-note,
html body .main-content #view-smart_cancel .sc-letter-draft-note { margin:0 0 14px; font-size:12px; line-height:1.6; color:var(--studio-secondary); }
html body .main-content #view-smart_cancel .sc-letter-draft-note {
  border:1px solid #9d6b1c; background:rgba(218,163,52,.12); color:#f3c979;
  border-radius:12px; padding:12px 14px;
}
html body.light-theme .main-content #view-smart_cancel .sc-letter-draft-note { color:#765013; background:#fff4d8; border-color:#caa461; }
html body .main-content #view-smart_cancel .sc-letter-draft-note[hidden] { display:none !important; }
html body .main-content #view-smart_cancel #sc-legal-acknowledgements { margin-top:16px !important; gap:10px; }
html body .main-content #view-smart_cancel .sc-legal-check {
  color:var(--studio-secondary) !important; background:var(--studio-surface) !important;
  border:1px solid var(--studio-line-strong) !important; gap:10px; padding:12px !important; border-radius:12px;
  font-size:12px !important; line-height:1.65 !important; min-width:0;
}
html body .main-content #view-smart_cancel .sc-legal-check input { width:19px; height:19px; flex:0 0 19px; margin-top:2px; accent-color:var(--studio-accent); }
html body .main-content #view-smart_cancel .sc-legal-check:has(input:checked) { border-color:var(--studio-accent) !important; background:var(--studio-accent-soft) !important; }
html body .main-content #view-smart_cancel .sc-legal-check.sc-legal-check-error { border-color:#e05b64 !important; }
html body .main-content #view-smart_cancel .sc-legal-links { display:flex; flex-wrap:wrap; gap:10px 18px; margin:0; }
html body .main-content #view-smart_cancel .sc-legal-links a { color:var(--studio-accent); font-size:11px; text-underline-offset:3px; text-decoration:underline; }
html body .main-content #view-smart_cancel .sc-pdf-status { margin:0; font-size:12px; line-height:1.55; color:var(--studio-secondary); }
html body .main-content #view-smart_cancel :is(.sc-pdf-status.error,.sc-legal-error) { color:#f79ba1 !important; }
html body.light-theme .main-content #view-smart_cancel :is(.sc-pdf-status.error,.sc-legal-error) { color:#aa2534 !important; }
html body .main-content #view-smart_cancel #sc-reset-letter-btn { position:static !important; margin:0 0 12px auto !important; }
@media (max-width:1200px) {
  html body .main-content #view-smart_cancel .sc-preview-row { grid-template-columns:minmax(0,1fr) !important; }
  html body .main-content #view-smart_cancel .sc-delivery-card { margin-top:4px; }
}
@media (max-width:600px) {
  html body .main-content #view-smart_cancel .sc-preview-card { padding:18px !important; }
  html body .main-content #view-smart_cancel .sc-preview-actions { top:var(--sc-sticky-top,80px); gap:8px !important; }
  html body .main-content #view-smart_cancel .sc-preview-actions > button { padding:11px 13px !important; font-size:12px !important; flex:0 1 auto; }
  html body .main-content #view-smart_cancel .sc-letter-paper { padding:20px 16px !important; }
  html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-header { flex-direction:column-reverse !important; gap:24px !important; }
  html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-sender { width:100% !important; flex:auto !important; border-bottom:1px solid #cbd1dc !important; padding-bottom:18px !important; }
  html body .main-content #view-smart_cancel .sc-polished-letter .sc-letter-recipient { width:100%; }
}
@media print {
  .sc-preview-actions,.sc-legal-acknowledgements,.sc-letter-context-note,.sc-letter-draft-note,#sc-reset-letter-btn { display:none !important; }
  .sc-letter-paper { background:#fff !important; color:#202020 !important; box-shadow:none !important; border:0 !important; }
}
@media (prefers-reduced-motion:reduce) {
  #view-smart_cancel #sc-letter-master-editable { transition:none !important; }
}
