/* Én arbeidsflate med prosjektvalg, visninger og verktøy for aktiv visning. */
#tegneplan-root.tp-edu-active #tp-edu-toolbar {
  grid-area: globaltools;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d9e3dd;
  border-radius: 6px;
  background: #fbfdfc;
  color: #273b35;
  font: 12px/1.35 system-ui, sans-serif;
}
#tegneplan-root .tp-edu-firstrow,
#tegneplan-root .tp-edu-secondrow,
#tegneplan-root .tp-edu-tabs,
#tegneplan-root .tp-edu-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
#tegneplan-root .tp-edu-firstrow,
#tegneplan-root .tp-edu-secondrow { padding: 4px 0; }
#tegneplan-root .tp-edu-secondrow { border-top: 1px solid #e3ebe6; }
#tegneplan-root.tp-edu-canvas-view .tp-edu-secondrow { display: none; }
#tegneplan-root:is(.tp-edu-canvas-view, .tp-edu-section-view) #tp-bw-joist-tools { display: none; }
#tegneplan-root.tp-edu-active #tp-edu-toolbar :is(.tp-edu-tabs, .tp-edu-tools, #tp-bw-views, #tp-bw-plan-section) button,
#tegneplan-root.tp-edu-active #tp-bw-open {
  box-sizing: border-box;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d1ddd5;
  border-radius: 5px;
  background: #fff;
  color: #23493b;
  font: 600 11px/1.2 system-ui, sans-serif;
  box-shadow: none;
  cursor: pointer;
}
#tegneplan-root.tp-edu-active #tp-edu-toolbar :is(.tp-edu-tabs, .tp-edu-tools, #tp-bw-views, #tp-bw-plan-section) button:hover,
#tegneplan-root.tp-edu-active #tp-bw-open:hover { background: #edf5f0; border-color: #7eaa96; }
#tegneplan-root.tp-edu-active #tp-edu-toolbar :is(.tp-edu-tabs, .tp-edu-tools, #tp-bw-views, #tp-bw-plan-section) button.is-active {
  background: #126b4d;
  border-color: #126b4d;
  color: #fff;
}
#tegneplan-root #tp-edu-toolbar button:focus-visible,
#tegneplan-root [data-edu-action="details"]:focus-visible { outline: 2px solid #147c57; outline-offset: 1px; }
#tegneplan-root .tp-edu-help { color: #526d61; font-size: 11px; }
#tegneplan-root .tp-edu-help:empty { display: none; }
#tegneplan-root.tp-edu-active:is([data-tp-mode="join_corner"], [data-tp-mode="section_pick"]) .tp-floating-object-toolbar { display: none !important; }
#tegneplan-root.tp-edu-active[data-tp-mode="section_pick"] #tp-svg { cursor: crosshair; }

#tegneplan-root.tp-edu-active :is(.tp-hero, .tp-global-toolstrip, .tp-sidebar, .tp-layer-quickbar, .tp-layout-quickbar, .tp-favorite-bar),
#tegneplan-root.tp-edu-active.tp-edu-has-building .tp-level-quickbar,
#tegneplan-root.tp-edu-active .tp-toolbar-top :is(
  #tp-current-meta, #tp-help-guide, #tp-about-tegneplan, #tp-print-badge, #tp-grid-badge,
  #tp-scale-badge, #tp-mode-badge, #tp-focus-toggle, #tp-center-view, #tp-save-as-top,
  #tp-delete-selected-top, #tp-toggle-joints-top, #tp-autosave-badge, #tp-2d-3d-toggle
) { display: none !important; }
#tegneplan-root.tp-edu-active .tp-toolbar-top { padding: 4px 8px !important; min-height: 0 !important; }
#tegneplan-root.tp-edu-active .tp-toolbar-titletext { min-width: 0; }
#tegneplan-root.tp-edu-active #tp-current-title {
  font-size: 14px;
  max-width: 32ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tegneplan-root.tp-edu-active [data-edu-action="details"][aria-pressed="true"] {
  border-color: #126b4d;
  background: #e6f3eb;
  color: #07583f;
}
#tegneplan-root.tp-edu-active #tp-edu-toolbar .tp-level-quickbar {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  width: auto;
  min-width: 0;
  margin-left: 4px;
}
#tegneplan-root.tp-edu-active.tp-edu-has-building #tp-edu-toolbar .tp-level-quickbar { display: none !important; }
#tegneplan-root.tp-edu-active:not(.tp-edu-details-open) .tp-properties { display: none !important; }
@media screen {
  #tegneplan-root.tp-edu-active :is(.tp-canvas-wrap, #tp-svg) {
    background-color: var(--tp-workspace-background, #ffffff) !important;
  }
  #tegneplan-root.tp-edu-active .tp-layout.tp-pc-layout {
    display: grid !important;
    position: relative;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    grid-template-areas: 'topbar' 'globaltools' 'canvas' !important;
    gap: 4px !important;
  }
  #tegneplan-root.tp-edu-active .tp-main {
    position: relative !important;
    top: auto !important;
    z-index: 1 !important;
    min-width: 0 !important;
  }
  #tegneplan-root.tp-edu-active.tp-edu-details-open .tp-properties {
    display: grid !important;
    grid-auto-rows: max-content;
    position: relative !important;
    z-index: 2 !important;
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0;
    justify-self: stretch !important;
    align-content: start !important;
    overflow: auto !important;
  }
  #tegneplan-root.tp-edu-active.tp-edu-details-open .tp-properties > .tp-card,
  #tegneplan-root.tp-edu-active.tp-edu-details-open.tp-properties-has-open .tp-properties > .tp-card.is-open {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    justify-self: stretch !important;
  }
  #tegneplan-root.tp-edu-active.tp-edu-details-open .tp-properties > .tp-selected-object-card.is-open {
    order: -1;
  }
}
#tegneplan-root.tp-edu-active .tp-statusline :is(.tp-status-control, #tp-lwt-toggle),
#tegneplan-root.tp-edu-active .tp-statusline .tp-status-chip:has(:is(#tp-status-grid-label, #tp-status-sheet-label, #tp-status-zoom-label)) {
  display: none !important;
}

@media screen and (min-width: 980px) {
  #tegneplan-root.tp-edu-active.tp-edu-details-open .tp-layout.tp-pc-layout {
    grid-template-columns: minmax(0, 1fr) clamp(235px, 21vw, 295px) !important;
    grid-template-areas: 'topbar topbar' 'globaltools globaltools' 'canvas props' !important;
  }
}
@media screen and (width < 1180px) {
  #tegneplan-root.tp-edu-active .tp-layout.tp-pc-layout {
    height: calc(100dvh - 56px) !important;
    grid-template-rows: auto auto minmax(360px, 1fr) !important;
  }
  #tegneplan-root.tp-edu-active .tp-main {
    min-height: 0 !important;
    height: 100% !important;
  }
}
@media screen and (width < 980px) {
  #tegneplan-root.tp-edu-active.tp-edu-details-open .tp-properties {
    grid-area: canvas !important;
    position: absolute !important;
    inset: 0 0 auto auto;
    width: min(100%, 300px) !important;
    max-height: min(100%, 62dvh) !important;
    padding: 6px;
    border: 1px solid #d9e3dd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 41, 30, .15);
  }
}
@media screen and (max-width: 760px) {
  #tegneplan-root.tp-edu-active .tp-toolbar-top {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    height: auto !important;
    max-height: none !important;
    gap: 6px !important;
  }
  #tegneplan-root.tp-edu-active .tp-toolbar-top :is(.tp-toolbar-titlewrap, .tp-toolbar-actions) {
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

#tegneplan-root.tp-edu-active .tp-properties > .tp-card:not(
  .tp-selected-object-card, .tp-object-list-card, .tp-drawing-check-card, .tp-underlay-card,
  .tp-edu-drawing-options, .tp-edu-symbol-options
) { display: none !important; }
#tegneplan-root.tp-edu-active .tp-edu-drawing-options h2 {
  margin: 0 0 6px;
  font: 650 13px/1.3 system-ui, sans-serif;
}
#tegneplan-root.tp-edu-active .tp-edu-drawing-options,
#tegneplan-root.tp-edu-active .tp-edu-opening-options { display: grid; gap: 6px; }
#tegneplan-root .tp-edu-plan-layers summary { cursor: pointer; font-weight: 650; }
#tegneplan-root .tp-edu-plan-layers .tp-layer-grid { margin-top: 6px; }
#tegneplan-root.tp-edu-active:not([data-tp-mode="door"]):not([data-tp-mode="window"]) .tp-edu-opening-options,
#tegneplan-root.tp-edu-active:not([data-tp-mode="symbol"]) .tp-edu-symbol-options,
#tegneplan-root .tp-edu-symbol-options > .tp-helpbox { display: none !important; }
#tegneplan-root.tp-edu-active .tp-edu-symbol-options { display: grid; gap: 6px; order: -2; }
#tegneplan-root .tp-edu-symbol-options > #tp-symbol-library-title { font-weight: 700; }
#tegneplan-root .tp-edu-symbol-options .tp-symbol-toolbar { gap: 4px; margin-bottom: 0; }
#tegneplan-root .tp-edu-symbol-options .tp-symbol-fav-toggle {
  display: flex;
  flex-direction: row;
  width: max-content;
  min-height: 28px;
  margin: 0 !important;
  padding: 0 4px;
  border: 0;
  background: transparent;
}
#tegneplan-root .tp-edu-symbol-options #tp-symbol-favorites-only {
  width: 16px;
  height: 16px;
  min-height: 0 !important;
  margin: 0;
}
#tegneplan-root .tp-edu-symbol-options .tp-symbol-library-list { max-height: min(32vh, 290px); margin-top: 0; overflow: auto; }
#tegneplan-root .tp-edu-symbol-options .tp-symbol-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#tegneplan-root .tp-edu-symbol-options .tp-symbol-card { min-height: 92px; }
#tegneplan-root .tp-edu-symbol-options .tp-symbol-card-icon { width: 52px; height: 54px; }
#tegneplan-root[data-menu-page="vvs"] .tp-edu-symbol-options .tp-symbol-card small { display: none; }

@media screen { #tp-native-view-print { display: none !important; } }
@media print {
  #tegneplan-root #tp-edu-toolbar, #tegneplan-root [data-edu-action="details"] { display: none !important; }
  body.tp-native-view-printing > :not(#tp-native-view-print),
  body.tp-native-view-printing #tegneplan-root .tp-shell { display: none !important; }
  body.tp-native-view-printing #tp-native-view-print { position: fixed; inset: 0; }
  body.tp-native-view-printing #tp-native-view-print,
  body.tp-native-view-printing #tp-native-view-print * { visibility: visible !important; }
}

.tp-quick-wall-slide-active #tp-quick-length { visibility: hidden; pointer-events: none; }
