/**
 * Adotah Suporte – layout wiki (alinhado ao CRM: Outfit, índigo #6366F1, cards #111827 no dark).
 *
 * @package Adotah_Suporte
 */

/* -------------------------------------------------------------------------
   Layout shell
   ------------------------------------------------------------------------- */
.adotah-shell {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - var(--adotah-header-h, 56px));
}

@media (min-width: 992px) {
	.adotah-shell {
		flex-direction: row;
		align-items: flex-start;
		max-width: var(--adotah-max-width, 1200px);
		margin: 0 auto;
		padding: 0 1.5rem;
		gap: 0;
	}
}

/* Sidebar docs – esquerda, sticky desktop */
.adotah-sidebar-adoc {
	width: 100%;
	border-bottom: 1px solid var(--adotah-border);
	background: var(--adotah-surface);
}

@media (min-width: 992px) {
	.adotah-sidebar-adoc {
		position: sticky;
		top: calc(var(--adotah-header-h, 56px) + 1rem);
		flex: 0 0 260px;
		max-height: calc(100vh - var(--adotah-header-h, 56px) - 2rem);
		overflow-y: auto;
		border-bottom: none;
		border-right: 1px solid var(--adotah-border);
		padding-right: 1.25rem;
		margin-right: 1.75rem;
		align-self: flex-start;
	}
}

.adotah-content-wrap {
	flex: 1;
	min-width: 0;
	padding: var(--adotah-space-section, 2rem) 0 3.5rem;
}

@media (min-width: 992px) {
	.adotah-content-wrap {
		padding: 2rem 0 4.5rem;
	}
}

/* -------------------------------------------------------------------------
   Header (layout tipo landing Adotah: logo | nav centro | CTAs + ícones)
   ------------------------------------------------------------------------- */
.adotah-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--adotah-header-bg, var(--adotah-surface));
	border-bottom: 1px solid var(--adotah-border);
	transition: background-color 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.adotah-header--scrolled {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html[data-theme="dark"] .adotah-header--scrolled {
	background: rgba(17, 24, 39, 0.94);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.adotah-header__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	min-height: 4rem;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

@media (min-width: 1100px) {
	.adotah-header__inner {
		min-height: 4.25rem;
		display: grid;
		/* logo (auto) | nav elástico (1fr) | CTAs+busca (auto) */
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: 1rem 1.5rem;
		padding-top: 0;
		padding-bottom: 0;
	}
}

/* Logo + “· Suporte” */
.adotah-header__start {
	display: flex;
	align-items: center;
	min-width: 0;
}

.adotah-header__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
	color: #1c2842;
	min-width: 0;
}

html[data-theme="dark"] .adotah-header__brand {
	color: #f8fafc;
}

.adotah-header__brand:hover {
	text-decoration: none;
	opacity: 0.92;
}

.adotah-header-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.adotah-header-logo-svg {
	height: 28px;
	width: auto;
	display: block;
}

.adotah-header__brand-text {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.adotah-header__brand-sep {
	color: var(--adotah-text-muted);
	font-weight: 500;
	opacity: 0.7;
}

.adotah-header__brand-product {
	color: var(--adotah-primary);
	font-weight: 600;
}

/* Nav central (desktop) / painel (mobile) */
.adotah-header__nav {
	margin: 0;
	padding: 0;
}

.adotah-header__nav-list,
.adotah-header__nav .adotah-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

@media (min-width: 1100px) {
	.adotah-header__nav {
		justify-self: center;
		grid-column: 2;
		min-width: 0;
	}

	.adotah-header__nav-list,
	.adotah-header__nav .adotah-nav-list {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		flex-wrap: nowrap;
		gap: 0.125rem;
	}
}

.adotah-header__nav-list a,
.adotah-header__nav .adotah-nav-list a {
	display: block;
	padding: 0.5rem 1rem;
	border-radius: var(--adotah-radius);
	text-decoration: none;
	color: var(--adotah-text-muted);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

@media (min-width: 1100px) {
	.adotah-header__nav-list a,
	.adotah-header__nav .adotah-nav-list a {
		padding: 0.5rem 0.85rem;
	}
}

.adotah-header__nav-list a:hover,
.adotah-header__nav .adotah-nav-list a:hover {
	background: var(--adotah-surface-hover);
	color: var(--adotah-text);
	text-decoration: none;
}

html[data-theme="dark"] .adotah-header__nav-list a:hover,
html[data-theme="dark"] .adotah-header__nav .adotah-nav-list a:hover {
	background: var(--adotah-surface-2);
	color: #fff;
}

/* Extras só no menu mobile (busca + CTAs empilhados) */
.adotah-header__nav-mobile-extras {
	display: none;
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--adotah-border);
	flex-direction: column;
	gap: 1rem;
}

.adotah-header__nav.is-open .adotah-header__nav-mobile-extras {
	display: flex;
}

@media (min-width: 1100px) {
	.adotah-header__nav-mobile-extras {
		display: none !important;
	}
}

/* Coluna direita */
.adotah-header__end {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.5rem;
	flex-wrap: nowrap;
	margin-left: auto;
}

@media (min-width: 1100px) {
	.adotah-header__end {
		grid-column: 3;
		justify-self: end;
		margin-left: 0;
		gap: 0.625rem;
	}
}

/* Busca compacta — só desktop (na home não renderiza) */
.adotah-header__search-desktop {
	display: none;
	max-width: 220px;
}

@media (min-width: 1100px) {
	.adotah-header__search-desktop {
		display: block;
	}
}

/* CTAs estilo landing */
.adotah-header-ctas {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.adotah-header-ctas--bar {
	display: none;
}

@media (min-width: 1100px) {
	.adotah-header-ctas--bar {
		display: flex;
	}
}

.adotah-header-ctas--stack {
	flex-direction: column;
	width: 100%;
	gap: 0.75rem;
}

.adotah-header-ctas--stack .adotah-header-cta {
	width: 100%;
	justify-content: center;
	text-align: center;
}

.adotah-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.625rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	font-family: var(--adotah-font-sans);
	border-radius: var(--adotah-radius-lg);
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	white-space: nowrap;
}

.adotah-header-cta:hover {
	text-decoration: none;
}

.adotah-header-cta--outline {
	border: 1px solid var(--adotah-border-strong);
	color: var(--adotah-text);
	background: transparent;
}

.adotah-header-cta--outline:hover {
	border-color: var(--adotah-border-strong);
	background: var(--adotah-surface-hover);
	color: var(--adotah-text);
}

html[data-theme="dark"] .adotah-header-cta--outline {
	border-color: #4b5563;
	color: #e5e7eb;
}

html[data-theme="dark"] .adotah-header-cta--outline:hover {
	background: var(--adotah-surface-2);
	border-color: #6b7280;
	color: #fff;
}

.adotah-header-cta--primary {
	background: var(--adotah-primary);
	color: #fff !important;
	border: none;
	box-shadow: 0 2px 8px var(--adotah-primary-glow);
}

.adotah-header-cta--primary:hover {
	filter: brightness(1.08);
	box-shadow: 0 4px 14px var(--adotah-primary-glow);
}

/* Botões ícone (tema, docs, menu) */
.adotah-header__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: var(--adotah-radius);
	background: transparent;
	color: var(--adotah-text-muted);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.adotah-header__icon-btn:hover {
	background: var(--adotah-surface-hover);
	color: var(--adotah-text);
}

html[data-theme="dark"] .adotah-header__icon-btn:hover {
	background: var(--adotah-surface-2);
	color: #fff;
}

.adotah-theme-toggle .adotah-theme-icon {
	display: block;
}

.adotah-theme-icon--sun {
	display: none;
}

html[data-theme="dark"] .adotah-theme-icon--moon {
	display: none !important;
}

html[data-theme="dark"] .adotah-theme-icon--sun {
	display: block !important;
}

.adotah-sidebar-toggle {
	display: none;
}

body.adotah-docs-context .adotah-sidebar-toggle {
	display: inline-flex;
}

/* Menu hambúrguer */
.adotah-header__menu-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: var(--adotah-radius);
	background: transparent;
	color: var(--adotah-text-muted);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.adotah-header__menu-btn:hover {
	background: var(--adotah-surface-hover);
	color: var(--adotah-text);
}

.adotah-menu-icon--close {
	display: none;
}

.adotah-header__menu-btn[aria-expanded="true"] .adotah-menu-icon--open {
	display: none;
}

.adotah-header__menu-btn[aria-expanded="true"] .adotah-menu-icon--close {
	display: block;
}

@media (min-width: 1100px) {
	.adotah-header__menu-btn {
		display: none;
	}
}

/* Mobile/tablet: nav em painel full-width abaixo da barra */
@media (max-width: 1099.98px) {
	.adotah-header__inner {
		flex-wrap: wrap;
	}

	.adotah-header__nav {
		display: none;
		flex: 1 0 100%;
		order: 10;
		width: 100%;
		padding: 0 0 1rem;
		border-top: 1px solid var(--adotah-border);
		margin-top: 0.5rem;
		padding-top: 1rem;
	}

	.adotah-header__nav.is-open {
		display: block;
	}

	body.adotah-menu-open {
		overflow: hidden;
	}
}

@media (min-width: 1100px) {
	.adotah-header__nav {
		display: block !important;
		border: none;
		margin: 0;
		padding: 0;
		width: auto;
		order: unset;
	}
}

/* Mobile overlay sidebar */
@media (max-width: 991px) {
	.adotah-sidebar-adoc {
		position: fixed;
		inset: 0;
		z-index: 200;
		max-height: none;
		padding: 1rem;
		transform: translateX(-100%);
		transition: transform 0.25s ease;
		box-shadow: var(--adotah-shadow-lg);
		overflow-y: auto;
	}

	.adotah-sidebar-adoc.is-open {
		transform: translateX(0);
	}

	body.adotah-sidebar-open::before {
		content: "";
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0.5);
		backdrop-filter: blur(4px);
		z-index: 199;
	}

	html[data-theme="dark"] body.adotah-sidebar-open::before {
		background: rgba(0, 0, 0, 0.6);
	}
}

/* -------------------------------------------------------------------------
   Site content wrapper
   ------------------------------------------------------------------------- */
.adotah-site-content {
	min-height: 50vh;
}

.adotah-main {
	padding: 0;
}

.adotah-container {
	max-width: var(--adotah-max-width, 1200px);
	margin: 0 auto;
	padding: 0 1.5rem;
}

/* -------------------------------------------------------------------------
   Front page hero
   ------------------------------------------------------------------------- */
.adotah-hero {
	padding: 3rem 1.5rem 2.75rem;
	text-align: center;
	border-bottom: 1px solid var(--adotah-border);
	background: radial-gradient(ellipse 80% 60% at 50% -20%, var(--adotah-primary-muted), transparent 55%),
		linear-gradient(180deg, var(--adotah-surface) 0%, var(--adotah-bg) 55%, var(--adotah-bg) 100%);
}

html[data-theme="dark"] .adotah-hero {
	background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(99, 102, 241, 0.14), transparent 55%),
		linear-gradient(180deg, #111827 0%, var(--adotah-bg) 45%, var(--adotah-bg) 100%);
	border-bottom-color: var(--adotah-border);
}

.adotah-hero-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4.5vw, 2.25rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	color: var(--adotah-text);
	line-height: 1.2;
}

.adotah-hero-lead {
	margin: 0 auto 2rem;
	max-width: 32rem;
	color: var(--adotah-text-muted);
	font-size: 1.125rem;
	line-height: 1.65;
	font-weight: 400;
}

.adotah-hero .adotah-search-form {
	max-width: 36rem;
	margin: 0 auto;
	justify-content: center;
	gap: 0.75rem;
}

/* -------------------------------------------------------------------------
   Category grid
   ------------------------------------------------------------------------- */
.adotah-categories-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
	padding: 2.5rem 0 3rem;
}

@media (min-width: 600px) {
	.adotah-categories-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

@media (min-width: 900px) {
	.adotah-categories-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1.5rem;
	}
}

.adotah-category-block {
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius-lg);
	padding: var(--adotah-space-card, 1.5rem) 1.75rem;
	background: var(--adotah-surface);
	box-shadow: var(--adotah-shadow-card);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.adotah-category-block:hover {
	border-color: var(--adotah-primary-muted);
	box-shadow: var(--adotah-shadow-card-hover);
	transform: translateY(-2px);
}

html[data-theme="dark"] .adotah-category-block {
	border-color: rgba(75, 85, 99, 0.5);
	background: rgba(17, 24, 39, 0.85);
	backdrop-filter: blur(12px);
}

html[data-theme="dark"] .adotah-category-block:hover {
	border-color: var(--adotah-border-strong);
}

.adotah-category-block h2 {
	margin: 0 0 1.125rem;
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.adotah-category-block h2 a {
	color: var(--adotah-text);
	text-decoration: none;
}

.adotah-category-block h2 a:hover {
	color: var(--adotah-primary);
}

.adotah-category-block ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.adotah-category-block li {
	margin: 0.5rem 0;
	font-size: 0.9375rem;
	line-height: 1.45;
}

.adotah-category-block a {
	text-decoration: none;
	color: var(--adotah-text-muted);
}

.adotah-category-block a:hover {
	color: var(--adotah-primary);
	text-decoration: none;
}

/* -------------------------------------------------------------------------
   Doc article (single)
   ------------------------------------------------------------------------- */
.adotah-doc-article {
	max-width: 100%;
}

.adotah-doc-header {
	margin-bottom: 1.25rem;
}

.adotah-doc-title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.25;
	color: var(--adotah-text);
}

.adotah-doc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	font-size: 0.875rem;
	color: var(--adotah-text-muted);
	margin-bottom: 1.25rem;
}

.adotah-doc-meta span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

/* Body: TOC + prose */
.adotah-doc-body {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.adotah-doc-body {
		grid-template-columns: minmax(0, 1fr) 200px;
		grid-template-areas: "prose toc";
		align-items: start;
	}

	.adotah-toc-wrap {
		grid-area: toc;
		position: sticky;
		top: calc(var(--adotah-header-h, 56px) + 1rem);
		order: unset;
	}

	.adotah-prose-wrap {
		grid-area: prose;
		order: unset;
	}
}

@media (max-width: 899px) {
	.adotah-toc-wrap {
		order: -1;
	}

	.adotah-prose-wrap {
		order: 0;
	}
}

.adotah-toc-wrap {
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius);
	padding: 1rem;
	background: var(--adotah-surface-2);
	font-size: 0.8125rem;
}

.adotah-toc-title {
	margin: 0 0 0.65rem;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--adotah-text-muted);
}

.adotah-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.adotah-toc-list li {
	margin: 0.35rem 0;
}

.adotah-toc-list a {
	color: var(--adotah-text-muted);
	text-decoration: none;
	display: block;
	padding: 0.2rem 0;
	border-left: 2px solid transparent;
	padding-left: 0.5rem;
	margin-left: -0.5rem;
	line-height: 1.35;
}

.adotah-toc-list a:hover {
	color: var(--adotah-primary);
}

.adotah-toc-list a.is-active {
	color: var(--adotah-primary);
	border-left-color: var(--adotah-primary);
	font-weight: 500;
}

.adotah-toc-list .adotah-toc-h3 {
	padding-left: 1rem;
	font-size: 0.8125rem;
}

/* Prose / entry content */
.adotah-prose,
.adotah-doc-content.entry-content {
	line-height: 1.75;
	color: var(--adotah-text);
	font-size: 1.0625rem;
}

.adotah-prose > *:first-child,
.adotah-doc-content > *:first-child {
	margin-top: 0;
}

.adotah-prose h2,
.adotah-doc-content h2 {
	font-size: 1.25rem;
	margin: 2rem 0 0.75rem;
	padding-top: 0.5rem;
	scroll-margin-top: calc(var(--adotah-header-h, 56px) + 1rem);
	color: var(--adotah-text);
}

.adotah-prose h3,
.adotah-doc-content h3 {
	font-size: 1.1rem;
	margin: 1.5rem 0 0.5rem;
	scroll-margin-top: calc(var(--adotah-header-h, 56px) + 1rem);
	color: var(--adotah-text);
}

.adotah-prose p,
.adotah-doc-content p {
	margin: 0 0 1rem;
}

.adotah-prose ul,
.adotah-prose ol,
.adotah-doc-content ul,
.adotah-doc-content ol {
	margin: 0 0 1rem;
	padding-left: 1.35rem;
}

.adotah-prose li,
.adotah-doc-content li {
	margin: 0.35rem 0;
}

.adotah-prose img,
.adotah-doc-content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--adotah-radius);
}

.adotah-prose a,
.adotah-doc-content a {
	color: var(--adotah-primary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.adotah-prose a:hover,
.adotah-doc-content a:hover {
	color: var(--adotah-primary-hover);
}

/* Code blocks */
.adotah-pre-wrap {
	position: relative;
	margin: 1.25rem 0;
	border-radius: var(--adotah-radius);
	overflow: hidden;
	border: 1px solid var(--adotah-border);
	background: var(--adotah-code-bg);
}

.adotah-doc-content pre,
.adotah-prose pre {
	margin: 0;
	padding: 1rem 1rem 2.75rem;
	overflow-x: auto;
	font-size: 0.875rem;
	line-height: 1.55;
	background: transparent;
	border: none;
	color: #e2e8f0;
}

.adotah-doc-content code,
.adotah-prose code {
	font-family: var(--adotah-font-mono);
	font-size: 0.875em;
}

.adotah-doc-content p code,
.adotah-prose p code,
.adotah-doc-content li code,
.adotah-prose li code {
	background: var(--adotah-code-inline-bg);
	padding: 0.15em 0.4em;
	border-radius: 4px;
}

.adotah-copy-code {
	position: absolute;
	right: 0.5rem;
	bottom: 0.5rem;
	padding: 0.35rem 0.65rem;
	font-size: 0.75rem;
	font-weight: 500;
	background: var(--adotah-surface);
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius);
	cursor: pointer;
	color: var(--adotah-text-muted);
}

.adotah-copy-code:hover {
	color: var(--adotah-text);
	border-color: var(--adotah-border-strong);
}

.adotah-copy-code.is-copied {
	color: var(--adotah-success);
	border-color: var(--adotah-success);
}

/* Alerts (shortcodes or classes – optional future) */
.adotah-alert {
	border-radius: var(--adotah-radius);
	padding: 0.85rem 1rem;
	margin: 1rem 0;
	border-left: 4px solid var(--adotah-border-strong);
	background: var(--adotah-surface-2);
	font-size: 0.9375rem;
}

.adotah-alert--info {
	border-left-color: var(--adotah-primary);
	background: var(--adotah-alert-info-bg);
}

.adotah-alert--warning {
	border-left-color: var(--adotah-warning);
	background: var(--adotah-alert-warn-bg);
}

.adotah-alert--success {
	border-left-color: var(--adotah-success);
	background: var(--adotah-alert-success-bg);
}

/* -------------------------------------------------------------------------
   Helpful block
   ------------------------------------------------------------------------- */
.adotah-helpful {
	margin: 2.5rem 0;
	padding: 1.75rem 1.5rem;
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius-lg);
	background: var(--adotah-surface-2);
	box-shadow: var(--adotah-shadow-card);
	text-align: center;
}

.adotah-helpful-title {
	margin: 0 0 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--adotah-text);
}

.adotah-helpful-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

.adotah-helpful-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	font-family: var(--adotah-font-sans);
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius);
	background: var(--adotah-surface);
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.adotah-helpful-btn:hover:not(:disabled) {
	border-color: var(--adotah-primary);
	background: var(--adotah-surface-hover);
}

.adotah-helpful-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.adotah-helpful-msg {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--adotah-text-muted);
}

/* -------------------------------------------------------------------------
   Related docs
   ------------------------------------------------------------------------- */
.adotah-related {
	margin-top: 2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--adotah-border);
}

.adotah-related-title {
	margin: 0 0 1rem;
	font-size: 1rem;
	font-weight: 600;
}

.adotah-related-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.65rem;
}

.adotah-related-list a {
	font-weight: 500;
	text-decoration: none;
	color: var(--adotah-primary);
}

.adotah-related-list a:hover {
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Sidebar tree nav
   ------------------------------------------------------------------------- */
.adotah-sidebar-adoc-inner {
	padding: 0.5rem 0 1rem;
}

.adotah-sidebar-adoc-title {
	margin: 0 0 0.75rem;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--adotah-text-muted);
}

.adotah-nav-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.adotah-nav-tree > li {
	margin-bottom: 0.25rem;
}

.adotah-nav-tree-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	text-align: left;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: var(--adotah-font-sans);
	color: var(--adotah-text);
	background: transparent;
	border: none;
	border-radius: var(--adotah-radius);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.adotah-nav-tree-toggle:hover {
	background: var(--adotah-surface-hover);
	color: var(--adotah-text);
}

.adotah-nav-tree-toggle .adotah-chevron {
	transition: transform 0.2s;
	font-size: 0.65rem;
	opacity: 0.6;
}

.adotah-nav-tree-toggle[aria-expanded="false"] .adotah-chevron {
	transform: rotate(-90deg);
}

.adotah-nav-tree-children {
	list-style: none;
	margin: 0;
	padding: 0.25rem 0 0.5rem 0.5rem;
	border-left: 1px solid var(--adotah-border);
	margin-left: 0.65rem;
}

.adotah-nav-tree-children[hidden] {
	display: none;
}

.adotah-nav-tree-children a {
	display: block;
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--adotah-text-muted);
	text-decoration: none;
	border-radius: var(--adotah-radius);
	transition: background 0.2s ease, color 0.2s ease;
}

.adotah-nav-tree-children a:hover {
	color: var(--adotah-text);
	background: var(--adotah-surface-hover);
}

.adotah-nav-tree-children a.is-current {
	color: var(--adotah-primary);
	font-weight: 600;
	background: var(--adotah-primary-light);
}

html[data-theme="dark"] .adotah-nav-tree-children a.is-current {
	background: rgba(99, 102, 241, 0.12);
	color: var(--adotah-primary);
}

/* Só no mobile (overlay): no desktop a sidebar é fixa e não precisa de “Fechar”. */
.adotah-sidebar-close {
	display: none !important;
	margin: 0 0 1rem;
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	cursor: pointer;
}

@media (max-width: 991px) {
	.adotah-sidebar-close {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 44px;
		padding: 0.5rem 1rem;
		margin-bottom: 1rem;
		font-family: var(--adotah-font-sans);
		font-size: 0.875rem;
		font-weight: 600;
		color: var(--adotah-text);
		background: var(--adotah-surface);
		border: 1px solid var(--adotah-border);
		border-radius: var(--adotah-radius-lg);
		box-shadow: var(--adotah-shadow-card);
		transition: background 0.2s ease, border-color 0.2s ease;
	}

	.adotah-sidebar-close:hover {
		background: var(--adotah-surface-hover);
		border-color: var(--adotah-border-strong);
	}
}

@media (min-width: 992px) {
	.adotah-sidebar-close {
		display: none !important;
	}
}

/* -------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------- */
.adotah-breadcrumb {
	margin-bottom: 1rem;
	font-size: 0.8125rem;
	color: var(--adotah-text-muted);
}

.adotah-breadcrumb-list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0.25rem;
	align-items: center;
}

.adotah-breadcrumb-item:not(:last-child)::after {
	content: "/";
	margin-left: 0.35rem;
	color: var(--adotah-border-strong);
	font-weight: 400;
}

.adotah-breadcrumb a {
	color: var(--adotah-text-muted);
	text-decoration: none;
}

.adotah-breadcrumb a:hover {
	color: var(--adotah-primary);
	text-decoration: underline;
}

/* -------------------------------------------------------------------------
   Doc cards (archive / search)
   ------------------------------------------------------------------------- */
.adotah-page-title {
	margin: 0 0 0.5rem;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.adotah-lead {
	color: var(--adotah-text-muted);
	margin: 0 0 1.5rem;
}

.adotah-docs-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.adotah-doc-card {
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius-lg);
	padding: var(--adotah-space-card, 1.5rem) 1.75rem;
	background: var(--adotah-surface);
	box-shadow: var(--adotah-shadow-card);
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.adotah-doc-card:hover {
	box-shadow: var(--adotah-shadow-card-hover);
	border-color: var(--adotah-primary-muted);
	transform: translateY(-1px);
}

html[data-theme="dark"] .adotah-doc-card {
	border-color: rgba(75, 85, 99, 0.5);
	background: rgba(17, 24, 39, 0.9);
}

.adotah-doc-card-title {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
	font-weight: 600;
}

.adotah-doc-card-title a {
	text-decoration: none;
	color: var(--adotah-text);
}

.adotah-doc-card-title a:hover {
	color: var(--adotah-primary);
}

.adotah-doc-card-excerpt {
	font-size: 0.9375rem;
	color: var(--adotah-text-muted);
	margin: 0 0 0.75rem;
	line-height: 1.55;
}

.adotah-doc-card-meta {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--adotah-text-muted);
}

.adotah-doc-card-meta a {
	color: var(--adotah-primary);
}

/* Search highlight */
.adotah-search-highlight {
	background: var(--adotah-highlight-bg);
	padding: 0 0.15em;
	border-radius: 2px;
}

/* -------------------------------------------------------------------------
   Search form
   ------------------------------------------------------------------------- */
.adotah-search-form {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: stretch;
}

.adotah-search-field {
	flex: 1 1 200px;
	min-width: 0;
	min-height: 44px;
	padding: 0.625rem 1rem;
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius);
	background: var(--adotah-surface);
	color: var(--adotah-text);
	font-size: 0.9375rem;
	font-family: var(--adotah-font-sans);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.adotah-search-field::placeholder {
	color: var(--adotah-text-muted);
	opacity: 0.85;
}

.adotah-search-field:focus {
	outline: none;
	border-color: var(--adotah-primary);
	box-shadow: 0 0 0 3px var(--adotah-focus-ring);
}

.adotah-search-submit {
	min-height: 44px;
	padding: 0.625rem 1.25rem;
	background: var(--adotah-primary);
	color: #fff;
	border: none;
	border-radius: var(--adotah-radius);
	cursor: pointer;
	font-weight: 600;
	font-size: 0.875rem;
	font-family: var(--adotah-font-sans);
	box-shadow: 0 4px 14px 0 var(--adotah-primary-glow);
	transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.adotah-search-submit:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 20px 0 var(--adotah-primary-glow);
}

.adotah-search-submit:active {
	filter: brightness(0.95);
}

/* Busca compacta no header (ícone) */
.adotah-search-form--compact {
	flex-wrap: nowrap;
	gap: 0;
	max-width: 100%;
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius-lg);
	overflow: hidden;
	background: var(--adotah-surface);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.adotah-search-form--compact:focus-within {
	border-color: var(--adotah-primary);
	box-shadow: 0 0 0 3px var(--adotah-focus-ring);
}

.adotah-search-field--compact {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 40px;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent;
	font-size: 0.8125rem;
	padding: 0.5rem 0.75rem;
}

.adotah-search-submit--icon {
	min-height: 40px;
	min-width: 44px;
	width: 44px;
	padding: 0;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: none;
}

.adotah-search-submit--icon:hover {
	filter: brightness(1.05);
}

.adotah-header__nav-search .adotah-search-form--compact {
	width: 100%;
}

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */
.adotah-main .nav-links {
	display: flex;
	gap: 0.5rem;
	margin: 2rem 0;
	flex-wrap: wrap;
}

.adotah-main .nav-links a,
.adotah-main .nav-links span {
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--adotah-border);
	border-radius: var(--adotah-radius);
	text-decoration: none;
	font-size: 0.875rem;
	color: var(--adotah-text);
	background: var(--adotah-surface);
}

.adotah-main .nav-links .current {
	background: var(--adotah-primary);
	color: #fff;
	border-color: var(--adotah-primary);
	box-shadow: 0 2px 8px var(--adotah-primary-glow);
}

/* -------------------------------------------------------------------------
   Buttons & footer
   ------------------------------------------------------------------------- */
.adotah-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.625rem 1.25rem;
	background: var(--adotah-primary);
	color: #fff !important;
	border-radius: var(--adotah-radius);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
	font-family: var(--adotah-font-sans);
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 14px 0 var(--adotah-primary-glow);
	transition: filter 0.2s ease, box-shadow 0.2s ease;
}

.adotah-button:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 20px 0 var(--adotah-primary-glow);
	text-decoration: none;
}

.adotah-button--ghost {
	background: transparent;
	color: var(--adotah-text) !important;
	border: 1px solid var(--adotah-border);
}

.adotah-button--ghost:hover {
	background: var(--adotah-surface-hover);
}

.adotah-footer {
	border-top: 1px solid var(--adotah-border);
	padding: 2.5rem 0;
	margin-top: auto;
	background: var(--adotah-header-bg, var(--adotah-surface-2));
}

.adotah-footer-inner {
	max-width: var(--adotah-max-width, 1200px);
	margin: 0 auto;
	padding: 0 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	align-items: center;
}

.adotah-footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.adotah-footer-nav a {
	font-size: 0.875rem;
	color: var(--adotah-text-muted);
	text-decoration: none;
}

.adotah-footer-nav a:hover {
	color: var(--adotah-primary);
}

.adotah-footer-text {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--adotah-text-muted);
}

/* -------------------------------------------------------------------------
   404
   ------------------------------------------------------------------------- */
.adotah-404 {
	text-align: center;
	padding: 3rem 0;
}

.adotah-404-code {
	font-size: 4rem;
	font-weight: 800;
	line-height: 1;
	color: var(--adotah-border-strong);
	letter-spacing: -0.05em;
}

/* -------------------------------------------------------------------------
   Page template
   ------------------------------------------------------------------------- */
.adotah-page-content {
	max-width: 42rem;
}

/* -------------------------------------------------------------------------
   Utilities
   ------------------------------------------------------------------------- */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	position: fixed !important;
	left: 1rem;
	top: 1rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--adotah-primary);
	color: #fff !important;
	font-weight: 600;
	border-radius: var(--adotah-radius);
	text-decoration: none;
}

.adotah-tax-desc {
	color: var(--adotah-text-muted);
	margin: 0 0 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.adotah-search-query {
	color: var(--adotah-primary);
	font-weight: 600;
}

/* Archive layout with sidebar on docs contexts */
.adotah-archive-inner {
	display: flex;
	flex-direction: column;
}

@media (min-width: 992px) {
	.adotah-archive-inner.adotah-has-sidebar {
		flex-direction: row;
		align-items: flex-start;
		gap: 0;
	}

	.adotah-archive-inner.adotah-has-sidebar .adotah-archive-main {
		flex: 1;
		min-width: 0;
		padding-right: 1.5rem;
	}
}
