/*
 # -----------------------------------------------------------------------------
 # ~/assets/theme/j1/modules/mmenu/css/theme/uno/mmenu.css
 # Provides theme styles (Uno) for Mobile Menu light v3.2.2
 #
 # Product/Info:
 # https://jekyll.one
 #
 # Copyright (C) 2023-2026 Juergen Adams
 #
 # J1 Template is licensed under the MIT License.
 # See: https://github.com/jekyll-one-org/j1-template/blob/main/LICENSE
 # -----------------------------------------------------------------------------
*/

/*
  jadams, 2020-06-20: CSS/Offset to the NAV bar should be calculated
  at runtime as a dyn style
*/

/* CSS overwrites
   ----------------------------------------------------------------------------- */

/* Drawer */

.mm-ocd--left .mm-ocd__content {
  background-color: #212121;
}

.mm-ocd--right .mm-ocd__content {
  background-color: #212121;
}

/* Additional CSS styles for BS Theme Switcher
   ----------------------------------------------------------------------------- */
.mmenu-item.active, .mmenu-item:active {
    /* color: #fff; */
    text-decoration: none;
    background-color: #607d8b;
}

/* Navigator
   ----------------------------------------------------------------------------- */

.mm-spn li:after {
   border-top: 0 !important;
}

.mm-spn a:not(:last-child):after {
   border-right: 0 !important;
}

.mm-spn li:hover {
    background-color: #424242;
}

.mm-spn.mm-spn--navbar:after {
  text-align: left;  /* jadams, 2020-06-20: set menu title to the left */
  font-size: x-large; /* jadams, 2020-06-20: increase size of the menu title */
}

/* Themes */
/* jadams, 2020-06-20: set J1 Theme colors (dark theme) */
.mm-spn.mm-spn--dark {
  color: #e3e3e3;
  background: #000 !important;
}

.mm-spn ul {
  background: #000 !important;
}

/* Sidebar (Drawer)
   ----------------------------------------------------------------------------- */
.mm-side {
    margin: 1.5rem;
}

.mm-side .widget {
    position: relative;
    z-index: 1;
    margin-bottom: 25px
}

.mm-side .widget .title {
    color: #fff;
    margin-bottom: 15px;
    border-left: 3px solid #204a87;
    padding-left: 5px
}

.menu-title {
    margin-bottom: 1.5rem;
    font-size: 28px;
    color: #EEEEEE;
    border-bottom: 1px solid #757575;
}

.mm-side .widget .heading {
    text-align: left;
    color: #EEEEEE;
    font-size: 20px;
    text-transform: uppercase;
    position: relative;
    margin-bottom: 10px;
    padding-bottom: 10px
}

.mm-side .widget ul.link {
    font-family: Open Sans,Helvetica Neue,Helvetica,Arial,sans-serif;
    font-size: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
    line-height: 1.5rem;
}

.mm-side .widget ul.link li a {
    color: #aaa
}

.mm-side .widget ul.link li a:focus,.mm-side .widget ul.link li a:hover {
    color: #fafafa;
    text-decoration: none;
    font-weight: 500;
}

/* Navigation (Menu)
   ----------------------------------------------------------------------------- */

.mm-item {
  color: #fafafa;
}

/* color: blue-200 */
.mm-item.active {
  background-color: #90CAF9; 
}

.mm-spn a {
  color: #9e9e9e !important;
}

/* jadams, 2022-08-13: muted the anchor on hover, because (currently)
   NO action on click
*/
.mm-spn a:hover {
    color: #9e9e9e !important;
}

/* jadams, 2020-07-03: added hover to global style */
a.toc-link:hover {
    color: #fafafa;
    text-decoration: none;
    font-weight: 500;
}

/* Fix MMenu #2
   Active|active parent menu item (Mobile Menu)
   -----------------------------------------------------------------------------
   The item of the current page carries the class 'active' and gets the
   background color #90CAF9 (see '.mm-item.active' above), while the base
   style '.mm-spn a' keeps the label at #9e9e9e: grey on yellow, hard to
   read. The rules below set a DARK label color for the active item and keep
   that color readable on hover ('.mm-spn li:hover' sets #424242 as
   background, what would leave a dark label on a dark background).

   The class 'active-parent' is set by the adapter (see
   ~/assets/theme/j1/adapter/js/mmenu.js, function mmenuApplyActiveParents)
   on ALL items the active item is placed BELOW. Because the sliding panels
   show one panel at a time, the parent item is the only hint on the previous
   panel WHERE the current page is located.

   NOTE: The color is set on the LABEL elements (A|SPAN) of the item, NOT on
   the LI itself. A parent item CONTAINS the items of its submenu, a color
   set on the LI would be inherited by all of them.

   NOTE: The chevron of an item ('.mm-spn li:before') is drawn as a border
   using 'currentColor' (inherited from the LI). It is therefore colored
   explicitly by the rules below.

   NOTE: All original rules are kept unchanged, the styles below are added.
   -----------------------------------------------------------------------------
*/

/* Fix MMenu #2: active item, dark label on the yellow background */
a.mm-item.active,
.mm-item.active > a,
.mm-item.active > span {
  color: #212121 !important;
}

/* Fix MMenu #2: active item, keep the label readable on hover */
a.mm-item.active:hover,
.mm-item.active > a:hover,
.mm-item.active > span:hover {
  color: #212121 !important;
}

/* Fix MMenu #2: active item, keep the background on hover
   (overwrites '.mm-spn li:hover', background-color: #424242) */
.mm-item.active:hover {
  background-color: #90CAF9;
}

/* Fix MMenu #2: active item, chevron in the label color */
.mm-item.active:before {
  border-top-color: #212121;
  border-right-color: #212121;
}

/* Fix MMenu #2: parent of the active item, subtle background
   NOTE: #332800 is #90CAF9 at 20% opacity on the black menu background. A
   solid color is used (NOT rgba) because '.mm-spn a' inherits the background
   of its LI, what would paint a transparent color TWICE.
*/
.mm-item.active-parent {
  background-color: #332800;
}

/* Fix MMenu #2: parent of the active item, label marked */
a.mm-item.active-parent,
.mm-item.active-parent > a,
.mm-item.active-parent > span {
  color: #90CAF9 !important;
  font-weight: 500;
}

/* Fix MMenu #2: parent of the active item, keep the label on hover */
a.mm-item.active-parent:hover,
.mm-item.active-parent > a:hover,
.mm-item.active-parent > span:hover {
  color: #90CAF9 !important;
}

/* Fix MMenu #2: parent of the active item, chevron in the label color */
.mm-item.active-parent:before {
  border-top-color: #90CAF9;
  border-right-color: #90CAF9;
}

/* Claude - Fix MMenu #3
   Parent of the active item, color-only marking
   -----------------------------------------------------------------------------
   The rule marking the label of the parent item (previous series) above sets
   'font-weight: 500' in ADDITION to the color. A heavier weight makes the
   glyphs of the label WIDER, so a label switches its width whenever the class
   'active-parent' is set or dropped, what moves the text on EVERY page load
   placing the active item somewhere else in the menu.

   The color alone marks the item already: #90CAF9 on the background #332800
   set by the rule giving the parent item its subtle background, while
   ALL other labels stay at #9e9e9e (see '.mm-spn a'). The weight is therefore
   reset below and the marking is done by the color only.

   NOTE: The rule is placed AFTER the rule it resets and uses the SAME
   selectors, so it wins by ORDER, NOT by specificity. It MUST stay below.

   NOTE: 'inherit' is used, NOT 'normal'. The weight of the LI is taken over
   that way, whatever the theme sets for the menu, so the label matches its
   NOT marked siblings exactly.

   NOTE: To get the heavier label back, comment the rule below out. The
   original declaration stays in place and takes effect again.
   -----------------------------------------------------------------------------
*/
a.mm-item.active-parent,
.mm-item.active-parent > a,
.mm-item.active-parent > span {
  font-weight: inherit;
}

/* Media breakpoints
   ----------------------------------------------------------------------------- */

/* BS@5
// -----------------------------------------------------------------------------
// X-Small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap

// Small devices (landscape phones, 576px and up)
// ----------------------------------------------
// @media (min-width: 576px) { ... }

// Medium devices (tablets, 768px and up)
// --------------------------------------
// @media (min-width: 768px) { ... }

// Large devices (desktops, 992px and up)
// --------------------------------------
// @media (min-width: 992px) { ... }

// X-Large devices (large desktops, 1200px and up)
// -----------------------------------------------
// @media (min-width: 1200px) { ... }

// XX-Large devices (larger desktops, 1400px and up)
// -------------------------------------------------
// @media (min-width: 1400px) { ... }
*/

/* jadams, 2020-07-02: media query for MMenu
--------------------------------------------------------------------------------
NOTE: For unknown reason, style "mm-ocd--left" is NOT applied correctly
      like "mm-ocd--right" what cause the wrong background-color
      As a workaround, the background-color is added to the media
      queries as well (but MUST be removed if fixed!!!)
--------------------------------------------------------------------------------
*/

/* Desktop
   Large devices (desktops, 992px and up)
*/

/* Claude - Fix MMenu #3
   Malformed comment, @media (min-width: 992px)
   ---------------------------------------------------------------------------
   CSS comments do NOT nest. The block below opens a comment on the line
   holding '.mm-ocd {' and opens a SECOND one inside it, on the line holding
   'top: 100px;'. The first closer ends the comment ALREADY, so the line
   below it is read as CSS again: its brace CLOSES the media query and the
   closer left over starts a selector.

   Parsed as written, the result is:

     1. '@media (min-width: 992px)' ends up with an EMPTY body, the black
        background for the desktop drawer is NOT set.
     2. The rule '.mm-ocd__content' that follows gets the closer left over
        prepended to its selector. The selector is invalid, the rule is
        dropped.
     3. The brace left over swallows the WHOLE mobile block that follows,
        including 'top: 48px' (the drawer offset to the NAV bar) and the
        black background for the mobile drawer. NONE of them is applied.

   The comment is RE-OPENED below instead. It is closed by the closer that
   is left over today, which consumes the brace left over as well. No line
   is removed, the block parses as it was meant to and all three rules
   above are applied again.
   ---------------------------------------------------------------------------
*/
@media only screen and (min-width: 992px) {
  .mm-ocd__content {
      background-color: #000; /* black */
  }
}

/* Mobile
   Small devices (992px and below)
*/
@media only screen and (max-width: 992px) {
  .mm-ocd {
    top: 48px; /* drawer top offset to NAV bar */
  }
  .mm-ocd__content {
      background-color: #000; /* black */
  }
}
