/**
 * WP Plugin Docs Hub frontend styles.
 */

.wpdh-wrap,
.wpdh-wrap * {
	box-sizing: border-box;
}

.wpdh-wrap {
	--wpdh-text: #0f172a;
	--wpdh-muted: #53627a;
	--wpdh-border: #dbe2ea;
	--wpdh-soft: #f8fafc;
	--wpdh-brand: #d61852;
	--wpdh-accent: #d1a22c;
	--wpdh-dark: #111827;
	max-width: 1200px;
	margin: 0 auto;
	padding: 44px 20px;
	color: var(--wpdh-text);
	font-family: inherit;
}

.wpdh-header {
	display: grid;
	grid-template-columns: 220px minmax(260px, 1fr) auto;
	gap: 24px;
	align-items: center;
	margin-bottom: 28px;
	padding: 14px 18px;
	border: 1px solid var(--wpdh-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.wpdh-header-no-search {
	grid-template-columns: 220px 1fr;
}

.wpdh-header-no-search .wpdh-header-nav {
	grid-column: 2;
}

.wpdh-brand {
	font-weight: 700;
	color: var(--wpdh-text);
	text-decoration: none;
}

.wpdh-header-nav {
	display: flex;
	justify-content: flex-end;
	gap: 18px;
}

.wpdh-header-nav a {
	color: var(--wpdh-text);
	text-decoration: none;
}

.wpdh-header-nav a:hover {
	color: var(--wpdh-brand);
}

.wpdh-header-search {
	width: 100%;
	max-width: 420px;
	justify-self: center;
}

.wpdh-search {
	position: relative;
	width: 100%;
}

.wpdh-search input[type="search"] {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 11px 16px;
	border: 1px solid #9ca3af;
	border-radius: 4px;
	background: #fff;
	color: var(--wpdh-text);
	font-size: 15px;
	box-shadow: none;
}

.wpdh-search-large {
	max-width: 720px;
	margin: 28px auto 0;
}

.wpdh-search-large input[type="search"] {
	min-height: 58px;
	border-radius: 999px;
	padding-right: 24px;
	padding-left: 24px;
	font-size: 17px;
}

.wpdh-search-results {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	right: 0;
	left: 0;
	overflow: hidden;
	border: 1px solid var(--wpdh-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

.wpdh-search-result,
.wpdh-search-message {
	display: block;
	padding: 13px 16px;
	color: var(--wpdh-text);
	text-decoration: none;
}

.wpdh-search-result:hover {
	background: var(--wpdh-soft);
}

.wpdh-search-result strong {
	display: block;
	margin-bottom: 3px;
}

.wpdh-search-result span {
	display: block;
	color: var(--wpdh-muted);
	font-size: 13px;
}

.wpdh-search-result .wpdh-search-category {
	margin-bottom: 4px;
}

.wpdh-search-result .wpdh-search-excerpt {
	color: var(--wpdh-text);
	font-size: 13px;
	line-height: 1.45;
}

.wpdh-search-message {
	color: var(--wpdh-muted);
}

.wpdh-hero {
	padding: 76px 28px;
	text-align: center;
	border: 1px solid var(--wpdh-border);
	border-radius: 24px;
	background:
		radial-gradient(circle at top left, rgba(214, 24, 82, 0.08), transparent 30%),
		linear-gradient(180deg, #fff, #f8fafc);
}

.wpdh-kicker {
	margin: 0 0 8px;
	color: var(--wpdh-brand);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wpdh-hero h1 {
	margin: 0 auto 16px;
	max-width: 780px;
	font-size: clamp(34px, 6vw, 58px);
	line-height: 1.05;
}

.wpdh-hero p {
	max-width: 760px;
	margin: 0 auto;
	color: var(--wpdh-muted);
	font-size: 18px;
}

.wpdh-card-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	margin-top: 24px;
}

.wpdh-card {
	display: block;
	min-height: 210px;
	padding: 24px;
	border: 1px solid var(--wpdh-border);
	border-radius: 18px;
	background: #fff;
	color: var(--wpdh-text);
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wpdh-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.wpdh-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-bottom: 18px;
	border-radius: 14px;
	background: #fff5f8;
	color: var(--wpdh-brand);
	font-weight: 800;
}

.wpdh-card h2 {
	margin: 0 0 10px;
	font-size: 20px;
}

.wpdh-card p {
	margin: 0;
	color: var(--wpdh-muted);
}

.wpdh-home-articles {
	margin-top: 34px;
	padding: 28px;
	border: 1px solid var(--wpdh-border);
	border-radius: 20px;
	background: #fff;
}

.wpdh-section-heading {
	margin-bottom: 18px;
}

.wpdh-section-heading p {
	margin: 0 0 6px;
	color: var(--wpdh-brand);
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wpdh-section-heading h2 {
	margin: 0;
	font-size: 24px;
}

.wpdh-home-article-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.wpdh-home-article {
	display: block;
	padding: 16px;
	border: 1px solid var(--wpdh-border);
	border-radius: 14px;
	color: var(--wpdh-text);
	text-decoration: none;
}

.wpdh-home-article:hover {
	border-color: var(--wpdh-brand);
	background: var(--wpdh-soft);
}

.wpdh-home-article strong,
.wpdh-home-article span {
	display: block;
}

.wpdh-home-article span {
	margin-top: 5px;
	color: var(--wpdh-muted);
	font-size: 14px;
}

.wpdh-doc-layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr) 220px;
	gap: 32px;
	align-items: start;
}

.wpdh-doc-layout-category {
	grid-template-columns: 260px minmax(0, 1fr);
}

.wpdh-sidebar,
.wpdh-toc,
.wpdh-prev-next {
	border: 1px solid var(--wpdh-border);
	border-radius: 16px;
	background: #fff;
}

.wpdh-sidebar,
.wpdh-toc {
	position: sticky;
	top: 32px;
	padding: 18px;
}

.wpdh-sidebar-title,
.wpdh-toc h2 {
	margin: 0 0 14px;
	color: var(--wpdh-muted);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wpdh-sidebar-title {
	padding-bottom: 14px;
	border-bottom: 1px solid var(--wpdh-border);
}

/* Strong reset for theme list/button styles inside the documentation navigation. */
.wpdh-sidebar ul,
.wpdh-sidebar li,
.wpdh-content ul,
.wpdh-content ol {
	background: none;
}

.wpdh-sidebar ul,
.wpdh-sidebar li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.wpdh-sidebar li::before,
.wpdh-sidebar li::after,
.wpdh-nav-list li::before,
.wpdh-nav-list li::after,
.wpdh-nav-children li::before,
.wpdh-nav-children li::after {
	display: none !important;
	content: none !important;
}

.wpdh-nav-list,
.wpdh-nav-children {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.wpdh-nav-section {
	margin: 0 0 8px !important;
}

.wpdh-nav-toggle {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 10px 12px !important;
	border: 0 !important;
	border-radius: 10px !important;
	outline: none !important;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--wpdh-text) !important;
	font: inherit !important;
	font-size: 15px !important;
	font-weight: 500 !important;
	line-height: 1.3 !important;
	text-align: left !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	appearance: none !important;
	cursor: pointer;
}

.wpdh-nav-toggle:hover,
.wpdh-nav-toggle:focus {
	background: var(--wpdh-soft) !important;
	color: var(--wpdh-brand) !important;
}

.wpdh-nav-caret {
	margin-left: 8px;
	font-size: 12px;
	transition: transform 0.15s ease;
}

.wpdh-nav-section.is-open > .wpdh-nav-toggle .wpdh-nav-caret {
	transform: rotate(180deg);
}

.wpdh-nav-children {
	display: none;
	margin-top: 6px !important;
	margin-left: 12px !important;
	padding-left: 10px !important;
	border-left: 1px solid var(--wpdh-border);
}

.wpdh-nav-children .wpdh-nav-subterms {
	margin-top: 6px !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
}

.wpdh-nav-children .wpdh-nav-section {
	margin-top: 4px !important;
}

.wpdh-nav-children .wpdh-nav-toggle {
	padding: 8px 10px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
}

.wpdh-nav-section.is-open > .wpdh-nav-children {
	display: block;
}

.wpdh-nav-children a {
	display: block;
	margin: 0 0 4px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--wpdh-text);
	font-size: 14px;
	text-decoration: none;
}

.wpdh-nav-children a:hover,
.wpdh-nav-children a[aria-current="page"] {
	background: #f1f5f9;
	color: var(--wpdh-text);
	font-weight: 700;
}

.wpdh-main {
	min-width: 0;
}

.wpdh-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	color: var(--wpdh-muted);
	font-size: 14px;
}

.wpdh-breadcrumb a {
	color: var(--wpdh-brand);
	text-decoration: none;
}

.wpdh-main h1 {
	margin: 0 0 16px;
	font-size: clamp(36px, 5vw, 52px);
	line-height: 1.05;
}

.wpdh-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 34px;
	color: var(--wpdh-muted);
	font-size: 14px;
}

.wpdh-content {
	font-size: 17px;
	line-height: 1.75;
}

.wpdh-content h2 {
	margin-top: 42px;
	padding-bottom: 8px;
	font-size: 30px;
	line-height: 1.2;
}

.wpdh-content h2::after {
	display: block;
	width: 80px;
	height: 4px;
	margin-top: 8px;
	background: var(--wpdh-accent);
	content: "";
}

.wpdh-content h3 {
	margin-top: 34px;
	font-size: 24px;
}

.wpdh-content h4 {
	margin-top: 28px;
	color: var(--wpdh-accent);
	font-size: 19px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.wpdh-content table {
	width: 100%;
	margin: 24px 0;
	border-collapse: collapse;
}

.wpdh-content th,
.wpdh-content td {
	padding: 13px 14px;
	border: 1px solid var(--wpdh-border);
}

.wpdh-content thead th {
	border-top: 3px solid var(--wpdh-dark);
	background: var(--wpdh-soft);
}

.wpdh-content blockquote {
	margin: 28px 0;
	padding: 20px 24px;
	border-left: 4px solid #94a3b8;
	border-radius: 12px;
	background: var(--wpdh-soft);
	font-style: italic;
}

.wpdh-content :not(pre) > code {
	padding: 2px 6px;
	border-radius: 6px;
	background: #f1f5f9;
	font-size: 0.92em;
}

.wpdh-content pre {
	overflow: auto;
	margin: 24px 0;
	padding: 24px;
	border-radius: 14px;
	background: #111827;
	color: #fff;
	font-size: 14px;
	line-height: 1.7;
}

.wpdh-content pre code {
	color: inherit;
	background: transparent;
}

.wpdh-content ul,
.wpdh-content ol {
	margin: 1.2em 0 1.2em 1.4em;
	padding-left: 1.2em;
}

.wpdh-content li {
	margin: 0.35em 0;
}

.wpdh-article-list {
	display: grid;
	gap: 14px;
}

.wpdh-article-card {
	display: block;
	padding: 22px;
	border: 1px solid var(--wpdh-border);
	border-radius: 14px;
	background: #fff;
	color: var(--wpdh-text);
	text-decoration: none;
}

.wpdh-article-card:hover {
	border-color: var(--wpdh-brand);
}

.wpdh-article-card h2 {
	margin: 0 0 8px;
	font-size: 20px;
}

.wpdh-article-card p {
	margin: 0;
	color: var(--wpdh-muted);
}

.wpdh-toc p {
	color: var(--wpdh-muted);
	font-size: 14px;
}

.wpdh-prev-next {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 44px;
	padding: 18px;
}

.wpdh-prev-next div:last-child {
	text-align: right;
}

.wpdh-prev-next span {
	display: block;
	margin-bottom: 5px;
	color: var(--wpdh-muted);
	font-size: 13px;
}

.wpdh-prev-next a {
	color: var(--wpdh-text);
	font-weight: 700;
	text-decoration: none;
}

/* Shortcode helpers. */
.wpdh-note {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 12px;
	margin: 24px 0;
	padding: 18px 20px;
	border: 1px solid #bfdbfe;
	border-left: 4px solid #2563eb;
	border-radius: 14px;
	background: #eff6ff;
	color: var(--wpdh-text, #0f172a);
}

.wpdh-note-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: rgba(37, 99, 235, 0.12);
	color: #1d4ed8;
	font-weight: 800;
	line-height: 1;
}

.wpdh-note-title {
	display: block;
	margin: 0 0 6px;
}

.wpdh-note-body > :first-child {
	margin-top: 0;
}

.wpdh-note-body > :last-child {
	margin-bottom: 0;
}

.wpdh-note-warning {
	border-color: #fde68a;
	border-left-color: #d97706;
	background: #fffbeb;
}

.wpdh-note-warning .wpdh-note-icon {
	background: rgba(217, 119, 6, 0.12);
	color: #b45309;
}

.wpdh-note-danger {
	border-color: #fecaca;
	border-left-color: #dc2626;
	background: #fef2f2;
}

.wpdh-note-danger .wpdh-note-icon {
	background: rgba(220, 38, 38, 0.12);
	color: #b91c1c;
}

.wpdh-note-success {
	border-color: #bbf7d0;
	border-left-color: #16a34a;
	background: #f0fdf4;
}

.wpdh-note-success .wpdh-note-icon {
	background: rgba(22, 163, 74, 0.12);
	color: #15803d;
}

.wpdh-faq {
	margin: 16px 0;
	border: 1px solid var(--wpdh-border, #dbe2ea);
	border-radius: 14px;
	background: #fff;
	color: var(--wpdh-text, #0f172a);
	overflow: hidden;
}

.wpdh-faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 16px 18px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.wpdh-faq summary::-webkit-details-marker {
	display: none;
}

.wpdh-faq-icon {
	transition: transform 0.15s ease;
}

.wpdh-faq[open] .wpdh-faq-icon {
	transform: rotate(180deg);
}

.wpdh-faq-body {
	padding: 0 18px 18px;
	color: var(--wpdh-muted, #53627a);
}

.wpdh-faq-body > :first-child {
	margin-top: 0;
}

.wpdh-faq-body > :last-child {
	margin-bottom: 0;
}

.wpdh-content h2,
.wpdh-content h3,
.wpdh-content h4 {
	scroll-margin-top: 120px;
}

.wpdh-content pre.wpdh-code-ready {
	position: relative;
	padding-top: 54px;
}

.wpdh-copy-code {
	position: absolute;
	top: 12px;
	right: 12px;
	margin: 0;
	padding: 7px 11px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.wpdh-copy-code:hover,
.wpdh-copy-code:focus {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.wpdh-toc-list,
.wpdh-toc-list li {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.wpdh-toc-list li::before,
.wpdh-toc-list li::after {
	display: none !important;
	content: none !important;
}

.wpdh-toc-list a {
	display: block;
	padding: 7px 0;
	color: var(--wpdh-muted);
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
	border-left: 2px solid transparent;
}

.wpdh-toc-list a:hover,
.wpdh-toc-list a.is-active {
	color: var(--wpdh-brand);
	border-left-color: var(--wpdh-brand);
}

.wpdh-toc-level-3 a {
	padding-left: 14px;
	font-size: 13px;
}

.wpdh-toc-level-4 a {
	padding-left: 28px;
	font-size: 12px;
}

@media (max-width: 1024px) {
	.wpdh-header,
	.wpdh-doc-layout,
	.wpdh-doc-layout-category {
		grid-template-columns: 1fr;
	}

	.wpdh-header-nav,
	.wpdh-header-no-search .wpdh-header-nav {
		grid-column: auto;
		justify-content: flex-start;
	}

	.wpdh-header-search {
		max-width: none;
		justify-self: stretch;
	}

	.wpdh-sidebar,
	.wpdh-toc {
		position: static;
	}

	.wpdh-card-grid,
	.wpdh-home-article-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.wpdh-wrap {
		padding: 28px 16px;
	}

	.wpdh-card-grid,
	.wpdh-home-article-grid,
	.wpdh-prev-next {
		grid-template-columns: 1fr;
	}

	.wpdh-prev-next div:last-child {
		text-align: left;
	}
}

.wpdh-empty {
	margin-top: 24px;
	padding: 24px;
	border: 1px dashed var(--wpdh-border);
	border-radius: 18px;
	background: #fff;
	color: var(--wpdh-muted);
}

.wpdh-empty h1,
.wpdh-empty h2 {
	margin-top: 0;
	color: var(--wpdh-text);
	font-size: 24px;
}

.wpdh-empty p:last-child {
	margin-bottom: 0;
}

.wpdh-sidebar-empty {
	margin: 0;
	color: var(--wpdh-muted);
	font-size: 14px;
	line-height: 1.5;
}

.wpdh-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 8px;
	padding: 10px 14px;
	border-radius: 10px;
	background: var(--wpdh-brand);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.wpdh-button:hover,
.wpdh-button:focus {
	color: #fff;
	filter: brightness(0.95);
}

.wpdh-not-found {
	max-width: 720px;
	margin-right: auto;
	margin-left: auto;
}

@media (max-width: 782px) {
	.wpdh-header {
		gap: 16px;
		padding: 16px;
	}

	.wpdh-header-nav {
		flex-wrap: wrap;
		gap: 12px;
	}

	.wpdh-hero {
		padding: 52px 20px;
	}

	.wpdh-main h1 {
		font-size: clamp(32px, 11vw, 44px);
	}

	.wpdh-content {
		font-size: 16px;
	}

	.wpdh-content h2 {
		font-size: 26px;
	}

	.wpdh-content h3 {
		font-size: 22px;
	}

	.wpdh-home-articles,
	.wpdh-empty {
		padding: 20px;
	}

	.wpdh-search-results {
		max-height: 70vh;
		overflow-y: auto;
	}
}

@media (max-width: 480px) {
	.wpdh-wrap {
		padding-right: 12px;
		padding-left: 12px;
	}

	.wpdh-header,
	.wpdh-hero,
	.wpdh-sidebar,
	.wpdh-toc,
	.wpdh-home-articles,
	.wpdh-card,
	.wpdh-empty {
		border-radius: 14px;
	}

	.wpdh-search-large input[type="search"] {
		min-height: 52px;
		font-size: 15px;
	}
}


.wpdh-standalone-docs {
	margin: 0;
	background: #fff;
}

.wpdh-standalone-page {
	min-height: 100vh;
}

.wpdh-standalone-docs #wpadminbar {
	position: fixed;
}
