/* ------------------------------------------------------------------------------------------------- */
/* -------------------------------                                     ----------------------------- */
/* -------------------------------      Detailmanager Basis-Styles     ----------------------------- */
/* -------------------------------                                     ----------------------------- */
/* ------------------------------------------------------------------------------------------------- */
/* ------------------------------------------------------------------------------------------------- */

/*
  Wir müssen ein paar Ding umbauen:
  1. Detailmanagermenu geht über die gesamte Breite
  2. Leftarea / Rightarea machen fürs menü platz
 */

.dm-title-bar, .dmTitle{
  height: var(--height-toolbar);
}

@keyframes dm-start {
  from {transform: scale(0.97);}
  to {transform: scale(1);}
}

div.dmContainer {
  box-shadow: 2px 2px 24px 4px rgba(0,0,0,0.4), 0 0 15px inset rgb(255 255 255 / 25%);
  height: calc(100% - 40px);
  display: flex;
  box-sizing: border-box;
  flex-direction: column;
  margin: 20px;
  background-color: var(--color-card-background);
  position:relative;
}
body:is(.menu-contextbar-classic, .menu-contextbar-navigation) div.dmContainer {
  /*margin-top: -12px;*/
  /*z-index: 1006; !* Das Menü liegt auf 1005 *!*/
  margin-top: 8px; /* Wir bekommen den DM nicht über das Menü, denn dann sind auch die Notificationlisten unter dem DM :( */
}
@media (orientation: portrait), (max-width: 1280px) {
  body div.dmContainer.dmContainer { margin: 0; height: 100%; }
}

div.dmContainer > div.dmMenu {
  display: flex;
  flex-direction: row;
  width: 100%;
  background-color: var(--color-menu3-back);
  color: var(--color-menu3-font);
  padding-top: 4px;
  box-sizing: border-box;
}

@media (orientation: portrait) and (max-width: 999px) {
  div.dmContainer > div.dmMenu {
    padding-top: env(safe-area-inset-top, 4px);
  }
}

div.dmMenu .tmplDetailManagerTitle {
  height: var(--height-toolbar);
  width: var(--width-leftarea);
  flex-shrink: 0;
  margin-right: calc(var(--width-componentspacing) * 2);
}

div.dmMenu .dm-title-bar {
  flex-shrink: 1;
}

div.dmContainer div.dmContent {
  /*padding: var(--width-componentspacing);*/
  /*border-radius: 3px;*/
  height: calc(99% - var(--height-toolbar));
  box-sizing: border-box;
  /*overflow: auto;*/
}

div.dm-title-bar {
  color: var(--color-menu3-font);
  width: 100%;
}

.tmplDetailManagerTitle .dmtitleFrame {
  width: 100%;
  padding-right: 24px; /* lappt unter das menü*/
  display: flex;
  flex-direction: row;
  height: var(--height-toolbar);
  align-items: center;
}

.dmTitle .dmtablist {
  flex-grow: 0;
  flex-shrink: 0;
  width: 32px;
}

.tmplDetailManagerTitle .dmtitle {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: var(--font-normal);
  position: relative;
  flex-grow: 1;
  background-color: transparent;
}

@media (max-width: 499px) {
  .tmplDetailManagerTitle .dmtitle {
    display: none;
  }
}


@media (max-width: 999px) {
  div.dmContainer {
    box-shadow: none;
    height: 100%;
    margin: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
    box-sizing: border-box;
    backdrop-filter: none;
  }

  div.dmMenu .tmplDetailManagerTitle {
    width: auto;
  }
}

.dmtitle .dmadminswitch {
  flex-grow: 0;
  flex-shrink: 0;
}

.dmtitle a {
  display: inline-block;
  height: var(--height-toolbar);
  line-height: var(--height-toolbar);
  box-sizing: border-box;
  padding: 0 4px;
  border-top: 0;
}

.dmtitle a.p {
  border-bottom: 5px solid transparent;
}

.dmtitle a.p:hover {
  box-shadow: none;
}

.dmtitle a.a {
  border-bottom: 5px solid var(--color-accent);
  cursor: default;
}

div.dmContainer div.tmplWorkarea .viewFrame:not([fullscreen]) {
  --header-background: var(--color-toolbar-back);
  --header-color: var(--color-toolbar-font);
}

/*
  Detailmanager menue
*/

.jmlMenuExpander span::before {
  content: '…';
  color: currentColor;
}

.tabcloser {
  overflow: visible;
  width: var(--height-toolbar);
  height: var(--height-toolbar);
  text-align: center;
  float: right;
  color: var(--color-menu3-font);
}

.dmClose {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  line-height: 30px;
  font-weight: bold;
  background-repeat: no-repeat;
}

.dmCloseAll, .dmDeeplink {
  width: 24px;
  margin-bottom: 6px;
  line-height: 24px;
  height: 24px;
}

.dmMenu .jmlMenuExpander {
  width: 0;
  overflow: visible;
  display: inline-block;
  cursor: pointer;
}

.dmMenu .jmlMenuExpander:last-child {
  display: none;
}

.dmMenu .jmlMenuExpander span {
  height: var(--height-toolbar);
  margin-top: 0;
  width: 20px;
  text-align: center;
  line-height: var(--height-toolbar);
  display: inline-block;
}


.dmMenu .jmlMenuExpander span:hover {
  background-color: #FFF;
}

html .tundra .jmlMenuNoWrap {
  overflow: hidden; /* was nicht reinpasst, wird nicht angezeigt */
  position: relative;
}

.jmlMenuNoWrap .items {
  height: 1000px;
  position: absolute;
  padding-right: 20px; /* fuer den More Pfeil reservieren wir uns etwas Platz */
  top: 0;
}

.tundra .jmlWrappedMenu .jmlPopupContent {
  padding: 0;
}

.jmlMenuWrapped { /* die vertikale Liste mit den Items die nicht reingepasst haben */
  min-width: 100px;
}

.jmlMenuWrapped .jmlMenuItem {
  display: block;
  overflow: hidden;
}

.jmlMenuWrapped .jmlMenuItem a {
  display: inline-block;
  width: 100%;
  height: 100%;
  padding: 0 5px;
  line-height: 24px;
  white-space: nowrap;
}

.jmlMenuWrapped .jmlMenuItem img {
  height: 32px;
}

.jmlMenuWrapped .jmlMenuItem img {
  display: none;
}

.dmMenu1, .dmMenu1:active {
  border: 0 none;
  padding: 0;
  margin: 0;
  height: var(--height-toolbar);
}

.dmMenu .jmlMenuItem {
  height: var(--height-toolbar);
  /* wir benötigen die hintergrundfarbe um den expander zu verdecken */
  background-color: var(--color-menu3-back);
  color: var(--color-menu3-font);
  padding: 0;
  line-height: var(--height-toolbar);
}

.dmMenu .jmlMenuItem .jmlMenuCaption {
  font: inherit;
  display: inline-block;
  padding: 10px;
  line-height: 10px;
}

.dmMenu .menuactive .jmlMenuCaption, .dmMenu .jmlMenuItem:hover .jmlMenuCaption {
  color: var(--color-menu3-font-hover);
}

.dmMenu .menupassive {
}

/* --- Kacheln in einem Detailmanager --------------------------------- */

.dmMenu .jmlMenuCaption img {
  display: none;
}

.dmMenu#menuOverview1 {
  margin-top: 8px;
  margin-left: 12px;
  grid-template-columns: repeat(auto-fit, 148px);
  grid-auto-rows: minmax(148px, 148px);
  justify-content: left;
}

.jmlMenuWrapped .jmlMenuItem a:hover,
.dmMenu .jmlMenuItem:hover,
.dmMenu .dijitMenuItemSelected,
.dmMenu .menuactive,
.dmMenu .jmlMenuExpander span:hover,
.dmMenu .menuOverviewItem:hover {
  background-color: var(--color-menu3-back-hover); /* Old browsers */
  color:var(--color-menu3-font-hover);
  --color-card-header: var(--color-menu3-font-hover);
}

.dmMenu .menuOverviewItem {
  color: var(--color-card-font);
  background:  var(--color-card-background);
  transition: all 0.2s ease-out;
}

.dmMenu .menuOverviewItem h1 {
  color: var(--color-card-header);
  font-weight: normal;
  font-size: 14px;
  text-align: center;
  height: 25px;
}

.dmMenu .menuOverviewItem .menuOverviewItemInner {
  width: 128px;
  height: 128px;
  padding: 10px 10px;
}

/* --- Generelles Aussehen ---*/
.detailmanager .boxarea .box.dialogpreshow {
  border-top: 0 none;
}

.detailmanager .dialogpreshow .box_header {
  display: none;
}

div.box.entityActionBar .boxsegmentcontent {
  background: var(--color-toolbar-back);
  color: var(--color-toolbar-font);
}

.entityActionBar .boxsegmentcontent > table {
  width: 100%;
  table-layout: fixed;
  text-align: center;
}

.entityActionBar td {
  padding: 0;
  text-align: center;
}

/*body.debugmode .entityActionBar td,*/
/*body.debugmode .tmplControlBar,*/
/*body.debugmode .globalAction*/
/*{*/
/*  background-image: url(/htdocs/gui/css/embed/debug_measure.svg);*/
/*  background-position: center;*/
/*}*/

.entityActionBar .jmlPopupButton,
.entityActionBar a.jmlAction {
  display: block;
  height: var(--height-toolbar, 32px);
  width: 100%;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: var(--color-toolbar-back);
  color: var(--color-toolbar-font);
}

 .entityActionBar .jmlPopupButton:hover,
 .entityActionBar a.jmlAction:hover {
  background: var(--color-toolbar-button-hover);
  color: var(--color-toolbar-font-hover);
}

.entityActionBar .jmlActionIcon, .entityActionBar .label {
  line-height: var(--height-toolbar, 32px);
  display: inline-block;
}


.entityactionbarpopup img {
  max-height: 24px;
  max-width: 24px;
}

.historyTab {
  overflow: hidden;
  display: inline-block;
  width: 28px;
  text-align: center;
  border-right: 1px solid currentColor;
  white-space: nowrap;
  cursor: pointer;
  margin-right: 8px;
}

div.dmOthersPopup {
  margin-left: 8px;
  margin-top: 16px;
}

div.dmOthersPopup div.jmlPopupContent {
  padding: 0;
  border: 0 none;
}

ul.othersList {
  padding: 0;
  margin: 0;
}

ul.othersList > li {
  position: relative;
  display: block;
  height: 100px;
  width: 250px;
  overflow: visible;
  padding: 8px 8px 8px 24px;
  margin-bottom: 0;
  perspective: 500px;
  box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.25);
  background-color: #DDD;
  color: #333;
  font-weight: bold;
}

ul.othersList > li:first-child {
  padding-top: 15px;
}

ul.othersList > li:last-child {
  padding-bottom: 20px;
}

ul.othersList li.dmTabActive {
  cursor: pointer;
}

ul.othersList li.dmTabClosed {
  height: 0;
}

ul.othersList li .dijitContentPane {
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 500ms;
  transform: translate3d(0, 0px, 0) rotateX(-10deg);
  height: 130px;
  overflow: hidden;
  background-color: white;
}

ul.othersList li:hover .dijitContentPane {
  transform: translate3d(0, -15px, 0) rotateX(-5deg);
}

ul.othersList li .otherTitle {
  position: absolute;
  top: 20px;
  left: 8px;
  color: #333;
}

.tmplDetailManagerTabs .dmTab:hover {
  box-shadow: inset 2px -1px 1px -2px #000;
  /*background: #e4e4e4; /* Old browsers */
  opacity: 1;
  top: 1px;
}

.tmplDetailManagerTabs .dmTabActive, .tmplDetailManagerTabs .dmTabActive:hover {
  box-shadow: 0 1px 2px 0 #000;
  z-index: 22;
  opacity: 1;
  background: #e4e4e4; /* Old browsers */
  background: -webkit-linear-gradient(top, #fafafa 0%, #e4e4e4 75%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top, #fafafa 0%, #e4e4e4 75%); /* Opera 11.10+ */
  background: -ms-linear-gradient(top, #fafafa 0%, #e4e4e4 75%); /* IE10+ */
  background: linear-gradient(to bottom, #fafafa 0%, #e4e4e4 75%); /* W3C */
  top: 0;
  border-radius: 3px 3px 0 0;
}

.tmplDetailManagerTabs .dmTabClosing {
  transition: all 0.5s;
  width: 100px;
}

.tmplDetailManagerTabs .dmTabClosed {
  opacity: 0;
  margin: 0;
  padding: 0;
  width: 0;
}

.tmplDetailManagerTabs .dmTabAdmin {
  padding-left: 12px;
  background-image: url(dmadmin.svg);
  background-repeat: no-repeat;
  background-position: -12px;
  background-color: #e4e4e4;
}

.tmplDetailManagerTabs .dmTab a.tablink {
  display: inline-block;
  height: 20px;
  min-width: 100px;
  padding: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 20px;
  font-size: 14px;
  color: #333;
}

.tmplDetailManagerTabs .dmTab a.tablink img {
  vertical-align: text-bottom;
}

/*.tmplDetailManagerTabs .dmTab .tabcloser {*/
  /*position: absolute;*/
  /*top: 0;*/
  /*right: 0;*/
  /*height: 20px;*/
  /*width: 20px;*/
  /*padding: 5px;*/
  /*text-align: right;*/
/*}*/

.tmplDetailManagerTabs .globalButtons {
  position: absolute;
  top: 0;
  right: 0;
  height: 30px;
  padding: 4px 4px 0 0;
}

.dmCloseTab {
  display: inline-block;
  transition: transform 0.25s;
  height: var(--height-toolbar);
  width: var(--height-toolbar);
  line-height: var(--height-toolbar);
  text-align: center;
  background: url(/htdocs/gui/detailmanager/css/dmclose.svg) no-repeat center;
  background-size: 20px 20px;
}

.dmCloseTab::after {
}

.dmCloseTab:hover {
  transform: rotate(90deg);
}

/*.dmCloseTab:hover{*/
/*background: url(blue/dmclose_hover.png) no-repeat center center;*/
/*}*/

.dmCloseAll {
  background: url(dmcloseall.svg) no-repeat center center;
}

.dmCloseAll:hover {
  background: url(dmcloseall_h.svg) no-repeat center center;
}

.dmDeeplink {
  background: url(dmdeeplink.png) no-repeat center center;
}

.dmDeeplink:hover {
  background: url(dmdeeplink_hover.png) no-repeat center center;
}

 /*div.tmplContentTable > .boxarea:first-child {*/
  /*position: relative;*/
  /*padding-top: 72px;*/
/*}*/

/*.detailmanager .boxarea .dmTitleSegment {*/
  /*position: absolute;*/
  /*box-shadow: none;*/
  /*margin: 0;*/
  /*top: 0;*/
  /*left: 0;*/
  /*right: 0;*/
/*}*/

ul.othersList > li:hover {
  background-color: var(--color-secondary);
}


.tmplDetailManagerMenu {
  padding-top: 0;
  min-height: var(--height-toolbar);
  background-color: var(--color-menu3-back);
  color: var(--color-menu3-font);
}
