/* PMAT Book Theme Styles */

/* Color scheme for PMAT branding */
:root {
  --pmat-primary: #2563eb;
  --pmat-secondary: #10b981;
  --pmat-accent: #f59e0b;
  --pmat-danger: #ef4444;
  --pmat-success: #22c55e;
  --pmat-warning: #f97316;
}

/* Status indicators */
.status-working {
  color: var(--pmat-success);
  font-weight: bold;
}

.status-planned {
  color: var(--pmat-warning);
  font-style: italic;
}

.status-broken {
  color: var(--pmat-danger);
  text-decoration: line-through;
}

/* Code block enhancements */
pre {
  border-left: 4px solid var(--pmat-primary);
  background-color: rgba(37, 99, 235, 0.05);
}

pre code {
  font-size: 0.95em;
  line-height: 1.5;
}

/* Command line styling */
pre code.language-bash {
  background-color: #1e293b;
  color: #e2e8f0;
}

pre code.language-bash::before {
  content: "$ ";
  color: var(--pmat-secondary);
  font-weight: bold;
}

/* JSON output styling */
pre code.language-json {
  background-color: #fafafa;
}

/* Table styling */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}

table th {
  background-color: var(--pmat-primary);
  color: white;
  font-weight: bold;
  padding: 0.75em;
  text-align: left;
}

table td {
  border: 1px solid #e5e7eb;
  padding: 0.75em;
}

table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Grade indicators */
.grade-a {
  color: var(--pmat-success);
  font-weight: bold;
  font-size: 1.2em;
}

.grade-b {
  color: var(--pmat-secondary);
  font-weight: bold;
  font-size: 1.2em;
}

.grade-c {
  color: var(--pmat-warning);
  font-weight: bold;
  font-size: 1.2em;
}

.grade-d, .grade-f {
  color: var(--pmat-danger);
  font-weight: bold;
  font-size: 1.2em;
}

/* Chapter status block */
.chapter-status {
  border: 2px solid var(--pmat-primary);
  border-radius: 8px;
  padding: 1em;
  margin: 1em 0;
  background-color: rgba(37, 99, 235, 0.05);
}

.chapter-status h2 {
  margin-top: 0;
  color: var(--pmat-primary);
}

/* Tip and warning boxes */
.tip {
  border-left: 4px solid var(--pmat-success);
  background-color: rgba(34, 197, 94, 0.1);
  padding: 1em;
  margin: 1em 0;
}

.warning {
  border-left: 4px solid var(--pmat-warning);
  background-color: rgba(249, 115, 22, 0.1);
  padding: 1em;
  margin: 1em 0;
}

.danger {
  border-left: 4px solid var(--pmat-danger);
  background-color: rgba(239, 68, 68, 0.1);
  padding: 1em;
  margin: 1em 0;
}

/* Navigation improvements */
.chapter li.chapter-item {
  margin: 0.5em 0;
}

.chapter li.chapter-item strong {
  color: var(--pmat-primary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  pre {
    font-size: 0.85em;
  }
  
  table {
    font-size: 0.9em;
  }
}