/***********************************************************************
 ** default  theme.css  for guide theme  
 ** 
 ***********************************************************************/

:root {
  --stack-body-fg: #333;
  --stack-body-bg: /*#f2f2f2;*/ #f5f5f4;
  --stack-body-font-family: "Roboto", arial, helvetica, Verdana, sans-serif; 
  --stack-body-font-size: 16px;
  
   /* most of these are no longer needed now that the menu is a dropdown. */
  --stack-menu-hover-bg: #ddd;
  --stack-menu-hover-fg: #222;
  --stack-menu-border-color: #999;
  --stack-menu-hrule-color: #ccc;
  
  --stack-footer-font-size: 11px;
  --stack-footer-fg: #888;
  
   /* These are no longer needed. */
  --stack-headbar-bg: black;
  --stack-headbar-fg: white; /*#ffff88;*/
  --stack-headbar-hover: yellow;
  --stack-headbar-font-size: 13px;
  --stack-headbar-font-family: arial, helvetica, Verdana, sans-serif; 
    
    /* header of a book and main stack (site). */
  --book-theme-bg: #008ccf; /*#036399;*/
  --book-theme-fg: white;
  --book-main-bg: white;
  --book-main-topoffset: 65px;
  --book-banner-width: 100px;
  --book-banner-bg: #f5f5f4;
  --book-banner-border: #e0e0e0;
  --book-toc-body-bg: white;
  --book-toc-icon-fg: white; /*#606060;*/
  --book-toc-icon-size: 20px; /*18.662px;*/ 
  
    /* page sections of the main body for the frontside and book management. */
  --mgm-section-card-bg: white;
  --mgm-section-card-fg: #222;
  --mgm-section-title-fg: #222222;
  --mgm-section-title-size: 25px;
  --mgm-section-text-fg: #555; /*#575757;*/
  --mgm-section-text-size: 14px;
  --mgm-section-hover-bg: #f4f4f4; 
  --mgm-section-hover-fg: #555;
  --mgm-section-border-color: #ccc;
  --mgm-section-shadow-color: #eee;
  --mgm-section-hrule-color: #aaa; /*#ccc;*/
  --mgm-section-btn-fg: #999; /*#555*/
  --mgm-section-btn-bg: white;
  
  --mgm-subcard-block-bg: #f8f8f8;
  --mgm-subcard-block-fg: #222;
  --mgm-subcard-title-size: 20px;
  --mgm-subcard-title-fg: var(--book-theme-bg);
  --mgm-subcard-border-color: #b4b4b4;
  
  --mgm-subsect-title-fg: var(--book-theme-bg);
  --mgm-subsect-title-size: 18px;
  --mgm-subsect-title-sizex: 20px;  
  --mgm-subsect-text-size: 13px;
  
    /* dialog parts. */
  --dialog-title-size: 24px;
  
    /* input elements within page sections. */
  --mgm-input-box-bg: #f4f4f4;
  --mgm-input-box-border: #b4b4b4;
  --mgm-input-box-hover: #e4e4e4;
  --mgm-input-label-fg: #555555;
  --mgm-input-label-size: 13.6px;
  --mgm-input-text-fg: #444444;
  --mgm-input-readonly-fg: #999;
  --mgm-input-btn-text: 12px;
  --mgm-input-textarea-size: 16px;
  --mgm-input-textarea-font: Courier New, monospace;
  
    /* Message colors. */
   --msg-warning-color: #cf4d03;
   
    /* Link Colors. */
  --link-normal-color: #003380; /*#206ea7;*/
  --link-hover-color: #006000;
}


/* ----------------------------------------------------------------
 *  HTML body settings
 * ----------------------------------------------------------------*/

html {
  height: 100%;
}

body {
  margin: 0px; 
  font-family: var(--stack-body-font-family);
  font-size: var(--stack-body-font-size); 
  color: var(--stack-body-fg);
  background-color: var(--stack-body-bg);
  font-weight: normal;   
}



/* ----------------------------------------------------------------
 *  Wiki Header
 * ----------------------------------------------------------------*/

header {
  position: sticky;
  position: -webkit-sticky;  
  z-index: 200;
  top: 0;
  width: 100%;
  height: 57px; /*59px;*/ /*68px;*/ /*65px;*/ 
  background-color: var(--book-theme-bg);
  color: var(--book-theme-fg);
  box-shadow: 0px 3px 7px black;
  margin-bottom: 0px; 
}


header a, 
header a:link,
header a:visited, 
header a:hover {
  color: var(--book-theme-fg); 
  text-decoration: none;
}

header .bw-header-icon {
  width: 1px;
  vertical-align: middle;  
}

header .bw-header-title {
  min-width: 25%;
  padding-left: 1ex;
  vertical-align: middle;  
}

header .bw-header-subtitle {
  vertical-align: middle;  
}

header .bw-header-search {
  min-width: 30%;
  vertical-align: middle;
}


header .bw-stacktitle {
  font-size: 20px; 
  display: inline-block;
  vertical-align: middle;
}

header .bw-stacktitle a, 
header .bw-stacktitle a:link,
header .bw-stacktitle a:visited, 
header .bw-stacktitle a:hover {
  font-weight: 500;
  color: var(--book-theme-fg); 
  text-decoration: none;
}


header .bw-subtitle {
  font-size: 20px;   
  font-style: italic;
}

header .bw-subtitle a, 
header .bw-subtitle a:link,
header .bw-subtitle a:visited, 
header .bw-subtitle a:hover {
  font-weight: 400;
  color: var(--book-theme-fg); 
  text-decoration: none;
}


header .stacksubtitle {
  font-size: 18.62px;
  font-style: italic;
  display: inline-block;
  font-family: 'Times New Roman', serif;
}

header .bw-topbar {
  /*background-image: url('imgs/navbg.gif');*/
}

header .bw-headerbar {
  border-top: 1px solid #eee;
  background-color: var(--stack-headbar-bg);
  padding-left: 0px;
  padding-right: 0px; /*1ex;*/
  font-size: var(--stack-headbar-font-size);
  font-family: var(--stack-headbar-font-family);
  height: 16px; /*18px;*/
  font-weight: 400;
}

header .bw-stackauthor a {
  text-decoration: none;
}

header .stackcmd a,
header .stackicon a {
  text-decoration: none;
  font-weight: bold;
}

header .stackcmd a:hover,
header .stackicon a:hover,
header .stackauthor a:hover {
  color: var(--stack-headbar-hover); 
  text-decoration: none;
}

header .headerbar a:hover {
  color: var(--stack-headbar-hover); 
  text-decoration: none;
}


header img.stackicon {
  width: 32px; 
  height: 32px; 
  vertical-align: middle;
}

header .stackicon i {
  font-size: 25.6px;
}


header .bw-bookicon {
  width: 50px;
  padding-top: 2px;
}

header .bw-bookicon img {
  width: 38px; 
  height: 38px; 
  vertical-align: middle;
}

header .stackauthor {
  font-size: var(--stack-headbar-font-size);
  padding-left: 5px; /*10px;*/
  padding-right: 0px; /*1ex;*/
  color: var(--stack-headbar-fg);
  line-height: 13px;
  display: inline-block;
}


header .stackcmd {
  color: white;
  font-size: 13px; 
  font-weight: bold;
  padding-left: 10px;
  padding-right: 1ex;
  color: var(--stack-login-fg);
  line-height: 13px;
  display: inline-block;  
}


.bw-stack-home {
  color: var(--book-theme-fg); /*var(--stack-home-icon-fg);*/
/*  position: fixed;
  left: 5px;
  bottom: 12px; */
  font-size: 0.95em;
/*  width: 75px; 
  text-align: center; 
  z-index: 10; */
  margin-right: 5px;
  margin-left: 0ex; 
  display: inline-block;
  vertical-align: middle;
  /*padding-top: 4px;*/
}

.bw-stack-home i {
  /*line-height: 1.5em; */
  font-size: 2em;
  vertical-align: middle;
}

.bw-stack-home a,
.bw-stack-home a:link,
.bw-stack-home a:visited {
  color: var(--book-theme-fg); /*var(--stack-home-icon-fg);*/
}

.bw-stack-home a:hover {
 /* color: var(--link-normal-color);*/
}


.bw-book-icon {
  display: inline-block;
  position: absolute;
  left: 10px;
  top: 100px;  
}

.bw-book-icon img {
  width: 48px;
}

.bw-chap-icon {
  display: inline-block;
  position: absolute;
  left: 10px;
  top: 100px;  
}

.bw-chap-icon img {
  width: 48px;
}

/* ----------------------------------------------------------------
 *  Wiki Search
 * ----------------------------------------------------------------*/

.bw-search-box {
  width: 8rem;
  transition: width 0.2s ease-in-out;
  background-color: var(--mgm-input-box-bg);
  font-size: 9pt;
  z-index: 10;
  border-radius: 7px;
  border: 1px solid white;  
}

.bw-search-box:focus {
  width: 18rem;
}


.bw-search-bar {
  padding-right: 7px;
  padding-bottom: 5px;   
  padding-top: 2px;
  padding-bottom: 2px;
  display: inline-block;
  z-index: 10;
  vertical-align: middle;  
}

.bw-search-form {
  margin: 0px;
  font-size: 9pt;
}

.bw-searchbtn {
  display: none;
}

header #searchbox {
  border-radius: 8px;
  border: 1px solid white;
}


/* ----------------------------------------------------------------
 *  Wiki Footer
 * ----------------------------------------------------------------*/

footer {
  text-align: center;
  color: var(--stack-footer-fg);
  font-size: var(--stack-footer-font-size);
  font-weight: bold;
}

footer.book {
  background-color: black;
  width: 100%;
  height: 18px;
  color: white;
}

footer.book a, 
footer.book a:link,
footer.book a:visited {
  font-weight: bold;
  color: white; 
  text-decoration: none;
}

footer.book a:hover {
  color: yellow; 
  text-decoration: none;
}

/* ----------------------------------------------------------------
 *  The Book TOC link in the header. 
 * ----------------------------------------------------------------*/

#bw-tocicon {
  min-width: 30px;
  color: var(--book-toc-icon-fg);
  font-weight: normal;
  line-height: 18px; 
  cursor: pointer;
  font-style: normal;
  font-size: var(--book-toc-icon-size);
  margin-left: 8px;   
  display: inline-block;
  vertical-align: middle;    
/*  position: fixed;
  left: 5px;
  top: 85px;*/
}



/* ----------------------------------------------------------------
 *  Tooltips for hovering text.
 * ----------------------------------------------------------------*/

 /* Tooltip container */
.bw-tooltip {
  position: relative;
  display: inline-block;
  font-weight: normal;
}

 /* Tooltip text. */
.bw-tooltip .tooltiptext,
.bw-tooltip .navtiptext {
  visibility: hidden;
  min-width: 175px;
  height: 28px;
  line-height: 28px;
  padding-left: 1ex; 
  padding-right: 1ex;
  background-color: #FFFFCC;
  color: #222;
  white-space: nowrap;  
  text-align: center;
  font-size: 14px;
  font-style: italic;
  border-radius: 6px;
  border: 1px solid #FFFFCC;
  
   /* Position the tooltip text */
  position: absolute;
  z-index: 1;  
}

.bw-tooltip .tooltiptext {
  top: 5px;
  left: 40px;
}

.bw-tooltip .navtiptext.left {
  left: -120px;
  top: 40px;
}

.bw-tooltip .navtiptext.right {
  right: 0px;
  top: 40px;
}

.bw-tooltip:hover .tooltiptext,
.bw-tooltip:hover .navtiptext {
  visibility: visible;
}



/* ----------------------------------------------------------------
 *  Main Body
 * ----------------------------------------------------------------*/

main {
  margin-left: 0px; 
  margin-top: 20px;
  font-size: 1em; 
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 20px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px;  
  min-height: 6in;
  line-height: 1.4;  
  position: relative;
}

main#stack {  
  margin-left: 0px; 
  margin-top: 20px;
  font-size: 1em; 
  padding-left: 0px;
  padding-right: 0px;
  padding-top: 20px; /*3ex;*/
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 20px; /*3ex;*/  
  min-height: 6in;
  line-height: 1.4;  
  position: relative;  
}

main#settings {
}


main#book {
  margin-top: 5px; /*20px;*/
}

main#bookx {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  padding-top: var(--book-main-topoffset);
  padding-left: 0px;
  margin-top: 0px;
}

/* ----------------------------------------------------------------
 *  General styles
 * ----------------------------------------------------------------*/

.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

.bw-button {
  font-family: var(--page-text-family);
  vertical-align: middle;
}

.bw-button i {
  vertical-align: middle;
  margin-right: 1ex;
  padding-bottom: 2px;
  font-size: 1.3em;
}


/* ----------------------------------------------------------------
 *  Error message box
 * ----------------------------------------------------------------*/

div.alert {
  display: inline-block;
  background-color: white;
  vertical-align: center;
  line-height: 1.3;
  color: blue; /*#ab0f0e;*/
  border-radius: 6px;
  border: 1px solid var(--mgm-section-border-color);
  border-left: 6px solid blue; /*#ab0f0e;*/
  width: 4in;
  min-height: 0.75in;
  box-shadow: 2px 2px 5px #777; 
/*  box-shadow: 0, 4px 8px 0 rgba(0, 0, 0, 0.2);*/
/*
  position: absolute;
  top: 0;
  right: 100px;
  */
  position: fixed;
  top: 9%;
  left: 60%;
}

div.alert.error {
  border-left: 6px solid #ab0f0e;
  color: #ab0f0e;  
}

div.alert.note {
  border-left: 6px solid #0a750a;
  color: #0a750a;  
}


div.alert .flex-container-row {
  display: flex;
  flex-direction: row;
  align-items: center;
/*  justify-content: space-between;*/
  min-height: 0.75in;
}

div.alert-icon {
  display: inline-block;
  width: 30px;
  height: 100%;
  margin-left: 2ex;  
}

div.alert .message {
  display: inline-block;
  margin: 2ex;
  margin-right: 3ex;
  font-weight: bold;
  font-size: 14px;
}

div.alert .close-btn {
  display: inline-block;
  color: #777;
  float: right;
  margin-right: 1ex;
 /* position: absolute;
  top: 8px;
  right: 12px;*/
  cursor: pointer;
  font-size: 24px;
  font-weight: normal;
}

 
.bw-text-warn {
  color: var(--msg-warning-color);
}

/* ----------------------------------------------------------------
 *  Section styles
 * ----------------------------------------------------------------*/

section.bw-card {
  font-size: var(--mgm-section-text-size);  
}


 /* Used with the <h1> title of a section block. */
section.bw-card h1 { 
  color: var(--mgm-section-title-fg);
  font-size: var(--mgm-section-title-size);
  font-weight: normal;
  margin-top: 5px;
  margin-bottom: 0px;
}


section.bw-card {
  color: var(--mgm-section-card-fg);
  background-color: var(--mgm-section-card-bg);
  border-color: #bbb;
/*  box-shadow: 0 1px 6px -1px black;*/
  box-shadow: 0px 0px 2px 0px #ccc;
  border-radius: 8px;
  padding: 16px 32px 16px 32px;  
  min-height: 300px;
  margin-left: auto;
  margin-right: auto;  
}

section .section-text {
  color: var(--mgm-section-text-fg);
  font-size: var(--mgm-section-text-size);
  margin-bottom: 10px;
  margin-top: 20px;
}

section .section-text h2 {
  color: var(--mgm-subsect-title-fg);
  font-size: 1.6em;
  font-weight: normal;
  margin-top: 20px;
  margin-bottom: 8px;
}


section hr {
  margin-top: 15px;
  margin-bottom: 15px;
  border: none;
  border-top: 1px solid var(--mgm-section-hrule-color);
}

.bw-button {  
  display: inline-block;
  color: var(--book-theme-fg);
  background-color: var(--book-theme-bg);
  border: 1px solid var(--book-theme-bg);
  border-radius: 4px;
  box-shadow: 2px 2px 3px var(--mbm-section-shadow-color);
  font-size: var(--mgm-input-btn-text);
  line-height: 1.4em;
  padding: 8px 16px;
  cursor: pointer;
}


a.bw-button:link,
a.bw-button:visited,
a.bw-button {
  text-decoration: none;
  color: var(--book-theme-fg);
}

a.bw-button:hover {
  filter: brightness(1.2);
  box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .1);  
}

a.bw-button.outline {
  color: var(--mgm-section-btn-fg);
  background-color: var(--mgm-section-btn-bg);
  border: 1px solid var(--mgm-section-btn-fg);
}

a.bw-button.outline:link,
a.bw-button.outline:visited,
a.bw-button.outline {
  text-decoration: none;
  color: var(--book-theme-bg);
}

a.bw-button.outline:hover {
  filter: none;
  border-color: black;
}

a.bw-button.image {
  padding: 1px 12px;
  padding-top: 5px;
}

.bw-button-group {
  margin-bottom: 8px;
  /*padding-top: 10px;
  border-top: 1px solid var(--mgm-section-hrule-color);*/
}

.bw-button-group.rule {
  border-top: 1px solid var(--mgm-section-hrule-color);
  padding-top: 8px;
}

.bw-button-group button {
  margin-left: 2ex;
}


/* ----------------------------------------------------------------
 *  Bookwiki Cards - used to display forms and lists 
 * ----------------------------------------------------------------*/

.bw-card .grid-container-row {
  display: grid;
  align-items: center;
}


.bw-card .flex-container-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;    
}

.bw-card .flex-container-row.right {
  justify-content: flex-end;
}

.flex-tile-group { 
  flex-direction: column;
  align-items: center;
  justify-content: space-between; 
  border-left: 1px dashed #777;
  padding-left: 25px;
}

.flex-tile-group.simple {
  border-left: none;
}

.bw-card .flex-container-row.compact {
  justify-content: flex-start;  
}

.bw-card .flex-container-row.stacked {
  justify-content: flex-start;
}

.flex-container-row.align-top {
  align-items: stretch;
}

.grid-container {
  display: grid;
  align-items: center;   
}

.grid-container.two-columns {
  grid-template-areas: '. .';
}
  
.grid-container.center-items {
  place-items: center;
}

.flex-container-row h1 {
  flex: 1;
}

 /* Used with the <h2> title of a sub section block. */
.bw-card .subsection h2 { 
  color: var(--mgm-subsect-title-fg);
  font-size: var(--mgm-subsect-title-size);
  font-weight: normal;
  margin-top: 20px;
  margin-bottom: 8px;
}


.bw-card .subsection summary h2 {
  display: inline;
}


.bw-card .subsection {
  color: var(--mgm-section-text-fg);
  font-size: var(--mgm-subsect-text-size);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--mgm-section-hrule-color);
}

.bw-card .subsection.norule {
  border-bottom: none;
}

.bw-card .subsection.xskip {
  margin-bottom: 25px;
}

.bw-card .subsection p {
  margin-top: 4px;
  margin-bottom: 15px;
}


.bw-card details .subsection {
  margin-left: 16px;
  margin-right: 16px;
}

.bw-card details.outline {
  border: 1px solid #b4b4b4;
  border-radius: 4px;
}

.bw-card summary {
  color: var(--mgm-input-label-fg);
  font-size: var(--mgm-input-label-size);
  padding-bottom: 2px;
  padding: 1ex;
  cursor: pointer;  
}

.bw-card .resource-lock {
  margin-right: 2ex;
}


/* ----------------------------------------------------------------
 *  Forms
 * ----------------------------------------------------------------*/

.bw-card form label {
  color: var(--mgm-input-label-fg);
  font-size: var(--mgm-input-label-size);
  padding-bottom: 2px;
  display: block;
}

.bw-card .form-group {
  margin-bottom: 15px;
}

.bw-card .form-group.expand {
  flex: 1;
}


.bw-card .flex-container-row {
  column-gap: 0px;
}

.bw-card .flex-container-row.smallgap {
  column-gap: 30px;
}

.bw-card .flex-container-row .form-group.half {
  flex: 0 0 45%;
  margin-bottom: 0px;
}


.bw-card form .error {
  color: #a00000;
  font-size: var(--mgm-input-label-size);    
}


.bw-card form textarea {
  box-sizing: border-box;  
  font-size: 14px;
  width: 100%;
  padding: 9px;
  color: var(--mgm-input-text-fg);
  border: 1px solid #b4b4b4;  
  border-radius: 3px;  
}

.bw-card form input[type="text"] {
  box-sizing: border-box;  
  font-size: 14px;
  width: 100%;
  padding: 9px;
  color: var(--mgm-input-text-fg);
  border: 1px solid #b4b4b4;  
  border-radius: 3px;
}

.bw-card form input[type="text"]:disabled {
  color: var(--mgm-input-readonly-fg);
}

.bw-card form input[type="password"] {
  box-sizing: border-box;
  outline-width: 1px;
  outline-color: var(-book-theme-bg);    
  font-size: 14px;
  width: 100%;
  padding: 9px;
  color: var(--mgm-input-text-fg);
  border: 1px solid #b4b4b4;  
  border-radius: 3px;  
}

.bw-card form input[type="file"]::file-selector-button {
  line-height: 1.4em;
  padding: 7.5px 16px;
  margin-top: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  background-color: var(--book-theme-bg);
  color: var(--book-theme-fg);
  box-shadow: none;
  border: 1px solid var(--book-theme-bg);
  border-radius: 4px;
  font-size: var(--mgm-input-btn-text);  
}

.bw-card form input[type="file"]::file-selector-button:hover {
    border: 1px solid black;
}

.bw-card .slider {
  height: 20px;
  width: 100%;
  background: #ddd;
  border-radius: 4px;
  outline: none;
  opacity: 1;  /*0.7*/
/*  transition: background 0.3s;
  -webkit-transition: 0.2s; */
  -webkit-appearance: none;
  appearance: none; 
}

.bw-card .slider:focus {
 /* outline: 1px solid #222;*/
  background: #bbb;
  opacity: 1;
}

.bw-card .slider-container.bool {
  width: 55px;
}

.bw-card .slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  background: var(--book-theme-bg);
  cursor: pointer;
  opacity: 1;
}

.bw-card .slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  background: var(--book-theme-bg);
  cursor: pointer;  
  opacity: 1;

}

.bw-card .slider.no::-moz-range-thumb {
  background: #777;
}

.bw-card .slider.yes::-moz-range-thumb {
  background: var(--book-theme-bg);
}


.bw-card form .custom-chkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.bw-card form .chkbox-label {
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  line-height: 20px;
}

.bw-card form .chkbox-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border: 2px solid var(--book-theme-bg);
  border-radius: 2px;
  background: white;
}

/* Checkmark for checked state */
.bw-card form .custom-chkbox:checked + .chkbox-label:after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0px;
  width: 6px;
  height: 12px;
  border: solid black;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg); 
}

/* Style checked state background */
.bw-card form .custom-chkbox:checked + .chkbox-label::before {
  /*background: #2196F3;*/ 
  /*border-color: #2196F3;*/
  filter: brightness(1.5);  
}
 
/* Hover state */
.bw-card form .chkbox-label:hover::before {
  background-color: var(--mgm-input-box-bg);
}
 
/* Focus + Checked state shadow */
.bw-card form .custom-chkbox:focus:checked + .chkbox-label::before {
  box-shadow: 0 0 0px 3px rgba(100, 100, 100, 0.4);
}

/* Focus state (critical for accessibility) */
.bw-card form .custom-chkbox:focus + .chkbox-label::before {
 /* background-color: var(--mgm-input-box-bg);*/
  box-shadow: 0 0 0 3px #ddd; /*rgba(33, 150, 243, 0.2);*/ /* Blue glow */
}

.bw-card button.bw-button {
  line-height: 1.4em;
  padding: 7.5px 16px;
  margin-top: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  background-color: var(--book-theme-bg);
  color: var(--book-theme-fg);
  box-shadow: none;
  border: 1px solid var(--book-theme-bg);
  border-radius: 4px;
  font-size: var(--mgm-input-btn-text);
}

.bw-card button.bw-button:hover {
  border-color: black;
}

.bw-card button.bw-button.outline {
  color: var(--book-theme-bg);
  background-color: var(--mgm-section-btn-bg);
  border: 1px solid var(--mgm-section-btn-fg);
}

.bw-card button.bw-button.outline:hover {
  border-color: black;
  box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .1);    
}

.bw-card form button:focus {
  outline-offset: -5px;
  outline: 1px dotted var(--book-theme-fg);
  border-width: 1px;
  border-color: var(--book-theme-bg);
}

.bw-card form button.outline:focus {
  outline-offset: -5px;
  outline: 1px dotted #333;
}

.bw-card form input:focus {
  outline: none;
  border-width: 1px;
  border-color: var(--book-theme-bg);
  background-color: var(--mgm-input-box-bg);
}

.bw-card form div.form-upload {
  /*display: flex;*/
  align-items: center;
  justify-content: center;
  box-sizing: border-box;   
  margin-left: 4ex;
  margin-bottom: 2ex;
  margin-top: 2ex;
  min-width: 200px;
  min-height: 150px;
  /*height: 170px;*/
  text-align: center;
  background-color: #f0f0f0;
}

.bw-card form div.form-upload.preview {
  width: 48px;
  height: 48px;  
  min-width: 24px;
  min-height: 24px;
}

.bw-card form div.form-upload.img-preview {
  width: 250px;
  height: 200px;  
}

.bw-card form div.form-upload.preview img.preview {
  max-width: 48px;
  max-height: 48px;
}

.bw-card form div.form-upload.img-preview img.preview {
  max-width: 250px;
  max-height: 200px;  
}

/* ----------------------------------------------------------------
 *  Dialog settings
 * ----------------------------------------------------------------*/

dialog {
  color: var(--mgm-section-text-fg);
  font-size: var(--mgm-section-text-size);  
  border: 1px solid #aaa;
  border-top: 8px solid var(--book-theme-bg);
  border-radius: 6px;
  box-shadow: 2px 2px 6px #888;
  min-width: 4in;
  min-height: 1.5in;
 /* position: relative; */  /* needed to position the close X character. */
}
 
dialog.bw-editsect {
  min-width: 950px;
}

dialog.wide {
  min-width: 5.5in;
}

dialog.xwide {
  min-width: 8in;
}

dialog.full-width {
  min-width: 10in;
}

dialog .closeX {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 1.2rem;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

 /* title on the dialog box. */
dialog section h1,
dialog h1 {
  font-size: var(--dialog-title-size);
  color: black;
  font-weight: normal;
  margin-top: 0px;
  margin-bottom: 2ex;
/*  width: 95%;
  background-color: #f0f0f0;
  padding-left: 2px;*/
}

dialog .dialog-body {
 /* margin-bottom: 24px;*/
}

dialog .bw-button-group {
  display: block;
  text-align: right;
  border-top: 1px solid  var(--mgm-section-hrule-color);
  padding-right: 16px;
  padding-left: 16px;
  padding-bottom: 0px;
  padding-top: 8px;
  margin-top: 0.6in;
}

dialog .bw-button-group.norule {
  margin-top: 0px; 
  padding-top: 0px;
  border-top: none;
}

dialog .bw-button-group.shift {
  margin-top: 0.3in; 
  padding-top: 0px;
}

dialog .bw-button-group.nospace {
  margin-top: 0px; 
  padding-top: 0px;
}

dialog .bw-button-group.bottomx {
  position: absolute;
  bottom: 10px;
}

dialog .bw-button-group button {
  margin-left: 2ex;
}

dialog input.dropdown-search:focus {
  background-color: white;
}

/* ----------------------------------------------------------------
 *  Dialog boxes for specific actions.
 * ----------------------------------------------------------------*/
#uname-toconfirm {
  font-weight: bold;
}
 
dialog.bw-pagehist {
  width: 10in;
  overflow: hidden;
}

dialog.bw-pagehist h1 {
  margin-bottom: 0px;
}

dialog.bw-pagehist hr {
  border: none;
  border-bottom: 1px solid  var(--mgm-section-hrule-color);
}

.bw-page-source pre {
  width: 10in;
  height: 6in;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid #888;
}

.bw-page-preview iframe {
  width: 10in;
  height: 6in;
  border: 1px solid #888;
}


/* ----------------------------------------------------------------
 *  List items on a card.
 * ----------------------------------------------------------------*/

.bw-card .list-items {
  border: 1px solid var(--mgm-section-border-color);
  border-radius: 4px;
  box-shadow: 1px 1px 3px var(--mgm-section-shadow-color);
  /*overflow: hidden;*/
  color: var(--mgm-section-text-fg);
  margin-top: 3ex;
  margin-bottom: 3ex;
}

.bw-card .list-items.tiles {
  border: 1px solid var(--mgm-subcard-border-color);  
  border-radius: 4px;
  box-shadow: none;
  padding: 1ex;
}

.bw-card  .list-items .stacked + .stacked {
  border-top: 1px solid var(--mgm-section-border-color);  
}

.bw-card  .list-items .flex-container-row {
  padding: 1.5ex;
}

.bw-card  .list-items.compact .flex-container-row {
  padding: 0.75ex;
}

.bw-card  .list-items.tiles .flex-container-row {
  padding: 0.75ex;
  border: 1px solid var(--mgm-section-border-color);   
  border-left: 2px solid var(--book-theme-bg);
/*  border-top: none; */
  
/*  margin-left: calc(var(--level) * 25px);*/
  margin-top: -1px;
  position: relative;  
}

/*
.card .list-items.tiles .flex-container-row::before {
  content: "";
  position: absolute;
  
  left: -25px;
  top: 0;
  bottom: 0;
  border-left: 1px solid #ddd;
}
*/

.bw-card .list-items .flex-container-row:hover {
  background-color: var(--mgm-section-hover-bg);
}


.flex-container-row .name {
  text-align: left;
}

.bw-card .list-items .title {
  padding-right: 3ex;
  flex-grow: 1;
  margin-right: 2ex;  
}

.bw-card .list-items .number {
  margin-right: 1ex;
}

.bw-card .list-items .descp {
  font-size: 0.9em;
}

.bw-card  .list-items .icon {
  width: 60px;
}

.bw-card  .list-items .icon img {
  width: 36px;
  height: 36px;
}

.bw-card  .list-items.compact .icon img {
  width: 24px;
  height: 24px;
}

.flex-container-row .action {
  min-height: calc(1.4em * 2);
  margin-left: 1.5ex;
}

.bw-card  .list-items i {
  color: black;
  font-size: 15px;
}

/* ----------------------------------------------------------------
 *  Drop-down menus.
 * ----------------------------------------------------------------*/

.bw-dropdown-container {
  display: inline-block;
  position: relative;
  margin-left: 1ex;
  font-size: var(--mgm-section-text-size);
  text-align: left;
}

.bw-dropdown-container hr {
  margin-top: 4px;
  margin-bottom: 4px;
  border: none;
  border-top: 1px solid var(--stack-menu-hrule-color);
}

.bw-dropdown-container .bw-menu-button {
  text-align: center;
  background: white;
  border: 1px solid transparent;
  padding: 6px 3px;
  cursor: pointer;
  align-self: flex-start;
  z-index: 1;
}

.bw-card .list-items.compact .bw-dropdown-container .bw-menu-button {
  padding: 5px 3px 1px 3px;
  margin-top: 1px;
}

.bw-dropdown-container .bw-menu-button:hover {
  background: #f0f0f0;
  border: 1px solid var(--mgm-section-border-color);
  border-radius: 3px;
  padding: 6px 3px;
}

.bw-dropdown-container .bw-menu-button.item-list:hover {
  background: white;
  border: 1px solid var(--mgm-section-border-color);
  border-radius: 3px;
}

.bw-dropdown-container i {
  pointer-events: none;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.bw-dropdown-container .menu-svg {
  pointer-events: none;
  display: inline-block;
  position: relative;
  z-index: 1;
}

nav.bw-dropdown-menu {
  display: none;
  position: absolute;
  z-index: 100;
  box-shadow: 0 1px 6px 0 rgba(0,0,0,0.18);
  border-radius: 6px;
  min-width: 140px;
  padding: 6px 0;
  color: #555;
  margin: 16px 0;
  background-color: white;
}

/*
.bw-menu-show { 
  display: inline-block;
}
*/

nav.bw-dropdown-menu.right {
  top: 0;
  right: 4px;    
}


nav.bw-dropdown-menu .menu-item {
  font-size: 0.98em;
  line-height: 1.4;
  cursor: pointer;
}

nav.bw-dropdown-menu .menu-item.popup,
nav.bw-dropdown-menu .menu-item a {
  text-decoration: none;
  display: block;
  padding: 8px 16px;
  color: var(--mgm-section-text-fg);
}

nav.bw-dropdown-menu .menu-item.popup:hover,
nav.bw-dropdown-menu .menu-item a:hover {
  background-color: var(--stack-menu-hover-bg); /*var(--book-theme-bg);*/
  color: var(--stack-menu-hover-fg); /*var(--book-theme-fg);*/
}




/* ----------------------------------------------------------------
 *  Sortable list items.
 * ----------------------------------------------------------------*/

/* the top-level ul sort list */

.bw-card .list-items.tiles ul.card-list {
  padding-left: 0px;
  list-style: none;
  margin-top: 0px;
  margin-bottom: 0px;
}

.bw-card .list-items.tiles ul.sublist{
  padding-left: 25px;
  list-style: none;
}

 /* Removes the padding on the top-level sort list. */
.bw-card .list-items.tiles ul.card-list.toplevel > li:first-child > ul.sublist {
  padding-left: 0px;
}

.bw-card .list-items.tiles .grip {
  margin-right:  1ex;
  text-align: left;
  cursor: grab;
}


.bw-card .list-items.tiles .grip:active {
  margin-right:  1ex;
  text-align: left;
  cursor: grabbing;
}



/* ----------------------------------------------------------------
 *  Frontpage Section Block
 * ----------------------------------------------------------------*/

section.welcome {
  width: 600px;
}

/* ----------------------------------------------------------------
 *  Login Section Block
 * ----------------------------------------------------------------*/

section.login {
  width: 448px;
}

/* ----------------------------------------------------------------
 *  Users section blocks
 * ----------------------------------------------------------------*/
 
section.users .list-items .uname  {
}

section.users .list-items .roles {
  font-size: 0.9em;
}

section.users .list-items .roles div {
  display: inline-block;
  padding-right: 3ex;
}
 
section.users {
  line-height: 1.4;
  width: 750px;
  /*padding-bottom: 35px;*/
}

section.users .flex-container-row .uname {
  width: 1.75in;
  margin-left: 2ex;
  margin-right: 2ex;
  flex-grow: 1;
}

section.users .flex-container-row .roles {
  flex-grow: 1;
  margin-right: 2ex;
}


/* ----------------------------------------------------------------
 *  Shelves section blocks
 * ----------------------------------------------------------------*/


section.shelves .list-items .title {
  padding-right: 3ex;
  flex-grow: 1;
  margin-right: 2ex;  
}
 
section.shelves {
  line-height: 1.4;
  width: 750px;
}

section.shelves #shelf_img {
  margin-top: auto;
  margin-bottom: auto;
}

/* ----------------------------------------------------------------
 *  BookList section blocks
 * ----------------------------------------------------------------*/

section.books {
  line-height: 1.4;
  width: 750px;
}

section.books #shelf_img {
  margin-top: auto;
  margin-bottom: auto;
}

section .grid-container-row.bookowner {
  grid-template-columns: 1fr 150px 250px;
  justify-items: start;
}

section.books .bookowner-lookup {
  font-size: var(--mgm-input-label-size);
  display: inline-block;
  color: var(--book-theme-bg);
  cursor: pointer;
}

section.books .bookowner-lookup::before {
  content: "<";
}

section.books .bookowner-lookup::after {
  content: ">";
}


/* ----------------------------------------------------------------
 *  Book owner drop-down list
 * ----------------------------------------------------------------*/

dialog#LookupOwner .dropdown,
dialog#lookup-owner .dropdown {
  display: relative;
}

dialog#LookupOwner .dropdown-content,
dialog#lookup-owner .dropdown-content {
  overflow: auto;
  /*position: absolute;*/
  background-color: var(--mgm-input-box-bg);
  min-width: 300px;
  height: calc(5 * 36.12px);
  overflow-y: auto;
  border: 1px solid var(--mgm-input-box-border);
  /*z-index: 1;*/
}


dialog#LookupOwner .dropdown-content div,
dialog#lookup-owner .dropdown-content div {
  cursor: pointer;
  padding: 8px 16px;
  border-bottom: 1px solid var(--mgm-input-box-border);
}

dialog#LookupOwner .dropdown-content div:hover,
dialog#lookup-owner .dropdown-content div:hover {
  background-color: var(--mgm-input-box-hover);
}

dialog#LookupOwner .dropdown-content:last-child,
dialog#lookup-owner .dropdown-content:last-child {
  border-bottom: none;
}


/* ----------------------------------------------------------------
 *  Chapter and page section blocks
 * ----------------------------------------------------------------*/

section.chapters {
  line-height: 1.4;
  width: 800px;
}


section.chapters .list-items .icon {
  width: 55px;
  padding-top: 3px;
}


section.pages {
  line-height: 1.4;
  width: 800px;
}

section.pages .list-items .icon {
  width: 35px;
  padding-top: 3px;
}

section .list-items .options {
  margin-left: 3ex;
}

section .list-items .options label {
  display: inline-block;
  /*margin-right: 5px;*/
}

section .list-items .page-nav {
 /* margin-left: 2ex; */
}

 /* Used to display the chapter info at the top of the page list. */ 
.bw-card details.chapter {
  margin-bottom: 15px;
  margin-top: 20px;
  /*margin-left: 10px;*/
}

.bw-card details.chapter summary {
  color: var(--book-theme-bg);
  font-size: 1.3em;
  padding: 1ex;
  cursor: pointer;  
}

.bw-card details.chapter div {
  padding: 0px 20px;    
}

.bw-card details.chapter p {
  margin-top: 3px;
  font-size: 0.97em;
}

.bw-card details.chapter p.dates {
  background-color: var(--mgm-input-box-bg);
  padding: 3px;
}


.bw-card details.chapter .subsection {
  margin-left: 16px;
  margin-right: 16px;
}

.bw-card details.chapter.outline {
  border: 1px solid #b4b4b4;
  border-radius: 4px;
}

/* ----------------------------------------------------------------
 *  Page tools
 * ----------------------------------------------------------------*/

section.toolbar {
  width: 600px;
  min-height: 30px;
  padding-top: 4px;
  padding-bottom: 4px;
  margin-bottom: 1ex;
}

section.toolbar button {
  display: inline-block;
  color: var(--link-normal-color);
  background-color: transparent;
  border: none;
  border-radius: 4px;
  box-shadow: 0px;
  font-family: var(--mgm-page-text-font);
  font-size: 1em;
  line-height: 1.4em;
  padding: 5px 16px;
  padding-top: 9px;
  cursor: pointer;  
} 
 
section.toolbar button:hover {
  background-color: #eee; 
  color: #222;
}

section.toolbar button div.action-icon {
  width: 25px;
  height: 25px;
  text-align: center;
  padding: 1px;
  border-radius: 14px;
  /*background-color: #f0f0f0;*/ 
  display: inline-block;
  margin-right: 0.7ex;
  vertical-align: middle;  
}

 /* Position the button icon. */
section.toolbar button i {
  font-size: 0.9em;
  vertical-align: middle;
}


/* ----------------------------------------------------------------
 *  Add/Edit pages
 * ----------------------------------------------------------------*/

section.editpage {
  /*max-width: 1000px;*/
  flex: 1;
}

section.bw-card.editpage {  
  height: calc(100dvh - 200px);
  padding-right: 40px;
  margin-left: 0px;
  margin-right: 0px;
}

section.editpage textarea {
  padding-left: 2px;
  padding-right: 2px;
  box-sizing: border-box;    
  width: 100%;
  height: 560px;
  border: 1px solid #b4b4b4;  
  font-family: var(--mgm-input-textarea-font);
  font-size: var(--mgm-input-textarea-size);
}

.flex-container-page {
  display: flex;
  position: relative;
  max-width: 1200px;  
  margin: 0 auto;
}

.bw-editpage-drawer {
  width: 38px;
  background-color:  var(--mgm-section-card-bg);
  border-color: #bbb;
  border-style: solid;
  border-width: 0px;
  border-radius: 8px 0px 0px 8px;
  box-shadow: 0px 0px 2px 0px #ccc;  
  cursor: pointer;
  margin-left: 10px;
  height: 2.5in;
}

.bw-card.bw-drawer {
  width: 350px;
  min-height: 500px;
  border-top-left-radius: 0px;
  padding: 8px 16px;
  display: none;
}


.bw-drawer-tab {
  font-size: 0.9em;
  padding-top: 4px;
  width: 38px;
  height: 50px;  
  color: var(--link-normal-color);
  background-color: var(--mgm-section-card-bg);  
  border-color: #bbb;
  border-style: none;
  border-width: 0px;
  cursor: pointer;  
}

.bw-drawer-tab svg {
  width: 18px;
  height: 18px;
}

.bw-drawer-tab.toggle {
  border-bottom: 1px dotted #bbb;
  font-size: 0.8em;  
  border-top-left-radius: 8px;    
}

.bw-drawer-tab:hover {
  background-color: #eef4f8;
}

.bw-drawer-tab.toggle.active {
  background-color: var(--book-theme-bg);
  color: var(--book-theme-fg);
  opacity: 1;
}

.bw-drawer-tab.toggle.active:hover {
  opacity: 0.6;
}

.bw-drawer-tab.active {
  background-color: #eef4f8;
}

.bw-drawer-pane {
  height: 100%;
  display: none;
}

.bw-drawer-pane.active {
  display: block;
}

.bw-pagetag-tile,
.bw-attach-tile {
  height: 45px;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  display: flex;
  gap: 0px;
  position: relative;
  background-color: white;
  box-shadow: 0 1px 6px -1px rgba(0, 0, 0, .1);
 /* break-inside: avoid;*/
  align-items: center;
}


.bw-attach-tile .gap2 {
  width: 20px;
  height: 100%;
  margin-right: 10px;
  background-color: var(--book-theme-bg); /*#eef4f8;*/ /*#ddd;*/
  color: var(--book-theme-fg);
  border-radius: 4px 0px 0px 4px;
  border: 1px solid var(--book-theme-bg);
  font-size: 1.3em;
  margin-top: auto;
  margin-bottom: auto;
}

.bw-attach-tile .mime {
  width: 25px;
  height: 100%;
  margin-left: 4px;
  font-size: 1.3em;
}

.bw-pagetag-tile .gap,
.bw-attach-tile .gap {
  width: 15px;
  height: 100%;
  margin-left: 5px;
  background-color: var(--book-theme-bg); /*#eef4f8;*/ /*#ddd;*/
  border-radius: 0px 4px 4px 0px;
  border: 1px solid var(--book-theme-bg);
}

.bw-attach-tile .name {
  flex: 1;
  margin-left: 1ex;
}

.bw-pagetag-tile .name {
  flex: 1;
  margin-left: 1ex;
}


.bw-attach-tile .type {
  font-size: 0.85em;
  color: var(--mgm-input-label-fg);
}

.bw-pagetag-tile .actions,
.bw-attach-tile .actions {
  height: 100%;
}

.bw-panetile-btn {
  border: none;
  height: 100%;
  width: 25px;
  background-color: white;
  padding-top: 3px;
  font-size: 0.95em;
}

.bw-panetile-btn:hover {
  background-color: #eee;
}

.bw-panetile-btn.edit {
  color: #206EA7;
}

.bw-panetile-btn.delete {
  color: #900000;  
}

.bw-panetile-btn.save {
  width: auto;
  height: 90%;  
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  box-sizing: border-box;   
  border-radius: 4px;
  padding: 4px;
}

.bw-panetile-btn.save:hover {
  background-color: #eee;
  border: 1px solid #444;
}

.bw-card form input[type='text'].tag-name {
/*  border: none;
  outline: none; */
}

.bw-card form input[type='text'].tag-name:disabled {
  color: var(--mgm-input-text-fg);
  font-weight: normal;
  border: none;
  outline: none;
}

.bw-pagetag-tile .savebtn {
  display: none;
/*  height: 100%;*/
  margin: 0px 4px;  
}

.bw-revision-container {
  /*border: 1px solid var(--mgm-section-border-color);*/
  box-shadow: 0px 0px 2px 0px #ccc;
  border-radius: 8px;  
  width: 100%;
  border-collapse: collapse;
}

.bw-revision-container tr {
  border-bottom: 1px solid var(--mgm-section-border-color);
}

.bw-revision-container tr:last-child {
  border-bottom: none;
}

.bw-revision-container th {
  background-color: #f0f0f0;
}

.bw-revision-container .num {
  width: 2em;
  padding: 4px;
  text-align: center;
}

.bw-revision-container .date {
  padding-left: 1ex;
  padding-right: 1ex;
  width: 1.45in;
  text-align: center;
}

.bw-revision-container .actions {
  text-align: right;
  padding-right: 4px;
  font-size: 1.1em;
  vertical-align: middle;
}

.bw-revision-container th.actions {
  padding-right: 5ex;
}

/* ----------------------------------------------------------------
 *  Edit Page Section
 * ----------------------------------------------------------------*/

 
dialog.bw-editsect textarea.editsection {
  box-sizing: border-box;   
  padding-left: 2px;
  padding-right: 2px;  
  width: 100%;
  height: 450px;
  border: 1px solid #b4b4b4;  
  font-family: var(--mgm-input-textarea-font);
  font-size: var(--mgm-input-textarea-size);
}

dialog.bw-editsect h1 {
  margin-bottom: 0.75ex;
}

dialog.bw-editsect p {
  margin-top: 0px;
  margin-bottom: 1ex;
  font-size: 1.4em;
}


/* ----------------------------------------------------------------
 *  Drop-down menu in the header of a book.
 * ----------------------------------------------------------------*/


button.menu-button {
  padding: 4px 4px 1px;
  text-align: center;
  cursor: pointer;
  border-width: 0px;
  border-radius: 4px;
  margin-right: 10px;
  font-size: 1.1em;
}


.bw-page-actions {
/*  position: fixed;
  right: 10px;
  top: 85px; */
/*  z-index: 10;*/
  display: inline-block;
  vertical-align: middle;  
}


.bw-page-actions button.menu-button {
  /*padding: 5px 5px;*/
}

.bw-page-actions button.menu-button:hover {
  color: blue;
}

.bw-page-actions .bw-dropdown-container {
  margin-left: 0px;
}



/* ----------------------------------------------------------------
 *  Default link colors when no specific ones are defined.
 * ----------------------------------------------------------------*/

a, a:visited, a:link {
	color: var(--link-normal-color);
	text-decoration: none;
	font-weight: normal;
}

a:hover {
	text-decoration: none;
	color: var(--link-hover-color);
}


/* ----------------------------------------------------------------
 *  Changes from the standard for the guide theme .
 * ----------------------------------------------------------------*/

header img.stackicon {
  width: 24px; 
  height: 24px; 
}


header .bw-stacktitle {
  font-size: 1em; 
}

header .bw-stacktitle a, 
header .bw-stacktitle a:link,
header .bw-stacktitle a:visited, 
header .bw-stacktitle a:hover {
  font-weight: 400;
}