/* Custom styles for Refac documentation */

/* Typography improvements */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #24292e;
}

code {
  background-color: #f6f8fa;
  border-radius: 3px;
  font-size: 85%;
  padding: 0.2em 0.4em;
}

pre {
  background-color: #f6f8fa;
  border-radius: 6px;
  font-size: 85%;
  line-height: 1.45;
  overflow: auto;
  padding: 16px;
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* Navigation improvements */
header nav ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

header nav ul li {
  margin-bottom: 8px;
}

header nav ul li a {
  color: #0366d6;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 4px 0;
  border-left: 3px solid transparent;
  padding-left: 12px;
  transition: all 0.2s ease;
}

header nav ul li a:hover {
  border-left-color: #0366d6;
  background-color: #f6f8fa;
}

/* Table of Contents */
.table-of-contents {
  background-color: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
}

.table-of-contents h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
}

.toc-list {
  list-style: none;
  padding-left: 0;
}

.toc-list .toc-list {
  padding-left: 20px;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-item a {
  color: #586069;
  text-decoration: none;
}

.toc-item a:hover {
  color: #0366d6;
  text-decoration: underline;
}

/* Responsive improvements */
@media screen and (max-width: 960px) {
  .wrapper {
    width: auto;
    margin: 0;
  }
  
  header, section, footer {
    float: none;
    position: static;
    width: auto;
  }
  
  header {
    padding-right: 320px;
  }
  
  section {
    border: 1px solid #e5e5e5;
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 0 20px;
  }
  
  header a small {
    display: inline;
  }
  
  header ul {
    position: absolute;
    right: 50px;
    top: 52px;
  }
}

@media screen and (max-width: 720px) {
  body {
    word-wrap: break-word;
  }
  
  header {
    padding: 0;
  }
  
  header ul, header p.view {
    position: static;
  }
  
  pre, code {
    word-wrap: normal;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 15px;
  }
  
  header ul {
    width: 99%;
  }
  
  header li, header ul li + li + li {
    width: 33%;
  }
}

/* Syntax highlighting improvements */
.highlight {
  margin-bottom: 16px;
}

.highlight pre {
  margin-bottom: 0;
}

/* Blockquote styling */
blockquote {
  border-left: 4px solid #dfe2e5;
  color: #6a737d;
  padding: 0 16px;
  margin: 16px 0;
}

/* Table styling */
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
}

table th,
table td {
  border: 1px solid #dfe2e5;
  padding: 6px 13px;
}

table tr {
  background-color: #fff;
  border-top: 1px solid #c6cbd1;
}

table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

/* Alert boxes */
.alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

.alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}