.md-content ul {
  list-style: none;
}

.md-content ul ul {
  list-style: circle;
}

.md-content ul li {
  position: relative;
}

.md-content:not(:has(.page)) ul li:before {
  content: "";
  display: inline-block;

  position: absolute;
  top: 0.2rem;
  left: -1.25rem;

  width: 0.75rem;
  height: 0.9375rem;

  background: url("../img/marker.svg") no-repeat center center / contain;
}

.md-content:not(:has(.page)) ul ul li::before,
.md-content:not(:has(.page)) ul ol li::before,
.md-content:not(:has(.page)) ol li:not(.md-path__item)::before {
  background: none;
  width: 0;
  height: 0;
}

/* Text */
.md-typeset {
  color: var(--text-gray);
  font-family: var(--md-text-font);
  font-size: 0.875rem;
  text-align: justify;
  font-weight: 500;
}

/* Links */
.md-typeset a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s, color 0.2s;
}

.md-typeset a:hover {
  color: var(--orange-primary);
}

.admonition-content {
  padding-inline: 1rem;
}

.admonition-content p:first-child {
  margin-top: 0;
}

/* Headings */
.md-typeset h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--md-primary-font);
  font-weight: 700 !important;
  color: var(--primary);

  text-align: start;
  margin-bottom: 1.25rem;
}

.md-typeset h1 {
  font-size: 1.75rem;
}

.md-typeset strong {
  font-weight: 700;
}

.md-typeset h2,
h3,
h4,
h5,
h6 {
  font-size: 1.25rem;
}

.md-typeset h3,
h4,
h5,
h6 {
  font-size: 1rem;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  height: 2.25rem;
  width: fit-content;
  padding-inline: 1rem;

  border: none;
  border-radius: 0.5rem;

  font-family: var(--md-primary-font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;

  cursor: pointer;
}

.button.lg {
  height: 2.75rem;
}

.button svg {
  flex-shrink: 0;
}

a.button {
  text-decoration: none;
}

.button.button-primary {
  background-color: var(--primary);
  color: var(--white-primary);
  fill: var(--white-primary);

  transition: background-color 0.2s, box-shadow 0.2s;
}

.button.button-primary:hover {
  box-shadow: 0px 1px 3px 1px #2c2c2c26;
  background-color: var(--blue-hover);
}

.button.button-secondary {
  background-color: var(--white-primary);
  color: var(--primary);
  stroke: var(--primary);
  border: 1px solid var(--gray-light);

  transition: opacity 0.2s, box-shadow 0.2s, background-color 0.2s, color 0.2s,
    border-color 0.2s, stroke 0.2s;
}

.button.button-secondary:hover {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);
  stroke: var(--white-primary);
  color: var(--white-primary);
  box-shadow: 0px 1px 3px 1px #2c2c2c26;
}

.button.button-link {
  background-color: transparent;

  font-family: var(--md-text-font);
  font-weight: 600;
  color: var(--primary);
  font-size: 0.75rem;
  padding: 0;

  transition: color 0.2s;
}

.button.button-link:hover,
.button.button-link.hover {
  color: var(--orange-primary);
}

.button.button-link:focus-visible,
.button.button-link.focus-visible {
  outline: none;
  color: var(--orange-primary);
}

.separator {
  flex-shrink: 0;
}

.separator.horizontal {
  width: 100%;
  height: 1px;
  background-color: var(--md-primary-bg-color);
}

.separator.vertical {
  width: 1px;
  height: 100%;
  background-color: var(--gray-light);
}

.table {
  width: 100%;
  overflow: auto;
}

.table thead th {
  background-color: var(--gray-secondary);
}

.table thead th,
.table tbody td {
  padding-left: 1.25rem;
  padding-block: 0.5rem;
}

.table tbody tr > td:last-child {
  padding-right: 1.25rem;
}

.cards {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.cards.sm {
  gap: 0.625rem;
}

.cards .card {
  flex: 1;
  min-width: 9rem;
}

.cards.sm .card {
  height: 6.25rem;
  min-width: 6.25rem;
}

.cards.examples .card {
  padding: 1rem 0.75rem;
  height: 7rem;
}

.cards.sm .card h3,
.cards.examples .card h3 {
  font-size: 0.875rem;
  margin-top: 0;
}

.cards.sm .card img {
  width: 1.75rem;
  height: 1.75rem;
}

.cards.examples .card img {
  width: 7.25rem;
  height: 2rem;
}

a.card {
  text-decoration: none;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;

  border: 1px solid var(--gray-light);
  border-radius: 0.5rem;
  padding: 1rem;
  height: 10.1875rem;
}

a.card:hover {
  opacity: 1;
}

.card:hover {
  opacity: 1;
  border-color: var(--primary);
  box-shadow: 0px 4px 5px 2px #0000001a;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.card img {
  width: 2.75rem;
  height: 2.75rem;
}

.card h3 {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600 !important;
  margin: 0;
  margin-top: 1rem;
  text-align: center;
}

.card .card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.card .card-title h3 {
  margin: 0;
}

.card .card-title img {
  width: 1.75rem;
  height: 1.75rem;
}

.card .card-text {
  color: var(--text-gray);
  font-size: 0.75rem;
  text-align: center;
  font-weight: 500;
  margin: 0;
}

.card .card-text.summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .card-text .version {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin: 0 !important;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.checkbox::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  vertical-align: middle;
  transition: background-color 0.2s, border-color 0.2s;
}

.checkbox input[type="checkbox"]:focus-visible + *::before,
.checkbox input[type="checkbox"]:focus-visible::before {
  outline: 2px solid var(--orange-primary);
  outline-offset: 2px;
}

.checkbox:has(input[type="checkbox"]:checked)::before {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 11 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.76197 6.2539L9.7907 0.213809C9.93297 0.0712696 10.099 0 10.2886 0C10.4783 0 10.6443 0.0712696 10.7866 0.213809C10.9289 0.356348 11 0.525731 11 0.72196C11 0.918189 10.9289 1.08733 10.7866 1.2294L4.25992 7.78619C4.11765 7.92873 3.95166 8 3.76197 8C3.57228 8 3.40629 7.92873 3.26402 7.78619L0.205198 4.7216C0.0629276 4.57906 -0.00536252 4.40992 0.000328317 4.21416C0.00601915 4.01841 0.0802369 3.84903 0.222982 3.70601C0.365727 3.563 0.534793 3.49173 0.730178 3.4922C0.925563 3.49268 1.09439 3.56395 1.23666 3.70601L3.76197 6.2539Z' fill='white'/%3E%3C/svg%3E");

  background-position: center;
  background-repeat: no-repeat;
  background-size: 60%;
}

.input {
  font-weight: 500;
  background-color: #ffffff;
  color: var(--text-gray);
  border: 1px solid var(--gray-light);
  border-radius: 0.3125rem;
  padding-inline: 1rem;
  width: 100%;
  height: 2.25rem;
}

.input::placeholder {
  color: var(--text-gray);
  opacity: 1;
}

.input:focus-visible {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px var(--orange-secondary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

/* Botão de busca */
.search-button {
  position: relative;
  display: block;

  height: 2.25rem;
  width: auto;

  padding-inline: 1rem;
  background: var(--white-primary);
  border: 1px solid var(--gray-light);
  border-radius: 0.5rem;

  color: var(--text-gray);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;

  transition: all 0.2s;
}

.search-button:hover,
.search-button:focus-visible {
  background-color: var(--orange-primary);
  border-color: var(--orange-primary);
  fill: var(--white-primary);
  color: var(--white-primary);
  box-shadow: 0px 1px 3px 1px #2c2c2c26;
}

.search-button-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-button-content svg {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.keyboard-shortcut {
  position: absolute;
  top: 50%;
  right: 0.625rem;
  transform: translateY(-50%);
  background: transparent;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--gray-light);
}

/* Overlay do modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
  justify-content: center;
  padding-top: 100px;
}

/* Modal */
.modal {
  background: var(--white-primary);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  width: 90%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideDown 0.3s ease;
  box-shadow: rgba(50, 50, 93, 0.25) 0px 50px 100px -20px,
    rgba(0, 0, 0, 0.3) 0px 30px 60px -30px;
  will-change: transform;
}

.search-input-wrapper {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-light);
  position: relative;
}

.search-input-wrapper::before {
  content: "";
  display: none;
  margin: 0.75rem auto;
  width: 4.5rem;
  height: 4px;
  background: var(--gray-light);
  border-radius: 4px;
  transition: background 0.2s;
}

.search-input-wrapper svg {
  position: absolute;
  top: 50%;
  left: 1.8rem;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  fill: var(--text-gray);
}

.search-input {
  width: 100%;
  padding: 0.75rem calc(1.8rem + 0.5rem);
  background: transparent;
  border: 1px solid var(--gray-light);
  border-radius: 0.5rem;
  color: var(--text-gray);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--orange-primary);
  box-shadow: 0 0 0 3px var(--orange-secondary);
}

.search-input::placeholder {
  color: var(--text-gray);
}

.results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.result-item {
  display: block;
  padding: 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 0.25rem;
}

.result-item:hover {
  background: var(--gray-light);
}

.result-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.result-icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--text-gray);
}

.result-hit-count {
  font-size: 0.75rem;
  color: var(--text-gray);
  font-weight: normal;
}

.result-description {
  font-size: 0.875rem;
  text-align: justify;
  color: var(--text-gray);
  margin-left: 1.5rem;
  margin-block: 0.75rem;
  line-height: 1.4;
}

.result-location {
  overflow: hidden;
  font-size: 0.75rem;
  color: var(--primary);
  margin-left: 1.5rem;

  display: -webkit-box;
  line-clamp: 1;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.modal-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.footer-hint {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-gray);
}

.key {
  background: var(--gray-light);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

.results-count {
  font-size: 0.75rem;
  color: var(--text-gray);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.results::-webkit-scrollbar {
  width: 8px;
}

.results::-webkit-scrollbar-track {
  background: transparent;
}

.results::-webkit-scrollbar-thumb {
  background: var(--gray-secondary);
  border-radius: 4px;
}

.results::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text-gray);
  font-size: 14px;
}

.loading-state {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--text-gray);
  font-size: 14px;
}
