/*
 * Spring-inspired palette and layout for this doc site (mkdocs-material).
 *
 * This is a visual homage, not a copy: the exact Spring green (#6DB33F) is used as an
 * accent color because it signals "Spring ecosystem" to a reader at a glance, the same
 * reason most Spring-adjacent OSS docs sites lean on it. No Spring logo, wordmark, or
 * asset is reproduced anywhere in this site -- see the "Not an official Spring project"
 * notice on the home page, which this stylesheet deliberately does not mute or restyle
 * away. See https://www.spring.io/trademarks before changing that notice's prominence.
 *
 * Light-mode-only overrides below are deliberately scoped to
 * [data-md-color-scheme="default"] rather than applied unconditionally: an earlier
 * version of this file set a white header/light-text unconditionally, which produced a
 * broken, mismatched look in dark mode (a white header bar over Material's own dark
 * body) -- caught by actually inspecting computed styles on the live site with dark mode
 * active, not assumed from a light-mode screenshot alone.
 *
 * Baseline measured live before this file's nav-size/frame/typography pass (root
 * font-size 20px, so 1rem = 20px throughout): nav links 16px/400, h1 32px/300, h2
 * 25px/300, body text (p/li) 16px/400, table cells 12.8px/400 -- the table-vs-body-text
 * gap in particular is the "inconsistent sizing" this file's typography section fixes,
 * by expressing every typeset size in rem (root-relative) rather than leaving it to
 * Material's own em-based nesting, which drifts depending on how deep an element sits.
 */

:root {
	--md-primary-fg-color: #6db33f;
	--md-primary-fg-color--light: #85c34d;
	--md-primary-fg-color--dark: #5a9636;
	--md-accent-fg-color: #5a9636;
	--md-accent-fg-color--transparent: rgba(109, 179, 63, 0.1);
}

[data-md-color-scheme="default"] {
	--md-primary-bg-color: #ffffff;
	--md-primary-bg-color--light: #ffffff;
	--md-accent-bg-color: #ffffff;
}

[data-md-color-scheme="slate"] {
	--md-primary-fg-color: #85c34d;
	--md-primary-fg-color--light: #9ed36a;
	--md-primary-fg-color--dark: #6db33f;
	--md-accent-fg-color: #9ed36a;
}

/* System sans-serif stack instead of a Google Fonts import -- no external font request,
   and closer to the plain, fast-loading feel of spring.io than a webfont round trip.
   Applies in both color schemes; typography isn't scheme-dependent. */
body,
.md-typeset {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.md-typeset code,
.md-typeset pre,
.md-typeset kbd {
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* Text-link green reads fine against both a white and a dark background. Nav links get
   their own, single-source-of-truth rule further down -- kept separate on purpose so
   changing one never silently changes the other. */
.md-typeset a {
	color: #5a9636;
}

.md-typeset a:hover {
	color: #6db33f;
}

.md-typeset .md-button--primary {
	background-color: #6db33f;
	border-color: #6db33f;
}

.md-typeset .md-button--primary:hover {
	background-color: #5a9636;
	border-color: #5a9636;
}

/* --- Light mode only: a plain, white header with a green accent on hover/active,
   closer to spring.io's own light, uncluttered header than Material's default
   solid-primary-color bar. Dark mode keeps Material's own slate header untouched. --- */

[data-md-color-scheme="default"] .md-header {
	background-color: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

[data-md-color-scheme="default"] .md-header--shadow {
	box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

[data-md-color-scheme="default"] .md-header__button,
[data-md-color-scheme="default"] .md-header__topic,
[data-md-color-scheme="default"] .md-header__title {
	color: #1a1a1a;
}

[data-md-color-scheme="default"] .md-header__button:hover {
	opacity: 1;
	color: #6db33f;
}

[data-md-color-scheme="default"] .md-search__input {
	background-color: rgba(0, 0, 0, 0.06);
	color: #1a1a1a;
}

[data-md-color-scheme="default"] .md-search__input::placeholder {
	color: rgba(0, 0, 0, 0.5);
}

[data-md-color-scheme="default"] .md-search__icon svg {
	fill: rgba(0, 0, 0, 0.6);
}

[data-md-color-scheme="default"] .md-nav__title {
	color: #1a1a1a;
}

/* --- Left-hand navigation: a hierarchical, collapsible tree (docs.spring.io/spring-ai's
   own reference site pattern, not the spring.io marketing landing page's top tab bar --
   navigation.tabs was tried and reverted; see site/mkdocs.yml). Exactly two rules govern
   every color a nav item can have, and they never overlap:
     1. .md-nav__link--active -- green. The ONE "you are here" signal, always.
     2. .md-nav__item--section > .md-nav__link -- a muted, uppercase, non-green label
        for a group heading (Getting Started, Guides, Reference). Never colored green,
        specifically so it can never be mistaken for the active-page indicator -- this
        exact ambiguity (a section label and the active page both rendering as
        different shades of green) is what previously read as "messy, random green."

   Every color declaration below targets the nested .md-ellipsis span, not the outer
   .md-nav__link/<label> itself -- confirmed live, not assumed, that Material renders a
   nav link's visible text through that child span, and setting `color` on the outer
   element (including with !important, and regardless of selector specificity) simply
   does not reach it. font-weight/font-size/text-transform DO apply correctly on the
   outer element -- only `color` needed this. Skipping this step is what silently broke
   an earlier version of this fix (the muted section-label color it declared never
   painted, leaving Material's own default text color in its place). */

.md-nav__link {
	font-size: 0.85rem; /* 17px, up from Material's 16px default */
	line-height: 1.9;
	padding: 0.15rem 0;
}

.md-nav__link--active {
	font-weight: 700;
}

.md-nav__link--active .md-ellipsis {
	color: #6db33f;
}

.md-nav__link:hover .md-ellipsis,
.md-nav__link:focus .md-ellipsis {
	color: #5a9636;
}

.md-nav__item--section > .md-nav__link {
	font-weight: 700;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

[data-md-color-scheme="default"] .md-nav__item--section > .md-nav__link .md-ellipsis {
	color: rgba(0, 0, 0, 0.55);
}

[data-md-color-scheme="slate"] .md-nav__item--section > .md-nav__link .md-ellipsis {
	color: rgba(255, 255, 255, 0.55);
}

/* The one case a section label and the active-page indicator could coincide: a section
   whose own group happens to be the ancestor of the current page (e.g. "Guides" while
   reading a page under it). Matches the two muted rules' own specificity exactly
   (attribute + three classes each) and is declared after them, so it wins on source
   order without needing !important -- verified live, not assumed, the same way the
   rest of this fix was. */
[data-md-color-scheme="default"] .md-nav__item--section > .md-nav__link--active .md-ellipsis,
[data-md-color-scheme="slate"] .md-nav__item--section > .md-nav__link--active .md-ellipsis {
	color: #6db33f;
}

.md-nav__title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

[data-md-color-scheme="default"] .md-nav__title {
	color: rgba(0, 0, 0, 0.55);
}

[data-md-color-scheme="slate"] .md-nav__title {
	color: rgba(255, 255, 255, 0.55);
}

/* --- Breadcrumb (navigation.path): "Overview > Guides > Tool Calling"-style trail
   above the content, matching the reference-docs layout. No color override needed --
   Material's own default already renders every breadcrumb link in --md-primary-fg-color,
   which is this site's custom green, so the on-brand look comes for free. Confirmed live
   (not assumed): every segment already renders as #6DB33F before any extra rule here. --- */

.md-path__link {
	font-size: 0.78rem;
}

/* "Edit this page" button (content.action.edit) -- on-brand green on hover. */
.md-content__button:hover {
	color: #6db33f;
}

/* --- Centered, framed content card -- max-width plus a border/shadow so the reading
   column reads as a distinct panel against the page canvas, the way spring.io's own
   content area does, instead of running full-width/borderless edge to edge.

   1100px, not the original 860px: with toc.integrate removing the right-hand TOC
   column entirely (see site/mkdocs.yml), the content column had ~1220px of available
   width on a 1440px viewport but was only using 860px of it -- confirmed live, not
   assumed, via the actual rendered rects before this change. Widened to use the space
   the right rail's removal freed up, per direct feedback that the reading column
   should be wider/more readable now that nothing else needs that space. --- */

body[data-md-color-scheme="default"] {
	background-color: #f6f8fa;
}

.md-content__inner {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
	padding: 2rem 2.75rem 3rem;
	border-radius: 10px;
}

[data-md-color-scheme="default"] .md-content__inner {
	background-color: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

[data-md-color-scheme="slate"] .md-content__inner {
	background-color: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Typography scale, normalized. Every size below is expressed in rem (relative to
   the root html font-size, 20px in this theme), not em -- rem resolves identically no
   matter how deeply an element is nested (inside a table, an admonition, a tab), which
   is what actually eliminates the "random" size drift a purely em-based cascade is prone
   to. Table cells were the biggest measured gap (12.8px against 16px body text before
   this file) and are the main thing this section fixes. --- */

.md-typeset {
	font-size: 0.8rem; /* 16px -- Material's own existing base, restated explicitly */
	line-height: 1.6;
}

.md-typeset h1 {
	font-size: 2rem; /* 40px */
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 1.2rem;
}

.md-typeset h2 {
	font-size: 1.5rem; /* 30px */
	font-weight: 700;
	line-height: 1.35;
	margin: 2rem 0 1rem;
}

.md-typeset h3 {
	font-size: 1.25rem; /* 25px */
	font-weight: 600;
	line-height: 1.4;
	margin: 1.5rem 0 0.75rem;
}

.md-typeset h4 {
	font-size: 1.1rem; /* 22px */
	font-weight: 600;
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol,
.md-typeset dl,
.md-typeset li {
	font-size: 0.8rem; /* 16px -- matches body baseline explicitly, not inherited-and-hoped */
	line-height: 1.6;
}

.md-typeset table th,
.md-typeset table td {
	font-size: 0.8rem; /* 16px, up from the unscaled 12.8px default -- the main fix here */
	line-height: 1.5;
	padding: 0.6rem 0.9rem;
}

.md-typeset code {
	font-size: 0.85em; /* relative to surrounding text is correct for inline code */
}

/* Tidy tables and code blocks in light mode -- a subtle border and rounded corners read
   as "documentation site," not "raw markdown." Left unscoped in dark mode since
   Material's own slate defaults already handle contrast correctly there, and a
   black-tinted border here would look wrong against a dark background. */
[data-md-color-scheme="default"] .md-typeset table:not([class]) {
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
}

[data-md-color-scheme="default"] .md-typeset table:not([class]) th {
	background-color: rgba(109, 179, 63, 0.08);
}

.md-typeset .highlight,
.md-typeset pre {
	border-radius: 6px;
}

/* --- Footer (version + "not an official Spring project" line): always visible, not
   just reachable by scrolling to the very end of a page. Fixed to the bottom of the
   viewport rather than left in normal document flow, which is what "en altta görünen
   hep görünsün" asked for. z-index 3 -- below the header (4, Material's own value) and
   any dialog/consent overlay, above ordinary content. .md-main gets matching bottom
   padding so the fixed bar never covers the last line of real content. --- */
.md-footer-meta {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 3;
}

.md-main {
	padding-bottom: 3.5rem;
}

