/* SANGO owns the Lab shell. This stylesheet aligns its editable archive and
   article content without replacing the theme's native card layout. */
.sgb-content-block__admin-link {
	display: none !important;
}

body.noasaba-lab-independent #container {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body.noasaba-lab-independent #content {
	flex: 1 0 auto;
}

body.noasaba-lab-independent.admin-bar #container {
	min-height: calc(100vh - 32px);
}

@media (max-width: 782px) {
	body.noasaba-lab-independent.admin-bar #container {
		min-height: calc(100vh - 46px);
	}
}

body.noasaba-lab-independent #archive_header {
	display: none;
}

body.noasaba-lab-independent .post-tab[hidden],
body.noasaba-lab-independent .post-tab__content[hidden] {
	display: none !important;
}

@media (max-width: 768px) {
	body.noasaba-lab-independent #container .wp-block-sgb-header-mobile-navigation {
		/* SANGO uses 100vw here; subtract the parent header's 16px side gutters
		   so desktop browser scrollbars do not create horizontal page overflow. */
		width: calc(100% + 32px) !important;
	}
}

@media (max-width: 360px) {
	body.noasaba-lab-independent #container .sgb-header__mobile-nav .wp-block-navigation__container {
		/* Keep the two independent-site links fully visible on narrow phones. */
		column-gap: 6px !important;
		padding-left: 8px !important;
		padding-right: 8px !important;
	}
}

body.noasaba-lab-independent .noasaba-lab-archive-heading {
	margin: 0 0 1.5rem;
	max-width: 100%;
}

body.noasaba-lab-independent .noasaba-lab-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
	list-style: none;
	margin: 0 0 .75rem;
	padding: 0;
}

body.noasaba-lab-independent .noasaba-lab-breadcrumb li {
	margin: 0;
}

body.noasaba-lab-independent .noasaba-lab-breadcrumb li + li::before {
	color: #858b94;
	content: "/";
	margin-right: .45rem;
}

body.noasaba-lab-independent .noasaba-lab-breadcrumb a {
	color: var(--sgb-main-color, #009ef3);
	text-decoration: none;
}

body.noasaba-lab-independent .noasaba-lab-breadcrumb a:hover,
body.noasaba-lab-independent .noasaba-lab-breadcrumb a:focus-visible {
	text-decoration: underline;
}

body.noasaba-lab-independent .noasaba-lab-archive-heading__title {
	font-size: clamp(1.5rem, 4vw, 2rem);
	line-height: 1.35;
	margin: 0 0 .5rem;
}

body.noasaba-lab-independent .noasaba-lab-archive-heading__description {
	color: #555d66;
	font-size: 1rem;
	line-height: 1.8;
}

body.noasaba-lab-independent .noasaba-lab-archive-heading__description p {
	margin: 0;
}

body.noasaba-lab-independent .noasaba-lab-category-filter {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 1rem;
}

body.noasaba-lab-independent .noasaba-lab-category-filter a {
	border: 1px solid var(--sgb-main-color, #009ef3);
	border-radius: 4px;
	color: var(--sgb-main-color, #009ef3);
	font-size: .9rem;
	line-height: 1.4;
	padding: .3rem .65rem;
	text-decoration: none;
}

body.noasaba-lab-independent .noasaba-lab-category-filter a:hover,
body.noasaba-lab-independent .noasaba-lab-category-filter a:focus-visible,
body.noasaba-lab-independent .noasaba-lab-category-filter a[aria-current="page"] {
	background: #006699;
	border-color: #006699;
	color: #fff;
}

/* Lab archive and article templates hide the sidebar and center the content
   within the full available width. */
@media (min-width: 769px) {
	body.noasaba-lab-independent.home,
	body.noasaba-lab-independent.archive,
	body.noasaba-lab-independent.single-post {
		background-image: none;
	}

	body.noasaba-lab-independent.home #inner-content,
	body.noasaba-lab-independent.archive #inner-content,
	body.noasaba-lab-independent.single-post #inner-content {
		flex-direction: row;
	}

	body.noasaba-lab-independent #container .sgb-header {
		margin-left: 0 !important;
	}

	body.noasaba-lab-independent #container .sgb-footer__menu {
		margin-left: 0 !important;
		width: 100% !important;
	}

	body.noasaba-lab-independent.home #main,
	body.noasaba-lab-independent.archive #main {
		box-sizing: border-box;
		margin-inline: auto;
		max-width: 1200px;
		width: 100%;
	}

	body.noasaba-lab-independent.single-post #main {
		box-sizing: border-box;
		flex: 1 1 100%;
		margin-inline: auto;
		max-width: 1040px;
		padding-right: 0;
		width: 100%;
	}

	body.noasaba-lab-independent.home #inner-content > .sidebar,
	body.noasaba-lab-independent.archive #inner-content > .sidebar,
	body.noasaba-lab-independent.single-post #inner-content > .sidebar {
		display: none;
	}

	body.noasaba-lab-independent.home #main,
	body.noasaba-lab-independent.archive #main {
		flex: 1 1 100%;
		padding-right: 0;
	}
}

/* Center a lone archive result without constraining the Lab home card. */
body.noasaba-lab-independent.archive #main .catpost-cards > .c_linkto_wrap:only-child {
	grid-column: 1 / -1;
	justify-self: center;
	width: 100%;
	max-width: 720px;
}

body.noasaba-lab-independent.archive #main .catpost-cards > .c_linkto_wrap:only-child > .c_linkto {
	flex: 1 1 auto;
	width: 100%;
}

body.noasaba-lab-independent #main .catpost-cards > .c_linkto_wrap:focus-within {
	outline: 3px solid var(--sgb-main-color, #009ef3);
	outline-offset: 3px;
}

body.noasaba-lab-independent .catpost-cards .c_linkto:focus-visible,
body.noasaba-lab-independent .catpost-cards .cat-name:focus-visible {
	outline: 3px solid var(--sgb-main-color, #009ef3);
	outline-offset: 3px;
}
