/* Custom styles for Munich Corpus Lab documentation */

/* Code blocks */
pre.sourceCode {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
}

/* CQL query examples */
code {
  background-color: #e9ecef;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Tables */
table {
  width: 100%;
  margin-bottom: 1rem;
}

th {
  background-color: #f8f9fa;
}



/* But keep first/attribute columns left-aligned if needed */
table td:first-child {
  text-align: left;
}

/* Utility class for explicitly numeric tables */
table.numeric td:nth-child(n+2) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Screenshots */
.screenshot {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 1rem 0;
}

/* Callout boxes */
.callout-note {
  border-left-color: #0d6efd;
}

.callout-tip {
  border-left-color: #198754;
}

.callout-important {
  border-left-color: #dc3545;
}

/* CQL Block - code block appearance with run button */
.cql-block {
  position: relative;
  margin: 1rem 0;
}

.cql-block pre.cql {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  padding-right: 3rem;
  /* Space for button */
  margin: 0;
  overflow-x: auto;
}

.cql-block pre.cql code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
  background: none;
  padding: 0;
}

.cql-block .cql-run-btn {
  position: absolute;
  top: 0;
  right: 0;
  padding: 0.5rem;
  color: #6c757d;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cql-block .cql-run-btn:hover {
  color: #0d6efd;
}

/* CQL Inline - clickable inline code */
a.cql-inline {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
  background-color: #e7f1ff;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: #0d6efd;
  text-decoration: none;
  border-bottom: 1px dashed #0d6efd;
}

a.cql-inline:hover {
  background-color: #cfe2ff;
  border-bottom-style: solid;
}

a.cql-inline::after {
  content: " \2197";
  /* ↗ arrow */
  font-size: 0.75em;
  opacity: 0.7;
}