html   { display: block; position: relative; width: 100%; height: 100%; margin:0; padding: 0; overflow: hidden; }  
body   { display: block; position: relative; width: 100%; height: 100%; margin:0; padding: 0; overflow: hidden; }  

#frameCover  { display: none;  position: absolute; width: 100%;  height: 100%;  z-index: 100; overflow: hidden; pointer-events: auto; background:black; opacity:0.5;}

#frameTop    { display: none;  position: absolute; display:none; left: 0; right: 0; height: 4em; z-index: 40; overflow: hidden;  padding:0.375em 0.5em; pointer-events: auto; }
#frameHead   { display: none;  position: absolute; display:none; left: 0; right: 0; height: 3.5em; z-index: 20; overflow: hidden;  padding:0.3333em; pointer-events: auto; }
#frameTools  { display: none;  position: absolute; display:none; left: 0; right: 0; height: auto;  z-index: 10; overflow: visible; pointer-events: auto; }
#frameCols   { position: absolute; z-index: 5; left: 0; right: 0; pointer-events: auto; }   /* The names of the columns of the list, above the box of the body (page.columns) */
#frameBody   { display: block; position: absolute; display:none; left: 0; right: 0; top: 0; bottom: 0; z-index: 0; overflow: hidden;  pointer-events: auto; overflow-y: scroll; }
#frameLeft   { display: none;  position: absolute; display:none; left: -20em; width: 15em; top: 4em; bottom: 0; z-index: 30; overflow: auto;    pointer-events: auto; }
#frameRight  { display: none;  position: absolute; display:none; right: -20em; width: 15em; top: 4em; bottom: 0; z-index: 30; overflow: auto;    pointer-events: auto; }

#blockLogo   { display: block; position: relative; margin:0; overflow: hidden;  height:3em;  line-height:3em; float:left; }
#blockTop    { display: block; position: relative; margin:0; overflow: visible; height:3em;  line-height:3em; float:right; }

/* The top bar always in one line: the button of the menu, the logo and, at the right, the options
   and the user, which take the room the logo leaves. When there is not enough, the name of the
   user is cut (...), down to its icon */
#blockTopBar { display: flex; align-items: center; height: 3em; }
#blockTopBar > #btnMenu   { flex: none; }
#blockTopBar > #blockLogo { flex: 0 1 auto; min-width: 0; float: none; }
#blockTopBar > #blockTop  { flex: 1 1 0; min-width: 0; float: none; display: flex; justify-content: flex-end; align-items: center; overflow: hidden; white-space: nowrap; }   /* centered, not stretched: each option as high as before, the bar of the one in use under its name */
#blockTop > *         { flex: none; }
#blockTop > .menuitem { flex: 0 1 auto; min-width: 4.5em; display: flex; align-items: center; }   /* at least its icons */
#blockTop .topUserName { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {   /* a phone: without the mark of the application in use, which only informs, and closer */
  #blockTop > .activeOption { display: none; }
  #blockTop > * { margin-left: 0.4em !important; margin-right: 0.4em !important; }
}

#blockHead   { display: block; position: relative; margin:0.50em; overflow: hidden;  height:2em;  line-height:2em; font-weight: bold; margin-left: 1em; white-space: nowrap; text-overflow: ellipsis; }
#blockTools  { display: block; position: relative; margin:0.25em; overflow: visible; height:auto; line-height:2em; }
#blockMenu   { display: block; position: relative; margin:0.75em; overflow: auto; }
#blockAux    { display: block; position: relative; margin:0.75em; overflow: auto; }
#blockBody   { display: block; position: relative; padding:0.25em 0 0.25em 0.5em; overflow: visible; background: inherit; }

#frameBody::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}

#frameBody::-webkit-scrollbar-thumb {
  background: #666;
  border-radius: 8px;
  border: 5px solid transparent;
  background-clip: padding-box;
  cursor: pointer;
}

/* The tabs of a page (page.init({tabs}), lib-page.js), at the right of its title, as the options
   of the top bar: the one in view with its bar (.activeOption, after this so that it gives the
   colour); the number of a tab, as a superscript (moved up without changing the height of the
   line) */
#blockHeadTabs { float: right; display: flex; align-items: center; height: 100%; margin: 0 0.4em; }
.headTab       { margin: 0 0.25em; padding: 0.25em 0 0; line-height: 1.25; white-space: nowrap; cursor: pointer; user-select: none; }
.headTabCaption { display: inline-block; padding: 0 0.4em 0.1em; border-bottom: 0.25em solid transparent; }
.headTabBadge  { display: inline-block; position: relative; top: -0.55em; margin-left: 0.2em; padding: 0 0.4em; border-radius: 0.8em; background: #c0392b; color: white; font-size: 0.7em; font-weight: bold; line-height: 1.4; }

/* Option in use of the top bar (Manager), with a bar under it as in the header of wtm: the theme
   sets its color, the same as .activeOption in wtm */
.activeOption { border-bottom: 0.25em solid currentColor; }

/* The login box (lib/platform/login.js) is centered in #loginWrap, which takes the whole screen.
   Its height is a minimum: it grows with its content (a bigger logo), and if it does not fit the
   screen, #loginWrap scrolls */
#loginWrap {
  position: fixed;
  left:0; top:0; right:0; bottom:0;
  display: flex;
  overflow: auto;
}

#loginBox {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 20em; min-height:35em;   /* (box-sizing: border-box) the inside is 16em, as the logo */
  margin: auto; padding:2em 2em 1.5em;
  background: #444; 
  border: 1px solid #048; 
  border-radius: 1em;
  text-align: center;
}

/* Parts of the login box, centered by default; a theme can change them (theme-gtd aligns them to
   the left) */
#loginBox .loginContent   { margin: auto 0; }   /* centered vertically in the box */
#loginBox .loginLogo      { width: 16em; }
#loginBox .loginName      { text-align: center; font-weight: bold; margin-top: 0.5em; }
#loginBox .loginSeparator { border: none; border-top: 1px solid currentColor; opacity: 0.6; margin: 2em auto 1em; max-width: 14em; }   /* 1em in from each side of the logo, also in the full screen themes; below it, the flags add their 1em */
/* Flags: the others a little dimmed (whole when the mouse is over them); the one of the language
   in use whole, with a bar under it, apart, as the option in use in the header of wtm
   (.activeOption): 0.25em in the accent color of the theme, which the theme sets. The bar is the
   border of the span around the image (the others have it transparent, so they are as high) */
#loginBox .loginFlag      { display: inline-block; vertical-align: top; margin: 1em 0.25em; padding-bottom: calc(0.25em + 1px); border-bottom: 0.25em solid transparent; cursor: pointer; opacity: 0.6; transition: opacity 0.2s; }
#loginBox .loginFlag img  { display: block; width: 32px; height: 24px; border: 1px solid black; }   /* SVG, 4:3 (lib/platform/img/flags) */
#loginBox .loginFlag:hover    { opacity: 1; }
#loginBox .loginFlag.selected { opacity: 1; cursor: default; border-bottom-color: currentColor; }
#loginBox #loginFormContainer { width: 13em; margin: auto; padding: 0 0 0.5em; overflow: hidden; text-align: left; }
#loginBox #btnLogin       { margin: 0.5em auto 0.75em; }
#loginBox .loginRecover   { padding: 1em 0; font-size: 85%; opacity: 0.7; }
#loginBox .loginFooter    { padding: 0.75em 0; opacity: 0.5; font-size: 66%; }

#frameHead > i {
  display: inline-block;
  position: relative;
  margin: 0.25em;
  border: none;
  border-radius: 5px;
  padding: 0;
  width: 1.3333333em;
  height: 1.3333333em;
  line-height: 1.3333333em;
  font-size: 1.5em;
  text-align: center;
  box-shadow: none;
  user-select: none;
  cursor: pointer;
}

/* The button of the main menu, at the left of the logo of the top bar, the same on every page:
   only on a narrow screen, where the menu is out of the screen (see the media query below) */
#btnMenu {
  display: block;
  float: left;
  height: 2em;
  line-height: 2em;
  margin-left: -0.25em;   /* More to the left and farther from the logo, which stays where it was */
  margin-right: 0.58em;
  padding: 0 0.25em;
  font-size: 1.5em;
  cursor: pointer;
  user-select: none;
}


#frameLeft button {
  display: block;
  margin: 0.25em 0 0.5em;
  width: 100%;
  text-align: left;
}

#popupMenu {
  display: none;
  position: fixed;
  width: auto;
  height: auto;
  z-index: 0;
  overflow: hidden;
  pointer-events: auto;
}

.menuitem {
  display: block;
  padding:8px;
  margin:8px;
  color: inherit;
  cursor:pointer;
  text-decoration: none;
  border-radius: 4px;  
}

.menuitem:hover {
  background: #E0D4C8;
  text-decoration: none;
}

/* A disabled option, in the menus and in the head (lib-page.js): the same, quite transparent */
#frameHead > i.disabled { opacity: 0.25; cursor: default; }
.menuitem.disabled {
  opacity: 0.25;
  pointer-events: none;
}

.menuoption {
  background: #E8E8E8;
  color: black;
  border: 1px solid #909090;
  line-height: 125%;
}

.menuoption>img {
  margin: 0px;
}

.signaled {
  color: #004090;
}



/* On a narrow screen the menu of the right is not used (its actions are in the head, lib-page.js):
   hidden, also when a page shows it, instead of out of the screen at the right, where it made the
   page wider than the screen of a phone (and the popup menus, fixed, went out of it) */
@media (max-width: 863.98px) {
  #frameRight  { display: none !important; }
}

@media (min-width: 864px) {
  #frameLeft   { left: 0px; }
  #frameRight  { right: 0px; }
  #frameHead   { left: 15em; right: 15em; }
  #frameTools  { left: 15em; right: 15em; }
  #frameBody   { left: 15em; right: 15em; }
  #frameCols   { left: 15em; right: 15em; }   /* As #frameBody (page.columns) */
  #frameHead i { display: none !important; }
  #btnMenu     { display: none !important; }
}






