/*begin http://bl.ocks.org/jensgrubert/7789216 */
.box {
  font: 10px sans-serif;
}

.box line,
.box rect,
.box circle {
  fill: steelblue;
  stroke: #000;
  stroke-width: 1px;
}

.box .center {
  stroke-dasharray: 3,3;
}

.box .outlier {
  fill: none;
  stroke: #000;
}

.axis {
  font: 12px sans-serif;
}

.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}

.x.axis path {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
/*end  http://bl.ocks.org/jensgrubert/7789216 */

html, p, div, input, button {
  font-family: "Helvetica Neue", "Helvetica", sans-serif;
  font-weight: 400;
  /*color: rgb(160, 160, 179);*/
}



@media print {
    .move-left-20-for-print {
      margin-inline-start: -20px;
    }
    .shrink-for-print-70 {
      transform: scale(0.7);
    }
    .shrink-for-print-50 {
      transform: scale(0.5);
    }
}

.comments-report {
  padding: 20px;
  width: 90%;
  max-width: 1600px;
  margin: 0 auto;
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.topic-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  background: white;
}

.topic-card h3 {
  margin-top: 0;
  color: #03a9f4;
}

.topic-meta {
  font-size: 0.8rem;
  color: #666;
  margin-top: 12px;
}

.layer-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.run-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.generated-date {
  color: #666;
  font-size: 0.9rem;
}

.info-text {
  background: #f0f7ff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  line-height: 1.5;
  color: #444;
  border-left: 4px solid #03a9f4;
}

.error-message {
  background: #fef8e8;
  border: 1px solid #f2d9a0;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  font-size: 18px;
  color: #666;
}

.section {
  margin-bottom: 40px;
}

.visualizations-container {
  margin-top: 20px;
}

.visualization-job {
  background: white;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.job-meta {
  display: flex;
  align-items: center;
  gap: 15px;
}

.job-status {
  font-size: 0.9rem;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.status-completed {
  background: #e3f9e5;
  color: #1b873f;
}

.status-running {
  background: #eef3fc;
  color: #0969da;
}

.status-pending {
  background: #fff8c5;
  color: #9a6700;
}

.status-failed {
  background: #ffebe9;
  color: #cf222e;
}

.job-date {
  font-size: 0.9rem;
  color: #666;
}

.visualizations-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
}

.visualization-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 5px;
  background: #fafafa;
}

.visualization-card h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #444;
}

.iframe-container {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: white;
}

.img-container {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: white;
}

.narrative-reports-container {
  margin-top: 20px;
}

.run-info-banner {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.run-info-banner p {
  margin: 0;
  color: #1976d2;
}

.run-info-note {
  color: #666;
  font-size: 0.9em;
}

.report-section {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.report-section h3 {
  margin-top: 0;
  color: #03a9f4;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.report-metadata {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  border-left: 4px solid #007bff;
}

.metadata-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.metadata-row:last-child {
  margin-bottom: 0;
}

.metadata-label {
  font-weight: 600;
  color: #495057;
  min-width: 140px;
  margin-right: 10px;
}

.status-badge {
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-right: 10px;
}

.status-badge.available {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-badge.pending {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.missing {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.report-content {
  line-height: 1.6;
}

.info-message,
.no-visualizations-message {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  color: #666;
  font-style: italic;
}

.no-visualizations-message .help-text {
  font-size: 0.85rem;
  margin-top: 8px;
  color: #888;
}

.section-header-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.create-job-button {
  background-color: #03a9f4;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.create-job-button:hover {
  background-color: #0288d1;
}

.batch-report-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.batch-report-button:hover {
  background-color: #388e3c;
}

.batch-report-button:disabled {
  background-color: #a5d6a7;
  cursor: not-allowed;
}

.job-creation-form-container {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.form-header h3 {
  margin: 0;
  color: #333;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  color: #888;
  cursor: pointer;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #444;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.form-group.checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.form-group.checkbox input {
  width: auto;
  margin-right: 8px;
}

.form-actions {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
}

.submit-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-button:hover {
  background-color: #388e3c;
}

.submit-button:disabled {
  background-color: #a5d6a7;
  cursor: not-allowed;
}

.result-message {
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-weight: 500;
}

.result-message.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.result-message.error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* New styles for narrative report layout */
.narrative-layout-container {
  display: flex;
  flex-direction: row;
  gap: 20px; /* Adjust gap as needed */
}

.narrative-text-content {
  flex-grow: 0; /* Do not grow beyond basis */
  flex-shrink: 1; /* Allow shrinking if space is tight */
  flex-basis: 520px; /* Preferred width, acts as max when grow is 0 */
}

.narrative-comments-column {
  flex-grow: 1; /* Grow to fill available space */
  flex-shrink: 1; /* Allow shrinking */
  flex-basis: 0%; /* Start with no intrinsic width, rely on grow */
  min-width: 400px; /* Ensure CommentList doesn't get too squished */
}

/* Responsive stacking for smaller screens */
@media (max-width: 992px) {
  .narrative-layout-container {
    flex-direction: column;
  }

  .narrative-text-content,
  .narrative-comments-column {
    flex-basis: auto; /* Reset flex-basis */
    width: 100%; /* Take full width when stacked */
  }

  .narrative-comments-column {
    margin-top: 30px; /* Add space when stacked below text */
  }
}

/* Layer switcher styles */
.layer-switcher {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.layer-switcher h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
}

.switcher-description {
  margin-bottom: 15px;
  color: #666;
  font-size: 0.9em;
}

.layer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.layer-button {
  background: white;
  border: 2px solid #03a9f4;
  color: #03a9f4;
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 140px;
}

.layer-button:hover {
  background: #e3f2fd;
}

.layer-button.active {
  background: #03a9f4;
  color: white;
}

.layer-description {
  font-size: 0.8em;
  font-weight: normal;
  opacity: 0.8;
  margin-top: 2px;
}

/* Action buttons grid */
.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

.action-button-group {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.action-button-group h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-size: 1.1em;
}

@media (max-width: 768px) {
  .action-buttons-grid {
    grid-template-columns: 1fr;
  }
  
  .layer-buttons {
    justify-content: center;
  }
  
  .layer-button {
    min-width: 120px;
  }
}

/* Report selector styles (matching TopicReport pattern) */
.report-selector {
  margin-bottom: 30px;
}

.report-selector select {
  width: 100%;
  max-width: 800px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  margin-bottom: 10px;
}

.section-status-summary {
  display: flex;
  gap: 20px;
  font-size: 0.9rem;
  color: #666;
}

.status-indicator {
  padding: 5px 10px;
  background: #f8f9fa;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

/* Topic preview styles */
.topic-preview {
  background: #f0f7ff;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.topic-metadata-display {
  background: white;
  padding: 15px;
  border-radius: 6px;
  margin: 15px 0;
  border: 1px solid #e9ecef;
}

.topic-metadata-display h6 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #495057;
  font-size: 1rem;
}

.topic-metadata-display p {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.sample-comments {
  margin-top: 15px;
}

.sample-comments ul {
  margin: 10px 0;
  padding-left: 20px;
}

.sample-comments li {
  margin-bottom: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.action-hint {
  margin-top: 15px;
  padding: 10px;
  background: #fff3cd;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
}

.action-hint p {
  margin: 0;
  font-size: 0.9rem;
  color: #856404;
}

.no-data {
  text-align: center;
  padding: 40px;
  color: #666;
  font-style: italic;
}
