---
---

@import "jekyll-theme-minimal";

/* Import our custom theme styles */
@import url("theme.css");

/* ===== FIX: Remove ALL unwanted lines/borders from Jekyll Minimal theme ===== */

/* Hide downloads section entirely - not used */
ul.downloads,
.downloads {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

/* Remove borders between download list items (backup if shown) */
.downloads li {
  border: none !important;
  border-right: none !important;
  border-left: none !important;
  border-top: none !important;
  border-bottom: none !important;
}

.downloads a {
  border: none !important;
}

/* Section - remove ALL borders in all states */
section {
  border: none !important;
  border-width: 0 !important;
  border-style: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Header - hide entirely (content is duplicated from README) */
header {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

header ul {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

header li {
  border: none !important;
  border-right: none !important;
}

header p,
header h1,
header a {
  border: none !important;
}

/* Footer - remove top line and any borders around "Hosted on GitHub Pages" */
footer {
  border: none !important;
  border-top: none !important;
  box-shadow: none !important;
  outline: none !important;
}

footer small,
footer p,
footer a {
  border: none !important;
}

/* Wrapper - ensure no borders leak through */
.wrapper,
div.wrapper {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Responsive: Fix lines that appear at specific breakpoints */
/* This is critical - the theme adds section borders at max-width: 960px */
@media print, screen and (max-width: 960px) {
  section {
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    padding-top: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  header,
  footer {
    border: none !important;
    border-width: 0 !important;
  }

  header ul {
    border: none !important;
  }
}

@media print, screen and (max-width: 720px) {
  section,
  header,
  footer {
    border: none !important;
    border-width: 0 !important;
  }
}

@media print, screen and (max-width: 480px) {
  section,
  header,
  footer,
  .downloads {
    border: none !important;
    border-width: 0 !important;
  }
}

/* Horizontal rules - use themed color, not default gray */
hr {
  border: none !important;
  border-top: 1px solid var(--border-color) !important;
  background: var(--border-color) !important;
  height: 1px !important;
}

/* ===== FIX: Code block word-wrap issues (GitHub Issue #130) ===== */
/* Core code block styles (pre, .highlight) are in theme.css */

/* Only allow wrapping for inline code (not in pre) */
:not(pre) > code {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* ===== Sortable Tables (Issue #126) ===== */

/* Sortable table headers - cursor and selection */
table[data-sortable] th {
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  position: relative;
  padding-inline-end: 1.5em !important;
  transition: background-color 0.15s ease;
}

/* Initial sortable indicator - subtle cue that headers are sortable */
table[data-sortable] th::after {
  content: "\21C5"; /* Up-Down Arrow character */
  position: absolute;
  inset-inline-end: 0.4em;
  opacity: 0.3;
  font-size: 0.75em;
  color: var(--text-muted);
}

/*
 * Hide default indicator when column is actively sorted
 * Uses aria-sort attribute which is set by the JavaScript sorting logic
 */
table[data-sortable] th[aria-sort]:not([aria-sort="none"])::after {
  display: none;
}

/* Hover state for sortable headers - improved dark mode contrast */
table[data-sortable] th:hover {
  background-color: var(--bg-code) !important;
}

/* Focus state for keyboard navigation */
table[data-sortable] th:focus {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: -2px !important;
}

table[data-sortable] th:focus:not(:focus-visible) {
  outline: none !important;
}

table[data-sortable] th:focus-visible {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: -2px !important;
}

/* Sort indicator styling */
table[data-sortable] th .sort-indicator {
  font-size: 0.75em;
  margin-inline-start: 0.25em;
  color: var(--accent-color);
  font-weight: normal;
}

/* Active sorted column highlight */
table[data-sortable] th[aria-sort="ascending"],
table[data-sortable] th[aria-sort="descending"] {
  background-color: var(--bg-secondary) !important;
}
