/* Base styles */
:root {
  --primary-color: #3f51b5;
  --secondary-color: #5c6bc0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --text-color: #333;
  --light-bg: #f5f7fa;
  --border-color: #e0e0e0;
  --header-bg: #f9f9f9;
  --card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-bg);
  margin: 0;
  padding: 20px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-top: 1em;
  margin-bottom: 0.5em;
}

/* Question heading */
.question {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 15px;
  color: #333;
  background-color: #fef8e2;
  border: 1px solid #fbebbb;
  border-radius: 4px;
  padding: 12px;
}

/* Exception detail card */
.exception-detail {
  background-color: white;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.exception-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background-color: rgba(244, 67, 54, 0.08);
  border-bottom: 1px solid rgba(244, 67, 54, 0.2);
  cursor: pointer;
  transition: background-color 0.2s;
}

.exception-header:hover {
  background-color: rgba(244, 67, 54, 0.12);
}

.exception-exception {
  font-weight: 600;
  color: var(--error-color);
}

.exception-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.exception-content.expanded {
  max-height: 5000px;
  padding: 20px;
  transition: max-height 0.5s ease-in;
}

/* Simple chevron indicator */
.chevron {
  display: inline-block;
  width: 20px;
  height: 20px;
  position: relative;
  margin-left: 8px;
}

.chevron::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-style: solid;
  border-width: 0 2px 2px 0;
  border-color: #666;
  transform: rotate(45deg);
  top: 4px;
  transition: transform 0.2s;
}

.exception-header[aria-expanded="true"] .chevron::before {
  transform: rotate(-135deg);
  top: 8px;
}

/* Section headers */
.section-header {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  margin: 24px 0 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-header h3 {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 18px;
  margin: 0;
}

.error-header {
  border-bottom-color: var(--error-color);
}

.error-header h3 {
  color: var(--error-color);
}

/* Details tables */
.details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  table-layout: fixed;
}

.details-table th {
  width: 200px;
  text-align: left;
  padding: 12px;
  background-color: #f9f9f9;
  font-weight: 500;
  border-bottom: 1px solid var(--border-color);
  vertical-align: top;
}

.details-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.details-table tr:last-child th,
.details-table tr:last-child td {
  border-bottom: none;
}

.details-table tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Code blocks */
pre {
  background-color: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 12px;
  overflow: auto;
  max-height: 300px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  margin: 0;
  width: 100%;
}

.code-block {
  font-family: monospace;
  padding: 16px;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow-x: auto;
  max-height: 300px;
  margin-top: 0;
}

.traceback {
  font-style: italic;
  font-size: 13px;
}

/* Copy button */
.copy-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.copy-button:hover {
  background-color: #303f9f;
}

/* Responsive design */
@media (max-width: 768px) {
  .details-table {
    display: block;
    overflow-x: auto;
  }
  
  .details-table th {
    width: 140px;
  }
  
  .exception-header {
    padding: 12px;
  }
  
  .exception-content.expanded {
    padding: 15px;
  }
}