/* NETRA Documentation Custom Stylesheet */

/* Center-align main page hero title */
.md-content h1#netra-llm-gateway-semantic-cache,
.md-content .center-title,
.md-typeset h1[align="center"],
.md-typeset h1:first-of-type {
  text-align: center !important;
}

/* Ensure crisp diagram rendering on retina and 4K displays */
.md-content img {
  max-width: 100%;
  height: auto;
}

/* Click-to-zoom is only enabled for standalone architectural diagrams, screenshots, and visual assets */
.md-content img:not(a img):not([src*="shields.io"]):not([src*="/icons/"]):not(.no-zoom) {
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.md-content img:not(a img):not([src*="shields.io"]):not([src*="/icons/"]):not(.no-zoom):hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Badge images, linked icons, and inline indicators must behave as standard hyperlinks */
.md-content a img,
.md-content img[src*="shields.io"],
.md-content img[src*="/icons/"],
.md-content .no-zoom {
  cursor: pointer;
  box-shadow: none !important;
  vertical-align: middle;
}

/* Lightbox overlay for click-to-zoom diagrams */
.netra-image-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  cursor: zoom-out;
  opacity: 0;
  animation: netraFadeIn 0.2s forwards;
  padding: 1.5rem;
}

.netra-image-overlay img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
  transform: scale(0.96);
  animation: netraScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.netra-image-caption {
  margin-top: 1rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.7);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

@keyframes netraFadeIn {
  to { opacity: 1; }
}

@keyframes netraScaleIn {
  to { transform: scale(1); }
}

/* Polished Enterprise Callout & Admonition Styling */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 8px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin: 1.5rem 0 !important;
  border-left-width: 4px !important;
  overflow: hidden;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.05) !important;
}

.md-typeset .admonition.tip > .admonition-title,
.md-typeset details.tip > summary {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.md-typeset .admonition.tip > .admonition-title::before,
.md-typeset details.tip > summary::before {
  background-color: #10b981 !important;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: #06b6d4 !important;
  background-color: rgba(6, 182, 212, 0.05) !important;
}

.md-typeset .admonition.note > .admonition-title,
.md-typeset details.note > summary {
  background-color: rgba(6, 182, 212, 0.1) !important;
  color: #0891b2 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid rgba(6, 182, 212, 0.15) !important;
}

.md-typeset .admonition.note > .admonition-title::before,
.md-typeset details.note > summary::before {
  background-color: #06b6d4 !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip,
[data-md-color-scheme="slate"] .md-typeset details.tip {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.08) !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.tip > summary {
  background-color: rgba(16, 185, 129, 0.18) !important;
  color: #34d399 !important;
  border-bottom: 1px solid rgba(16, 185, 129, 0.25) !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.note,
[data-md-color-scheme="slate"] .md-typeset details.note {
  border-color: #06b6d4 !important;
  background-color: rgba(6, 182, 212, 0.08) !important;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.note > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset details.note > summary {
  background-color: rgba(6, 182, 212, 0.18) !important;
  color: #22d3ee !important;
  border-bottom: 1px solid rgba(6, 182, 212, 0.25) !important;
}

/* Fallback: render raw blockquotes with a clean modern border */
.md-typeset blockquote {
  border-left: 4px solid #10b981 !important;
  background: rgba(16, 185, 129, 0.04) !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 0.85rem 1.25rem !important;
  margin: 1.5rem 0 !important;
  color: inherit !important;
}
