/* 
 * Project: IRTF VNC Documentation
 * Author: Miranda Hawarden-Ogata
 * Version: 1.0.4
 * Last Modified: 2024-08-17
 * 
 * Changelog:
 * - 2024-08-17: Tweaked to better display code and links between Modes
 * - 2024-08-16: Reworked to default to Dark Mode, 
 *               included Light Mode for browser adjustment
 * - 2024-08-15: Added section for sublist bullets
 * - 2024-08-10: Updated to standardise file
 * - 2023-06-xx: Initial version, Tony Denault
 */

/*---------------------------------------------------------------------- 
 * Global Variables (Dark Mode is default)
 * 
 * Dark Mode Palette
 * 
 * #cc8400  (orange-gold)            - logo background
 * #e8e6e3  (light off-white)        - logo text, heading text, navbar text, general text
 * #454a4d  (medium-dark gray)       - scrollbar thumb
 * #202324  (very dark gray)         - scrollbar track
 * #313537  (very dark gray with a slight bluish tint) - header background
 * #575e62  (medium-dark gray)       - header border
 * #2b2d2e  (dark neutral gray)      - navbar background
 * #4d5356  (medium-dark gray, slightly darker) - navbar hover background
 * #c8c3bc  (light grayish beige)    - primary color (for div blocks within body)
 * #242627  (very dark gray, slightly lighter than black) - body and footer background
 * #131516  (almost black, very dark gray) - page background
 * #60cfff  (bright sky blue)        - link color
 * #3391ff  (medium blue)            - link hover color
 * #909090  (gray)                   - code text color
 * #77cc77  (light green)            - emphasis text color
 */
:root {
   /* standard definitions independent of Light/Dark Mode */
   --logo-bg-color: #cc8400;
   --logo-text-color: #e8e6e3;
   --scrollbar-thumb-color: #454a4d;
   --scrollbar-track-color: #202324;
   --heading-font-family: Georgia, serif;
   --navbar-font-family: Arial, sans-serif;
   --base-font-family: Arial, Helvetica, sans-serif;
   --base-font-size: 14px;
   /**** Dark Mode Palette ****/
   --heading-bg-color: #313537;
   --heading-border-color: #575e62;
   --heading-text-color: #e8e6e3;
   --navbar-bg-color: #2b2d2e;
   --navbar-hl-color: #4d5356;
   --navbar-text-color: #e8e6e3;
   --primary-color: #c8c3bc;
   --secondary-color: #242627;
   --tertiary-color: #131516;
   --text-color: #e8e6e3;
   --link-color: #60cfff;
   --link-hover-color: #3391ff;
   --code-text-color: #909090;
   --emphasis-text-color: #77CC77;
}

/*---------------------------------------------------------------------- 
 * Light Mode Palette
 * 
 * #cc8400  (orange-gold)             - logo background
 * #2b2d2e  (dark neutral gray)       - heading text, navbar text, general text
 * #575e62  (medium-dark gray)        - header border
 * #c0c0c0  (light gray)              - header background
 * #d3d3d3  (light gray)              - navbar background
 * #a9a9a9  (gray)                    - navbar hover background
 * #d0d0d0  (medium-light gray)       - primary color (for div blocks within body)
 * #f0f0f0  (light neutral gray)      - body and footer background
 * #e0e0e0  (light gray)              - page background
 * #0000ff  (blue)                    - link color
 * #3391ff  (medium blue)             - link hover color
 * #696969  (darker gray)             - code text color
 * #006400  (medium green)            - emphasis text color
 */
@media (prefers-color-scheme: light) {
    :root {
      --heading-bg-color: #c0c0c0;
      --heading-border-color: #575e62;
      --heading-text-color: #2b2d2e;
      --navbar-bg-color: #d3d3d3;
      --navbar-hl-color: #a9a9a9;
      --navbar-text-color: #2b2d2e;
      --primary-color: #d0d0d0;
      --secondary-color: #f0f0f0;
      --tertiary-color: #e0e0e0;
      --text-color: #2b2d2e;
      --link-color: #0000ff;
      --link-hover-color: #3391ff;
      --code-text-color: #696969;
      --emphasis-text-color: #006400;
    }
}

/*---------------------------------------------------------------------- 
 * header components 
 * - background-color: background color of the header
 * - border-color: border color of the header
 * - color: text color within the header
 * - font-family: font family for header text
 * - display: flexbox layout for horizontal alignment
 * - align-items: vertical alignment of header items
 * - padding: padding inside the header
 */
#header {
   background-color: var(--heading-bg-color);
   border-color: var(--heading-border-color);
   color: var(--heading-text-color);
   font-family: var(--heading-font-family);
   display: flex;
   align-items: center;
   padding: 2px;
}

/*---------------------------------------------------------------------- 
 * navbar components 
 * - background-color: background color of the navbar
 * - color: text color within the navbar
 * - font-family: font family for navbar text
 * - overflow: handling of content overflow
 */
#navbar {
   background-color: var(--navbar-bg-color);
   color: var(--navbar-text-color);
   font-family: var(--navbar-font-family);
   overflow: hidden;
}

/*---------------------------------------------------------------------- 
 * navbar link styling
 * - color: text color of links
 * - font-size: font size of the navbar links
 * - text-align: alignment of link text within the navbar
 * - text-decoration: removal of underlines on links
 * - float: alignment of links within the navbar
 * - padding: padding inside each link
 * - hover/active: background color and text color when links are hovered or active
 */
#navbar a {
   color: var(--navbar-text-color);
   font-size: 16px;
   text-align: center;
   text-decoration: none;
   float: left;
   padding: 14px 16px;
}
#navbar a:hover,
#navbar a:active {
   background-color: var(--navbar-hl-color);
}

/*---------------------------------------------------------------------- 
 * footer components 
 * - background-color: background color of the footer
 * - color: text color within the footer
 * - padding: padding inside the footer
 */
#footer {
   background-color: var(--secondary-color);
   color: var(--text-color);
   padding: 2px;
}

/*---------------------------------------------------------------------- 
 * main page components 
 * - background-color: general background color of the page
 * - color: general text color of the page
 */
html,
body {
   background-color: var(--tertiary-color);
   color: var(--text-color);
}

/*---------------------------------------------------------------------- 
 * page body styling
 * - background-color: background color of the body
 * - font-family: font family for body text
 * - font-size: font size for body text
 * - margin: margin around the body content
 */
body {
   background-color: var(--secondary-color);
   font-family: var(--base-font-family);
   font-size: var(--base-font-size);
   margin: 8px 5%;
}

/*---------------------------------------------------------------------- 
 * url styling
 * - color: link text color
 * - text-decoration: removal of underline from links
 * - hover/active: color of links when hovered or active
 */
a {
   color: var(--link-color);
   text-decoration: none;
}
a:hover,
a:active {
   color: var(--link-hover-color);
}

/*---------------------------------------------------------------------- 
 * Body block styling
 * - margin: Add a slight space between the element and sidebars
 */
.body-block {
   margin: 0 10px;
}

/*---------------------------------------------------------------------- 
 * logo block styling
 * - background-color: background color of the logo block
 * - color: text color of the logo block
 * - margin-right: space between logo and heading 
 * - display: flexbox layout for horizontal alignment
 * - align-items: align items vertically
 */
.logo-block {
   background-color: var(--logo-bg-color);
   color: var(--logo-text-color);
   margin-right: 10px; 
   display: flex;
   align-items: center;
}

/*---------------------------------------------------------------------- 
 * header block styling
 * - padding: padding inside the header block
 */
.header-block {
   padding: 5px;
}
/*---------------------------------------------------------------------- 

 * footer block styling
 * - text-align: text alignment within the footer block
 * - margin: margin inside the footer block
 */
.footer-block {
   text-align: left;
   margin: 10px;
}

/*---------------------------------------------------------------------- 
 * title text styling
 * - font-size: font size of the title text
 * - font-weight: font weight of the title text
 */
.title-text {
   font-size: 20px;
   font-weight: bold;
}

/*---------------------------------------------------------------------- 
 * subtitle text styling
 * - font-size: font size of the subtitle text
 */
.subtitle-text {
   font-size: 12px;
}

/*---------------------------------------------------------------------- 
 * password of the day text styling
 * - font-family: font family for potd text
 */
.potd-text {
   font-family: var(--heading-font-family);
}

/*---------------------------------------------------------------------- 
 * code block styling
 * - background-color: background color for code blocks
 */
.code-block {
   background-color: var(--primary-color);
}

/*---------------------------------------------------------------------- 
 * code text styling
 * - color: text color for code blocks
 */
.code-text {
   color: var(--code-text-color);
}

/*---------------------------------------------------------------------- 
 * emphasis text styling
 * - color: text color for emphasis text
 */
.emphasis-text {
   color: var(--emphasis-text-color);
}

/*---------------------------------------------------------------------- 
 * automatic list numbering with css
 * - counter-reset: reset the list item counter
 * - counter-increment: increment the list item counter
 * - list-style-type: disable default list styling
 * - content: add a custom counter to list items
 */
.parent-list {
   counter-reset: item;
}
.parent-list > li {
   counter-increment: item;
   list-style-type: none;
}
.parent-list > li:before {
   content: counters(item, ".") " ";
}
.parent-list ol {
   counter-reset: subitem;
   list-style-type: none;
}
.parent-list ol > li {
   counter-increment: subitem;
}
.parent-list ol > li:before {
   content: counters(item, ".") "." counters(subitem, ".") " ";
}

/*---------------------------------------------------------------------- 
 * scrollbar styling
 * - scrollbar thumb: the draggable part
 * - scrollbar track: the part the thumb sits on
 */
::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color); 
}
::-webkit-scrollbar-track {
    background-color: var(--scrollbar-track-color);
}
