body:has(.model-page) .gx-module-index,body:has(.model-admin-grid) .gx-module-index{display:none!important}body:has(.model-page) .gx-module-layout,body:has(.model-admin-grid) .gx-module-layout{display:block!important}.model-page{max-width:1600px;margin:auto}.model-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 0}.model-toolbar>strong{flex:1}.model-toolbar label{display:flex;gap:8px;align-items:center}.model-toolbar span{font-size:12px;opacity:.8}.model-toolbar input{width:120px}model-viewer{display:block;width:100%;height:min(57vh,780px);min-height:320px;background:var(--gg-field,#eef3fa);border:1px solid var(--gg-line,#bccfe5);border-radius:16px;--progress-bar-color:#1565ff}model-viewer:fullscreen{height:100vh;background:#edf1f6}.model-progress{position:absolute;bottom:20px;left:20px;padding:10px 16px;background:var(--gg-field,#fff);color:var(--gg-text,#18354b);border-radius:10px}.model-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.model-admin-grid label{display:grid;gap:6px;margin:14px 0}.model-admin-grid select,.model-admin-grid input{width:100%;min-width:0;max-width:100%;box-sizing:border-box}.machine-catalog-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.machine-catalog-links article{display:grid;gap:10px;padding:16px;border:1px solid var(--gg-line,#c5d5e9);border-radius:12px;background:var(--gg-field,#f4f8ff)}.machine-catalog-links a{padding:8px 0}.machine-model-dialog{border:0;border-radius:18px;padding:0;width:min(1200px,94vw);height:88vh;background:var(--gg-field,#fff)}.machine-model-dialog::backdrop{background:#0b203c99;backdrop-filter:blur(6px)}.machine-model-dialog iframe{width:100%;height:calc(100% - 52px);border:0}.machine-model-dialog>button{float:right;margin:8px;min-height:36px}.catalog-model-button{min-height:40px;white-space:nowrap}.model-admin-grid .ix-panel{min-width:0}@media(max-width:700px){.model-admin-grid{grid-template-columns:1fr}model-viewer{height:60vh}.model-toolbar{gap:8px}.model-toolbar>strong{flex-basis:100%}}
.customer-catalogs #catalogsMenu>.catalogs-grid,.customer-catalogs #documentationMenu .kh-catalogs,.customer-catalogs #documentationMenu [onclick*="showGroupCatalogs"],.customer-catalogs #groupCatalogsContainer{display:none!important}.customer-catalogs #catalogsMenu [data-own-machine-catalogs]{display:block!important}.catalog-model-button[hidden]{display:none!important}

body:has(.model-page[data-embedded]) .gx-page-heading,body:has(.model-page[data-embedded]) .gx-breadcrumb{display:none!important}
.model-page[data-embedded]>.model-toolbar:first-child>a{display:none}
.model-page[data-embedded] model-viewer{height:calc(100vh - 200px);min-height:260px}

body:has(.model-page[data-embedded]) .saved-items-standalone{display:none!important}
@media(max-width:600px){model-viewer,.model-page[data-embedded] model-viewer{height:45vh;min-height:300px;max-height:420px}.model-toolbar>strong{line-height:1.4}.model-toolbar button{min-height:44px}}

/* Explicit button styling survives the catalogue toolbar's generic reset. */
#catalog-local-model.catalog-model-button{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:10px 16px!important;border:1px solid #1745df!important;border-radius:10px!important;background:#1945e6!important;color:#fff!important;font:600 13px/1.2 GronnGolos,Arial,sans-serif!important;cursor:pointer;white-space:nowrap;box-shadow:0 2px 5px #153fbb20}
#catalog-local-model.catalog-model-button:hover{background:#1038c8!important;border-color:#1038c8!important}
#catalog-local-model.catalog-model-button:active{background:#0b2ca8!important}
#catalog-local-model.catalog-model-button:focus-visible{outline:3px solid #75b4ff!important;outline-offset:3px}
#catalog-local-model.catalog-model-button svg{display:block;width:19px;height:19px;flex:none;pointer-events:none}
#catalog-local-model.catalog-model-button[hidden]{display:none!important}

/* Stable sizing also inside auto-height portal frames. */
model-viewer,.model-page[data-embedded] model-viewer{height:clamp(320px,46vw,600px)!important;max-height:600px;min-height:320px;background:radial-gradient(ellipse at 50% 32%,#ffffff 0%,#edf1f5 58%,#d2dbe5 100%)}
model-viewer:fullscreen{height:100dvh!important;max-height:none}.model-toolbar button[aria-pressed=true]{background:#1559ec;color:white}.model-toolbar select{max-width:180px}.model-toolbar :is(button,select){min-height:44px}
@media(max-width:600px){model-viewer,.model-page[data-embedded] model-viewer{height:340px!important;min-height:280px}.model-page .model-toolbar{gap:8px}.model-page .model-toolbar span{line-height:1.5}}
