html,
body {
  height: 100%;
  margin: 0;
}
#elm-main {
  height: 100vh;
}

/* Markdown content styling */
.markdown-content pre {
  background-color: #1e1e1e;
  border: 1px solid #444;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

.markdown-content code {
  color: #f8f9fa;
  background-color: transparent;
}

.markdown-content pre code {
  display: block;
  color: #f8f9fa;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95em;
  line-height: 1.5;
}

.markdown-content p code {
  background-color: #2d2d2d;
  color: #f8f9fa;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
}

.button {
  display: inline-block;
  padding: 0.1em 0.4em;
  background-color: transparent;
  color: white !important;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  border: solid 1px gray;
  background-color: gray;
  margin: 0;
  font-size: 0.8rem;
}

.button.copy:before {
  content: "⿻ Copy";
}

.button.copy.active:before {
  content: "⿻ Copied ✓";
}

.button.copy:hover {
  background-color: darkgrey;
}

.m-app-card {
  transition: background-color 0.15s ease-in-out;
}

.m-app-card:hover {
  background-color: #f8f9fa;
}

[data-bs-theme="dark"] .m-app-card:hover {
  background-color: #2a3036;
}

/* Hide the annoying border around search bar that bootstrap adds */
.form-control:focus {
  box-shadow: none !important;
  border-color: royalblue;
}

/* Default: small screens */
.m-app-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(
    auto-fit,
    minmax(max(200px, 100%), 1fr)
  ); /* 1 column */
}

/* 320px+ allow multiple and allow them to stretch to full width */
@media (min-width: 321px) {
  .m-app-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* for large screens use auto-fill to avoid auto-fit stretching each app card too wide */
@media (min-width: 900px) {
  .m-app-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* hide the native summary icon */
details.accordion-item > summary {
  list-style: none;
}
details.accordion-item > summary::-webkit-details-marker {
  display: none;
}

/* remove the default blue outline on click */
details.accordion-item > summary:focus {
  box-shadow: none;
}

/* make the Bootstrap arrow react to the native <details> open/closed state */
details.accordion-item:not([open]) > summary.accordion-button::after {
  transform: none;
}

details.accordion-item[open] > summary.accordion-button::after {
  transform: rotate(-180deg); /* Points up when open */
}

a:link {
  text-decoration: none;
}

/* permalinks */
.anchor-link {
  padding: 0 0.175rem;
  font-weight: 400;
  color: #0d6efd80;
  text-decoration: none;
  opacity: 0;
  transition:
    color 0.15s ease-in-out,
    opacity 0.15s ease-in-out;
}
@media (prefers-reduced-motion: reduce) {
  .anchor-link {
    transition: none;
  }
}
.anchor-link:after {
  content: "#";
}
.anchor-link:focus,
.anchor-link:hover,
:hover > .anchor-link,
:target > .anchor-link {
  color: #0d6efd;
  text-decoration: none;
  opacity: 1;
}
