/* Sagsmapper til retten (25.11.2026). Samme papir og mappe som selskabsmappen i mm_skuffeselskab. */
.sm { color: #262626; font-size: 14px; --ark: clamp(520px, calc(100vh - 225px), 820px); }
.sm-linje { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 12px; }
.sm-mappe { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; padding: 24px 18px; border-radius: 10px;
  background: #d4ac6a; box-shadow: inset 0 0 0 2px #c29858, inset 0 0 40px rgba(120, 80, 30, .35); }
.sm-mappe::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: calc(50% - 17px); width: 22px; transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(90, 60, 20, .28) 45%, rgba(255, 240, 210, .25) 55%, rgba(0, 0, 0, 0)); pointer-events: none; }
.sm .halvdel { position: relative; min-width: 0; padding: 0 14px; }
.sm .venstre { padding-left: 0; } .sm .hoejre { padding-right: 0; }
.sm .papir { background: #fbfaf5; border-radius: 2px; box-shadow: 0 1px 0 #e4e0d4, 0 8px 22px rgba(0, 0, 0, .35); position: relative; height: var(--ark); padding: 28px 26px 16px; display: flex; flex-direction: column; }
.sm .forside { transform: rotate(-.5deg); }
/* Siderne: indholdet løber i spalter på præcis én sides bredde, og man bladrer ved at rulle en spalte frem */
.sm .sm-vindue { flex: 1; min-height: 0; overflow: hidden; }
.sm .sm-flow { height: 100%; column-fill: auto; orphans: 2; widows: 2; }
.sm .sm-flow > :last-child { margin-bottom: 0; }
.sm .sm-flow h3, .sm .sm-flow h4, .sm .del-hoved, .sm thead { break-after: avoid; }
.sm tr, .sm .felt, .sm .del-hoved, .sm .udarbejdet, .sm .hoved, .sm .smaa { break-inside: avoid; }
/* Hver rapport, sag, afsnit og vidneudsagn begynder på sin egen side */
.sm .sm-flow > .del + .del, .sm .sm-flow > .indhold + .del { break-before: column; }
.sm-samlet .sm-flow > h3:not(:first-child) { break-before: column; margin-top: 0; }
.sm .indhold { margin-top: 10px; }
.sm .indhold button { display: flex; gap: 12px; align-items: baseline; width: 100%; background: none; border: 0; border-bottom: 1px dotted #c9c3b3; padding: 8px 0; font: inherit; color: #262626; text-align: left; cursor: pointer; break-inside: avoid; }
.sm .indhold button:hover span { text-decoration: underline; }
.sm .indhold b { width: 58px; flex-shrink: 0; font-weight: 600; } .sm .indhold span { flex: 1; min-width: 0; overflow-wrap: anywhere; } .sm .indhold i { font-style: normal; color: #7c776b; font-size: 12.5px; white-space: nowrap; }
.sm .sm-bladr { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 12px; color: #7c776b; font-size: 12.5px; }
.sm .sm-bladr.skjult { visibility: hidden; }
.sm .sm-bladr span { min-width: 84px; text-align: center; }
.sm .sm-bladr .blaek:disabled { opacity: .3; cursor: default; background: none; color: #2c2c2c; }
.sm .skriv .sm-flow { display: flex; flex-direction: column; }
.sm .clips { position: absolute; top: -14px; right: 92px; transform: rotate(4deg); width: 20px; height: 54px; border: 3px solid #9aa0a6; border-radius: 12px; z-index: 2; }
.sm .clips::after { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 36px; border: 3px solid #9aa0a6; border-radius: 8px; border-top: 0; }
.sm h3 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 22px; line-height: 1.25; margin: 0 0 2px; color: #262626; padding: 0; border: 0; text-transform: none; letter-spacing: 0; }
.sm h4 { font-family: Georgia, "Times New Roman", serif; font-weight: normal; font-size: 16.5px; margin: 20px 0 4px; color: #262626; }
.sm .hoved { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 14px; overflow-wrap: anywhere; min-height: 128px; }
.sm .foto { position: relative; width: 104px; flex-shrink: 0; margin: 2px 8px 0 0; background: #fff; padding: 5px 5px 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .28); transform: rotate(2deg); }
.sm .foto span { display: grid; place-items: center; aspect-ratio: 1; background: #e6e1d5; color: #8f8876; font-family: Georgia, serif; font-size: 30px; }
.sm .foto img { position: absolute; left: 5px; top: 5px; width: 94px; height: 94px; object-fit: cover; }
.sm .under, .sm .fodnote { color: #7c776b; font-size: 12.5px; }
.sm p.fodnote { margin: 8px 0; }
.sm a { color: #1f3f8a; }
.sm table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sm th { text-align: left; font-weight: 600; font-size: 12px; color: #7c776b; padding: 6px 8px 5px 0; border: 0; border-bottom: 1.5px solid #3b3a36; background: none; text-transform: none; letter-spacing: 0; }
.sm td { padding: 6px 8px 6px 0; border: 0; border-bottom: 1px solid #e2ddd0; color: #262626; vertical-align: top; background: none; white-space: normal; }
.sm th:last-child, .sm td:last-child { padding-right: 0; }
.sm .r { text-align: right; }
.sm .nb { white-space: nowrap; }
.sm tr.sum td { border-bottom: 0; font-weight: 600; }
.sm .felt { display: flex; flex-direction: row; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px dotted #c9c3b3; align-items: baseline; }
.sm .felt > span:first-child { color: #7c776b; flex-shrink: 0; }
.sm .felt > span:last-child { text-align: right; overflow-wrap: anywhere; color: #262626; }
.sm .stempel { flex-shrink: 0; margin-right: 8px; white-space: nowrap; border: 3px solid rgba(164, 48, 42, .7); color: rgba(164, 48, 42, .8); border-radius: 6px; padding: 3px 9px; font-family: Georgia, serif; font-size: 15px; transform: rotate(-8deg); pointer-events: none; }
.sm .udarbejdet { margin-top: 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.sm .udarbejdet > div:first-child { min-width: 0; flex: 0 1 300px; }
.sm .underskrift { font-family: "Segoe Script", "Bradley Hand", "Brush Script MT", cursive; font-size: 21px; color: #1f3f8a; line-height: 1.5; }
.sm .streg { border-top: 1px solid #3b3a36; padding-top: 4px; font-size: 12px; color: #7c776b; }
.sm .faneblade { display: flex; flex-direction: column; gap: 4px; padding-top: 22px; }
.sm .faneblade button { writing-mode: vertical-rl; background: #efe6cf; border: 0; border-radius: 0 6px 6px 0; padding: 11px 7px; font: inherit; font-size: 13px; font-weight: 500; color: #3f382a; cursor: pointer; box-shadow: 2px 2px 4px rgba(0, 0, 0, .15); }
.sm .faneblade button:hover { filter: brightness(1.05); }
.sm .faneblade button:nth-child(2) { background: #dfe9d8; } .sm .faneblade button:nth-child(3) { background: #e6dff0; }
.sm .faneblade button:nth-child(4) { background: #f2dcd3; } .sm .faneblade button:nth-child(5) { background: #d9e6ee; } .sm .faneblade button:nth-child(6) { background: #ece3c0; }
.sm .faneblade em { font-style: normal; }
.sm .faneblade button.on { background: #fbfaf5; color: #262626; font-weight: 600; }
.sm .blaek { background: transparent; border: 1.5px solid #2c2c2c; color: #2c2c2c; border-radius: 4px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.sm .blaek:hover, .sm .blaek.fyldt { background: #2c2c2c; color: #fbfaf5; }
.sm .blaek.roed { border-color: #a4302a; color: #a4302a; }
.sm .blaek.roed:hover { background: #a4302a; color: #fff; }
.sm .blaek.lk { padding: 2px 8px; font-size: 12px; border-width: 1px; }
.sm .blaek:disabled { opacity: .5; cursor: wait; }
.sm .smaa { display: flex; flex-wrap: wrap; gap: 6px; flex-shrink: 0; }
.sm .smaa.foer { margin: 12px 0 4px; }
.sm .smaa.bund { margin-top: 24px; }
.sm .del { padding: 10px 0 0; }
.sm .del-hoved { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sm .del h4 { margin: 0 0 2px; overflow-wrap: anywhere; }
.sm .broed { line-height: 1.6; margin: 8px 0; overflow-wrap: anywhere; }
.sm .broed p { margin: 0 0 8px; } .sm .broed ul { margin: 0 0 8px; padding-left: 20px; }
.sm .sm-form { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; flex: 1; min-height: 0; }
.sm .sm-form textarea { flex: 1; min-height: 120px; resize: none !important; }
.sm .sm-form input, .sm .sm-form textarea { width: 100%; background: #fff; border: 1px solid #cfc9ba; border-radius: 4px; padding: 8px 10px; font: inherit; color: #262626; resize: vertical; }
.sm .sm-form input:focus, .sm .sm-form textarea:focus { outline: none; border-color: #7c776b; }
.sm .vaerk { display: flex; gap: 4px; }
.sm .vaerk button { background: none; border: 1px solid #cfc9ba; border-radius: 4px; min-width: 30px; padding: 3px 8px; font: inherit; font-size: 13px; color: #262626; cursor: pointer; }
.sm .sm-fejl { color: #a4302a; font-size: 13px; } .sm .sm-fejl:empty { display: none; }
.sm .fotos { margin: 12px -6px 0; font-size: 0; orphans: 1; widows: 1; }
.sm figure { display: inline-flex; vertical-align: top; width: calc(50% - 14px); margin: 4px 6px 10px; break-inside: avoid; font-size: 14px; background: #fff; padding: 7px 7px 10px; box-shadow: 0 1px 5px rgba(0, 0, 0, .22); flex-direction: column; gap: 7px; }
.sm figure .vis { border: 0; padding: 0; background: #eceae4; cursor: zoom-in; }
.sm figure img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; }
.sm figcaption { font-size: 13px; display: flex; flex-direction: column; overflow-wrap: anywhere; flex: 1; }
.sm .historik td { font-size: 12.5px; }
/* Vinduerne omkring mappen */
#smSpoerg, #smRapport, #smAkter { width: min(620px, 94vw); } #smKamera { width: min(860px, 95vw); } #smStort { width: min(1100px, 95vw); padding: 14px; }
#smLaes { width: min(1240px, 97vw); max-height: 96vh; padding: 14px; } #smLaes .sm { --ark: clamp(440px, calc(96vh - 190px), 820px); }
.sm-soeg { width: 100%; background: var(--bg); border: 1px solid var(--kant); border-radius: 6px; color: var(--tekst); padding: 9px 11px; font: inherit; margin-bottom: 10px; }
.sm-liste { max-height: 48vh; overflow-y: auto; }
.sm-valg { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--kant); color: var(--tekst); padding: 9px 4px; font: inherit; cursor: pointer; }
.sm-flueben { display: flex; gap: 10px; align-items: flex-start; } .sm-flueben input { margin-top: 4px; } .sm-flueben span { min-width: 0; }
.sm-gruppe { margin: 12px 0 2px; padding: 0; border: 0; font-size: 12px; font-weight: 600; color: var(--grå); } .sm-gruppe:first-child { margin-top: 0; }
.sm-valgt { color: var(--grå); padding-top: 10px; } .sm-valgt:empty { display: none; }
.sm-valg:hover { background: var(--hover); } .sm-valg small { display: block; color: var(--grå); }
#mappeStatus select { background: var(--bg); border: 1px solid var(--kant); border-radius: 6px; color: var(--tekst); padding: 5px 8px; font: inherit; font-size: 13px; max-width: 260px; }

@media (max-height: 780px) and (min-width: 1101px) { .sm .faneblade { padding-top: 10px; } .sm .faneblade em { display: none; } .sm .faneblade button { padding: 9px 6px; } }
@media (max-width: 1100px) {
  .sm-mappe { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sm-mappe::before { display: none; }
  .sm .venstre { padding-left: 14px; } .sm .hoejre { padding-right: 14px; order: 2; }
  .sm .faneblade { flex-direction: row; flex-wrap: wrap; padding: 20px 22px 0; gap: 3px; order: 1; }
  .sm .faneblade button { writing-mode: horizontal-tb; border-radius: 6px 6px 0 0; padding: 7px 10px; box-shadow: none; }
}
@media (max-width: 600px) {
  .sm { --ark: clamp(460px, calc(100vh - 150px), 640px); }
  .sm-mappe { padding: 20px 4px; }
  .sm .halvdel, .sm .hoejre { padding: 0 6px; }
  .sm .papir { padding: 24px 16px 14px; }
  .sm .foto { width: 84px; } .sm .foto img { width: 74px; height: 74px; }
  .sm .clips { right: 60px; }
  .sm .del-hoved { flex-direction: column; gap: 6px; }
  .sm .faneblade { padding: 18px 10px 0; }
  .sm .faneblade button { padding: 6px 7px; font-size: 12.5px; }
  .sm .sm-form input, .sm .sm-form textarea { font-size: 16px; }
}
/* Udskrift: alt efter hinanden på papiret, uden mappe og bladring */
@media print {
  body:has(.sm-samlet) { background: #fff; display: block; }
  body:has(#smLaes[open]) > *:not(#smLaes) { display: none !important; }
  body:has(.sm-samlet) .side, body:has(.sm-samlet) .faner, body:has(.sm-samlet) .top, .sm-linje, .sm .clips, .sm .faneblade, .sm .sm-bladr, #smLaes .dialog-knapper { display: none !important; }
  body:has(.sm-samlet) main { overflow: visible; padding: 0; border: 0; }
  #smLaes { position: static; max-height: none; width: auto; border: 0; background: #fff; overflow: visible; }
  .sm-samlet .sm-mappe { background: none; box-shadow: none; padding: 0; grid-template-columns: minmax(0, 1fr); }
  .sm-mappe::before { display: none; }
  .sm .papir { box-shadow: none; background: #fff; height: auto; display: block; transform: none; }
  .sm .sm-vindue { overflow: visible; }
  .sm-samlet .sm-flow > .del + .del, .sm-samlet .sm-flow > h3:not(:first-child) { break-before: page; }
  .sm .sm-flow { height: auto; width: auto !important; column-width: auto !important; }
}
