/*
 * Echo Knowledge Base article overrides.
 * Loaded after Echo's own styles so dynamic plugin markup is not removed by
 * the Tailwind production build.
 */

/* Echo Knowledge Base article layout.
	   Scoped to the dedicated template so regular pages and posts stay untouched. */
	body.eckb-kb-template-article-page {
		padding: 0;
		background: #ffffff;
	}
	body.eckb-kb-template-article-page #eckb-article-page-container-v2 {
		width: min(100%, 1400px);
		margin-inline: auto;
			padding: 2rem 1rem 4rem;
		color: var(--color-ink);
		font-family: var(--font-sans);
	}
	body.eckb-kb-template-article-page #eckb-article-header {
		margin-bottom: 1.5rem;
			padding: 0 !important;
			background: transparent !important;
	}
	body.eckb-kb-template-article-page #epkb-ml__module-search {
			margin: 0 !important;
			padding: 0 !important;
			background: transparent !important;
		}
		body.eckb-kb-template-article-page #epkb-ml-search-classic-layout {
		padding: 1.25rem clamp(1.25rem, 3vw, 2.25rem);
		border-radius: 1rem;
		background: var(--color-secondary-900);
		box-shadow: 0 10px 28px rgba(18,51,72,.07);
			border: 1px solid var(--color-line);
			background: #ffffff;
	}
	body.eckb-kb-template-article-page .epkb-ml-search-title {
		margin-bottom: .9rem;
		color: white;
		font-family: var(--font-display);
		color: var(--color-secondary-900) !important;
			font-size: clamp(1.25rem, 2vw, 1.7rem);
		font-weight: 700;
	}
	body.eckb-kb-template-article-page #epkb-ml-search-box {
		display: flex;
		gap: .65rem;
	}
	body.eckb-kb-template-article-page #epkb-ml-search-box input {
		min-width: 0;
		flex: 1;
		height: 3.1rem;
		padding: 0 1rem;
		border: 1px solid var(--color-line);
		border-radius: .65rem;
		background: white;
		color: var(--color-ink);
	}
	body.eckb-kb-template-article-page #eckb-article-page-container-v2 #eckb-article-header #epkb-ml__module-search #epkb-ml-search-classic-layout #epkb-ml-search-box button.epkb-ml-search-box__btn {
		min-height: 3.1rem;
		padding: 0 1.35rem;
		border: 0;
		border-radius: .65rem;
		background: #f58220 !important;
		color: white !important;
		font-weight: 800;
		cursor: pointer;
	}
	body.eckb-kb-template-article-page #eckb-article-body {
		display: grid !important;
		grid-template-columns: minmax(235px, 285px) minmax(0, 1fr) !important;
		gap: 1.5rem !important;
		align-items: start;
	}
	body.eckb-kb-template-article-page #eckb-article-left-sidebar,
	body.eckb-kb-template-article-page #eckb-article-content {
		width: auto !important;
		min-width: 0 !important;
		max-width: none !important;
		margin: 0 !important;
	}
	body.eckb-kb-template-article-page #epkb-sidebar-container-v2,
	body.eckb-kb-template-article-page #eckb-article-content {
		border: 1px solid var(--color-line);
		border-radius: 1rem;
		background: white;
		box-shadow: 0 14px 38px rgba(18,51,72,.07);
	}
	body.eckb-kb-template-article-page #epkb-sidebar-container-v2 {
		padding: 1rem;
	}
	body.eckb-kb-template-article-page #epkb-sidebar-container-v2 ul {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	body.eckb-kb-template-article-page .epkb-sidebar__cat__top-cat + .epkb-sidebar__cat__top-cat {
		margin-top: .35rem;
		padding-top: .35rem;
		border-top: 1px solid var(--color-line);
	}
	body.eckb-kb-template-article-page .epkb-sidebar__cat__top-cat__heading-container,
	body.eckb-kb-template-article-page .epkb-category-level-2-3 {
		padding: .7rem .6rem !important;
		border-radius: .55rem;
			border: 1px solid #dce8ed !important;
			border-left: 4px solid #f58220 !important;
			background: #f8faf9 !important;
			color: #123348 !important;
			box-shadow: none !important;
		cursor: pointer;
	}
	body.eckb-kb-template-article-page .epkb-sidebar__cat__top-cat__heading-container:hover,
	body.eckb-kb-template-article-page .epkb-category-level-2-3:hover {
		background: var(--color-secondary-50);
	}
	body.eckb-kb-template-article-page #epkb-sidebar-container-v2 h2,
	body.eckb-kb-template-article-page #epkb-sidebar-container-v2 h3 {
		margin: 0;
		color: var(--color-secondary-900);
		font-family: var(--font-sans);
		color: #123348 !important;
			font-size: .96rem !important;
		line-height: 1.35;
	}
	body.eckb-kb-template-article-page .epkb-sidebar-article {
		display: block;
		padding: .45rem .6rem;
		border-radius: .45rem;
		text-decoration: none;
	}
	body.eckb-kb-template-article-page .epkb-sidebar-article:hover {
		background: var(--color-energy-soft);
	}
	body.eckb-kb-template-article-page .epkb-sidebar__cat__top-cat:has(.epkb-sidebar__body__sub-cat)
		> .epkb-sidebar__cat__top-cat__body-container
		> .epkb-sidebar__body__main-cat {
		display: none;
	}
	body.eckb-kb-template-article-page .eckb-article-title__text {
		color: var(--color-ink);
		font-size: .88rem !important;
		line-height: 1.4;
	}
	body.eckb-kb-template-article-page #eckb-article-content {
		overflow: hidden;
		padding: clamp(1.35rem, 3vw, 2.75rem);
	}
	body.eckb-kb-template-article-page #eckb-article-content-header-row-1,
	body.eckb-kb-template-article-page .eckb-article-content-header-row-left-group,
	body.eckb-kb-template-article-page #eckb-article-content-header-row-3 {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: .65rem 1rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-header-row-1 {
		justify-content: space-between;
		padding-bottom: 1rem;
		border-bottom: 1px solid var(--color-line);
	}
	body.eckb-kb-template-article-page .eckb-breadcrumb-nav {
		display: flex;
		flex-wrap: wrap;
		gap: .25rem;
		margin: 0;
		padding: 0;
		list-style: none;
	}
	body.eckb-kb-template-article-page .eckb-breadcrumb-nav li {
		display: inline-flex;
		align-items: center;
	}
	body.eckb-kb-template-article-page .eckb-skip-link {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
	body.eckb-kb-template-article-page .eckb-skip-link:focus {
		position: fixed;
		z-index: 100000;
		top: .75rem;
		left: .75rem;
		width: auto;
		height: auto;
		margin: 0;
		padding: .75rem 1rem;
		clip: auto;
		border-radius: .5rem;
		background: white;
		color: var(--color-secondary-900);
		box-shadow: 0 8px 24px rgba(16,47,64,.2);
	}
	body.eckb-kb-template-article-page #eckb-article-content-title-container h1 {
		margin: 1.35rem 0 .65rem;
		color: var(--color-secondary-900);
		font-family: var(--font-display);
		font-size: clamp(2rem, 4vw, 3.25rem);
		line-height: 1.08;
		letter-spacing: -.025em;
	}
	body.eckb-kb-template-article-page #eckb-article-content-header-row-3 {
		padding-bottom: 1.25rem;
		color: var(--color-muted);
		font-size: .86rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-header-row-3 [class$="-container"] {
		display: inline-flex;
		align-items: center;
		gap: .28rem;
	}
	body.eckb-kb-template-article-page .eckb-breadcrumb-nav li + li::before {
		content: "›";
		margin: 0 .4rem;
		color: var(--color-muted);
	}
	body.eckb-kb-template-article-page #eckb-article-content-body {
		color: #314d5c;
		font-size: 1.05rem;
		line-height: 1.72;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body p {
		margin: 0 0 1.05rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body h2 {
		margin: 2.25rem 0 .8rem;
		color: var(--color-secondary-900);
		font-family: var(--font-display);
		font-size: clamp(1.45rem, 2.4vw, 2rem);
		line-height: 1.2;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body h3 {
		margin: 1.7rem 0 .65rem;
		color: var(--color-secondary-700);
		font-family: var(--font-display);
		font-size: 1.3rem;
		line-height: 1.25;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body ul,
	body.eckb-kb-template-article-page #eckb-article-content-body ol {
		margin: .65rem 0 1.3rem;
		padding-left: 1.45rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body li + li {
		margin-top: .45rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body a {
		color: var(--color-secondary-700);
		font-weight: 700;
		text-decoration-color: var(--color-primary);
		text-underline-offset: .2em;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body .wp-block-group {
		margin: 1.25rem 0;
		padding: 1rem 1.15rem;
		border-left: 4px solid var(--color-primary);
		border-radius: 0 .65rem .65rem 0;
		background: var(--color-primary-50);
	}
	body.eckb-kb-template-article-page #eckb-article-content-body .wp-block-group p:last-child {
		margin-bottom: 0;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body .wp-block-table {
		overflow-x: auto;
		margin: 1.2rem 0 1.8rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body table {
		width: 100%;
		border-collapse: collapse;
		font-size: .94rem;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body th {
		background: var(--color-secondary-900);
		color: white;
		text-align: left;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body th,
	body.eckb-kb-template-article-page #eckb-article-content-body td {
		padding: .8rem .9rem;
		border: 1px solid var(--color-line);
		vertical-align: top;
	}
	body.eckb-kb-template-article-page #eckb-article-content-body tbody tr:nth-child(even) {
		background: var(--color-secondary-50);
	}
	body.eckb-kb-template-article-page #eckb-article-content-toc,
		body.eckb-kb-template-article-page #eckb-article-right-sidebar {
		display: none !important;
		width: 0 !important;
		min-width: 0 !important;
		margin: 0 !important;
	}

	@media (max-width: 900px) {
		body.eckb-kb-template-article-page #eckb-article-body {
			grid-template-columns: 1fr;
		}
		body.eckb-kb-template-article-page #eckb-article-left-sidebar {
			order: 2;
		}
	}
	@media (max-width: 640px) {
		body.eckb-kb-template-article-page {
			padding-inline: .65rem;
		}
		body.eckb-kb-template-article-page #epkb-ml-search-box {
			flex-direction: column;
		}
		body.eckb-kb-template-article-page #eckb-article-content {
			padding: 1.15rem;
		}
	}

