/**
 * MediaBlaster admin documentation UI.
 */

body.wpst-docs-admin-screen .wpst-docs-wrap {
	padding-left: 20px;
	padding-right: 20px;
}

.wpst-docs-wrap {
	--wpst-docs-accent: #2271b1;
	--wpst-docs-accent-soft: #f0f6fc;
	--wpst-docs-border: #dcdcde;
	--wpst-docs-surface: #fff;
	--wpst-docs-muted: #646970;
	--wpst-docs-text: #1d2327;
	--wpst-docs-radius: 8px;
	--wpst-docs-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
	max-width: 1280px;
	margin-top: 12px;
	color: var(--wpst-docs-text);
}

.wpst-docs-wrap .description {
	color: var(--wpst-docs-muted);
}

/* Hero (index) */

.wpst-docs-hero {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 20px;
	padding: 24px 28px;
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: linear-gradient(135deg, #fff 0%, var(--wpst-docs-accent-soft) 100%);
	box-shadow: var(--wpst-docs-shadow);
}

.wpst-docs-hero h1 {
	margin: 0 0 8px;
	padding: 0;
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.25;
}

.wpst-docs-hero p {
	margin: 0;
	max-width: 52rem;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wpst-docs-muted);
}

.wpst-docs-stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--wpst-docs-surface);
	border: 1px solid var(--wpst-docs-border);
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.wpst-docs-stat .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: var(--wpst-docs-accent);
}

/* Search toolbar */

.wpst-docs-toolbar {
	margin-bottom: 20px;
}

.wpst-docs-search {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 420px;
	padding: 0 14px;
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: var(--wpst-docs-surface);
	box-shadow: var(--wpst-docs-shadow);
}

.wpst-docs-search:focus-within {
	border-color: var(--wpst-docs-accent);
	box-shadow: 0 0 0 1px var(--wpst-docs-accent);
}

.wpst-docs-search .dashicons {
	color: var(--wpst-docs-muted);
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.wpst-docs-search input {
	flex: 1;
	width: 100%;
	margin: 0;
	padding: 11px 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 14px;
}

.wpst-docs-search input:focus {
	outline: none;
	box-shadow: none;
}

/* Section cards (index) */

.wpst-docs-sections {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr));
	gap: 20px;
}

.wpst-docs-section-card {
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: var(--wpst-docs-surface);
	box-shadow: var(--wpst-docs-shadow);
	overflow: hidden;
}

.wpst-docs-section-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--wpst-docs-border);
	background: #f6f7f7;
}

.wpst-docs-section-card__header h2 {
	margin: 0;
	padding: 0;
	font-size: 15px;
	font-weight: 600;
}

.wpst-docs-section-card__count {
	font-size: 12px;
	color: var(--wpst-docs-muted);
}

.wpst-docs-guide-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpst-docs-guide-item {
	display: flex;
	align-items: stretch;
	border-top: 1px solid #f0f0f1;
}

.wpst-docs-guide-item:first-child {
	border-top: 0;
}

.wpst-docs-guide-item__link {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	text-decoration: none;
	color: inherit;
	transition: background 0.15s ease;
}

.wpst-docs-guide-item__link:hover,
.wpst-docs-guide-item__link:focus {
	background: var(--wpst-docs-accent-soft);
	color: inherit;
}

.wpst-docs-guide-item__link:hover .wpst-docs-guide-item__title,
.wpst-docs-guide-item__link:focus .wpst-docs-guide-item__title {
	color: var(--wpst-docs-accent);
}

.wpst-docs-guide-item__icon {
	flex-shrink: 0;
	color: var(--wpst-docs-accent);
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.wpst-docs-guide-item__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.wpst-docs-guide-item__title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.wpst-docs-guide-item__summary {
	font-size: 13px;
	line-height: 1.45;
	color: var(--wpst-docs-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wpst-docs-guide-item__arrow {
	flex-shrink: 0;
	color: #c3c4c7;
	transition: transform 0.15s ease, color 0.15s ease;
}

.wpst-docs-guide-item__link:hover .wpst-docs-guide-item__arrow,
.wpst-docs-guide-item__link:focus .wpst-docs-guide-item__arrow {
	color: var(--wpst-docs-accent);
	transform: translateX(2px);
}

.wpst-docs-guide-item__settings {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	flex-shrink: 0;
	border-left: 1px solid #f0f0f1;
	color: var(--wpst-docs-muted);
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.wpst-docs-guide-item__settings:hover,
.wpst-docs-guide-item__settings:focus {
	background: #f6f7f7;
	color: var(--wpst-docs-accent);
}

.wpst-docs-no-results {
	margin-top: 16px;
	padding: 16px 18px;
	border: 1px dashed var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: #f6f7f7;
	color: var(--wpst-docs-muted);
	text-align: center;
}

/* Badges */

.wpst-docs-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--wpst-docs-accent-soft);
	color: var(--wpst-docs-accent);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

.wpst-docs-badge--muted {
	background: #f0f0f1;
	color: var(--wpst-docs-muted);
}

/* Breadcrumb */

.wpst-docs-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 16px;
	font-size: 13px;
	color: var(--wpst-docs-muted);
}

.wpst-docs-breadcrumb a {
	color: var(--wpst-docs-accent);
	text-decoration: none;
}

.wpst-docs-breadcrumb a:hover,
.wpst-docs-breadcrumb a:focus {
	text-decoration: underline;
}

.wpst-docs-breadcrumb__sep {
	opacity: 0.55;
}

.wpst-docs-breadcrumb__current {
	color: var(--wpst-docs-text);
	font-weight: 500;
}

/* Article layout */

.wpst-docs-layout {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.wpst-docs-sidebar {
	position: sticky;
	top: 32px;
}

.wpst-docs-sidebar__inner {
	max-height: calc(100vh - 64px);
	overflow: auto;
	padding: 16px;
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: var(--wpst-docs-surface);
	box-shadow: var(--wpst-docs-shadow);
}

.wpst-docs-sidebar__label {
	margin: 0 0 12px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wpst-docs-muted);
}

.wpst-docs-sidebar__group + .wpst-docs-sidebar__group {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #f0f0f1;
}

.wpst-docs-sidebar__group-title {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--wpst-docs-text);
}

.wpst-docs-sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.wpst-docs-sidebar li + li {
	margin-top: 2px;
}

.wpst-docs-sidebar a {
	display: block;
	padding: 8px 10px;
	border-radius: 6px;
	text-decoration: none;
	color: var(--wpst-docs-text);
	transition: background 0.15s ease, color 0.15s ease;
}

.wpst-docs-sidebar a:hover,
.wpst-docs-sidebar a:focus {
	background: var(--wpst-docs-accent-soft);
	color: var(--wpst-docs-accent);
}

.wpst-docs-sidebar a.is-current {
	background: var(--wpst-docs-accent);
	color: #fff;
}

.wpst-docs-sidebar a.is-current .wpst-docs-sidebar__link-tab {
	color: rgba(255, 255, 255, 0.82);
}

.wpst-docs-sidebar__link-title {
	display: block;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
}

.wpst-docs-sidebar__link-tab {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	color: var(--wpst-docs-muted);
	line-height: 1.3;
}

.wpst-docs-main--solo {
	max-width: 720px;
}

.wpst-docs-article-header {
	margin-bottom: 20px;
	padding: 24px 28px;
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: var(--wpst-docs-surface);
	box-shadow: var(--wpst-docs-shadow);
}

.wpst-docs-article-header__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.wpst-docs-article-header h1 {
	margin: 0 0 10px;
	padding: 0;
	font-size: 1.65rem;
	font-weight: 600;
	line-height: 1.25;
}

.wpst-docs-article-lead {
	margin: 0 0 16px;
	max-width: 48rem;
	font-size: 15px;
	line-height: 1.6;
	color: var(--wpst-docs-muted);
}

.wpst-docs-article-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpst-docs-article-actions .button-primary {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wpst-docs-article-actions .button-primary .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-top: 0;
}

/* Prose content */

.wpst-docs-content {
	padding: 28px 32px;
	border: 1px solid var(--wpst-docs-border);
	border-radius: var(--wpst-docs-radius);
	background: var(--wpst-docs-surface);
	box-shadow: var(--wpst-docs-shadow);
}

.wpst-docs-prose {
	max-width: none;
	font-size: 15px;
	line-height: 1.7;
}

.wpst-docs-prose > :first-child {
	margin-top: 0;
}

.wpst-docs-prose h2,
.wpst-docs-prose h3,
.wpst-docs-prose h4 {
	margin-top: 1.75em;
	margin-bottom: 0.65em;
	line-height: 1.3;
	color: var(--wpst-docs-text);
	scroll-margin-top: 48px;
}

.wpst-docs-prose h2 {
	padding-bottom: 0.35em;
	border-bottom: 1px solid #f0f0f1;
	font-size: 1.25rem;
}

.wpst-docs-prose h3 {
	font-size: 1.05rem;
}

.wpst-docs-prose h4 {
	font-size: 0.95rem;
}

.wpst-docs-prose p {
	margin: 0 0 1em;
}

.wpst-docs-prose ul,
.wpst-docs-prose ol {
	margin: 0 0 1.15em 1.35em;
	padding: 0;
}

.wpst-docs-prose li {
	margin-bottom: 0.45em;
}

.wpst-docs-prose li > ul,
.wpst-docs-prose li > ol {
	margin-top: 0.45em;
}

.wpst-docs-prose a {
	color: var(--wpst-docs-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wpst-docs-prose a:hover,
.wpst-docs-prose a:focus {
	color: #135e96;
}

.wpst-docs-prose code {
	padding: 2px 6px;
	border-radius: 4px;
	background: #f6f7f7;
	border: 1px solid #ececec;
	font-size: 0.9em;
}

.wpst-docs-prose pre {
	margin: 0 0 1.25em;
	padding: 14px 16px;
	overflow-x: auto;
	border: 1px solid var(--wpst-docs-border);
	border-radius: 6px;
	background: #f6f7f7;
	font-size: 13px;
	line-height: 1.55;
}

.wpst-docs-prose pre code {
	padding: 0;
	border: 0;
	background: transparent;
	font-size: inherit;
}

.wpst-docs-prose table {
	width: 100%;
	margin: 0 0 1.25em;
	border-collapse: collapse;
	font-size: 14px;
}

.wpst-docs-prose th,
.wpst-docs-prose td {
	padding: 10px 12px;
	border: 1px solid var(--wpst-docs-border);
	text-align: left;
	vertical-align: top;
}

.wpst-docs-prose th {
	background: #f6f7f7;
	font-weight: 600;
}

.wpst-docs-prose tr:nth-child(even) td {
	background: #fcfcfc;
}

.wpst-docs-prose blockquote {
	margin: 0 0 1.15em;
	padding: 12px 16px;
	border-left: 4px solid var(--wpst-docs-accent);
	border-radius: 0 6px 6px 0;
	background: var(--wpst-docs-accent-soft);
	color: var(--wpst-docs-text);
}

.wpst-docs-prose blockquote p:last-child {
	margin-bottom: 0;
}

.wpst-docs-prose hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--wpst-docs-border);
}

.wpst-docs-prose strong {
	font-weight: 600;
}

/* Responsive */

@media screen and (max-width: 960px) {
	.wpst-docs-layout {
		grid-template-columns: 1fr;
	}

	.wpst-docs-sidebar {
		position: static;
	}

	.wpst-docs-sidebar__inner {
		max-height: none;
	}

	.wpst-docs-hero {
		flex-direction: column;
	}
}

@media screen and (max-width: 782px) {
	.wpst-docs-wrap {
		margin-top: 0;
	}

	.wpst-docs-hero,
	.wpst-docs-article-header,
	.wpst-docs-content {
		padding-left: 18px;
		padding-right: 18px;
	}

	.wpst-docs-sections {
		grid-template-columns: 1fr;
	}

	.wpst-docs-guide-item__summary {
		-webkit-line-clamp: 3;
	}
}
