/* 3D-arbeidsflate. Utskriftsarket bruker egen rendret kopi av visningen. */
#tegneplan-root #tp-edu-3d-stage[hidden]{display:none!important}
#tegneplan-root #tp-edu-3d-stage{position:absolute;inset:0;z-index:110;display:flex;flex-direction:column;background:#fff;overflow:hidden;font:12px/1.4 system-ui,Arial,sans-serif;color:#234135}
#tegneplan-root #tp-edu-3d-canvas{width:100%;height:100%;display:block;flex:1;min-height:0;background:#fff;cursor:grab;touch-action:none}
#tegneplan-root #tp-edu-3d-canvas:active{cursor:grabbing}
#tegneplan-root .tp-edu-3d-tools{display:flex;align-items:center;flex-wrap:wrap;gap:7px;background:#fff;padding:8px 12px;border-bottom:1px solid #d7e4dd;position:relative;z-index:2;flex:none}
#tegneplan-root .tp-edu-3d-tools button,#tegneplan-root .tp-edu-3d-tools select{background:#fff;color:#234135;border:1px solid #c5d6cc;border-radius:5px;padding:6px 9px;font-size:12px;cursor:pointer;min-height:31px;box-shadow:none}
#tegneplan-root .tp-edu-3d-tools button:hover{background:#ecf5f0}
#tegneplan-root .tp-edu-3d-tools label{display:inline-flex;align-items:center;gap:5px;font-size:12px;white-space:nowrap}
#tegneplan-root .tp-edu-3d-tools input{accent-color:#158455;width:15px;height:15px}
#tegneplan-root #tp-edu-3d-wall-display{display:inline-flex;gap:3px;flex:none}
#tegneplan-root #tp-edu-3d-wall-display [aria-pressed="true"]{background:#087e54;color:#fff;border-color:#087e54}
#tegneplan-root .tp-edu-3d-visibility { position:relative; }
#tegneplan-root .tp-edu-3d-visibility summary {
  box-sizing:border-box; min-height:31px; padding:6px 9px; cursor:pointer;
  background:#fff; color:#234135; border:1px solid #c5d6cc; border-radius:5px;
}
#tegneplan-root .tp-edu-3d-visibility-panel {
  position:absolute; top:calc(100% + 4px); left:0; z-index:3; min-width:165px;
  display:grid; gap:6px; padding:10px 12px; border:1px solid #c5d6cc; border-radius:6px;
  background:#fff; box-shadow:0 5px 18px #13372a22;
}
#tegneplan-root .tp-edu-3d-visibility-panel label:has(:disabled) { opacity:.55; }
#tegneplan-root #tp-edu-3d-background-controls { display:flex; align-items:center; gap:5px; }
#tegneplan-root #tp-edu-3d-background-controls[hidden],
#tegneplan-root #tp-edu-3d-background-color[hidden] { display:none !important; }
#tegneplan-root #tp-edu-3d-background-color { width:31px; height:28px; padding:2px; cursor:pointer; }
#tegneplan-root .tp-edu-3d-caption{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:3px 12px; flex:none;
  background:#fff; color:#4b6155; border-bottom:1px solid #e7eee9; padding:4px 12px; font-size:11px;
}
#tegneplan-root.tp-edu-3d-active .tp-view-controls,#tegneplan-root.tp-edu-3d-active #tp-quick-length,#tegneplan-root.tp-edu-3d-active #tp-3d-camera-bar{visibility:hidden!important}
body:has(#tegneplan-root.tp-edu-3d-active) > .tp-footerline.tp-statusline[data-tp-status-portal="1"],
body:has(#tegneplan-root.tp-edu-3d-active) > .tp-footerline.tp-statusline.tp-statusline-fixed-portal{
  background:#fff!important;
  box-shadow:none!important;
}
@media(max-width:850px){
  #tegneplan-root .tp-edu-3d-tools{gap:5px;padding:6px}
  #tegneplan-root .tp-edu-3d-caption{font-size:10px}
  #tegneplan-root .tp-edu-3d-visibility{position:static}
  #tegneplan-root .tp-edu-3d-visibility-panel{left:auto;right:6px;max-height:52dvh;overflow:auto}
}
@media print{#tegneplan-root #tp-edu-3d-stage{display:none!important}}

/* 1.9.268: separate, visible zoom controls without changing 2D. */
#tegneplan-root .tp-edu-3d-zoom-tools{display:inline-flex;gap:5px;align-items:center;border-right:1px solid #d7e4dd;padding-right:9px;flex:none}
#tegneplan-root .tp-edu-3d-zoom-tools input[type=range]{width:100px;accent-color:#087e54;cursor:pointer}
#tegneplan-root .tp-edu-3d-zoom-tools output{min-width:43px;text-align:right;font-variant-numeric:tabular-nums;color:#314b40;font-size:11px}
#tegneplan-root .tp-edu-3d-zoom-tools button{font-weight:bold;font-size:16px;min-width:28px;padding:3px 7px}

/* v1.9.271: Markeringsdialoger fra 2D skal ikke ligge over den roterbare 3D-visningen. */
#tegneplan-root.tp-edu-3d-active .tp-floating-object-toolbar{display:none!important}

/* v1.9.282: read-only adjustable pipe cross-section in the same work surface. */
#tegneplan-root #tp-edu-section-controls[hidden]{display:none!important}
#tegneplan-root #tp-edu-section-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:7px 12px;border-bottom:1px solid #d6e2db;background:#fff;flex:none;color:#234135}
#tegneplan-root #tp-edu-section-controls label{display:inline-flex;gap:7px;align-items:center;white-space:nowrap}
#tegneplan-root #tp-edu-section-controls select{padding:5px;border:1px solid #b7ccc0;border-radius:5px;background:#fff;color:#183c30}
#tegneplan-root #tp-edu-section-controls input[type=range]{width:min(210px,45vw);accent-color:#087e54}
#tegneplan-root #tp-edu-section-controls input[type=checkbox]{accent-color:#087e54;margin:0}
#tegneplan-root #tp-edu-section-controls output{font-variant-numeric:tabular-nums;min-width:72px;font-weight:700}
#tegneplan-root #tp-edu-section-controls small{color:#5e7568}
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode #tp-edu-3d-canvas{cursor:default;touch-action:auto}
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode .tp-edu-3d-zoom-tools,
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode [data-3d-act="fit"],
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode [data-3d-act="iso"],
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode [data-3d-act="top"],
#tegneplan-root #tp-edu-3d-stage.tp-edu-section-mode [data-3d-act="front"]{display:none}
#tegneplan-root #tp-edu-3d-stage [data-3d-act="view-section"][aria-pressed="true"],
#tegneplan-root #tp-edu-3d-stage [data-3d-act="view-3d"][aria-pressed="true"]{background:#087e54;color:#fff;border-color:#087e54}
