/* Custom CSS overrides for Bootstrap */

:root {
  /* Custom color palette */
  --cream-bg: #faf8f3;
  --slate-text: #2d3748;
  --slate-text-dark: #1a202c;
  --light-cream: #fefcf7;
  --section-cream-light: #f8f6f1;
  --section-cream-dark: #f3f0ea;
}

/* Global background and text colors */
html {
  background-color: var(--cream-bg);
  height: 100%;
}

body {
  color: var(--slate-text);
  font-family: "Merriweather", ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* Make main content grow to fill available space */
main {
  flex: 1;
}

/* Override Bootstrap's default navbar styling */
.navbar-light {
  background-color: var(--light-cream) !important;
  border-bottom: 1px solid rgba(45, 55, 72, 0.2);
}

/* Content page background - only for pages without main-wrapper */
body > main {
  background-color: #fefdfb;
}

/* Footer link styling */
footer a {
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Nginx directory listing styling */
h1 {
  color: var(--slate-text);
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

pre {
  background-color: var(--light-cream);
  border: 1px solid rgba(45, 55, 72, 0.2);
  border-radius: 8px;
  padding: 1.5rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--slate-text);
}

pre a {
  color: var(--slate-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

pre a:hover {
  color: var(--slate-text-dark);
  text-decoration: underline;
}

/* File type icons using Bootstrap Icons */
pre a::before {
  font-family: "bootstrap-icons";
  margin-right: 0.5rem;
  font-size: 1rem;
  color: var(--slate-text);
  content: "\f488"; /* bi-file-earmark - default */
}

/* Specific file type overrides */

pre a[href$="/"]::before {
  content: "\F3D7"; /* bi-folder */
}

pre a[href="../"]::before {
  content: "\f148"; /* bi-arrow-up */
}

pre a[href$=".dmg"]::before {
  content: "\F6FB"; /* bi-device-ssd */
}

pre a[href$=".pkg"]::before {
  content: "\F1C7"; /* bi-box-seam */
}

pre a[href$=".tar"]::before,
pre a[href$=".tar.gz"]::before,
pre a[href$=".tgz"]::before,
pre a[href$=".zip"]::before {
  content: "\f3bf"; /* bi-file-zip */
}

hr {
  border: 0;
  height: 1px;
  background: rgba(45, 55, 72, 0.2);
  margin: 1rem 0;
}