/* Fancy tweaks for Read the Docs theme */

/* Accent color for links and headings */
:root {
  --accent: #3b82f6; /* blue-500 */
}

.wy-nav-content a,
.wy-nav-top a,
.rst-content a {
  color: var(--accent);
}

.rst-content h1, .rst-content h2, .rst-content h3,
.rst-content h4, .rst-content h5, .rst-content h6 {
  color: #0f172a; /* slate-900 */
}

/* Code blocks with subtle header and copy affordance */
.rst-content pre code {
  border-left: 4px solid var(--accent);
  background: #0b12201a; /* light blue tint */
}

/* Callout boxes using admonition-like styling */
.admonition,
.note,
.tip,
.warning,
.important {
  padding: 0.8em 1em;
  border-left: 4px solid var(--accent);
  background: #f8fafc; /* slate-50 */
  margin: 1em 0;
}

/* Table header styling */
.rst-content table thead th {
  background: #eef2ff; /* indigo-50 */
}

/* Improve nav width and readability */
.wy-nav-content {
  max-width: 1100px;
}

/* Buttons in index cards (links) */
.rst-content .grid .card a {
  color: white !important;
  background: var(--accent);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

/* Footer navigation buttons (Prev / Next) */
.rst-footer-buttons a.btn,
.rst-footer-buttons a.btn:visited {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: none !important;
  max-width: 45%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rst-footer-buttons a.btn:hover,
.rst-footer-buttons a.btn:focus {
  background: #2563eb !important; /* slightly darker accent */
  color: #ffffff !important;
}

/* Prevent long repository labels from wrapping in the sidebar header */
.wy-side-nav-search a.icon,
.wy-side-nav-search .wy-dropdown > a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Constrain and ellipsize links in the bottom-left versions/repo panel */
.rst-versions .rst-current-version,
.rst-versions .rst-other-versions dd a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  display: inline-block;
}

/* Make the GitHub link in the versions panel look like a proper chip */
.rst-versions .rst-other-versions dd a[href*="github.com"] {
  background: var(--accent);
  color: #ffffff !important;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

/* Bottom-left versions/repo panel: change to a light sky color */
.rst-versions {
  background: #e0f2fe !important; /* sky-100 */
  color: #0f172a !important;      /* slate-900 */
  border-top: 1px solid #bae6fd;  /* sky-200 */
}

.rst-versions .rst-current-version {
  background: #dbeafe !important; /* indigo-100 */
  color: #0f172a !important;
}

.rst-versions .rst-current-version .fa,
.rst-versions .rst-current-version .icon {
  color: var(--accent) !important;
}

.rst-versions .rst-other-versions {
  background: #ffffff !important;
  border-top: 1px solid #e5e7eb;
}

.rst-versions a {
  color: var(--accent) !important;
}

/* Hide the right-side Next button in footer navigation */
.rst-footer-buttons .btn.float-right,
.rst-footer-buttons a.btn[href*="next" i] {
  display: none !important;
}

/* Image styling with dark contours */
.rst-content img {
  border: 2px solid #374151; /* gray-700 - dark contour */
  border-radius: 8px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin: 1em 0;
  max-width: 100%;
  height: auto;
}

/* Hover effect for images */
.rst-content img:hover {
  border-color: #1f2937; /* gray-800 - slightly darker on hover */
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  transition: all 0.2s ease-in-out;
}

/* Ensure images in code blocks don't get the border */
.rst-content pre img,
.rst-content code img {
  border: none;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
}

.rst-content pre img:hover,
.rst-content code img:hover {
  border: none;
  box-shadow: none;
  transform: none;
}

