/* navody v /kb/ */

div#knowledgebase {
	font-size: 11pt;
	line-height: 1.5em;
	max-width: 980px;
	margin-right: auto;
	margin-left: auto;
	width: min(100%, 980px);
	margin-top: 10px;
	padding: 0 12px;
	box-sizing: border-box;
}

div#knowledgebase a {
	color: #c5476e;
}

.knowledgebase-search {
	margin-bottom: 1.5rem;
}

.knowledgebase-search .input-group {
	display: flex;
	align-items: stretch;
}

.knowledgebase-search-field {
	min-height: 46px;
	border: 1px solid #d9dfe7;
	border-right: 0;
	border-radius: 12px 0 0 12px;
	padding: 0.75rem 1rem;
	box-shadow: none;
}

.knowledgebase-search-field:focus {
	border-color: #9fc4b2;
	box-shadow: 0 0 0 0.2rem rgba(8, 129, 59, 0.12);
}

button[type=submit].knowledgebase-search-button {
	border: 0;
	background: #949494;
	color: #fff;
	font-size: 0.95rem;
	font-weight: bold;
	padding: 0.75rem 1.1rem;
	border-radius: 0 12px 12px 0;
	box-shadow: inset 0 -0.15rem 0 rgba(0, 0, 0, 0.2);
}

.knowledgebase-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
}

.knowledgebase-header h1 {
	margin: 0;
	line-height: 1.1;
}

div#knowledgebase a.knowledgebase-back-button {
	display: inline-block;
	border: 0;
	background: none repeat scroll 0 0 #D7D7D7;
	border-radius: 5px;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	color: #000;
	font-size: 0.85rem;
	font-weight: bold;
	padding: 7px 10px;
	cursor: pointer;
	line-height: 1.2;
	box-shadow: inset 0 -0.15rem 0 rgb(0 0 0 / 20%);
	text-decoration: none;
}

div#knowledgebase a.knowledgebase-back-button:hover,
div#knowledgebase a.knowledgebase-back-button:focus {
	color: #000;
	text-decoration: none;
}

.table-of-contents {
	float: right;
	width: min(280px, 100%);
	margin: 0 0 1.5rem 2rem;
	padding: 1.35rem 1.4rem 1.3rem;
	background: #ffffff;
	border: 1px solid #e1d8dc;
    border-radius: 18px;
    box-shadow: 0 14px 32px rgb(201 199 200 / 28%);
	list-style: none;
	counter-reset: toc;
}

.table-of-contents::before {
	content: "Obsah";
	display: block;
	margin: 0 0 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #C4145C;
}

/* top-level items — numbered pink badges */
.table-of-contents > li {
	list-style: none;
	counter-increment: toc;
}

.table-of-contents > li > a {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.3rem 0.25rem;
	border-radius: 10px;
	font-weight: 600;
	font-size: 0.94rem;
	line-height: 1.3;
	color: #241F2E;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.table-of-contents > li > a::before {
	content: counter(toc);
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #FBE2EC;
	color: #8C0E42;
	font-size: 0.72rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.table-of-contents > li > a:hover,
.table-of-contents > li > a:focus-visible {
	background: #FDF1F6;
	color: #8C0E42;
}

/* nested list — indented, thin pink guide line, no numbers */
.table-of-contents ol {
	list-style: none;
	padding-inline-start: 0;
	margin: 0.35rem 0 0.15rem 2.55rem;
	padding-left: 0.85rem;
	border-left: 2px solid #F3D3E2;
}

.table-of-contents ol li {
	list-style: none;
}

.table-of-contents ol li + li {
	margin-top: 0.1rem;
}

.table-of-contents ol a {
	display: block;
	padding: 0.2rem 0.5rem;
	border-radius: 8px;
	font-size: 0.85rem;
	color: #5B5560;
	text-decoration: none;
	transition: background .15s ease, color .15s ease;
}

.table-of-contents ol a:hover,
.table-of-contents ol a:focus-visible {
	background: #FDF1F6;
	color: #8C0E42;
}

/* optional: highlight the section currently scrolled/linked to */
.table-of-contents a:target,
.table-of-contents li:has(> a:target) > a {
	background: #FBE2EC;
	color: #8C0E42;
}

h1, h2, h3, h4, h5, h6 {
	clear: none;
	margin-bottom: 0.5em;
	margin-top: .5em;
	line-height: 1.15;
}

h2 {
	padding-bottom: 0.35rem;
	border-bottom: 1px solid #eceff3;
}

div#knowledgebase ul {
	padding-left: 1.2rem;
}

div#knowledgebase ul ul {
	margin-bottom: 0.3rem;
    padding-left: 1.1rem;
}

div#knowledgebase .kb-index .card {
	min-width: 280px;
	padding: 0;
	border: 1px solid #ebeef2;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 24px rgba(31, 41, 55, 0.05);
	margin-bottom: 1.5rem;
}
div#knowledgebase .kb-index .card:not(:has(> h3)){
	padding: 20px 5px 10px;
}
div#knowledgebase .kb-index .row > .col h3:first-child {
	margin-top: 0;
    background: #fdeef4;
    color: #8C0E42;
    border-radius: 12px 12px 0 0;
    padding: 10px 24px;
}
div#knowledgebase .kb-index .row > .col h3 {
    font-size: 18pt;
    margin-top: 0;
    background: #fdeef4;
    color: #8C0E42;
    padding: 10px 24px;
}
div#knowledgebase ul li a {
	display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.85rem;
    color: #c5476e;
	border-radius: 8px;
}
div#knowledgebase ul li a:hover {
    color: #8C0E42;
	background: #FDF1F6;
}

pre {
	background-color: #eee;
	border-radius: 0.5em;
	border: 1px solid #ccc;
	tab-size: 4;
}

div#knowledgebase a.heading-permalink {
	font-size: .8em;
	vertical-align: super;
	text-decoration: none;
	color: transparent;
}

div#knowledgebase h1:hover .heading-permalink,
div#knowledgebase h2:hover .heading-permalink,
div#knowledgebase h3:hover .heading-permalink,
div#knowledgebase h4:hover .heading-permalink,
div#knowledgebase h5:hover .heading-permalink,
div#knowledgebase h6:hover .heading-permalink,
div#knowledgebase .heading-permalink:hover {
	text-decoration: none;
	color: #aaa;
}

h1 {
	font-size: 28pt;
}
h2 {
	font-size: 24pt;
}
h3 {
	font-size: 20pt;
}
h4 {
	font-size: 18pt;
}
h5 {
	font-size: 16pt;
}
h6 {
	font-size: 14pt;
}

p:has(img) {
	text-align: center;
}
p > img{
	box-shadow: 2px 4px 12px #dfdfdf;
	max-width: 100%;
}
p > img.noshadow {
	box-shadow: unset;
}

@media (max-width: 767px) {
	div#knowledgebase {
		padding: 0 10px;
	}


	.knowledgebase-header {
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
	}

	.knowledgebase-back-button {
		width: 100%;
		text-align: center;
	}

	.table-of-contents {
		float: none;
		display: block;
		width: 100%;
		margin: 0 0 1rem 0;
		padding: 0.9rem 0.95rem 0.8rem 1.2rem;
	}

	h1 {
		font-size: 22pt;
	}

	h2 {
		font-size: 19pt;
	}

	div#knowledgebase .row > .col {
		padding: 1rem 1rem 1.1rem;
	}
}
