/* Styles for the behaviour in site.js. Colours follow the page designs. */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }
[hidden] { display: none !important; }

.pb-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.pb-status { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: #475569; }
.pb-status:empty { display: none; }
.pb-status.pb-ok { padding: 12px 14px; border-radius: 10px; background: #f0fdf4; color: #15803d; font-weight: 700; }
.pb-status.pb-error { padding: 12px 14px; border-radius: 10px; background: #fff7ed; color: #9a3412; font-weight: 700; }

.pb-search { position: relative; }
.pb-results { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: max(100%, 420px); max-height: 420px; overflow-y: auto;
	padding: 6px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; box-shadow: 0 24px 48px -24px rgba(15, 23, 42, .35);
	font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif; text-align: left; }
.pb-results a { display: flex !important; flex-direction: column; gap: 2px; padding: 10px 12px !important; border-radius: 8px; color: #0b1324 !important; text-decoration: none; }
.pb-results a strong { font-size: 14px; font-weight: 800; }
.pb-results a span { font-size: 12.5px; font-weight: 500; line-height: 1.45; color: #64748b; }
.pb-results a:hover, .pb-results a.pb-active { background: #e7eeff; }
.pb-none { padding: 12px; font-size: 13px; color: #64748b; }

.pb-has-copy { position: relative; }
.pb-copy { position: absolute; top: 10px; right: 10px; padding: 4px 10px; border: 1px solid #334155; border-radius: 7px; background: #111b30;
	color: #cbd5e1; font: 700 12px 'Manrope', ui-sans-serif, system-ui, sans-serif; cursor: pointer; opacity: .75; }
.pb-copy:hover, .pb-copy:focus-visible { opacity: 1; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
	outline: 3px solid #2f5be0; outline-offset: 2px; }

/* Status badges (Available, Coming soon, Under consideration...) with an icon per kind. */
.st{--i:none;display:inline-flex !important;align-items:center;gap:5px;align-self:flex-start;height:24px;padding:0 10px 0 8px !important;box-sizing:border-box;border-radius:999px;border:1px solid transparent;font-size:11.5px !important;font-weight:800;line-height:1;letter-spacing:.01em;white-space:nowrap}
.st::before{content:"";flex:none;width:13px;height:13px;background:currentColor;-webkit-mask:var(--i) center/contain no-repeat;mask:var(--i) center/contain no-repeat}
.st.st-ok{background:#dcfce7 !important;border-color:#bbf7d0;color:#15803d !important;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")}
.st.st-soon{background:#e0e9ff !important;border-color:#c7d4ff;color:#1e40af !important;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E")}
.st.st-idea{background:#fef3c7 !important;border-color:#fde68a;color:#92400e !important;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1.1 2V16h5v-.2c.1-.8.5-1.5 1.1-2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E")}
.st.st-info{background:#f1f5f9 !important;border-color:#e2e8f0;color:#334155 !important;--i:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E")}

/* ---------- language switcher (dark top bar) ---------- */
.pb-lang { position: relative; }
.pb-lang > summary { display: flex; align-items: center; gap: 6px; color: #fff; font-size: 13px; font-weight: 700; padding: 4px 6px; border-radius: 6px; }
.pb-lang > summary:hover, .pb-lang[open] > summary { background: #1e293b; }
.pb-lang > summary::after { content: ""; width: 6px; height: 6px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.pb-lang-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 168px; padding: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 20px 40px -16px rgba(15,23,42,.35); display: flex; flex-direction: column; }
.pb-lang-menu a { padding: 8px 12px; border-radius: 8px; color: #0b1324; font-size: 14px; font-weight: 600; text-decoration: none; }
.pb-lang-menu a:hover { background: #f1f5f9; color: #0b1324; }
.pb-lang-menu a[aria-current] { color: #2f5be0; font-weight: 800; }

/* Connector request box: the form moves under the text when both do not fit on one line
   (always the case in the translated pages, and nearly so in English). */
#notify { flex-wrap: wrap; }
#notify > div:first-child { flex: 1 1 100%; }
#notify form input { flex: 1 1 auto; }
#notify form, #notify form label { flex: 1 1 auto; }

/* Full-width page template: no block gap above the page's own top bar. */
.page-template-page-canvas .entry-content > * { margin-block-start: 0; }

/* ---------- phones and small tablets ----------
   The pages are laid out with inline styles for a 1440px design, so this layer overrides
   them by pattern: side padding, multi-column grids, side-by-side rows, fixed widths and
   display-size headings. The main menu folds into a button (site.js). */
.pb-menu-btn, .pb-docs-btn { display: none; }
@media (max-width: 900px) {
	html, body { overflow-x: hidden; }
	img, svg, video, iframe { max-width: 100%; }
	img { height: auto; }

	/* Side padding: 48px → 20px. */
	[style*="padding: 0 48px"], [style*="padding: 16px 48px"], [style*="padding: 56px 48px"],
	[style*="padding: 64px 48px"], [style*="padding: 40px 48px"], [style*="padding: 48px"], .wrap {
		padding-left: 20px !important; padding-right: 20px !important; }
	[style*="padding: 64px 0"] { padding-left: 16px !important; padding-right: 16px !important; box-sizing: border-box; }
	form[data-pb-form="signin-redirect"] { width: 100% !important; }
	:has(> form[data-pb-form="signin-redirect"]) { width: 100%; max-width: 100%; box-sizing: border-box; }
	[style*="padding: 48px 24px"] { padding-left: 16px !important; padding-right: 16px !important; }

	/* Grids collapse to one column; four- and five-up grids of small items keep two. */
	[style*="grid-template-columns"] { grid-template-columns: minmax(0, 1fr) !important; }
	[style*="grid-template-columns: repeat(4"], [style*="grid-template-columns: repeat(5"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
	[style*="grid-column"] { grid-column: auto !important; }
	/* Comparison tables keep their columns and scroll sideways. */
	[style*="grid-template-columns: 1.6fr repeat(4"] { grid-template-columns: 150px repeat(4, 116px) !important; width: max-content; }
	[style*="grid-template-columns: 1.6fr repeat(4"] > * { padding-left: 12px !important; padding-right: 12px !important; }
	:has(> [style*="grid-template-columns: 1.6fr repeat(4"]) { overflow-x: auto !important; min-width: 0; max-width: 100%; }
	[style*="gap: 64px"], [style*="gap: 72px"], [style*="gap: 80px"], [style*="gap: 96px"] { gap: 32px !important; }

	/* Side-by-side rows wrap, and fixed-width columns take the full width. */
	[style*="display: flex"]:not([style*="flex-direction: column"]) { flex-wrap: wrap; }
	[style*="width:"]:not(svg):not(img):not(input[type="checkbox"]):not(input[type="radio"]) { max-width: 100% !important; box-sizing: border-box; }
	[style*="display: flex"]:not([style*="flex-direction: column"]) > [style*="flex: 1"]:not(span):not(input):not(nav):not(article) {
		flex: 1 1 100% !important; min-width: 0; }
	[style*="flex: 0 0 2"], [style*="flex: 0 0 3"], [style*="flex: 0 0 4"], [style*="flex: none; width: 2"] { flex: 1 1 100% !important; }

	/* Display headings. */
	[style*="font-size: 56px"], [style*="font-size: 58px"], [style*="font-size: 60px"], [style*="font-size: 62px"],
	[style*="font-size: 64px"], [style*="font-size: 72px"] { font-size: 38px !important; line-height: 1.08 !important; }
	[style*="font-size: 40px"], [style*="font-size: 42px"], [style*="font-size: 44px"], [style*="font-size: 48px"],
	[style*="font-size: 50px"], .h2 { font-size: 30px !important; line-height: 1.12 !important; }
	[style*="font-size: 30px"], [style*="font-size: 32px"], [style*="font-size: 34px"], [style*="font-size: 36px"],
	[style*="font-size: 38px"] { font-size: 26px !important; line-height: 1.15 !important; }
	h1, h2, h3 { overflow-wrap: anywhere; hyphens: auto; }

	/* Home architecture captions need room for the wrapped text. */
	[style*="position: relative; height: 92px"] { height: 200px !important; }

	/* API reference: endpoint boxes wrap, parameter rows stack, the example panel fits. */
	.mono[style*="display: inline-flex"] { flex-wrap: wrap; max-width: 100%; box-sizing: border-box; overflow-wrap: anywhere; }
	.prow { grid-template-columns: minmax(0, 1fr) !important; gap: 6px !important; }
	aside[aria-label] { padding: 24px 16px !important; }
	[style*="flex-direction: column"] > * { min-width: 0; }

	/* Tables and code scroll sideways inside themselves. */
	table { display: block; max-width: 100%; overflow-x: auto; }
	pre { max-width: 100%; overflow-x: auto; }

	/* Docs: sidebar on top, folded behind a button (site.js); the page outline is hidden. */
	div:has(> nav.side) { flex-direction: column !important; }
	nav.side { width: 100% !important; padding: 16px 20px !important; border-right: 0 !important; border-bottom: 1px solid #eef2f7; }
	nav.side > a, nav.side > .grp { display: none !important; }
	nav.side.pb-open > a { display: block !important; }
	nav.side.pb-open > .grp { display: block !important; }
	.pb-docs-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; margin-top: 10px; padding: 0 14px;
		border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; color: #0b1324; font: 700 14px 'Manrope', ui-sans-serif, system-ui, sans-serif; cursor: pointer; }
	.pb-docs-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
	nav.side.pb-open .pb-docs-btn::after { transform: translateY(2px) rotate(-135deg); }
	aside[aria-label="On this page"] { display: none !important; }
	article.art { padding: 28px 20px 56px !important; width: 100%; box-sizing: border-box; }

	/* Top bar: keep the badge, the language switcher and the demo / sign-in links. */
	.pb-topbar { gap: 12px !important; height: auto !important; min-height: 44px; padding-top: 6px !important; padding-bottom: 6px !important; }
	.pb-topbar-note, .pb-topbar-cta { display: none !important; }

	/* Header: the menu folds behind a button. */
	.pb-headrow { flex-wrap: wrap !important; gap: 12px !important; }
	.pb-menu-btn { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; width: 44px; height: 44px;
		border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #0b1324; cursor: pointer; }
	.pb-menu-btn svg { width: 22px; height: 22px; }
	header nav.pb-mainnav { display: none !important; flex: 1 1 100% !important; flex-direction: column; gap: 0 !important; padding: 4px 0 8px; }
	header.pb-menu-open nav.pb-mainnav { display: flex !important; }
	header nav.pb-mainnav > a { padding: 12px 0 !important; border-bottom: 1px solid #eef2f7 !important; font-size: 16px !important; }
	header nav.pb-mainnav > a:last-child { border-bottom: 0 !important; }
}
@media (max-width: 600px) {
	[style*="grid-template-columns: repeat(4"], [style*="grid-template-columns: repeat(5"] { grid-template-columns: minmax(0, 1fr) !important; }
}
