.frame {
  display: block;
  margin: 4px;
}

/* The buttons of a page of options (Home, Utilities, Downloads, Configuration, Reports:
   produceHomeItem of lib-base.js), all in this container */
.homeitems {
  padding: 0.5em;
}

.homeitem {
  display: block;
  position: relative;
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.pageitem {
  display: block;
  position: relative;
  float: left;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.browseitem {
  display: block;
  position: relative;
  margin: 0;
  padding: 0.5em 0.25em;
  border-bottom: 1px solid #ddd;
  overflow: hidden;
  background: inherit;
  cursor: pointer;
}

/* The row under the mouse, in every list (.browseitem, and the rows of .pageTable): a little
   darker than its own background, whatever it is (the list, a window, a theme, a selected row).
   A filter and not a colour: its blocks inherit the background of the row (background: inherit),
   and a transparent colour would be darker twice on them */
.browseitem:hover,
.pageTable tr:hover td {
  filter: brightness(0.95);
}

.browseitem.selected {
  background: #d4dcd8;
}

.browsePopup .browseitem {
  border: none;
}

#blockBody > .browseitem {
  padding: 0.5em 0.25em;
}

.xformfield .browseitem:last-of-type {
  border-bottom: none;
}

.browseitem > div {
  background: inherit;
}

.itemicon {
  display: block;
  float: left;
  width: 1.5em;
  height: 1em;
  line-height: 1em;
  vertical-align: top;
  text-align: center;
  color: #003834;
  position: relative;
  background: inherit;
}

.itemicon > i {
  position: absolute;
  font-size: 40%;
  left: -0.25em; 
  bottom: -0.25em;
  padding: 0.16em;
  line-height: 1em;
  margin: 0;
  border-radius: 0.66em;
  background: inherit;
}

.box {
  display: block;
  position:relative;
  margin: 0.25em;
  background: white;
  border-radius: 8px;
  padding: 0.5em;
  overflow: hidden;
  cursor: pointer;
}

.button {
  display: block;
  position:relative;
  margin: 0.25em;
  background: white;
  border-radius: 8px;
  padding: 0.5em;
  overflow: hidden;
  cursor: pointer;
}

.textbox {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25em;  
}

.textbox3 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; /* number of lines to show */
  line-height: 1.25em;      /* fallback */
   max-height: 3.75em;      /* fallback */
}

ul, ol {
  list-style-position: outside;
  margin-left: 1.25em;
}

li {
  margin-top: 12px;
  margin-bottom: 12px;
}

p {
  margin-top: 12px;
  margin-bottom: 12px;
}

h1, h2, h3 {
  display: block;
  margin: 0.25em 0 0 0;
  padding: 0.25em;
  background: #ccc;
  color: black;
  font-size: bold;
  border-radius: 4px;
}

h1 { font-size: 125%; }
h2 { font-size: 112%; }
h3 { font-size: 100%; }

/* Buttons */

button {
  display: inline;
  position: relative;
  margin: 0.25em;
  padding: 0.4375em 0.25em;
  width: 128px;
  height: 2.25em;
  line-height: 1.25em;
  border: 0.0625em outset #999;
  border-radius: 5px;
  vertical-align: middle;
  
  background: #eee;
  color: black;
  cursor: pointer;

  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: center;
  text-transform: none;
  font-size: inherit;
  
  overflow: hidden;
  outline: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  border: 0.0625em inset #999;
}

button:active span {
  position: relative;
  top: 1px;
  left: 1px;  
}

button:hover {
  background: white;
}

button.selected {
  background: #ffc060;
  cursor: default;
}

button:disabled {
  opacity: 0.5;
}

button i {
  font-size: 1.25em;
  line-height: 1em;
  vertical-align: top;
}

#frameMenu button {
  border: none;
  height: 2.25em;
  padding: 0.5em 0.375em;
  text-align: left;
}



.frameMenuAux .button {
  display: block;
  position: relative;
  margin: 8px;
  border: none;
  border-radius: 5px;
  padding: 0 4px;
  width: auto;
  height: 40px;
  line-height: 40px;
  box-shadow: none;
  text-align: left;
  padding: 0 4px;
  background: white;
  color: black;
  cursor: pointer;
  user-select: none;
}

.frameFootContent {
  display: table;
  table-layout: fixed;
  width: 100%;
  border-spacing: 8px;
  max-width: 320px;
  margin: 0 auto;
}

.frameFootContent .button {
  display: table-cell;
}
 

i {
  text-rendering: optimizeLegibility;
}


/* Platform status (app-tools.js, appToolsStatus): two panels, the state and the incidents, one for
   each of its tabs (in the head of the page, page.init in lib-page.js and .headTab in layout.css).

   The state: each service is a white box, with its title over it as a label (no background),
   and inside one column per server, each one with the name of its server. The colour only where
   it tells something: the dot of the state, the line of its chart and the circles of the server.
   When the page is narrow (a phone), the servers of a service go side by side while they fit */

.statusFrame { container-type: inline-size; padding: 0 0.75em 1em; }
#platformStatus, .statusFrame { background: inherit; }
.statusPanel { display: none; }
.statusPanel.selected { display: block; }

.statusGrid { display: block; }
.statusRow { display: block; }
/* Each service, a white box with the border of a field of a form (.formfield, lib-forms.css),
   with its servers side by side: one column each on a wide screen (--servers, app-tools.js) */
.statusItems { display: grid; grid-template-columns: repeat(var(--servers, 2), minmax(0, 1fr)); column-gap: 2.5em; padding: 1em 1.25em 0.8em; background: #fff; border: 0.0625em solid; border-color: #aaa #eee #eee #aaa; border-radius: 5px; }
.statusLabel { display: flex; align-items: center; gap: 0.6em; margin-top: 1em; padding: 0 0.25em 0.35em; font-weight: bold; min-width: 0; overflow-wrap: anywhere; }   /* the title of the service, over its box, as a label: no background */
.statusServers > .statusLabel { margin-top: 0.5em; }
.statusLabel > i { font-size: 1.3em; opacity: 0.8; }
.statusLink { margin-left: auto; font-weight: normal; font-size: 0.85em; text-decoration: underline; cursor: pointer; opacity: 0.8; }   /* in the title of a service: Software versions, View logs */
.statusLink + .statusLink { margin-left: 1em; }   /* two (the servers): together at the right */
.statusItem { display: flex; flex-direction: column; min-width: 0; }   /* a server in the box of the service */
.statusItemServer { font-size: 0.85em; opacity: 0.7; margin-bottom: 0.3em; }   /* its name, always */
.statusCell { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }   /* a long word (a server, an address) is cut to stay inside */
.statusState { display: flex; align-items: flex-start; gap: 0.5em; font-weight: bold; line-height: 1.25; }   /* the icon with the first line */
.statusState > span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line, cut if it does not fit */
.statusState > span.statusUptime { flex: none; align-self: center; font-size: 0.9em; font-weight: normal; color: black; opacity: 0.75; }   /* after the state of the server, how long it runs: as the text under it (.statusText): its size, weight and tone */
.statusText { margin-top: 0.35em; font-size: 0.9em; opacity: 0.75; line-height: 1.5; }

/* The icon of the state (a circle: play, pause, stop...), and the colour of its chart */
.statusIcon { flex: none; font-size: 1.15em; color: #999; }
.statusState > .statusIcon { margin-top: 0.05em; }   /* centred on the first line (1.25em high, the icon 1.15em) */
.status-green .statusState { color: #2f7a28; }   /* the word of the state, in its colour too */
.status-lime  .statusState { color: #b35900; }
.status-idle  .statusState { color: #2a65a8; }
.status-red   .statusState { color: #b03024; }
.statusCell.status-gray { opacity: 0.5; }   /* not enabled: the whole cell faded */
.status-gray  .statusState { font-weight: normal; }
.status-green .statusIcon { color: #3d8a35; }
.status-lime  .statusIcon { color: #e67700; }
.status-idle  .statusIcon { color: #2f74c0; }
.status-gray  .statusIcon { color: #999; }
.status-red   .statusIcon { color: #c0392b; }
.status-green .statusChart { color: #3d8a35; }
.status-lime  .statusChart { color: #3d8a35; }   /* what went well stays green: the red line is what went wrong */
.status-idle  .statusChart { color: #2f74c0; }
.status-gray  .statusChart { color: #999; }
.status-red   .statusChart { color: #3d8a35; }

/* The charts: the evolution of each service under its text, a line across the width (stretched
   SVG), what went well in green and what went wrong in red, on the same scale; and the circles
   of the resources of the server, filled up to their percent (orange from 70, red from 90) */
.statusChart { margin-top: auto; padding-top: 0.6em; }
.statusChart svg { display: block; width: 100%; height: 2em; overflow: visible; }
.statusArea { fill: currentColor; opacity: 0.15; }   /* under the good line: its level, from the base */
.statusAreaFailed { fill: #c0392b; opacity: 0.15; }   /* the same under the red line */
.statusGap { fill: none; stroke: #666; stroke-width: 1.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }   /* a time without data (the task did not work then): grey dots along the base, a dot per minute, not to be taken for the red line */
.statusLine { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.statusLineFailed { fill: none; stroke: #c0392b; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }   /* what went wrong, on the same scale */
.statusChartFailed { color: #c0392b; opacity: 1; }
.statusMark { stroke: #c0392b; stroke-width: 3; opacity: 0.5; vector-effect: non-scaling-stroke; }   /* a server before 10.8.1: the minutes with something to point out */
.statusChartCaption { margin-top: 0.4em; font-size: 0.75em; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* one line, cut if it does not fit */
.statusRings { display: flex; flex-wrap: wrap; gap: 0.5em 0.75em; margin-top: 0.7em; }
.statusRingGroup { display: flex; gap: 0.75em; flex: 0 1 auto; min-width: 0; }   /* the three circles, that do not part: narrow, they get smaller */
.statusRing { flex: 0 1 3.5em; min-width: 0; text-align: center; }   /* its texts may go a little over the gap, not widen it */
.statusRing svg { display: block; width: 100%; max-width: 3.25em; margin: 0 auto; }
.statusRingBack { fill: none; stroke: rgba(0, 0, 0, 0.12); stroke-width: 3.5; }
.statusRingValue { fill: none; stroke: #3d8a35; stroke-width: 3.5; stroke-linecap: round; }
.statusRingValue.mid { stroke: #e67700; }
.statusRingValue.high { stroke: #c0392b; }
.statusRing text { font-size: 8.5px; font-weight: bold; fill: currentColor; }
.statusRingLabel { font-size: 0.75em; line-height: 1.2; opacity: 0.8; white-space: nowrap; }
.statusRingSub { font-size: 0.7em; line-height: 1.25; opacity: 0.6; white-space: nowrap; }   /* under the name, what completes it (Load 120%, Swap 0%, I/O 8%) */
.statusRingGroup .statusRingLabel, .statusRingGroup .statusRingSub { margin: 0 -1em; }   /* centred under their circle, also when wider than it */
/* The network, in the place of a circle: a chart of its last minutes as high as the circles,
   received in blue and sent in pink (also their values under it) */
.statusNet { flex: 1 1 3.5em; min-width: 3.5em; }   /* next to the circles, taking the room left in the line; if it does not fit, under them, as wide as the cell */
.statusNet svg { height: 3.25em; max-width: none; }
.statusRingUnit { font-size: 0.85em; opacity: 0.6; }   /* the unit, lighter than the name (NET Mbps) */
.statusNetBase { stroke: rgba(0, 0, 0, 0.12); stroke-width: 1; vector-effect: non-scaling-stroke; }
.statusNetLine { fill: none; stroke-width: 1.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.statusNetArea { stroke: none; opacity: 0.15; }
.statusNetLine.statusNetRx { stroke: #4a8fd9; }
.statusNetLine.statusNetTx { stroke: #d96a9c; }
.statusNetArea.statusNetRx { fill: #4a8fd9; }
.statusNetArea.statusNetTx { fill: #d96a9c; }
span.statusNetRx { color: #4a8fd9; }
span.statusNetTx { color: #d96a9c; }
.statusNet .statusRingSub { opacity: 1; }   /* the values in their colour, not faded */

/* The window of the software versions: the servers side by side, in orange the versions that differ */
.statusSoftware { width: 100%; border-collapse: collapse; font-size: 0.9em; }
.statusSoftware th, .statusSoftware td { padding: 0.4em 0.5em; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(0, 0, 0, 0.1); overflow-wrap: anywhere; }
.statusSoftware td:first-child { opacity: 0.75; white-space: nowrap; }
/* The window of the log of a service (administrators): the field of its lines (a form of
   lib-forms), scrolling, selectable, the messages in green, the warnings in orange and the
   errors in red */
.formcontainer .formfield > div.statusLog { overflow: auto; font-family: Consolas, "DejaVu Sans Mono", monospace; font-size: 0.8em; line-height: 1.35; white-space: pre; user-select: text; }   /* a line each, long ones scroll sideways */
.statusLog > div { padding: 0.1em 0.25em; }
/* Its form (.formcontainer is a table, which grows to its widest content): as wide as the
   window, so that the long lines scroll inside the field and the window has no scroll bars */
.statusLogBody > .formcontainer { table-layout: fixed; }
/* The checks of the filter, as high as the other fields: lib-forms.css gives each of their
   labels a margin of 0.5em above and below (.formfield label) */
.statusLogFilter .formfield > div.flex-box > label { margin: 0; }
/* The same in the toolbars of the pages (the check «Incomplete» of the translations, beside the
   filter) */
#blockTools .formfield > div.flex-box > label { margin: 0; }
/* A list in columns (.pageTable, in the body of a page) and the names of its columns (.pageColumns,
   fixed above the box of the body: page.columns of lib-page.js), as the table of centers of wtm
   (.table of wtm/css/custom.css). The list from the left edge of its box (#blockBody has 0.5em on
   the left) to its scroll bar, and each name over its column, with the same space before the text */
.pageTable { width: calc(100% + 0.5em); margin-left: -0.5em; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.pageTable td { padding: 0.25em 0.25em 0.25em 0.5em; border-bottom: 1px solid #ddd;   /* As .browseitem, also in the themes */ text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.pageTable, .pageTable tbody, .pageTable tr, .pageTable td { background: inherit; }   /* The background of the list in each cell, as .browseitem: the filter of the row under the mouse darkens it */
/* The names in a row as wide as the box of the body, each one as wide as its column (flex, by the
   width of its column: equal, or flex-grow by page.columns): the list goes to the scroll bar of the
   box (16px, #frameBody::-webkit-scrollbar of layout.css), the space left on the right. Their grey
   with a gap between them (their transparent border); the first one and the last one to the edges
   of the box (2px beyond their column: their border), the last one also over the scroll bar */
.pageColumns { display: flex; padding-right: 16px; cursor: default; user-select: none; }   /* Names, not text to select */
.pageColumns > div { flex: 1 1 0; min-width: 0; box-sizing: border-box; color: white; background: #888; background-clip: padding-box; border: 2px solid transparent; border-radius: 0.33em; padding: 0.1em 0.25em 0.1em 0.5em; line-height: 1.5em; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pageColumns > div:first-child { margin-left: -2px; flex-basis: 2px; }
.pageColumns > div:last-child { margin-right: -18px; flex-basis: 18px; }
.pageColumns > div img { vertical-align: middle; }
/* Above the lines, when the period has more than the ones given */
.statusLog > div.statusLogNotice { position: sticky; top: 0; left: 0; width: max-content; margin-bottom: 0.25em; padding: 0.25em 0.5em; background: #fde8d2; color: #b35900; font-family: Arial, sans-serif; }
.statusLogInfo { color: #2f7a28; }
.statusLogWarning { color: #b35900; }
.statusLogError { color: #b03024; }

.statusSoftware th { border-bottom: 2px solid rgba(0, 0, 0, 0.2); }   /* under the heads, as between the groups */
.statusSoftwareGroup td { border-top: 2px solid rgba(0, 0, 0, 0.2); }   /* the first row of each group */
.statusSoftware td.statusSoftwareDiffer { color: #b35900; font-weight: bold; }   /* the versions, in orange */

@container (max-width: 48em) {   /* Narrow: the servers of each service side by side while they fit, in columns of the same width (one that goes below is as wide as the ones above) */
  .statusItems { grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); column-gap: 1.5em; row-gap: 1.4em; padding: 0.9em 0.9em 0.7em; }
}
