.ghrm-menu-shell {
  position: relative;
  display: inline-flex;
}

.ghrm-view-menu-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--borderColor-default, #d0d7de);
  border-radius: 6px;
  background: var(--bgColor-default, #ffffff);
  color: var(--fgColor-muted, #636c76);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.markdown-body .ghrm-view-menu-toggle {
  color: var(--fgColor-muted, #636c76);
  text-decoration: none;
}

.ghrm-view-menu-toggle:hover,
.ghrm-view-menu-toggle.is-active,
.ghrm-view-menu-toggle[aria-expanded="true"] {
  background: var(--bgColor-muted, #f6f8fa);
  color: var(--fgColor-default, #1f2328);
  border-color: var(--borderColor-muted, #d0d7deb3);
}

.markdown-body .ghrm-view-menu-toggle:hover,
.markdown-body .ghrm-view-menu-toggle.is-active,
.markdown-body .ghrm-view-menu-toggle[aria-expanded="true"] {
  color: var(--fgColor-default, #1f2328);
}

.ghrm-view-menu-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ghrm-view-menu-toggle use[href$="#ghrm-icon-filter"] {
  stroke: currentColor;
}

.ghrm-view-menu {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--borderColor-default, #d0d7de);
  border-radius: 8px;
  background: var(--bgColor-default, #ffffff);
  box-shadow:
    0 8px 24px rgba(31, 35, 40, 0.12),
    0 1px 2px rgba(31, 35, 40, 0.08);
}

.ghrm-view-option {
  width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--fgColor-default, #1f2328);
  font: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  text-decoration: none;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 10px;
  cursor: pointer;
}

button.ghrm-view-option {
  appearance: none;
}

.markdown-body .ghrm-view-option {
  color: var(--fgColor-default, #1f2328);
  text-decoration: none;
}

.ghrm-view-option:hover {
  background: var(--bgColor-neutral-muted, #afb8c133);
}

.markdown-body .ghrm-view-option:hover {
  color: var(--fgColor-default, #1f2328);
  text-decoration: none;
}

.ghrm-view-option[hidden] {
  display: none;
}

.ghrm-view-option-check {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0;
}

.ghrm-view-option-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ghrm-view-option.is-active .ghrm-view-option-check {
  opacity: 1;
}

.ghrm-view-option-label {
  min-width: 0;
}

.ghrm-view-group {
  padding-left: 26px;
}

.ghrm-view-separated {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 2px solid var(--borderColor-muted, #d1d9e0b3);
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

hr.ghrm-menu-separator {
  all: unset;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--borderColor-muted, #d1d9e0b3);
  margin: 6px 0;
}

.markdown-body .ghrm-nav-table {
  display: table;
  width: 100%;
  margin: 0;
  table-layout: fixed;
  border-collapse: collapse;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.markdown-body .ghrm-nav-table .ghrm-column-headers {
  border-bottom: 1px solid var(--borderColor-default, #d0d7de);
}

.markdown-body .ghrm-nav-table .ghrm-column-headers th {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--fgColor-muted, #656d76);
  border: none !important;
  background: var(--bgColor-muted, #f6f8fa);
}

.markdown-body .ghrm-nav-table .ghrm-column-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}

.markdown-body .ghrm-nav-table button.ghrm-column-sort {
  width: 100%;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.markdown-body .ghrm-nav-table .ghrm-column-sort:hover,
.markdown-body .ghrm-nav-table .ghrm-column-sort.is-active {
  color: var(--fgColor-default, #1f2328);
  text-decoration: none;
}

.ghrm-column-sort-icon {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex: 0 0 auto;
}

.ghrm-nav-icon-col,
.ghrm-nav-table .ghrm-column-headers .ghrm-nav-icon {
  width: 34px;
}

.markdown-body .ghrm-nav-table .ghrm-column-headers .ghrm-nav-meta-number,
.markdown-body .ghrm-nav-table .ghrm-column-headers .ghrm-nav-meta-time {
  text-align: right;
}

.markdown-body
  .ghrm-nav-table
  .ghrm-column-headers
  .ghrm-nav-meta-number
  button.ghrm-column-sort,
.markdown-body
  .ghrm-nav-table
  .ghrm-column-headers
  .ghrm-nav-meta-time
  button.ghrm-column-sort {
  justify-content: flex-end;
}

.ghrm-nav-empty {
  margin: 0;
  padding: 16px;
  color: var(--fgColor-muted, #636c76);
  font-size: 14px;
}

.ghrm-archive-progress {
  padding: 8px 12px;
  border-top: 1px solid var(--borderColor-muted, #d0d7deb3);
  border-bottom: 1px solid var(--borderColor-muted, #d0d7deb3);
  background: var(--bgColor-default, #ffffff);
}

.ghrm-archive-progress[hidden] {
  display: none;
}

.ghrm-archive-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 6px;
  color: var(--fgColor-muted, #636c76);
  font-size: 12px;
  line-height: 16px;
}

.ghrm-archive-progress-label,
.ghrm-archive-progress-count {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghrm-archive-progress-label {
  color: var(--fgColor-default, #1f2328);
}

.ghrm-archive-progress-count {
  flex: 0 1 auto;
  text-align: right;
}

.ghrm-archive-progress-track {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--borderColor-muted, #d0d7deb3);
}

.ghrm-archive-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--fgColor-accent, #0969da);
  transition: width 0.2s ease;
}

.ghrm-archive-progress[data-state="failed"] .ghrm-archive-progress-fill {
  background: var(--fgColor-danger, #d1242f);
}

.markdown-body .ghrm-nav-table tr,
.markdown-body .ghrm-nav-table tr:nth-child(2n) {
  background-color: transparent;
  border-top: none;
}

.markdown-body .ghrm-nav-table tbody tr:hover {
  background: var(--bgColor-muted, #f6f8fa);
}

.markdown-body .ghrm-nav-table td {
  height: 40px;
  padding: 0px 12px 10px;
  vertical-align: bottom;
  border: none;
  border-bottom: 1px solid var(--borderColor-muted, #d0d7deb3);
}

.markdown-body .ghrm-nav-table .ghrm-nav-icon {
  width: 34px;
  padding-right: 6px;
  position: relative;
}

.markdown-body .ghrm-nav-table .ghrm-nav-name {
  min-width: 0;
  padding-left: 6px;
  text-align: left;
}

.ghrm-nav-icon {
  color: var(--fgColor-muted, #636c76);
}

.ghrm-nav-copy-path {
  position: absolute;
  left: 10px;
  bottom: 8px;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  font: inherit;
  opacity: 0;
}

.ghrm-nav-copy-path:hover,
.ghrm-nav-copy-path:focus-visible,
.ghrm-nav-copy-path.is-copied {
  color: var(--fgColor-default, #1f2328);
  background: var(--bgColor-neutral-muted, #afb8c133);
  opacity: 1;
}

.ghrm-nav-copy-path:focus-visible {
  outline: 2px solid var(--focus-outlineColor, #0969da);
  outline-offset: 2px;
}

.ghrm-nav-copy-path.is-copied {
  color: var(--fgColor-success, #1a7f37);
}

.ghrm-nav-icon:has(.ghrm-nav-copy-path:hover) > svg,
.ghrm-nav-icon:has(.ghrm-nav-copy-path:focus-visible) > svg,
.ghrm-nav-icon:has(.ghrm-nav-copy-path.is-copied) > svg {
  opacity: 0;
}

.ghrm-nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ghrm-nav-copy-path .ghrm-copy-icon-check {
  display: none;
}

.ghrm-nav-copy-path.is-copied .ghrm-copy-icon-copy {
  display: none;
}
.ghrm-nav-copy-path.is-copied .ghrm-copy-icon-check {
  display: block;
}

.ghrm-nav-name {
  font-size: 14px;
  line-height: 20px;
}

.ghrm-nav-name a {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
  color: var(--fgColor-default, #1f2328);
  font-weight: 400;
  line-height: 20px;
  text-decoration: none;
}

.ghrm-nav-name a:hover {
  color: var(--fgColor-accent, #0969da);
  text-decoration: underline;
}

.ghrm-nav-name .ghrm-nav-external {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: var(--fgColor-muted, #636c76);
  vertical-align: -2px;
}

.ghrm-nav-name .ghrm-nav-external:hover {
  color: var(--fgColor-accent, #0969da);
  text-decoration: none;
}

.ghrm-nav-meta[hidden] {
  display: none;
}

.ghrm-nav-meta-text-value {
  display: block;
  color: var(--fgColor-muted, #636c76);
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ghrm-nav-meta-time {
  width: 120px;
  text-align: right;
  color: var(--fgColor-muted, #636c76);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  cursor: default;
}

.ghrm-nav-meta-number {
  width: 64px;
  text-align: right;
  color: var(--fgColor-muted, #636c76);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  cursor: default;
}

@container ghrm-explorer (max-width: 38rem) {
  .ghrm-has-edge-meta .ghrm-nav-middle-meta {
    display: none;
  }
}

@media (max-width: 767px) {
  .ghrm-view-menu-toggle {
    width: 26px;
    height: 26px;
  }

  .ghrm-view-menu {
    min-width: 200px;
  }
}
