/* Custom styles for djadmin generated view documentation */

/* View info block (docstring description) */
.doc-view-info {
  background-color: var(--md-code-bg-color);
  padding: 1rem;
  border-radius: 0.25rem;
  font-family: var(--md-code-font-family);
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0.5rem 0 1rem;
}

/* Section separators */
.doc-djadmin-view hr.doc-section-separator {
  margin: 2rem 0;
  border: none;
  border-top: 1px solid var(--md-default-fg-color--lightest);
}

/* Definition lists for View Information */
.doc-info-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}

.doc-info-list dt {
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}

.doc-info-list dd {
  margin: 0;
}

/* Plugin badges */
.doc-plugin-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fff;
  background-color: #6366f1;
  border-radius: 0.25rem;
  vertical-align: middle;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .doc-plugin-badge {
  color: #1e1e2e;
  background-color: #a5b4fc;
}

/* Mixin and bound method lists */
.doc-mixin-list,
.doc-bound-methods-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0;
}

.doc-mixin-list li,
.doc-bound-methods-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.doc-mixin-list li:last-child,
.doc-bound-methods-list li:last-child {
  border-bottom: none;
}

.doc-bound-from {
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* MRO list */
.doc-mro-list {
  padding-left: 1.5rem;
  margin: 0.5rem 0;
}

.doc-mro-list li {
  padding: 0.3rem 0;
}

.doc-mro-source {
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

/* Tables */
.doc-attributes-table,
.doc-fields-table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.doc-attributes-table th,
.doc-attributes-table td,
.doc-fields-table th,
.doc-fields-table td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.doc-attributes-table th,
.doc-fields-table th {
  font-weight: 600;
  color: var(--md-default-fg-color--light);
  background-color: var(--md-code-bg-color);
}

.doc-attributes-table tbody tr:hover,
.doc-fields-table tbody tr:hover {
  background-color: var(--md-code-bg-color);
}

/* Method styling */
.doc-method {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.doc-method:last-child {
  border-bottom: none;
}

.doc-defined-in {
  font-size: 0.85rem;
  color: var(--md-default-fg-color--light);
  margin: 0.25rem 0 0.5rem;
}

/* Labels */
.doc-label {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  margin-left: 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--md-accent-fg-color);
  background-color: var(--md-accent-fg-color--transparent);
  border-radius: 0.25rem;
  vertical-align: middle;
}

.doc-label-bound {
  color: #fff;
  background-color: #10b981;
}

[data-md-color-scheme="slate"] .doc-label-bound {
  color: #1e1e2e;
  background-color: #6ee7b7;
}

/* Code in tables - smaller */
.doc-attributes-table code,
.doc-fields-table code {
  font-size: 0.8rem;
}
