/* B1386 (266): mobile Belegkarte auch in der ursprünglichen CP-Positionsmaske; keine Frame-Gruppenstyles. */
/* B1385: Belege in der CP-Positionsakte auf schmalen Geräten als Karte.
   Vier feste Desktopspalten ließen dem Dateinamen nur eine Zeichenbreite. */
@media(max-width:900px){
 body.crm-cp-r1 #bsvOverlay #bsvBelBox > div[style*="grid-template-columns:2.6rem"]{grid-template-columns:2.6rem minmax(0,1fr)!important;align-items:start!important;gap:.6rem!important}
 body.crm-cp-r1 #bsvOverlay #bsvBelBox > div[style*="grid-template-columns:2.6rem"] > :nth-child(n+3){grid-column:2;min-width:0;text-align:left!important}
 body.crm-cp-r1 #bsvOverlay #bsvBelBox > div[style*="grid-template-columns:2.6rem"] > :last-child{justify-content:flex-start!important;flex-wrap:wrap}
 body.crm-cp-r1 #bsvOverlay #bsvBelBox > div[style*="grid-template-columns:2.6rem"] > :last-child a{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
}

/* B1387 (266): volle CP-Inhaltsfläche; originale Root-Hitfläche inset:0/z-index:1200 bleibt.
   Der transparente Kopfabstand ist rein visuell und öffnet keine globale Navigation. */
body.crm-cp-r1 #bsvOverlay.cpPositionDesign266{padding:var(--crm168-header-height,64px) 0 0!important;background:transparent!important;align-items:stretch!important;justify-content:stretch!important}
.cpPositionDesign266,.cpPositionDesign266 *{box-sizing:border-box;min-width:0}
.cpPositionDesign266Shell{max-width:none!important;height:100%!important;border-radius:0!important;box-shadow:none!important;width:100%!important;overflow:auto!important}
.cpPositionDesign266Head{padding-top:3.4rem!important;flex-shrink:0;overflow-wrap:anywhere}
.cpPositionDesign266Identity{font-size:.8rem;font-weight:700;color:var(--ink-soft);margin-bottom:.7rem}
.cpPositionDesign266Return{top:.6rem!important;right:.8rem!important;width:auto!important;height:auto!important;min-height:44px;border-radius:8px!important;padding:.5rem .8rem!important;font:inherit!important;font-size:.8rem!important;font-weight:700!important;background:var(--panel,#fff)!important}
.cpPositionDesign266Tabs{flex-shrink:0;overflow-x:visible!important}
.cpPositionDesign266Tabs>span{flex-wrap:wrap;border-radius:12px!important;width:100%}
.cpPositionDesign266Tabs button{min-height:44px;white-space:normal!important}
.cpPositionDesign266Tabs button[style*="background:var(--ink)"]{background:var(--accent,#9c3841)!important;color:var(--bg,#fff)!important}
.cpPositionDesign266Panel{flex:0 0 auto!important;overflow:visible!important;overflow-wrap:anywhere;overscroll-behavior:contain}
.cpPositionDesign266Group{background:var(--panel,#fff);border:1px solid var(--rule);border-radius:14px;padding:.85rem 1rem;margin-bottom:.8rem}
.cpPositionDesign266Group h3{font-size:.85rem;margin:0 0 .7rem;color:var(--ink)}
.cpPositionDesign266Group [data-cp-design-card="details"]{border:0!important;box-shadow:none!important;padding:0!important}
.cpPositionDesign266Group [data-cp-design-field]{font-size:.86rem}
.cpPositionDesign266 :focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.cpPositionDesign266 input,.cpPositionDesign266 select,.cpPositionDesign266 textarea{max-width:100%}
.cpPositionDesign266 table{display:block;overflow:auto;max-width:100%}
@media(max-width:600px){
 .cpPositionDesign266Panel [style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important}
 .cpPositionDesign266Panel,.cpPositionDesign266Tabs{padding:.7rem!important}
 .cpPositionDesign266Head{padding-left:.8rem!important;padding-right:.8rem!important}
 .cpPositionDesign266Group{padding:.75rem}
 .cpPositionDesign266Panel [style*="minmax(12.5rem"]{grid-template-columns:minmax(0,1fr)!important}
}

/* B1387 Deltakorrektur: CP-Metadatenchips behalten ihre Originalschriftfarbe,
   erhalten aber einen Themehintergrund statt Weißtransparenz für lesbaren Dunkelmodus. */
.cpPositionDesign266Head span[style*="background:rgba(255,255,255,0.6)"]{background:var(--bg-card,var(--panel,#fff))!important}

/* B1388 (266): Originalakte als Inhaltsfläche im Ansichtsslot statt fixem Overlay.
   Überschreibt die unveränderten Inline-Styles des Originals nur mit der Inline-Klasse;
   Kopf und Menü bleiben frei. Die Liste wird nur ausgeblendet, nicht ersetzt. */
#view-bauservice[data-bsv-akte266] > :not(#bsvAkteSlot266){display:none!important}
body.crm-cp-r1 #bsvOverlay.cpPositionInline266,#bsvOverlay.cpPositionInline266{position:static!important;inset:auto!important;z-index:auto!important;padding:0!important;background:transparent!important}
#bsvOverlay.cpPositionInline266 .cpPositionDesign266Shell{height:auto!important;overflow:visible!important;border:1px solid var(--rule);border-radius:14px!important}
#bsvAkteSlot266{scroll-margin-top:12px}
