/* Base variables */
:root {
  --scrollbar-color: #d6dee1;
  --scrollbar-color-hover: #a8bbbf;
  --background-color: #fdfdfd;
  --color: black;
  --font-family: "Computer Modern Serif", serif;
  --font-size: 1.5vw;
  --table-header-color: #dfdfdf;
  --table-row-color: #f2f2f2;
  --table-border-color: black;
}

/* Base variables - Light Theme */
html[data-theme="light"] {
  --scrollbar-color: #d6dee1;
  --scrollbar-color-hover: #a8bbbf;
  --background-color: #fdfdfd;
  --color: black;
  --font-family: "Computer Modern Serif", serif;
  --table-header-color: #dfdfdf;
  --table-row-color: #f2f2f2;
  --table-border-color: black;
}

/* Base variables - Dark Theme */
html[data-theme="dark"] {
  --scrollbar-color: #424242;
  --scrollbar-color-hover: #686868;
  --background-color: #1b1b1b;
  --color: whitesmoke;
  --table-header-color: #474747;
  --table-row-color: #313131;
  --table-border-color: whitesmoke;
}

/* Body */
body {
  background-color: blue;
  color: var(--color);
  font-family: var(--font-family);
  font-size: var(--font-size);
  margin: 0;
  width: 100vw; 
  padding: 0;
  transition: 0.5s;
}

/* Main */
main {
  margin-left: 5rem;
  margin-top: 5rem;
  padding: 1rem;
  border: solid thin;
}

/* Math */
.katex {
  font-size: 1em !important;
}
.katex-display {
  overflow: auto hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 20px;
}
::-webkit-scrollbar-track {
  background-color: transparent;
}
::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-color);
  border-radius: 20px;
  border: 6px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-color-hover);
}
::-webkit-scrollbar-corner {
  background-color: transparent;
}

/* Theme Toggle */
/* Sun Icon */
.sun-icon {
  position: relative;
  height: 20px;
  width: 20px;
}
.sun-icon.dark {
  filter: grayscale(1);
  opacity: 0.5;
}
/* Moon Icon */
.moon-icon {
  position: relative;
  height: 17px;
  width: 17px;
  filter: grayscale(1);
  opacity: 0.5;
}
.moon-icon.dark {
  filter: none;
  opacity: 1;
}
/* Theme Toggle Button */
.theme-toggle {
  width: 60px;
  height: 34px;
  background-color: #ccc;
  border-radius: 150px;
  position: relative;
  cursor: pointer;
}
.theme-toggle.dark {
  background-color: #2196f3;
}
/* Theme Toggle Button Indicator */
.theme-toggle .theme-toggle-indicator {
  width: 34px;
  height: 34px;
  background-color: white;
  border-radius: 50%;
  transform: scale(0.8);
  position: absolute;
  left: 0;
  transition: 0.5s;
}
.theme-toggle.dark .theme-toggle-indicator {
  left: 26px;
}

/* Navigation Bar */
nav.top-nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  z-index: 1;
  background-color: #0e1012;
  position: fixed;
  top: 0;
  width: 100%;
}

nav.top-nav li {
  float: left;
}

nav.top-nav li a {
  display: block;
  color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
}

nav.top-nav li a:hover {
  background-color: #111;
}

nav.top-nav li a[aria-current] {
  background-color: #023020;
}

/* Table Layout */
table.standardTable {
  margin-left: auto;
  margin-right: auto;
  border-top: 2px solid var(--table-border-color);
  border-bottom: 2px solid var(--table-border-color);
  border-collapse: collapse;
  overflow-x: auto;
  white-space: nowrap;
}

table.standardTable th,
td {
  text-align: center;
  padding: 8px;
}

table.standardTable th {
  text-align: center;
  border-bottom: 2px solid var(--table-border-color);
}

table.standardTable td + td {
  border-left: 2px solid var(--table-border-color);
}
table.standardTable th + th {
  border-left: 2px solid var(--table-border-color);
}

table.standardTable tr:nth-child(odd) {
  background-color: var(--table-row-color);
}

table.standardTable th {
  background-color: var(--table-header-color);
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 90%;
}

/* @media screen and (min-width: 769px) {
    .main-page-content {
        margin-bottom: 0.5rem;
        padding: 0;
    }
} */

.main-page-content {
  /* background: #1B1B1B; */
  margin: auto;
  width: 60%;
  border-radius: 25px;
  border: 3px solid #808080;
  padding: 3rem 1rem 1rem;
  overflow-wrap: break-word;
}

/* TABLE OF CONTENTS */
ol.nested-counter-list {
  counter-reset: item;
  overflow: scroll;
}

ol.nested-counter-list li {
  display: block;
}

ol.nested-counter-list li::before {
  content: counters(item, ".") ". ";
  counter-increment: item;
  font-weight: bold;
}

ol.nested-counter-list ol {
  counter-reset: item;
}
/* TABLE OF CONTENTS */

#toc-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 3s ease-out;
  cursor: pointer;
}

.toc-closed {
  width: 25px;
  height: 25px;
  background-color: rgb(90, 95, 229);
  border: solid 1px rgb(90, 95, 229);
  border-radius: 50%;
}

.toc-open {
  width: 80px;
  height: 300px;
  background-color: rgb(113, 106, 130);
  border: solid 1px rgb(52, 51, 55);
  border-radius: 5px;
  transform: translate(-80px, -70px);
}

#toc-icon {
  transition: 1s;
}

.toc-icon-inactive {
  width: 0px;
  height: 0px;
}

#toc-text {
  animation: createBox 1.5s;
}

@keyframes createBox {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes createBox2 {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0);
  }
}

.toc-text-inactive {
  display: none;
  animation-name: createBox;
  animation-duration: 1.5s;
  /* animation-direction: reverse;
  animation-fill-mode: forwards; */
}

.toc-text-active {
  display: block;
  animation-name: createBox;
  animation-duration: 1.5s;
}

.hb {
  width: 30px;
  margin: 0 auto;
  display: block;
}

/* AQUI FLOAT ICON MENU */
.expando {
  border-radius: 2px;
  overflow: hidden;
  position: fixed;
  top: 80px;
  left: 20px;
  will-change: transform;
}

.expando__inner {
  top: 10px;
  left: 10px;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  position: absolute;
  will-change: transform;
}

.expando__inner-inverter {
  will-change: transform;
}

.expando__btn {
  width: 48px;
  height: 48px;
  position: absolute;
  top: 0;
  left: 0;
  background: none;
  border: none;
  outline: none;
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
  transition: transform 0.1s cubic-bezier(0, 0, 0.31, 1),
    opacity 0.2s cubic-bezier(0, 0, 0.31, 1);
}

.expando__content {
  position: absolute;
  left: -10px;
  top: -10px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0, 0, 0.31, 1),
    opacity 0.3s cubic-bezier(0, 0, 0.31, 1);
}

.expando__close {
  position: absolute;
  right: 10px;
  top: 10px;
  outline: none;
  border: none;
  background: none;
  cursor: pointer;
}

.expando__content-list {
  width: 140px;
  margin: 0;
  padding: 30px 0 20px 0;
  list-style: none;
  overflow: hidden;
}

.expando__content-list li {
  line-height: 1.9;
  padding: 0 20px;
}

.expando__content-list li:hover {
  background: #555;
  color: #fff;
}

.item--expanded {
  animation-name: expandAnimation;
  animation-duration: 0.7s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--expanded {
  animation-name: expandContentsAnimation;
  animation-duration: 0.7s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item--collapsed {
  animation-name: collapseAnimation;
  animation-duration: 0.2s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--collapsed {
  animation-name: collapseContentsAnimation;
  animation-duration: 0.2s;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.item__contents--expanded .expando__content {
  transform: translateY(0px);
  opacity: 1;
  pointer-events: auto;
}

.item__contents--expanded .expando__btn {
  transform: rotate(180deg);
  opacity: 0;
  pointer-events: none;
}
