---
---

@import "{{ site.theme }}";

/* Category grid (used by the auto-generated category list on home, apps,
   appimages and every category page; emitted by am2pla-site in the AM repo).
   Shared layout; theme-specific colors live in the @media blocks below. */
.cat-grid {
  /* Flex (not grid) so pills pack tight to their content width; a small
     gap controls inter-pill spacing, and .cat-sep bullets emitted between
     pills by am2pla-site give a visual separator at that tight spacing. */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25em 0.35em;
  margin: 0.75em 0;
}

.cat-pill {
  padding: 0.15em 0.55em;
  border: 1px solid;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-size: 0.85em;
  line-height: 1.4;
  white-space: nowrap;
}

.cat-pill--all {
  font-weight: bold;
}

.cat-sep {
  font-size: 0.85em;
  user-select: none;
}

/* Hamburger toggle. The checkbox is always hidden; the label is hidden on
   desktop and shown on narrow viewports, where it controls grid visibility
   via the :checked sibling trick. No JavaScript needed. */
#cat-menu-toggle {
  display: none;
}
.cat-menu-button {
  display: none;
}

@media (max-width: 600px) {
  .cat-menu-button {
    display: inline-block;
    padding: 0.5em 0.9em;
    border: 1px solid;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-size: 0.95em;
    margin: 0.5em 0;
  }
  .cat-menu .cat-grid {
    display: none;
  }
  #cat-menu-toggle:checked ~ .cat-grid {
    display: flex;
  }
}

/* Default body styles */
body {
  background-color: white; /* Default background color for light theme */
  color: black; /* Default text color for light theme */
}

/* Default link styles */
a {
  color: blue; /* Default link color */
  text-decoration: none;
  transition: color 0.3s; /* Smooth transition for hover effect */
}

/* Light theme styles */
@media (prefers-color-scheme: light) {
  body {
    background-color: white; /* Background color for light theme */
    color: black; /* Text color for light theme */
  }

  a {
    color: blue; /* Link color for light theme */
  }

  table {
    background-color: white; /* Table background for light theme */
    color: black; /* Table text color for light theme */
  }

  th {
    background-color: #f0f0f0; /* Light gray background for table headers */
    color: black; /* Header text color */
  }

  td {
    background-color: white; /* Background color for table cells */
  }

  .cat-pill {
    background-color: #f6f8fa;
    border-color: #d0d7de;
    color: #0969da;
  }
  .cat-pill:hover {
    background-color: #eaeef2;
  }
  .cat-pill--all {
    background-color: #ddf4ff;
    border-color: #0969da;
  }
  .cat-pill--all:hover {
    background-color: #b6e3ff;
  }
  .cat-menu-button {
    background-color: #f6f8fa;
    border-color: #d0d7de;
    color: #0969da;
  }
  .cat-menu-button:hover {
    background-color: #eaeef2;
  }
  .cat-sep {
    color: #999;
  }
}

/* Dark theme styles */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #010211; /* Dark background color */
    color: #ebdddd; /* Light text color for dark theme */
  }

  a {
    color: #5d93e8;
  }

  a:hover {
    color: lightgreen;
  }

  h1 {
    color: #45c1c1;
    font: icon;
  }
  
  hr {
    height: 0.2em;
    margin: 12px 0;
  }

  .markdown-body h1 {
    padding-bottom: 1em;
    border-bottom: 5px solid #2b343f;
  }

  .markdown-body h2 {
    padding-bottom: 1em;
    font-size: 1.5em;
    border-bottom: 2.5px solid #2b343f;
  }

  .markdown-body h3 {
    font-size: 1.1em;
  }

  .markdown-body h4 {
    font-size: 1.05em;
    font-style: italic;
    color: #dbd9cd;
  }

  .markdown-body h6 {
    font-size: 0.8em;
    color: #d8dbdf;
  }

  .markdown-body hr {
    background-color: #2b343f;
  }

  .markdown-body pre {
    background-color: #000;
  }

  pre {
    color: #128418;
    font-style: italic;
    font-weight: bold;
  }

  table {
    background-color: #010211; /* Dark background for table */
    color: #e0e0e0; /* Table text color for dark theme */
    font-style: italic;
  }

  th {
    background-color: #000; /* Darker gray background for table headers */
    color: #e0e0e0; /* Header text color for dark theme */
  }

  td {
    background-color: #110e1b; /* Dark background for table cells */
    border: 1px solid #35333b;
  }

  .cat-pill {
    background-color: #1a1d27;
    border-color: #2b343f;
    color: #5d93e8;
  }
  .cat-pill:hover {
    background-color: #232733;
    color: lightgreen;
  }
  .cat-pill--all {
    background-color: #0d2238;
    border-color: #5d93e8;
  }
  .cat-pill--all:hover {
    background-color: #143052;
  }
  .cat-menu-button {
    background-color: #1a1d27;
    border-color: #2b343f;
    color: #5d93e8;
  }
  .cat-menu-button:hover {
    background-color: #232733;
    color: lightgreen;
  }
  .cat-sep {
    color: #555;
  }
}
