/* Search geometry taken from the observed prototype; scoped to the own dialog. */
body.tg-reference #tgr-search{inset:0 0 auto;height:auto;width:min(760px,calc(100% - 32px));max-width:none;max-height:calc(100dvh - 100px);margin:72px auto 16px;padding:0;border:0;background:var(--paper);color:var(--ink);box-shadow:0 24px 60px #0006;overflow:hidden}
body.tg-reference #tgr-search[open]{display:flex;flex-direction:column}
body.tg-reference #tgr-search .srch-bar{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;border-bottom:2px solid var(--ink);margin:0}
body.tg-reference #tgr-search input[type=search]{font:600 1.25rem var(--f-body);border:0;background:transparent;color:var(--ink);width:100%;min-width:0;padding:6px 0;box-shadow:none;margin:0}
body.tg-reference #tgr-search .srch-x{position:static;border:0;background:transparent!important;color:var(--ink);font:600 .9rem var(--f-body);padding:8px 4px;min-height:44px;transform:none}
body.tg-reference #tgr-search .srch-body{overflow-y:auto;min-height:64px;padding:8px 16px 18px;overscroll-behavior:contain}
body.tg-reference #tgr-search .srch-h{margin:14px 0 6px;font-size:.75rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--mute)}
body.tg-reference #tgr-search .srch-list{list-style:none;margin:0;padding:0;display:grid;gap:2px}
body.tg-reference #tgr-search .srch-it{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:12px;align-items:center;padding:6px 8px;border-radius:var(--radius);text-decoration:none;color:var(--ink)}
body.tg-reference #tgr-search .srch-it img{width:52px;height:52px;object-fit:contain;background:var(--img-bg)}
body.tg-reference #tgr-search .srch-it b{display:block;font-weight:600;line-height:1.25}
body.tg-reference #tgr-search .srch-it small{display:block;color:var(--mute);font-size:.85rem;line-height:1.3}
body.tg-reference #tgr-search .srch-p{font-weight:600;text-align:right;font-size:.94rem}
body.tg-reference #tgr-search .srch-p .amount{white-space:nowrap}
body.tg-reference #tgr-search .srch-p ins{background:none;color:var(--danger)}
body.tg-reference #tgr-search .srch-p del{display:block;color:var(--mute);font-size:.8rem}
body.tg-reference #tgr-search .srch-it:hover{background:color-mix(in srgb,var(--accent) 22%,var(--paper))}
body.tg-reference #tgr-search .srch-chips{display:flex;flex-wrap:wrap;gap:8px}
body.tg-reference #tgr-search .srch-chips a{border:1.5px solid var(--line);border-radius:999px;padding:7px 14px;font-weight:600;font-size:.92rem;color:var(--ink);text-decoration:none}
body.tg-reference #tgr-search .srch-chips a:hover{border-color:var(--ink);background:var(--ink);color:var(--paper)}
body.tg-reference #tgr-search .srch-pg{display:block;padding:12px 8px;color:var(--ink);font-weight:600}
body.tg-reference .tgr-search-empty{padding:18px 0;margin:0;color:var(--ink);line-height:1.6}
body.tg-reference .tgr-search-empty a{color:var(--ink)!important;text-decoration:underline;font-weight:600;text-underline-offset:3px}
body.tg-reference #tgr-search :focus-visible{outline:2px solid var(--ink);outline-offset:2px}
body.tg-reference #tgr-search .tgr-search-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
body.tg-reference #view-kundencenter .tgr-kc-preview{padding:12px 16px;border-left:3px solid var(--accent);background:var(--card);color:var(--mute);font-size:.88rem;line-height:1.5;margin:0 0 20px}
@media(max-width:600px){
  body.tg-reference #tgr-search{margin-top:24px;max-height:calc(100dvh - 48px)}
  body.tg-reference #tgr-search input[type=search]{font-size:1rem}
  body.tg-reference #tgr-search .srch-it{grid-template-columns:40px minmax(0,1fr);gap:8px}
  body.tg-reference #tgr-search .srch-it img{width:40px;height:40px;grid-row:span 2}
  body.tg-reference #tgr-search .srch-p{grid-column:2;text-align:left}
  body.tg-reference #tgr-search .srch-p del{display:inline;margin-right:8px}
}
