/* Reset and Base */
html,
body {
  padding: 0;
  margin: 0;
  background-color: rgb(46, 41, 41);
  color: white;
  scrollbar-face-color: #646464;
  scrollbar-base-color: #646464;
  scrollbar-3dlight-color: #646464;
  scrollbar-highlight-color: #646464;
  scrollbar-track-color: #000;
  scrollbar-arrow-color: #000;
  scrollbar-shadow-color: #646464;
  font-family: Arial, sans-serif;
  box-sizing: border-box;
}

body {
  max-width: 960px;
  width: 90%;
  margin: 20px auto;
  padding: 20px;
  border: 1px solid gray;
}

/* Layout container */
.responsive-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 992px) {
  .responsive-wrapper {
    flex-direction: row;
  }

  aside {
    flex: 0 0 280px;
  }

  main {
    flex: 1;
  }

  body {
    margin-left: 300px;
    width: calc(100% - 320px);
  }
}

/* Sidebar */
aside {
  position: relative;
  width: 100%;
  height: auto;
  padding: 1.5rem;
  border: 1px solid #444;
  font-size: 0.95rem;
  background-color: #454545;
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  aside {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    border-right: 1px solid #ddd;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
    overflow-y: auto;
    z-index: 1000;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 3px;
}
::-webkit-scrollbar-button {
  background-color: #000;
}
::-webkit-scrollbar-track {
  background-color: #646464;
}
::-webkit-scrollbar-track-piece {
  background-color: #000;
}
::-webkit-scrollbar-thumb {
  height: 50px;
  background-color: #666;
  border-radius: 3px;
}
::-webkit-scrollbar-corner {
  background-color: #646464;
}
::-webkit-resizer {
  background-color: #666;
}

/* Headers / footers (from template) */
.next-header-pane {
  height: 66px;
  background-color: #606060;
}
.header-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 30px;
  font-weight: bold;
}
.next-footer-pane {
  position: absolute;
  height: 49px;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #606060;
}
.footer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Flex body system */
.next-body {
  position: absolute;
  top: 66px;
  right: 0;
  bottom: 49px;
  left: 0;
  display: flex;
}
.next-sidebar {
  width: 20%;
  overflow-y: scroll;
  background-color: #404040;
}
.next-main {
  flex: 1;
  width: 80%;
  display: flex;
  flex-direction: column;
}
.next-content {
  flex: 1;
  display: flex;
  overflow: auto;
  flex-direction: column;
}
.next-box {
  display: flex;
  min-height: 100%;
}
.next-column:nth-child(1) {
  overflow-y: scroll;
  width: 100%;
}

.content {
  margin: 0px;
  padding: 0px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}
.content > div {
  padding: 10px;
}

/* Links */
a,
a:hover,
a:focus,
a:active {
  text-decoration: none;
  color: white;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #ddd;
  margin-bottom: 20px;
}
th,
td {
  text-align: left;
  padding: 16px;
}
th {
  background-color: #202020;
  color: white;
  border-bottom: 2px solid white;
}
tr:nth-child(even) {
  background-color: #303030;
}
tr:nth-child(odd) {
  background-color: #505050;
}

/* Code blocks (PrismJS) */
pre[class*="language-"] {
  background: #353535;
  overflow-x: auto;
  padding: 1rem;
  border-radius: 4px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 1rem 0;
  border: 1px solid gray;
}

:not(pre) > code[class*="language-"] {
  background: #303030;
}
pre[class*="language-"]::-webkit-scrollbar {
  height: 6px;
}

/* Images */
img {
  max-width: 40%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
}

main,
.next-main,
.next-content,
.next-column:nth-child(1) {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  box-sizing: border-box;
  max-width: 100%;
}

pre,
code {
  max-width: 100%;
  overflow-x: auto;
  /*display: block;*/
  box-sizing: border-box;
}

body,
pre,
code {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

main {
  margin: 0 auto;
  max-width: 100%;
  padding: 0 1rem;
}

@media (min-width: 992px) {
  body {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
  }

  .responsive-wrapper {
    padding: 2rem;
    gap: 2rem;
  }

  main {
    flex: 1;
    width: 100%;
  }
}
@media (min-width: 992px) {
  .responsive-wrapper {
    margin-left: 280px; /* deixa espaço para o sidebar fixo */
  }

  body {
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100%;
    overflow-x: hidden;
  }

  main {
    flex: 1;
    width: 100%;
  }
}
