/* https://picocss.com/docs */
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("./Atkinson-Hyperlegible-Regular-102.woff");
}
:root {
  --pico-typography-spacing-vertical: 1.5rem;
  --pico-font-family: "Atkinson Hyperlegible", sans-serif;
  --pico-color-grey-50: #f1f1f1;
  --pico-color-azure-50: #e9f2fc;
  --pico-color-azure-200: #9bccfd;
  --pico-color-grey-700: #474747;
  --pico-color-slate-500: ##687899;
  --pico-color-slate-750: #333c4e;
  --pico-color-slate-800: #2a3140;
  --pico-color-slate-850: #202632;
  --pico-color-azure-550: #0172ad;
  --pico-color-azure-650: #015887;
  --pico-border-radius: 4px;
  --pico-typography-spacing-vertical: 1rem;
}

[data-theme="light"],
:root:not([data-theme="dark"]) {
  --pico-tag: var(--pico-color-azure-50);
  --pico-bg-menu: #fff;
  --pico-home: var(--pico-color-slate-500);
  --pico-menu-selected: #48536b;
  --pico-menu: #5d6b89;
}

@media only screen and (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --pico-tag: var(--pico-color-slate-850);
    --pico-bg-menu: var(--pico-color-slate-850);
    --pico-home: var(--pico-color-slate-500);
    --pico-menu-selected: #b3b9c5;
    --pico-menu: #969eaf;
  }
}

[data-theme="dark"] {
  --pico-tag: var(--pico-color-slate-850);
  --pico-bg-menu: var(--pico-color-slate-850);
  --pico-home: var(--pico-color-slate-500);
  --pico-menu-selected: #b3b9c5;
  --pico-menu: #969eaf;
}

a {
  text-decoration: none;
}

blockquote {
  padding: 0;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 1rem;
  padding-bottom: 0.01rem;
}

.header-name a.contrast {
  color: var(--pico-home);
}

.header-name {
  color: var(--pico-home);
}

/* Menu Hamburguer */
.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.header-menu {
  list-style: none;
  display: flex;
  gap: 15px;
  position: relative;
}

.header-menu li {
  text-decoration: none;
  padding: 8px 16px;
  color: #333;
  display: inline-block;
}

.header-menu .selected {
  background-color: transparent;
  color: var(--pico-menu-selected);
  border: none;
  border-radius: 0;
}

.header-menu .menu-item {
  transition: color 0.3s ease;
}

.underline {
  position: absolute;
  height: 2px;
  background-color: var(--pico-color-azure-550);
  transition: transform 0.4s ease-in-out, width 0.4s ease-in-out;
  bottom: 8px;
  left: 0;
  width: 0;
}

.menu-item.active + .underline {
  transform: translateX(0);
}

.header-menu li a:hover {
  color: var(--pico-menu-selected);
  transition: 0.3s ease-in-out;
}

.hamburger {
  font-size: 30px;
  background: none;
  border: none;
  cursor: pointer;
  display: none;
  color: var(--pico-color-azure-650);
  position: relative;
}

#menu-toggle:focus {
  outline: none;
}

/* Tags */

.content-tags {
  display: flex;
  width: auto;
  flex-direction: row;
  margin: 0 0;
  justify-content: flex-start;
  list-style: none;
  gap: 8px;
}

.content-tags li {
  padding: 8px 16px;
  border-radius: 4px;
  margin: 4px 8px;
  background-color: var(--pico-tag);
  text-wrap: nowrap;
  position: relative;
  padding: 4px 12px 4px 8px;
  border-radius: 4px;
  background-color: var(--pico-tag);
  white-space: nowrap;
  list-style: none;
  display: inline-block;
  color: #333;
}

.content-tags li:before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-right: 16px solid var(--pico-tag);
}

.group-list .content-tags {
  display: flex;
  width: auto;
  flex-direction: row;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 12px;
}

.tag-count {
  color: var(--pico-color-azure-550);
}

.content-tags li::marker {
  content: "";
}

article footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spoiler,
.spoiler > * {
  transition: color 0.5s, opacity 0.5s;
}
.spoiler:not(:hover) {
  color: transparent;
  background-color: #808080;
}
.spoiler:not(:hover) > * {
  opacity: 0;
}

pre:has(> code.language-mermaid) {
  background-color: #fff;
}

pre:has(> code.language-mermaid) p {
  color: revert;
}

/* Search */

#search-toggle {
  align-items: center;
  justify-content: center;
}

.search-magnifier {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--pico-menu);
  border-radius: 50%;
  position: relative;
  margin-right: 5px;
  box-sizing: content-box;
}

/* Configurações do cabo da lupa */
.search-magnifier::after {
  content: "";
  display: block;
  width: 8px;
  height: 2px;
  background-color: var(--pico-menu);
  position: absolute;
  top: 80%;
  left: 95%;
  transform: rotate(45deg);
  transform-origin: top left;
}

.search-txt {
  display: none;
}

.pagination nav li a {
  font-size: 2rem;
}

.hero article {
  overflow: auto;
}

/* Footer content */
.data-tags-footer {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.data-tags-footer .content-date {
  margin-left: 0;
}

.date-tags-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
}

.content-authors-full {
  width: 100%;
}

.content-authors-flex {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.footer-content div {
  text-align: center;
}

/* Centering and styling the search bar */
.marmite-search-bar {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--pico-bg-menu);
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1001; /* Higher z-index to sit above the background overlay */
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.marmite-search-bar.hidden {
  display: none;
}

/* Style for the input field */
#marmite-search-input {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid var(--pico-color-azure-550);
  border-radius: 4px;
  outline: none;
  margin-bottom: 10px;
}

/* Style for the search results */
.marmite-search-bar-result {
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
}

.marmite-search-bar-result ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Background overlay with blur effect */
.marmite-background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(10px); /* This creates the blur effect */
  background-color: rgba(0, 0, 0, 0.4); /* Slightly darkened background */
  z-index: 1000; /* Sits behind the search bar */
  display: none; /* Initially hidden */
}

/* Toggle visibility of overlay and search bar */
.show .marmite-background-overlay,
.show .marmite-search-bar {
  display: block;
}

/* Close button styling */
.marmite-close-button {
  position: absolute;
  top: 1.2em;
  right: 1em;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--pico-text-selection-color);
}

.hljs {
  /* important crime must be committed here because of unknown events */
  background: var(
    --pico-code-background-color
  ) !important; /* why, Bruno, Why??????*/
}

/*  Banner img*/
.content-banner-image {
  height: 350px;
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.index-banner-image {
  margin-bottom: 20px;
}

.content-title {
  margin-bottom: 10px;
}
.content-title h1 {
  margin: 0;
}

.content-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-authors img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.content-authors p {
  margin: 0;
}

.content-authors-full .content-authors {
  flex-wrap: wrap;
}

.content-authors-full .date-tags-container .content-tags {
  justify-content: center;
  flex-wrap: nowrap;
}

.content-date {
  color: var(--pico-home);
}

.content-authors ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin-top: revert;
}

.content-authors li {
  display: flex;
  align-items: center;
}

td,
th {
  padding: calc(var(--pico-spacing) / 2) var(--pico-spacing);
  border: var(--pico-border-width) solid var(--pico-table-border-color);
  background-color: var(--pico-background-color);
  color: var(--pico-color);
  font-weight: var(--pico-font-weight);
  /* text-align: left; */
  text-align: start;
}

/* Author Hero*/

.hero {
  display: block;
  width: 100%;
  justify-content: left;
  justify-content: center;
  align-items: flex-start;
}

.author-hero-image .avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

.author-hero-links {
  grid-area: links;
  display: block;
  margin-left: 0px;
}

.author-hero-links ul {
  display: flex;
  gap: 15px;
  padding: 0;
  list-style: none;
  align-items: center;
  margin-bottom: 0;
}

.author-hero-links ul li {
  list-style: none;
}

.author-hero-links a {
  color: var(--pico-color-azure-550);
}

.author-hero-profile {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  align-items: flex-start;
}

.author-hero-flex {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.author-hero-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  justify-self: center;
}

.author-hero-info p {
  color: var(--pico-home);
  margin-bottom: 0;
}

.author-hero-info h1 {
  margin-bottom: 0;
}

.group-details img.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

/* ^ Any non-responsive code goes above here ^ */

/* Responsive */
@media (max-width: 1025px) {
  .header-nav {
    flex-direction: row;
  }
  .header-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: 100px;
    right: 0;
    background-color: var(--pico-bg-menu);
    padding: 15px;
    border-radius: 4px;
    z-index: 100;
    box-shadow: 0px 4px 4px 0px #0000001f;
  }

  .header-menu.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }

  .underline {
    display: none;
  }

  .search-txt {
    display: inline-block;
  }

  .search-magnifier {
    display: none;
  }

  .content-authors-flex .date-tags-container {
    flex-direction: column;
    align-items: center;
    overflow: auto;
  }

  .content-authors-flex .date-tags-container ul {
    margin-left: 0;
    display: flex;
    justify-content: center;
  }

  .content-authors-flex .date-tags-container ul li {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .content-authors-full .content-authors ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .content-authors-full .content-authors ul li a {
    display: flex;
    flex-direction: row;
    gap: 8px;
  }
}

@media (max-width: 768px) {
  .author-hero article {
    grid-template-areas:
      "title"
      "image"
      "bio"
      "links";
    grid-template-columns: 1fr;
    text-align: center;
  }

  .content-banner-image {
    height: 200px;
  }
}
