/*
 * Main stylesheet for Lintian SSG generated website
 *
 * SPDX-FileCopyrightText: 2024 Nicolas Peugnet <nicolas@club1.fr>
 * SPDX-License-Identifier: GPL-2.0-or-later
 */

/* Global layout */
html, body {
	height: 100%;
}
body {
	display: flex;
	flex-direction: column;
}

div#content {
	max-width: 700px;
	padding: 0 2%;
}

div#spacer {
	flex-grow: 1; /* Allows the footer to stay to the bottom */
}

/* Search boxes */
#searchbox {
	width: 80%;
	max-width: 350px;
	text-align: right;
}

.searchbox-form {
	display: none; /* The searchbox are broken without JS, so they are hidden by default */
}

.searchbox-form input[type="search"] {
	max-width: 400px;
	width: calc(100% - 60px);
}

/* Basic elements */
a {
	outline: revert; /* Add back the outline of links, removed by debian.css */
}

code {
	font-size: 1.1em
}

pre {
	border: 1px solid #DFDFE0;
	padding: 1em;
	background-color: #F5F6F7;
}

menu {
	padding-left: 0;
}
menu > li {
	list-style: none;
}

/* Colored tags header */
h1 > code {
	padding: .15em .25em;
	line-height: 1.5em;
	background-color: var(--bg-color)
}

code.error {
	--bg-color: #FF7741;
}
code.warning {
	--bg-color: #FFEB44;
}
code.info {
	--bg-color: #AAB2FF;
}
code.pedantic {
	--bg-color: #BCEA3C;
}
code.classification {
	--bg-color: #D0D0D0;
}
code.experimental {
	background: repeating-linear-gradient(-45deg, #00000020, #00000020 10px, #0000 10px, #0000 20px ), var(--bg-color)
}

/* Compact see also list */
#see-also p {
	margin: 0;
}

/* Lintian User's Manual specific styles */
#lintian-user-s-manual {
	/* Invert link hover styles for table of contents and headers */
	h1, h2, h3, .contents {
		a {
			text-decoration: none;
		}
		a:hover {
			text-decoration: underline;
		}
	}
	/* Justify text */
	p, dd, li {
		hyphens: auto; /* to prevent overlong whitespaces when justifying */
		text-align: justify;
	}
}
