:root {
  --md-admonition-icon--folder: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-8l-2-2H4Z"/></svg>')
}

.md-typeset .admonition.folder,
.md-typeset details.folder {
  border: none;
  border-left: 3px solid var(--md-primary-fg-color);
  box-shadow: none;
  background: var(--md-default-bg-color--light);
}

.md-typeset .folder > .admonition-title,
.md-typeset .folder > summary {
  background: none;
  padding: 0.2rem 0.5rem;
  margin: 0;
  font-weight: normal;
  display: flex;
  align-items: center;
  min-height: 40px; /* Better touch target size */
  gap: 0.5rem; /* Add space between icon and text */
  color: var(--md-typeset-color); /* Ensure sufficient contrast */
}

.md-typeset .folder > .admonition-title::before,
.md-typeset .folder > summary::before {
  background-color: var(--md-default-fg-color--light);
  -webkit-mask-image: var(--md-admonition-icon--folder);
          mask-image: var(--md-admonition-icon--folder);
  position: relative; /* Remove absolute positioning */
  margin: 0; /* Remove default margins */
  top: 0; /* Remove top positioning */
  left: 0; /* Remove left positioning */
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.md-typeset .folder > .admonition-title:hover,
.md-typeset .folder > summary:hover {
  background: var(--md-default-fg-color--lightest);
  border-radius: 4px;
}

.md-typeset details.folder > div.content {
  padding-left: 1.8rem;
  margin: 0;
}

.md-typeset details.folder ul {
  margin: 0.2rem 0 0.2rem 0.8rem;
  list-style: none;
}

.md-typeset details.folder ul li {
  margin: 0.2rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
